History

Fix ObserveFirstPassMotionVectors()

1) Use kRefFrameTypeNone in the unit test 2) Reset mv_info in fp_motion_vector_info_init 3) Call fp_motion_vector_info_init() in first_pass_encode() 4) Set mv_info for intra frame. 5) Set mv_info with zero mv as default for inter frame 6) Remove duplicated fp_motion_vector_info in encode_frame_info

angiebird committed 6 years ago

Commit bb7a2cc1 parent e3ae48b4 files · +35 −20Browse files

Showing the changes to test/simple_encode_test.cc (1 of 4 files). Show all

Unified · Split

test/simple_encode_test.cc+3−2
@@ -74,8 +74,9 @@ TEST_F(SimpleEncodeTest, ObserveFirstPassMotionVectors) { · 73 unmodified lines
7474 EXPECT_EQ(num_blocks, fps_motion_vectors[i].size());
7575 for (size_t j = 0; j < num_blocks; ++j) {
7676 const int mv_count = fps_motion_vectors[i][j].mv_count;
77− const int ref_count = (fps_motion_vectors[i][j].ref_frame[0] > 0) +
78− (fps_motion_vectors[i][j].ref_frame[1] > 0);
77+ const int ref_count =
78+ (fps_motion_vectors[i][j].ref_frame[0] != kRefFrameTypeNone) +
79+ (fps_motion_vectors[i][j].ref_frame[1] != kRefFrameTypeNone);
7980 EXPECT_EQ(mv_count, ref_count);
8081 }
8182 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t