Commit 5e757964 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Chromium LUCI CQ

media/gpu/video_encode_accelerator_perf_tests: Add MeasureProducedBitstreamQuality test case

This adds the test case to video_encode_accelerator_perf_tests
that compute SSIM and PSNR values of the bitstream produced by
VideoEncodeAccelerator.

Bug: b:174322759
Test: video_encode_accelerator_tests on atlas
Change-Id: I78817f1a91d926b3041a1c8e02a2d70c4bbf828e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563012
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835986}
parent c3a4e38a
......@@ -619,9 +619,12 @@ if (use_v4l2_codec || use_vaapi) {
data = [ "//media/test/data/" ]
deps = [
":buildflags",
"test:frame_validator",
"test:helpers",
"test:test_helpers",
"test:video_encoder",
"test:video_encoder_test_environment",
"test:video_encoder_test_environment",
"//media:test_support",
"//testing/gtest",
]
......
......@@ -184,7 +184,7 @@ class RawVideoFrameValidator : public VideoFrameValidator {
};
// Validate by computing PSNR from the frame to be validated and the model frame
// acquired by |get_model_frame_cb_|. If the PSNR value is equal to or less than
// acquired by |get_model_frame_cb_|. If the PSNR value is equal to or more than
// |tolerance_|, the validation on the frame passes.
class PSNRVideoFrameValidator : public VideoFrameValidator {
public:
......@@ -195,7 +195,7 @@ class PSNRVideoFrameValidator : public VideoFrameValidator {
std::unique_ptr<VideoFrameProcessor> corrupt_frame_processor = nullptr,
ValidationMode validation_mode = ValidationMode::kThreshold,
double tolerance = kDefaultTolerance);
const std::map<size_t, double>& GetPSNRValues() { return psnr_; }
const std::map<size_t, double>& GetPSNRValues() const { return psnr_; }
~PSNRVideoFrameValidator() override;
private:
......@@ -220,7 +220,7 @@ class PSNRVideoFrameValidator : public VideoFrameValidator {
};
// Validate by computing SSIM from the frame to be validated and the model frame
// acquired by |get_model_frame_cb_|. If the SSIM value is equal to or less than
// acquired by |get_model_frame_cb_|. If the SSIM value is equal to or more than
// |tolerance_|, the validation on the frame passes.
class SSIMVideoFrameValidator : public VideoFrameValidator {
public:
......@@ -231,7 +231,7 @@ class SSIMVideoFrameValidator : public VideoFrameValidator {
std::unique_ptr<VideoFrameProcessor> corrupt_frame_processor = nullptr,
ValidationMode validation_mode = ValidationMode::kThreshold,
double tolerance = kDefaultTolerance);
const std::map<size_t, double>& GetSSIMValues() { return ssim_; }
const std::map<size_t, double>& GetSSIMValues() const { return ssim_; }
~SSIMVideoFrameValidator() override;
private:
......
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