IvfFileReader: Fix SpatialIndex values

The SpatialIndex value from an EncodedImage is 0-based, but values were
off by 1.

Bug: none
Change-Id: Ie74e6450ddef1cfaee68fa230c441030fa86a64a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/203525
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33067}
This commit is contained in:
Florent Castelli
2021-01-25 12:53:30 +01:00
committed by Commit Bot
parent 437843f9a5
commit 54fb32a15e
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ class IvfFileReaderTest : public ::testing::Test {
bool use_capture_tims_ms,
int spatial_layers_count) {
ASSERT_TRUE(frame);
EXPECT_EQ(frame->SpatialIndex(), spatial_layers_count);
EXPECT_EQ(frame->SpatialIndex(), spatial_layers_count - 1);
if (use_capture_tims_ms) {
EXPECT_EQ(frame->capture_time_ms_, static_cast<int64_t>(frame_index));
EXPECT_EQ(frame->Timestamp(), static_cast<int64_t>(90 * frame_index));