webrtc_m130/rtc_tools/frame_analyzer/video_quality_analysis_unittest.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

250 lines
8.6 KiB
C++
Raw Normal View History

/*
* 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.
*/
#include "rtc_tools/frame_analyzer/video_quality_analysis.h"
#include <string>
#include <vector>
#include "api/test/metrics/metric.h"
#include "api/test/metrics/metrics_logger.h"
#include "system_wrappers/include/clock.h"
#include "test/gmock.h"
#include "test/gtest.h"
#include "test/testsupport/file_utils.h"
namespace webrtc {
namespace test {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
namespace {
using ::testing::IsSupersetOf;
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
// Metric fields to assert on
struct MetricValidationInfo {
std::string test_case;
std::string name;
Unit unit;
ImprovementDirection improvement_direction;
double mean;
};
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
bool operator==(const MetricValidationInfo& a, const MetricValidationInfo& b) {
return a.name == b.name && a.test_case == b.test_case && a.unit == b.unit &&
a.improvement_direction == b.improvement_direction;
}
std::ostream& operator<<(std::ostream& os, const MetricValidationInfo& m) {
os << "{ test_case=" << m.test_case << "; name=" << m.name
<< "; unit=" << test::ToString(m.unit)
<< "; improvement_direction=" << test::ToString(m.improvement_direction)
<< " }";
return os;
}
std::vector<MetricValidationInfo> ToValidationInfo(
const std::vector<Metric>& metrics) {
std::vector<MetricValidationInfo> out;
for (const Metric& m : metrics) {
out.push_back(
MetricValidationInfo{.test_case = m.test_case,
.name = m.name,
.unit = m.unit,
.improvement_direction = m.improvement_direction,
.mean = *m.stats.mean});
}
return out;
}
TEST(VideoQualityAnalysisTest, PrintAnalysisResultsEmpty) {
ResultsContainer result;
DefaultMetricsLogger logger(Clock::GetRealTimeClock());
PrintAnalysisResults("Empty", result, logger);
}
TEST(VideoQualityAnalysisTest, PrintAnalysisResultsOneFrame) {
ResultsContainer result;
result.frames.push_back(AnalysisResult(0, 35.0, 0.9));
DefaultMetricsLogger logger(Clock::GetRealTimeClock());
PrintAnalysisResults("OneFrame", result, logger);
}
TEST(VideoQualityAnalysisTest, PrintAnalysisResultsThreeFrames) {
ResultsContainer result;
result.frames.push_back(AnalysisResult(0, 35.0, 0.9));
result.frames.push_back(AnalysisResult(1, 34.0, 0.8));
result.frames.push_back(AnalysisResult(2, 33.0, 0.7));
DefaultMetricsLogger logger(Clock::GetRealTimeClock());
PrintAnalysisResults("ThreeFrames", result, logger);
}
TEST(VideoQualityAnalysisTest, PrintMaxRepeatedAndSkippedFramesSkippedFrames) {
ResultsContainer result;
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
result.max_repeated_frames = 2;
result.max_skipped_frames = 2;
result.total_skipped_frames = 3;
result.decode_errors_ref = 0;
result.decode_errors_test = 0;
DefaultMetricsLogger logger(Clock::GetRealTimeClock());
PrintAnalysisResults("NormalStatsFile", result, logger);
std::vector<MetricValidationInfo> metrics =
ToValidationInfo(logger.GetCollectedMetrics());
EXPECT_THAT(
metrics,
IsSupersetOf(
{MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Max_repeated",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 2},
MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Max_skipped",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 2},
MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Total_skipped",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 3},
MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Decode_errors_reference",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 0},
MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Decode_errors_test",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 0}}));
}
TEST(VideoQualityAnalysisTest,
PrintMaxRepeatedAndSkippedFramesDecodeErrorInTest) {
ResultsContainer result;
std::string log_filename =
TempFilename(webrtc::test::OutputPath(), "log.log");
FILE* logfile = fopen(log_filename.c_str(), "w");
ASSERT_TRUE(logfile != NULL);
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
result.max_repeated_frames = 1;
result.max_skipped_frames = 0;
result.total_skipped_frames = 0;
result.decode_errors_ref = 0;
result.decode_errors_test = 3;
DefaultMetricsLogger logger(Clock::GetRealTimeClock());
PrintAnalysisResults("NormalStatsFile", result, logger);
std::vector<MetricValidationInfo> metrics =
ToValidationInfo(logger.GetCollectedMetrics());
EXPECT_THAT(
metrics,
IsSupersetOf(
{MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Max_repeated",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 1},
MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Max_skipped",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 0},
MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Total_skipped",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 0},
MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Decode_errors_reference",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 0},
MetricValidationInfo{
.test_case = "NormalStatsFile",
.name = "Decode_errors_test",
.unit = Unit::kUnitless,
.improvement_direction = ImprovementDirection::kNeitherIsBetter,
.mean = 3}}));
}
TEST(VideoQualityAnalysisTest, CalculateFrameClustersOneValue) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
const std::vector<Cluster> result = CalculateFrameClusters({1});
EXPECT_EQ(1u, result.size());
EXPECT_EQ(1u, result[0].index);
EXPECT_EQ(1, result[0].number_of_repeated_frames);
}
TEST(VideoQualityAnalysisTest, GetMaxRepeatedFramesOneValue) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(1, GetMaxRepeatedFrames(CalculateFrameClusters({1})));
}
TEST(VideoQualityAnalysisTest, GetMaxSkippedFramesOneValue) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(0, GetMaxSkippedFrames(CalculateFrameClusters({1})));
}
TEST(VideoQualityAnalysisTest, GetTotalNumberOfSkippedFramesOneValue) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(0, GetTotalNumberOfSkippedFrames(CalculateFrameClusters({1})));
}
TEST(VideoQualityAnalysisTest, CalculateFrameClustersOneOneTwo) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
const std::vector<Cluster> result = CalculateFrameClusters({1, 1, 2});
EXPECT_EQ(2u, result.size());
EXPECT_EQ(1u, result[0].index);
EXPECT_EQ(2, result[0].number_of_repeated_frames);
EXPECT_EQ(2u, result[1].index);
EXPECT_EQ(1, result[1].number_of_repeated_frames);
Reland "Update video_quality_analysis to align videos instead of using barcodes" This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it won't automatically pick up change to the source file. Therefore, restore all old code to be backwards compatible. Original change's description: > Update video_quality_analysis to align videos instead of using barcodes > > This CL is a follow-up to the previous CL > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > logic for aligning videos. This will allow us to easily extend > video_quality_analysis with new sophisticated video quality metrics. > Also, we can use any kind of video that does not necessarily need to > contain bar codes. Removing the need to decode barcodes also leads to a > big speedup for the tests. > > Bug: webrtc:9642 > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > Reviewed-on: https://webrtc-review.googlesource.com/94845 > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24423} TBR=phensman@webrtc.org,phoglund@webrtc.org Bug: webrtc:9642 Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 Reviewed-on: https://webrtc-review.googlesource.com/96000 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24429}
2018-08-24 14:56:03 +02:00
}
Revert "Update video_quality_analysis to align videos instead of using barcodes" This reverts commit d65e143801a7aaa9affdb939ea836aec1955cdcc. Reason for revert: Breaks perf bots. frame_analyzer is a prebuilt binary, so it won't automatically pick up changes in the .cc file. Original change's description: > Update video_quality_analysis to align videos instead of using barcodes > > This CL is a follow-up to the previous CL > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > logic for aligning videos. This will allow us to easily extend > video_quality_analysis with new sophisticated video quality metrics. > Also, we can use any kind of video that does not necessarily need to > contain bar codes. Removing the need to decode barcodes also leads to a > big speedup for the tests. > > Bug: webrtc:9642 > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > Reviewed-on: https://webrtc-review.googlesource.com/94845 > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24423} TBR=phoglund@webrtc.org,magjed@webrtc.org,phensman@webrtc.org Change-Id: Ia590b465687b861fe37ed1b14756d4607ca90da1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:9642 Reviewed-on: https://webrtc-review.googlesource.com/95946 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24428}
2018-08-24 12:44:59 +00:00
TEST(VideoQualityAnalysisTest, GetMaxRepeatedFramesOneOneTwo) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(2, GetMaxRepeatedFrames(CalculateFrameClusters({1, 1, 2})));
Reland "Update video_quality_analysis to align videos instead of using barcodes" This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it won't automatically pick up change to the source file. Therefore, restore all old code to be backwards compatible. Original change's description: > Update video_quality_analysis to align videos instead of using barcodes > > This CL is a follow-up to the previous CL > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > logic for aligning videos. This will allow us to easily extend > video_quality_analysis with new sophisticated video quality metrics. > Also, we can use any kind of video that does not necessarily need to > contain bar codes. Removing the need to decode barcodes also leads to a > big speedup for the tests. > > Bug: webrtc:9642 > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > Reviewed-on: https://webrtc-review.googlesource.com/94845 > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24423} TBR=phensman@webrtc.org,phoglund@webrtc.org Bug: webrtc:9642 Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 Reviewed-on: https://webrtc-review.googlesource.com/96000 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24429}
2018-08-24 14:56:03 +02:00
}
Revert "Update video_quality_analysis to align videos instead of using barcodes" This reverts commit d65e143801a7aaa9affdb939ea836aec1955cdcc. Reason for revert: Breaks perf bots. frame_analyzer is a prebuilt binary, so it won't automatically pick up changes in the .cc file. Original change's description: > Update video_quality_analysis to align videos instead of using barcodes > > This CL is a follow-up to the previous CL > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > logic for aligning videos. This will allow us to easily extend > video_quality_analysis with new sophisticated video quality metrics. > Also, we can use any kind of video that does not necessarily need to > contain bar codes. Removing the need to decode barcodes also leads to a > big speedup for the tests. > > Bug: webrtc:9642 > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > Reviewed-on: https://webrtc-review.googlesource.com/94845 > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24423} TBR=phoglund@webrtc.org,magjed@webrtc.org,phensman@webrtc.org Change-Id: Ia590b465687b861fe37ed1b14756d4607ca90da1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:9642 Reviewed-on: https://webrtc-review.googlesource.com/95946 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24428}
2018-08-24 12:44:59 +00:00
TEST(VideoQualityAnalysisTest, GetMaxSkippedFramesOneOneTwo) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(0, GetMaxSkippedFrames(CalculateFrameClusters({1, 1, 2})));
Reland "Update video_quality_analysis to align videos instead of using barcodes" This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it won't automatically pick up change to the source file. Therefore, restore all old code to be backwards compatible. Original change's description: > Update video_quality_analysis to align videos instead of using barcodes > > This CL is a follow-up to the previous CL > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > logic for aligning videos. This will allow us to easily extend > video_quality_analysis with new sophisticated video quality metrics. > Also, we can use any kind of video that does not necessarily need to > contain bar codes. Removing the need to decode barcodes also leads to a > big speedup for the tests. > > Bug: webrtc:9642 > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > Reviewed-on: https://webrtc-review.googlesource.com/94845 > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24423} TBR=phensman@webrtc.org,phoglund@webrtc.org Bug: webrtc:9642 Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 Reviewed-on: https://webrtc-review.googlesource.com/96000 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24429}
2018-08-24 14:56:03 +02:00
}
Revert "Update video_quality_analysis to align videos instead of using barcodes" This reverts commit d65e143801a7aaa9affdb939ea836aec1955cdcc. Reason for revert: Breaks perf bots. frame_analyzer is a prebuilt binary, so it won't automatically pick up changes in the .cc file. Original change's description: > Update video_quality_analysis to align videos instead of using barcodes > > This CL is a follow-up to the previous CL > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > logic for aligning videos. This will allow us to easily extend > video_quality_analysis with new sophisticated video quality metrics. > Also, we can use any kind of video that does not necessarily need to > contain bar codes. Removing the need to decode barcodes also leads to a > big speedup for the tests. > > Bug: webrtc:9642 > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > Reviewed-on: https://webrtc-review.googlesource.com/94845 > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24423} TBR=phoglund@webrtc.org,magjed@webrtc.org,phensman@webrtc.org Change-Id: Ia590b465687b861fe37ed1b14756d4607ca90da1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:9642 Reviewed-on: https://webrtc-review.googlesource.com/95946 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24428}
2018-08-24 12:44:59 +00:00
TEST(VideoQualityAnalysisTest, GetTotalNumberOfSkippedFramesOneOneTwo) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(0,
GetTotalNumberOfSkippedFrames(CalculateFrameClusters({1, 1, 2})));
Revert "Update video_quality_analysis to align videos instead of using barcodes" This reverts commit d65e143801a7aaa9affdb939ea836aec1955cdcc. Reason for revert: Breaks perf bots. frame_analyzer is a prebuilt binary, so it won't automatically pick up changes in the .cc file. Original change's description: > Update video_quality_analysis to align videos instead of using barcodes > > This CL is a follow-up to the previous CL > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > logic for aligning videos. This will allow us to easily extend > video_quality_analysis with new sophisticated video quality metrics. > Also, we can use any kind of video that does not necessarily need to > contain bar codes. Removing the need to decode barcodes also leads to a > big speedup for the tests. > > Bug: webrtc:9642 > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > Reviewed-on: https://webrtc-review.googlesource.com/94845 > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24423} TBR=phoglund@webrtc.org,magjed@webrtc.org,phensman@webrtc.org Change-Id: Ia590b465687b861fe37ed1b14756d4607ca90da1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:9642 Reviewed-on: https://webrtc-review.googlesource.com/95946 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24428}
2018-08-24 12:44:59 +00:00
}
Reland "Update video_quality_analysis to align videos instead of using barcodes" This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it won't automatically pick up change to the source file. Therefore, restore all old code to be backwards compatible. Original change's description: > Update video_quality_analysis to align videos instead of using barcodes > > This CL is a follow-up to the previous CL > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > logic for aligning videos. This will allow us to easily extend > video_quality_analysis with new sophisticated video quality metrics. > Also, we can use any kind of video that does not necessarily need to > contain bar codes. Removing the need to decode barcodes also leads to a > big speedup for the tests. > > Bug: webrtc:9642 > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > Reviewed-on: https://webrtc-review.googlesource.com/94845 > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24423} TBR=phensman@webrtc.org,phoglund@webrtc.org Bug: webrtc:9642 Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 Reviewed-on: https://webrtc-review.googlesource.com/96000 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24429}
2018-08-24 14:56:03 +02:00
TEST(VideoQualityAnalysisTest, CalculateFrameClustersEmpty) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_TRUE(CalculateFrameClusters({}).empty());
}
TEST(VideoQualityAnalysisTest, GetMaxRepeatedFramesEmpty) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(0, GetMaxRepeatedFrames({}));
}
TEST(VideoQualityAnalysisTest, GetMaxSkippedFramesEmpty) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(0, GetMaxSkippedFrames({}));
}
TEST(VideoQualityAnalysisTest, GetTotalNumberOfSkippedFramesEmpty) {
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
EXPECT_EQ(0, GetTotalNumberOfSkippedFrames({}));
}
Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman <phensman@webrtc.org> > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24583}
2018-09-05 16:11:48 +02:00
} // namespace
} // namespace test
} // namespace webrtc