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

Unified Diff: webrtc/common_video/h264/sps_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/sps_parser.cc ('k') | webrtc/common_video/h264/sps_vui_rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/h264/sps_parser_unittest.cc
diff --git a/webrtc/common_video/h264/sps_parser_unittest.cc b/webrtc/common_video/h264/sps_parser_unittest.cc
index 514d41ff9dbe22b307d05168f5b844e908f2d856..60e55d2c6225f1b66a17b880bf90487a0edd8a26 100644
--- a/webrtc/common_video/h264/sps_parser_unittest.cc
+++ b/webrtc/common_video/h264/sps_parser_unittest.cc
@@ -41,10 +41,7 @@
// The fake SPS that this generates also always has at least one emulation byte
// at offset 2, since the first two bytes are always 0, and has a 0x3 as the
// level_idc, to make sure the parser doesn't eat all 0x3 bytes.
-void GenerateFakeSps(uint16_t width,
- uint16_t height,
- int id,
- rtc::Buffer* out_buffer) {
+void GenerateFakeSps(uint16_t width, uint16_t height, rtc::Buffer* out_buffer) {
uint8_t rbsp[kSpsBufferMaxSize] = {0};
rtc::BitBufferWriter writer(rbsp, kSpsBufferMaxSize);
// Profile byte.
@@ -54,7 +51,7 @@
// level_idc.
writer.WriteUInt8(0x3u);
// seq_paramter_set_id.
- writer.WriteExponentialGolomb(id);
+ writer.WriteExponentialGolomb(0);
// Profile is not special, so we skip all the chroma format settings.
// Now some bit magic.
@@ -154,22 +151,20 @@
TEST_F(H264SpsParserTest, TestSyntheticSPSQvgaLandscape) {
rtc::Buffer buffer;
- GenerateFakeSps(320u, 180u, 1, &buffer);
+ GenerateFakeSps(320u, 180u, &buffer);
EXPECT_TRUE(static_cast<bool>(
sps_ = SpsParser::ParseSps(buffer.data(), buffer.size())));
EXPECT_EQ(320u, sps_->width);
EXPECT_EQ(180u, sps_->height);
- EXPECT_EQ(1u, sps_->id);
}
TEST_F(H264SpsParserTest, TestSyntheticSPSWeirdResolution) {
rtc::Buffer buffer;
- GenerateFakeSps(156u, 122u, 2, &buffer);
+ GenerateFakeSps(156u, 122u, &buffer);
EXPECT_TRUE(static_cast<bool>(
sps_ = SpsParser::ParseSps(buffer.data(), buffer.size())));
EXPECT_EQ(156u, sps_->width);
EXPECT_EQ(122u, sps_->height);
- EXPECT_EQ(2u, sps_->id);
}
} // namespace webrtc
« no previous file with comments | « webrtc/common_video/h264/sps_parser.cc ('k') | webrtc/common_video/h264/sps_vui_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698