Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Unified Diff: media/video/h264_poc_unittest.cc

Issue 2008473002: Revert of H264POC: Allow gaps in frame_num. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/video/h264_poc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/h264_poc_unittest.cc
diff --git a/media/video/h264_poc_unittest.cc b/media/video/h264_poc_unittest.cc
index 9df67429fd9338213a9c8f084af2393c3a07fd65..79177db24a91db2b32be5a27381c2fb7b1e20587 100644
--- a/media/video/h264_poc_unittest.cc
+++ b/media/video/h264_poc_unittest.cc
@@ -52,13 +52,11 @@
// Initial IDR with POC 0.
slice_hdr_.idr_pic_flag = true;
- slice_hdr_.frame_num = 0;
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(0, poc_);
// Ref frame with POC lsb 8.
slice_hdr_.idr_pic_flag = false;
- slice_hdr_.frame_num = 1;
slice_hdr_.pic_order_cnt_lsb = 8;
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(8, poc_);
@@ -66,14 +64,12 @@
// Ref frame with POC lsb 0. This should be detected as wrapping, as the
// (negative) gap is at least half the maximum.
slice_hdr_.pic_order_cnt_lsb = 0;
- slice_hdr_.frame_num = 2;
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(16, poc_);
// Ref frame with POC lsb 9. This should be detected as negative wrapping,
// as the (positive) gap is more than half the maximum.
slice_hdr_.pic_order_cnt_lsb = 9;
- slice_hdr_.frame_num = 3;
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(9, poc_);
}
@@ -84,36 +80,30 @@
// Initial IDR with POC 0.
slice_hdr_.idr_pic_flag = true;
- slice_hdr_.frame_num = 0;
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(0, poc_);
// Skip ahead.
slice_hdr_.idr_pic_flag = false;
- slice_hdr_.frame_num = 1;
slice_hdr_.pic_order_cnt_lsb = 8;
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(8, poc_);
- slice_hdr_.frame_num = 2;
slice_hdr_.pic_order_cnt_lsb = 0;
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(16, poc_);
- slice_hdr_.frame_num = 3;
- slice_hdr_.pic_order_cnt_lsb = 8;
- ASSERT_TRUE(ComputePOC());
- ASSERT_EQ(24, poc_);
-
- slice_hdr_.frame_num = 4;
+ slice_hdr_.pic_order_cnt_lsb = 8;
+ ASSERT_TRUE(ComputePOC());
+ ASSERT_EQ(24, poc_);
+
+ SetMMCO5();
slice_hdr_.pic_order_cnt_lsb = 0;
- SetMMCO5();
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(32, poc_);
// Due to the MMCO5 above, this is relative to 0, but also detected as
// positive wrapping.
- slice_hdr_.frame_num = 5;
slice_hdr_.pic_order_cnt_lsb = 8;
ASSERT_TRUE(ComputePOC());
ASSERT_EQ(24, poc_);
« no previous file with comments | « media/video/h264_poc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698