mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into yellow
This commit is contained in:
commit
1ae06f01b0
6 changed files with 275 additions and 17 deletions
|
@ -94,6 +94,7 @@ Item {
|
|||
text: MyAvatar.sessionDisplayName === "" ? MyAvatar.displayName : MyAvatar.sessionDisplayName
|
||||
maximumLength: 256
|
||||
clip: true
|
||||
selectByMouse: true
|
||||
anchors.fill: parent
|
||||
onEditingFinished: {
|
||||
if (MyAvatar.displayName !== text) {
|
||||
|
|
|
@ -17,6 +17,7 @@ import "./audio" as AudioSettings
|
|||
import "./general" as GeneralSettings
|
||||
import "./vr" as VrSettings
|
||||
import "./dev" as DevSettings
|
||||
import "./about" as AboutSettings
|
||||
|
||||
Rectangle {
|
||||
property string activeTabView: "generalTabView"
|
||||
|
@ -76,6 +77,10 @@ Rectangle {
|
|||
tabTitle: "VR"
|
||||
tabViewName: "vrTabView"
|
||||
}
|
||||
ListElement {
|
||||
tabTitle: "About"
|
||||
tabViewName: "aboutTabView"
|
||||
}
|
||||
ListElement {
|
||||
tabTitle: "Dev"
|
||||
tabViewName: "devTabView"
|
||||
|
@ -103,7 +108,7 @@ Rectangle {
|
|||
delegate: Item {
|
||||
visible: model.tabTitle !== "Dev" || (model.tabTitle === "Dev" && root.developerModeEnabled)
|
||||
|
||||
width: tabTitleText.paintedWidth + 64
|
||||
width: tabTitleText.paintedWidth + 32
|
||||
height: parent.height
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
|
@ -163,6 +168,12 @@ Rectangle {
|
|||
anchors.fill: parent
|
||||
}
|
||||
|
||||
AboutSettings.About {
|
||||
id: aboutTabViewContainer
|
||||
visible: activeTabView === "aboutTabView"
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
SimplifiedControls.VerticalScrollBar {
|
||||
parent: {
|
||||
if (activeTabView === "generalTabView") {
|
||||
|
@ -173,6 +184,8 @@ Rectangle {
|
|||
vrTabViewContainer
|
||||
} else if (activeTabView === "devTabView") {
|
||||
devTabViewContainer
|
||||
} else if (activeTabView === "aboutTabView") {
|
||||
aboutTabViewContainer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,218 @@
|
|||
//
|
||||
// About.qml
|
||||
//
|
||||
// Created by Zach Fox on 2019-06-18
|
||||
// Copyright 2019 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
import QtQuick 2.10
|
||||
import QtQuick.Controls 2.3
|
||||
import "../../simplifiedConstants" as SimplifiedConstants
|
||||
import "../../simplifiedControls" as SimplifiedControls
|
||||
import stylesUit 1.0 as HifiStylesUit
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
Flickable {
|
||||
id: root
|
||||
contentWidth: parent.width
|
||||
contentHeight: aboutColumnLayout.height
|
||||
clip: true
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
root.contentX = 0;
|
||||
root.contentY = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SimplifiedConstants.SimplifiedConstants {
|
||||
id: simplifiedUI
|
||||
}
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
id: aboutColumnLayout
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 26
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 26
|
||||
anchors.top: parent.top
|
||||
spacing: 0
|
||||
|
||||
Image {
|
||||
source: "images/logo.png"
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.topMargin: 16
|
||||
Layout.preferredWidth: 200
|
||||
Layout.preferredHeight: 150
|
||||
fillMode: Image.PreserveAspectFit
|
||||
mipmap: true
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: platformInfoContainer
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.bottomMargin: 24
|
||||
spacing: 0
|
||||
|
||||
HifiStylesUit.GraphikSemiBold {
|
||||
text: "Version " + Window.checkVersion()
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikSemiBold {
|
||||
text: "Platform Info"
|
||||
Layout.maximumWidth: parent.width
|
||||
Layout.topMargin: 8
|
||||
Layout.bottomMargin: 8
|
||||
height: paintedHeight
|
||||
size: 22
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>Computer Vendor/Model:</b>"
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
Component.onCompleted: {
|
||||
var computer = JSON.parse(PlatformInfo.getComputer());
|
||||
var computerVendor = computer.vendor;
|
||||
if (computerVendor.length === 0) {
|
||||
computerVendor = "Unknown";
|
||||
}
|
||||
var computerModel = computer.model;
|
||||
if (computerModel.length === 0) {
|
||||
computerModel = "Unknown";
|
||||
}
|
||||
|
||||
text = "<b>Computer Vendor/Model:</b> " + computerVendor + "/" + computerModel;
|
||||
}
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>Profiled Platform Tier:</b> " + PlatformInfo.getTierProfiled()
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>OS Type:</b> " + PlatformInfo.getOperatingSystemType()
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>CPU:</b> " + PlatformInfo.getCPUBrand()
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b># CPUs:</b> " + PlatformInfo.getNumCPUs()
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b># CPU Cores:</b> " + PlatformInfo.getNumLogicalCores()
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>RAM:</b> " + PlatformInfo.getTotalSystemMemoryMB() + " MB"
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>GPU:</b> " + PlatformInfo.getGraphicsCardType()
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>VR Hand Controllers:</b> " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None"))
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
SimplifiedControls.Button {
|
||||
Layout.topMargin: 8
|
||||
width: 200
|
||||
height: 32
|
||||
text: "Copy to Clipboard"
|
||||
|
||||
onClicked: {
|
||||
Window.copyToClipboard(root.buildPlatformInfoTextToCopy());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function buildPlatformInfoTextToCopy() {
|
||||
var textToCopy = "**About Interface**\n";
|
||||
textToCopy += "Interface Version: " + Window.checkVersion() + "\n";
|
||||
textToCopy += "\n**Platform Info**\n";
|
||||
|
||||
var computer = JSON.parse(PlatformInfo.getComputer());
|
||||
var computerVendor = computer.vendor;
|
||||
if (computerVendor.length === 0) {
|
||||
computerVendor = "Unknown";
|
||||
}
|
||||
var computerModel = computer.model;
|
||||
if (computerModel.length === 0) {
|
||||
computerModel = "Unknown";
|
||||
}
|
||||
|
||||
textToCopy += "Computer Vendor/Model: " + computerVendor + "/" + computerModel + "\n";
|
||||
textToCopy += "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + "\n";
|
||||
textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n";
|
||||
textToCopy += "CPU: " + PlatformInfo.getCPUBrand() + "\n";
|
||||
textToCopy += "# CPUs: " + PlatformInfo.getNumCPUs() + "\n";
|
||||
textToCopy += "# CPU Cores: " + PlatformInfo.getNumLogicalCores() + "\n";
|
||||
textToCopy += "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB\n";
|
||||
textToCopy += "GPU: " + PlatformInfo.getGraphicsCardType() + "\n";
|
||||
textToCopy += "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None"));
|
||||
|
||||
return textToCopy;
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
|
@ -35,16 +35,6 @@ static const double SQRT2 = 1.41421356237309504880;
|
|||
static const double FIXQ31 = 2147483648.0;
|
||||
static const double FIXQ32 = 4294967296.0;
|
||||
|
||||
// Round an integer to the next power-of-two, at compile time.
|
||||
// VS2013 does not support constexpr so macros are used instead.
|
||||
#define SETBITS0(x) (x)
|
||||
#define SETBITS1(x) (SETBITS0(x) | (SETBITS0(x) >> 1))
|
||||
#define SETBITS2(x) (SETBITS1(x) | (SETBITS1(x) >> 2))
|
||||
#define SETBITS3(x) (SETBITS2(x) | (SETBITS2(x) >> 4))
|
||||
#define SETBITS4(x) (SETBITS3(x) | (SETBITS3(x) >> 8))
|
||||
#define SETBITS5(x) (SETBITS4(x) | (SETBITS4(x) >> 16))
|
||||
#define NEXTPOW2(x) (SETBITS5((x) - 1) + 1)
|
||||
|
||||
//
|
||||
// Allpass delay modulation
|
||||
//
|
||||
|
@ -111,6 +101,18 @@ static const int M_AP19 = 113;
|
|||
static const int M_AP20 = 107;
|
||||
static const int M_AP21 = 127;
|
||||
|
||||
// Round an integer to the next power-of-two, at compile time
|
||||
constexpr uint32_t NEXTPOW2(uint32_t n) {
|
||||
n -= 1;
|
||||
n |= (n >> 1);
|
||||
n |= (n >> 2);
|
||||
n |= (n >> 4);
|
||||
n |= (n >> 8);
|
||||
n |= (n >> 16);
|
||||
n += 1;
|
||||
return n;
|
||||
}
|
||||
|
||||
//
|
||||
// Filter design tools using analog-matched response.
|
||||
// All filter types approximate the s-plane response, including cutoff > Nyquist.
|
||||
|
@ -1796,6 +1798,18 @@ void AudioReverb::render(float** inputs, float** outputs, int numFrames) {
|
|||
|
||||
#include <emmintrin.h>
|
||||
|
||||
// unaligned load/store without undefined behavior
|
||||
static inline __m128i mm_loadu_si32(void const* mem_addr) {
|
||||
int32_t temp;
|
||||
memcpy(&temp, mem_addr, sizeof(int32_t));
|
||||
return _mm_cvtsi32_si128(temp);
|
||||
}
|
||||
|
||||
static inline void mm_storeu_si32(void* mem_addr, __m128i a) {
|
||||
int32_t temp = _mm_cvtsi128_si32(a);
|
||||
memcpy(mem_addr, &temp, sizeof(int32_t));
|
||||
}
|
||||
|
||||
// convert int16_t to float, deinterleave stereo
|
||||
void AudioReverb::convertInput(const int16_t* input, float** outputs, int numFrames) {
|
||||
__m128 scale = _mm_set1_ps(1/32768.0f);
|
||||
|
@ -1816,7 +1830,7 @@ void AudioReverb::convertInput(const int16_t* input, float** outputs, int numFra
|
|||
_mm_storeu_ps(&outputs[1][i], f1);
|
||||
}
|
||||
for (; i < numFrames; i++) {
|
||||
__m128i a0 = _mm_cvtsi32_si128(*(int32_t*)&input[2*i]);
|
||||
__m128i a0 = mm_loadu_si32((__m128i*)&input[2*i]);
|
||||
__m128i a1 = a0;
|
||||
|
||||
// deinterleave and sign-extend
|
||||
|
@ -1887,7 +1901,7 @@ void AudioReverb::convertOutput(float** inputs, int16_t* output, int numFrames)
|
|||
|
||||
// interleave
|
||||
a0 = _mm_unpacklo_epi16(a0, a1);
|
||||
*(int32_t*)&output[2*i] = _mm_cvtsi128_si32(a0);
|
||||
mm_storeu_si32((__m128i*)&output[2*i], a0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -793,6 +793,18 @@ int AudioSRC::multirateFilter4(const float* input0, const float* input1, const f
|
|||
|
||||
#include <emmintrin.h> // SSE2
|
||||
|
||||
// unaligned load/store without undefined behavior
|
||||
static inline __m128i mm_loadu_si32(void const* mem_addr) {
|
||||
int32_t temp;
|
||||
memcpy(&temp, mem_addr, sizeof(int32_t));
|
||||
return _mm_cvtsi32_si128(temp);
|
||||
}
|
||||
|
||||
static inline void mm_storeu_si32(void* mem_addr, __m128i a) {
|
||||
int32_t temp = _mm_cvtsi128_si32(a);
|
||||
memcpy(mem_addr, &temp, sizeof(int32_t));
|
||||
}
|
||||
|
||||
// convert int16_t to float, deinterleave stereo
|
||||
void AudioSRC::convertInput(const int16_t* input, float** outputs, int numFrames) {
|
||||
__m128 scale = _mm_set1_ps(1/32768.0f);
|
||||
|
@ -839,7 +851,7 @@ void AudioSRC::convertInput(const int16_t* input, float** outputs, int numFrames
|
|||
_mm_storeu_ps(&outputs[1][i], f1);
|
||||
}
|
||||
for (; i < numFrames; i++) {
|
||||
__m128i a0 = _mm_cvtsi32_si128(*(int32_t*)&input[2*i]);
|
||||
__m128i a0 = mm_loadu_si32((__m128i*)&input[2*i]);
|
||||
__m128i a1 = a0;
|
||||
|
||||
// deinterleave and sign-extend
|
||||
|
@ -878,9 +890,9 @@ void AudioSRC::convertInput(const int16_t* input, float** outputs, int numFrames
|
|||
_mm_storeu_ps(&outputs[3][i], _mm_shuffle_ps(f1, f3, _MM_SHUFFLE(3,1,3,1)));
|
||||
}
|
||||
for (; i < numFrames; i++) {
|
||||
__m128i a0 = _mm_cvtsi32_si128(*(int32_t*)&input[4*i+0]);
|
||||
__m128i a0 = mm_loadu_si32((__m128i*)&input[4*i+0]);
|
||||
__m128i a1 = a0;
|
||||
__m128i a2 = _mm_cvtsi32_si128(*(int32_t*)&input[4*i+2]);
|
||||
__m128i a2 = mm_loadu_si32((__m128i*)&input[4*i+2]);
|
||||
__m128i a3 = a2;
|
||||
|
||||
// deinterleave and sign-extend
|
||||
|
@ -986,7 +998,7 @@ void AudioSRC::convertOutput(float** inputs, int16_t* output, int numFrames) {
|
|||
|
||||
// interleave
|
||||
a0 = _mm_unpacklo_epi16(a0, a1);
|
||||
*(int32_t*)&output[2*i] = _mm_cvtsi128_si32(a0);
|
||||
mm_storeu_si32((__m128i*)&output[2*i], a0);
|
||||
}
|
||||
|
||||
} else if (_numChannels == 4) {
|
||||
|
|
Loading…
Reference in a new issue