| 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_);
|
|
|