Skip to content
Snippets Groups Projects
Commit b5250cfb authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by David Stevens
Browse files

c2_e2e_test: Print drop frame rate instead of the count.

Originally when measuring the drop frame, we decode the video in loop.
The test didn't reply the count of total decoded frames.
This CL changes to print the drop frame rate instead of the count.

Bug: 155944233
Test: Run tast.arc.VideoDecodeAccelPerf.h264_2160p_30fps

Change-Id: I62aee92184d6fbb35b5dc737fcf85eaeeba28ac1
(cherry picked from commit 7373fd74f8786288db1586ba9e32ed83cea293cf)
parent 05ed5977
No related branches found
No related tags found
No related merge requests found
......@@ -457,4 +457,10 @@ int64_t MediaCodecDecoder::GetReleaseTimestampNs(size_t frame_order) {
return base_timestamp_ns_ + frame_order * kSecToNs / frame_rate_;
}
double MediaCodecDecoder::dropped_frame_rate() const {
assert(received_outputs_ > 0);
return (double)drop_frame_count_ / (double)received_outputs_;
}
} // namespace android
......@@ -64,7 +64,7 @@ public:
void StopLooping() { looping_ = false; }
int32_t dropped_frame_count() const { return drop_frame_count_; }
double dropped_frame_rate() const;
void OnAsyncInputAvailable(int32_t idx);
void OnAsyncOutputAvailable(int32_t idx, AMediaCodecBufferInfo* info);
......
......@@ -356,7 +356,7 @@ void C2VideoDecoderE2ETest::TestFPSBody() {
double fps = fps_calculator.CalculateFPS();
printf("[LOG] Measured decoder FPS: %.4f\n", fps);
EXPECT_GE(fps, static_cast<double>(g_env->min_fps_no_render()));
printf("[LOG] Dropped frames: %d\n", decoder_->dropped_frame_count());
printf("[LOG] Dropped frames rate: %lf\n", decoder_->dropped_frame_rate());
}
TEST_F(C2VideoDecoderSurfaceE2ETest, TestFPS) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment