Commit 463b4aca authored by Pin-chih Lin's avatar Pin-chih Lin Committed by Commit Bot

vea_unittest: don't fail test by low FPS for 2160p input video

Some devices could not reach 30 FPS for 2160p (4K, UHD) h264/vp8
encoding. Since we want to gather FPS performance data from devices
which have 4k encoding capability, we disable the check of FPS larger
than kMinPerfFPS, and just a warning log instead.

BUG=chromium:927277
TEST=video_encode_accelerator_unittest on Eve and Caroline

Change-Id: I3ff3fac117a6423d5e5949e49920ec6f3428410e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1503178
Commit-Queue: Pin-chih Lin <johnylin@chromium.org>
Auto-Submit: Pin-chih Lin <johnylin@chromium.org>
Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638014}
parent 805eae82
......@@ -106,6 +106,8 @@ const double kDefaultSubsequentFramerateRatio = 0.1;
const double kBitrateTolerance = 0.1;
// Minimum required FPS throughput for the basic performance test.
const uint32_t kMinPerfFPS = 30;
// The frame size for 2160p (UHD 4K) video in pixels.
const int k2160PSizeInPixels = 3840 * 2160;
// Minimum (arbitrary) number of frames required to enforce bitrate requirements
// over. Streams shorter than this may be too short to realistically require
// an encoder to be able to converge to the requested bitrate over.
......@@ -2207,8 +2209,19 @@ void VEAClient::FlushTimeout() {
void VEAClient::VerifyMinFPS() {
DCHECK(thread_checker_.CalledOnValidThread());
if (test_perf_)
EXPECT_GE(frames_per_second(), kMinPerfFPS);
if (test_perf_) {
if (input_coded_size_.GetArea() >= k2160PSizeInPixels) {
// When |input_coded_size_| is 2160p or more, it is expected that the
// calculated FPS might be lower than kMinPerfFPS. Log as warning instead
// of failing the test in this case.
if (frames_per_second() < kMinPerfFPS) {
LOG(WARNING) << "Measured FPS: " << frames_per_second()
<< " is below min required: " << kMinPerfFPS << " FPS.";
}
} else {
EXPECT_GE(frames_per_second(), kMinPerfFPS);
}
}
}
void VEAClient::VerifyStreamProperties() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment