libobs, UI: Add true peak measurements

Add a new algorithm to calculate the true-peak. It implements the
Whittaker- Shannon interpolation from four samples to create 4
intermediate samples (5 x oversampling) inbetween the middle two
samples.

With 4 samples and 4 intermediate samples the algorithm can be
implemented as a 4x4 vector-matrix cross product, which is ideal for
SSE.

I've also replaced the sample-peak algorithm using SSE as well to
improve performance.

Closes obsproject/obs-studio#1189
This commit is contained in:
Tjienta Vara
2018-01-19 22:57:36 +01:00
committed by jp9000
parent dcbad4af89
commit b0f94afaf2
9 changed files with 417 additions and 45 deletions

View File

@@ -3362,7 +3362,7 @@
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<item row="9" column="0" colspan="2">
<widget class="QScrollArea" name="audioSourceScrollArea">
<property name="widgetResizable">
<bool>true</bool>
@@ -3379,7 +3379,7 @@
</widget>
</widget>
</item>
<item row="9" column="1">
<item row="10" column="1">
<widget class="QLabel" name="audioMsg">
<property name="styleSheet">
<string notr="true">color: rgb(255, 0, 4);</string>
@@ -3392,7 +3392,7 @@
</property>
</widget>
</item>
<item row="10" column="1">
<item row="11" column="1">
<widget class="QLabel" name="audioMsg_2">
<property name="text">
<string notr="true"/>
@@ -3440,6 +3440,30 @@
</item>
</widget>
</item>
<item row="8" column="1">
<widget class="QComboBox" name="peakMeterType">
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Basic.Settings.Audio.PeakMeterType.SamplePeak</string>
</property>
</item>
<item>
<property name="text">
<string>Basic.Settings.Audio.PeakMeterType.TruePeak</string>
</property>
</item>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_66">
<property name="text">
<string>Basic.Settings.Audio.PeakMeterType</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="videoPage">
@@ -3744,8 +3768,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>98</width>
<height>28</height>
<width>818</width>
<height>697</height>
</rect>
</property>
<layout class="QFormLayout" name="hotkeyLayout">
@@ -3791,7 +3815,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>593</width>
<width>803</width>
<height>761</height>
</rect>
</property>