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

Unified Diff: webrtc/common_video/h264/pps_parser_unittest.cc

Issue 2265023002: Revert of Add pps id and sps id parsing to the h.264 depacketizer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 | « webrtc/common_video/h264/pps_parser.cc ('k') | webrtc/common_video/h264/sps_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/h264/pps_parser_unittest.cc
diff --git a/webrtc/common_video/h264/pps_parser_unittest.cc b/webrtc/common_video/h264/pps_parser_unittest.cc
index 8be8b23ee3882723b52622aa665bc6b276c0f04b..198343908368c545e66df93548ca8adb5456e1ef 100644
--- a/webrtc/common_video/h264/pps_parser_unittest.cc
+++ b/webrtc/common_video/h264/pps_parser_unittest.cc
@@ -11,7 +11,6 @@
#include "webrtc/common_video/h264/pps_parser.h"
#include <limits>
-#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,17 +20,8 @@
namespace webrtc {
-namespace {
-// Contains enough of the image slice to contain slice QP.
-const uint8_t kH264BitstreamChunk[] = {
- 0x00, 0x00, 0x00, 0x01, 0x67, 0x42, 0x80, 0x20, 0xda, 0x01, 0x40, 0x16,
- 0xe8, 0x06, 0xd0, 0xa1, 0x35, 0x00, 0x00, 0x00, 0x01, 0x68, 0xce, 0x06,
- 0xe2, 0x00, 0x00, 0x00, 0x01, 0x65, 0xb8, 0x40, 0xf0, 0x8c, 0x03, 0xf2,
- 0x75, 0x67, 0xad, 0x41, 0x64, 0x24, 0x0e, 0xa0, 0xb2, 0x12, 0x1e, 0xf8,
-};
-const size_t kPpsBufferMaxSize = 256;
-const uint32_t kIgnored = 0;
-} // namespace
+static const size_t kPpsBufferMaxSize = 256;
+static const uint32_t kIgnored = 0;
void WritePps(const PpsParser::PpsState& pps,
int slice_group_map_type,
@@ -42,9 +32,9 @@
rtc::BitBufferWriter bit_buffer(data, kPpsBufferMaxSize);
// pic_parameter_set_id: ue(v)
- bit_buffer.WriteExponentialGolomb(pps.id);
+ bit_buffer.WriteExponentialGolomb(kIgnored);
// seq_parameter_set_id: ue(v)
- bit_buffer.WriteExponentialGolomb(pps.sps_id);
+ bit_buffer.WriteExponentialGolomb(kIgnored);
// entropy_coding_mode_flag: u(1)
bit_buffer.WriteBits(kIgnored, 1);
// bottom_field_pic_order_in_frame_present_flag: u(1)
@@ -185,8 +175,6 @@
EXPECT_EQ(pps.redundant_pic_cnt_present_flag,
parsed_pps_->redundant_pic_cnt_present_flag);
EXPECT_EQ(pps.pic_init_qp_minus26, parsed_pps_->pic_init_qp_minus26);
- EXPECT_EQ(pps.id, parsed_pps_->id);
- EXPECT_EQ(pps.sps_id, parsed_pps_->sps_id);
}
PpsParser::PpsState generated_pps_;
@@ -204,19 +192,10 @@
generated_pps_.redundant_pic_cnt_present_flag = 1; // 1 bit value.
generated_pps_.weighted_bipred_idc = (1 << 2) - 1; // 2 bit value.
generated_pps_.weighted_pred_flag = true;
- generated_pps_.id = 2;
- generated_pps_.sps_id = 1;
RunTest();
generated_pps_.pic_init_qp_minus26 = std::numeric_limits<int32_t>::min() + 1;
RunTest();
}
-TEST_F(PpsParserTest, PpsIdFromSlice) {
- rtc::Optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice(
- kH264BitstreamChunk, sizeof(kH264BitstreamChunk));
- ASSERT_TRUE(pps_id);
- EXPECT_EQ(2u, *pps_id);
-}
-
} // namespace webrtc
« no previous file with comments | « webrtc/common_video/h264/pps_parser.cc ('k') | webrtc/common_video/h264/sps_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698