summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-17 08:51:49 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-17 08:51:49 +0200
commit882aaf5b1fda7b216051b55e268de78fd5126f42 (patch)
treeccb3f6f6299a5d1c603e6b73d3892f635bb96a8e /media
parent8ee235ca5df26f39ca3066935bef90c4d28dd61a (diff)
parentd118d486a680ed42030b1bdee263a29831da3e86 (diff)
downloadUXP-882aaf5b1fda7b216051b55e268de78fd5126f42.tar
UXP-882aaf5b1fda7b216051b55e268de78fd5126f42.tar.gz
UXP-882aaf5b1fda7b216051b55e268de78fd5126f42.tar.lz
UXP-882aaf5b1fda7b216051b55e268de78fd5126f42.tar.xz
UXP-882aaf5b1fda7b216051b55e268de78fd5126f42.zip
Merge branch 'master' into Pale_Moon-release
# Conflicts: # application/palemoon/config/version.txt # js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h # toolkit/components/search/orginal/nsSearchService.js
Diffstat (limited to 'media')
-rw-r--r--media/ffvpx/README_MCP7
-rw-r--r--media/libvpx/bug1480092.patch36
-rwxr-xr-xmedia/libvpx/update.py2
-rw-r--r--media/libvpx/vp8/common/postproc.c2
-rwxr-xr-xmedia/webrtc/signaling/src/media-conduit/AudioConduit.cpp9
-rw-r--r--media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp8
-rw-r--r--media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp109
-rw-r--r--media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp16
8 files changed, 44 insertions, 145 deletions
diff --git a/media/ffvpx/README_MCP b/media/ffvpx/README_MCP
index 4555e08da..5ed4d8d94 100644
--- a/media/ffvpx/README_MCP
+++ b/media/ffvpx/README_MCP
@@ -7,10 +7,6 @@ Currently, we only use the vp8 and vp9 portion of the library, and only on x86
based platforms. If this changes, configuration files will most likely
need to be updated.
-AVX2 must be disabled on Linux 32 bits due to the use of yasm 1.1 on the build bots.
-Once yasm is upgraded to 1.2 or later, AVX2 code could be re-enabled.
-Add --disable-avx2 to configure on those platforms.
-
configuration files were generated as follow using the configure script:
./configure --disable-everything --disable-protocols --disable-demuxers --disable-muxers --disable-filters --disable-programs --disable-doc --disable-parsers --enable-parser=vp8 --enable-parser=vp9 --enable-decoder=vp8 --enable-decoder=vp9 --disable-static --enable-shared --disable-debug --disable-sdl2 --disable-libxcb --disable-securetransport --disable-iconv --disable-swresample --disable-swscale --disable-avdevice --disable-avfilter --disable-avformat --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --disable-videotoolbox --enable-decoder=flac --enable-asm --enable-x86asm
@@ -18,13 +14,12 @@ config*:
replace: /HAVE_(MALLOC_H|ARC4RANDOM|LOCALTIME_R|MEMALIGN|POSIX_MEMALIGN)/d
config_darwin32.h:
-add to configure command: --disable-asm --disable-yasm --cc='clang -m32'
+add to configure command: --disable-asm --disable-x86asm --cc='clang -m32'
config_unix32.h:
add to configure command: --disable-asm --disable-x86asm --cc='clang -m32'
replace: s/HAVE_SYSCTL 1/HAVE_SYSCTL 0/ and s/HAVE_MEMALIGN 1/HAVE_MEMALIGN 0/ and s/HAVE_POSIX_MEMALIGN 1/HAVE_POSIX_MEMALIGN 0/
-
config_unix32.h/config_unix64.h/config_unix64.asm:
replace: s/HAVE_SYSCTL 1/HAVE_SYSCTL 0
diff --git a/media/libvpx/bug1480092.patch b/media/libvpx/bug1480092.patch
new file mode 100644
index 000000000..ae774bb20
--- /dev/null
+++ b/media/libvpx/bug1480092.patch
@@ -0,0 +1,36 @@
+From f00fe25d7eb13ceafbea6a6987d45fdef64cffb3 Mon Sep 17 00:00:00 2001
+From: Pale Moon <git-repo@palemoon.org>
+Date: Tue, 11 Sep 2018 08:58:16 +0200
+Subject: [PATCH] Cherry-pick libvpx upstream
+ 52add5896661d186dec284ed646a4b33b607d2c7.
+
+---
+ media/libvpx/vp8/common/postproc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/media/libvpx/vp8/common/postproc.c b/media/libvpx/vp8/common/postproc.c
+index a4e6ae170..3b05bc63e 100644
+--- a/media/libvpx/vp8/common/postproc.c
++++ b/media/libvpx/vp8/common/postproc.c
+@@ -325,17 +325,17 @@ void vp8_deblock(VP8_COMMON *cm,
+ YV12_BUFFER_CONFIG *post,
+ int q,
+ int low_var_thresh,
+ int flag)
+ {
+ double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
+ int ppl = (int)(level + .5);
+
+- const MODE_INFO *mode_info_context = cm->show_frame_mi;
++ const MODE_INFO *mode_info_context = cm->mi;
+ int mbr, mbc;
+
+ /* The pixel thresholds are adjusted according to if or not the macroblock
+ * is a skipped block. */
+ unsigned char *ylimits = cm->pp_limits_buffer;
+ unsigned char *uvlimits = cm->pp_limits_buffer + 16 * cm->mb_cols;
+ (void) low_var_thresh;
+ (void) flag;
+--
+2.16.1.windows.4
+
diff --git a/media/libvpx/update.py b/media/libvpx/update.py
index 85eed5872..1e9d9b478 100755
--- a/media/libvpx/update.py
+++ b/media/libvpx/update.py
@@ -608,6 +608,8 @@ def apply_patches():
os.system("patch -p3 < input_frame_validation.patch")
# Bug 1315288 - Check input frame resolution for vp9
os.system("patch -p3 < input_frame_validation_vp9.patch")
+ # Cherrypick fix from upstream
+ os.system("patch -p3 < bug1480092.patch")
def update_readme(commit):
with open('README_MOZILLA') as f:
diff --git a/media/libvpx/vp8/common/postproc.c b/media/libvpx/vp8/common/postproc.c
index a4e6ae170..3b05bc63e 100644
--- a/media/libvpx/vp8/common/postproc.c
+++ b/media/libvpx/vp8/common/postproc.c
@@ -330,7 +330,7 @@ void vp8_deblock(VP8_COMMON *cm,
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
int ppl = (int)(level + .5);
- const MODE_INFO *mode_info_context = cm->show_frame_mi;
+ const MODE_INFO *mode_info_context = cm->mi;
int mbr, mbc;
/* The pixel thresholds are adjusted according to if or not the macroblock
diff --git a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
index 2c57431e7..e36b8b6cf 100755
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.cpp
@@ -706,15 +706,6 @@ WebrtcAudioConduit::GetAudioFrame(int16_t speechData[],
if (GetAVStats(&jitter_buffer_delay_ms,
&playout_buffer_delay_ms,
&avsync_offset_ms)) {
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- if (avsync_offset_ms < 0) {
- Telemetry::Accumulate(Telemetry::WEBRTC_AVSYNC_WHEN_VIDEO_LAGS_AUDIO_MS,
- -avsync_offset_ms);
- } else {
- Telemetry::Accumulate(Telemetry::WEBRTC_AVSYNC_WHEN_AUDIO_LAGS_VIDEO_MS,
- avsync_offset_ms);
- }
-#endif
CSFLogError(logTag,
"A/V sync: sync delta: %dms, audio jitter delay %dms, playout delay %dms",
avsync_offset_ms, jitter_buffer_delay_ms, playout_buffer_delay_ms);
diff --git a/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp b/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp
index eb03c0bf8..da40a59ea 100644
--- a/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp
+++ b/media/webrtc/signaling/src/media-conduit/CodecStatistics.cpp
@@ -124,8 +124,6 @@ void VideoCodecStatistics::ReceiveStateChange(const int aChannel,
TimeDuration timeDelta = TimeStamp::Now() - mReceiveFailureTime;
CSFLogError(logTag, "Video error duration: %u ms",
static_cast<uint32_t>(timeDelta.ToMilliseconds()));
- Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_ERROR_RECOVERY_MS,
- static_cast<uint32_t>(timeDelta.ToMilliseconds()));
mRecoveredLosses++; // to calculate losses per minute
mTotalLossTime += timeDelta; // To calculate % time in recovery
@@ -147,16 +145,10 @@ void VideoCodecStatistics::EndOfCallStats()
if (callDelta.ToSeconds() != 0) {
uint32_t recovered_per_min = mRecoveredBeforeLoss/(callDelta.ToSeconds()/60);
CSFLogError(logTag, "Video recovery before error per min %u", recovered_per_min);
- Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_RECOVERY_BEFORE_ERROR_PER_MIN,
- recovered_per_min);
uint32_t err_per_min = mRecoveredLosses/(callDelta.ToSeconds()/60);
CSFLogError(logTag, "Video recovery after error per min %u", err_per_min);
- Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_RECOVERY_AFTER_ERROR_PER_MIN,
- err_per_min);
float percent = (mTotalLossTime.ToSeconds()*100)/callDelta.ToSeconds();
CSFLogError(logTag, "Video error time percentage %f%%", percent);
- Telemetry::Accumulate(Telemetry::WEBRTC_VIDEO_DECODE_ERROR_TIME_PERMILLE,
- static_cast<uint32_t>(percent*10));
}
}
#endif
diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
index 33422ed7a..43d10ca86 100644
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -2245,22 +2245,6 @@ PeerConnectionImpl::AddIceCandidate(const char* aCandidate, const char* aMid, un
CSFLogDebug(logTag, "AddIceCandidate: %s", aCandidate);
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- // When remote candidates are added before our ICE ctx is up and running
- // (the transition to New is async through STS, so this is not impossible),
- // we won't record them as trickle candidates. Is this what we want?
- if(!mIceStartTime.IsNull()) {
- TimeDuration timeDelta = TimeStamp::Now() - mIceStartTime;
- if (mIceConnectionState == PCImplIceConnectionState::Failed) {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_LATE_TRICKLE_ARRIVAL_TIME,
- timeDelta.ToMilliseconds());
- } else {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_ON_TIME_TRICKLE_ARRIVAL_TIME,
- timeDelta.ToMilliseconds());
- }
- }
-#endif
-
nsresult res = mJsepSession->AddRemoteIceCandidate(aCandidate, aMid, aLevel);
if (NS_SUCCEEDED(res)) {
@@ -3011,49 +2995,7 @@ PeerConnectionImpl::PluginCrash(uint32_t aPluginID,
void
PeerConnectionImpl::RecordEndOfCallTelemetry() const
{
- if (!mJsepSession) {
- return;
- }
-
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- // Bitmask used for WEBRTC/LOOP_CALL_TYPE telemetry reporting
- static const uint32_t kAudioTypeMask = 1;
- static const uint32_t kVideoTypeMask = 2;
- static const uint32_t kDataChannelTypeMask = 4;
-
- // Report end-of-call Telemetry
- if (mJsepSession->GetNegotiations() > 0) {
- Telemetry::Accumulate(Telemetry::WEBRTC_RENEGOTIATIONS,
- mJsepSession->GetNegotiations()-1);
- }
- Telemetry::Accumulate(Telemetry::WEBRTC_MAX_VIDEO_SEND_TRACK,
- mMaxSending[SdpMediaSection::MediaType::kVideo]);
- Telemetry::Accumulate(Telemetry::WEBRTC_MAX_VIDEO_RECEIVE_TRACK,
- mMaxReceiving[SdpMediaSection::MediaType::kVideo]);
- Telemetry::Accumulate(Telemetry::WEBRTC_MAX_AUDIO_SEND_TRACK,
- mMaxSending[SdpMediaSection::MediaType::kAudio]);
- Telemetry::Accumulate(Telemetry::WEBRTC_MAX_AUDIO_RECEIVE_TRACK,
- mMaxReceiving[SdpMediaSection::MediaType::kAudio]);
- // DataChannels appear in both Sending and Receiving
- Telemetry::Accumulate(Telemetry::WEBRTC_DATACHANNEL_NEGOTIATED,
- mMaxSending[SdpMediaSection::MediaType::kApplication]);
- // Enumerated/bitmask: 1 = Audio, 2 = Video, 4 = DataChannel
- // A/V = 3, A/V/D = 7, etc
- uint32_t type = 0;
- if (mMaxSending[SdpMediaSection::MediaType::kAudio] ||
- mMaxReceiving[SdpMediaSection::MediaType::kAudio]) {
- type = kAudioTypeMask;
- }
- if (mMaxSending[SdpMediaSection::MediaType::kVideo] ||
- mMaxReceiving[SdpMediaSection::MediaType::kVideo]) {
- type |= kVideoTypeMask;
- }
- if (mMaxSending[SdpMediaSection::MediaType::kApplication]) {
- type |= kDataChannelTypeMask;
- }
- Telemetry::Accumulate(Telemetry::WEBRTC_CALL_TYPE,
- type);
-#endif
+ /* STUB */
}
nsresult
@@ -3109,13 +3051,6 @@ PeerConnectionImpl::ShutdownMedia()
pair.second->RemovePrincipalChangeObserver(this);
}
}
-
- // End of call to be recorded in Telemetry
- if (!mStartTime.IsNull()){
- TimeDuration timeDelta = TimeStamp::Now() - mStartTime;
- Telemetry::Accumulate(Telemetry::WEBRTC_CALL_DURATION,
- timeDelta.ToSeconds());
- }
#endif
// Forget the reference so that we can transfer it to
@@ -3423,33 +3358,6 @@ void PeerConnectionImpl::IceConnectionStateChange(
return;
}
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- if (!isDone(mIceConnectionState) && isDone(domState)) {
- // mIceStartTime can be null if going directly from New to Closed, in which
- // case we don't count it as a success or a failure.
- if (!mIceStartTime.IsNull()){
- TimeDuration timeDelta = TimeStamp::Now() - mIceStartTime;
- if (isSucceeded(domState)) {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_SUCCESS_TIME,
- timeDelta.ToMilliseconds());
- } else if (isFailed(domState)) {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_FAILURE_TIME,
- timeDelta.ToMilliseconds());
- }
- }
-
- if (isSucceeded(domState)) {
- Telemetry::Accumulate(
- Telemetry::WEBRTC_ICE_ADD_CANDIDATE_ERRORS_GIVEN_SUCCESS,
- mAddCandidateErrorCount);
- } else if (isFailed(domState)) {
- Telemetry::Accumulate(
- Telemetry::WEBRTC_ICE_ADD_CANDIDATE_ERRORS_GIVEN_FAILURE,
- mAddCandidateErrorCount);
- }
- }
-#endif
-
mIceConnectionState = domState;
if (mIceConnectionState == PCImplIceConnectionState::Connected ||
@@ -3467,10 +3375,6 @@ void PeerConnectionImpl::IceConnectionStateChange(
STAMP_TIMECARD(mTimeCard, "Ice state: new");
break;
case PCImplIceConnectionState::Checking:
-#if !defined(MOZILLA_EXTERNAL_LINKAGE)
- // For telemetry
- mIceStartTime = TimeStamp::Now();
-#endif
STAMP_TIMECARD(mTimeCard, "Ice state: checking");
break;
case PCImplIceConnectionState::Connected:
@@ -4067,16 +3971,7 @@ PeerConnectionImpl::IceStreamReady(NrIceMediaStream *aStream)
//Telemetry for when calls start
void
PeerConnectionImpl::startCallTelem() {
- if (!mStartTime.IsNull()) {
- return;
- }
-
- // Start time for calls
- mStartTime = TimeStamp::Now();
-
- // Increment session call counter
- // If we want to track Loop calls independently here, we need two histograms.
- Telemetry::Accumulate(Telemetry::WEBRTC_CALL_COUNT_2, 1);
+ /* STUB */
}
#endif
diff --git a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
index 96bdd5b70..f283d6111 100644
--- a/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
+++ b/media/webrtc/signaling/src/peerconnection/WebrtcGlobalInformation.cpp
@@ -1194,18 +1194,8 @@ static void GetStatsForLongTermStorage_s(
rate_limit_bit_pattern |= 2;
}
- if (query->failed) {
- Telemetry::Accumulate(
- Telemetry::WEBRTC_STUN_RATE_LIMIT_EXCEEDED_BY_TYPE_GIVEN_FAILURE,
- rate_limit_bit_pattern);
- } else {
- Telemetry::Accumulate(
- Telemetry::WEBRTC_STUN_RATE_LIMIT_EXCEEDED_BY_TYPE_GIVEN_SUCCESS,
- rate_limit_bit_pattern);
- }
-
- // Even if Telemetry::Accumulate is threadsafe, we still need to send the
- // query back to main, since that is where it must be destroyed.
+ // We still need to send the query back to main, since that is where
+ // it must be destroyed.
NS_DispatchToMainThread(
WrapRunnableNM(
&StoreLongTermICEStatisticsImpl_m,
@@ -1216,8 +1206,6 @@ static void GetStatsForLongTermStorage_s(
void WebrtcGlobalInformation::StoreLongTermICEStatistics(
PeerConnectionImpl& aPc) {
- Telemetry::Accumulate(Telemetry::WEBRTC_ICE_FINAL_CONNECTION_STATE,
- static_cast<uint32_t>(aPc.IceConnectionState()));
if (aPc.IceConnectionState() == PCImplIceConnectionState::New) {
// ICE has not started; we won't have any remote candidates, so recording