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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc

Issue 1409753007: Reland of "Change type of pid_diff (int16_t -> uint8_t) according to updates in RTP payload profile… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: also update include/module_common_types.h Created 5 years, 1 month 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
Index: webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc
index 242746d7b1eccdadf8e0a02763c4dd67e547459f..5bbafe459d22d8c8aea0d8e0ddf43a30b72b93f0 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc
@@ -55,7 +55,7 @@ void VerifyHeader(const RTPVideoHeaderVP9& expected,
actual.gof.temporal_up_switch[i]);
EXPECT_EQ(expected.gof.temporal_idx[i], actual.gof.temporal_idx[i]);
EXPECT_EQ(expected.gof.num_ref_pics[i], actual.gof.num_ref_pics[i]);
- for (size_t j = 0; j < expected.gof.num_ref_pics[i]; j++) {
+ for (uint8_t j = 0; j < expected.gof.num_ref_pics[i]; j++) {
EXPECT_EQ(expected.gof.pid_diff[i][j], actual.gof.pid_diff[i][j]);
}
}
@@ -550,9 +550,9 @@ TEST_F(RtpDepacketizerVp9Test, ParseLayerInfoWithFlexibleMode) {
TEST_F(RtpDepacketizerVp9Test, ParseRefIdx) {
const uint8_t kHeaderLength = 6;
const int16_t kPictureId = 17;
- const int16_t kPdiff1 = 17;
- const int16_t kPdiff2 = 18;
- const int16_t kPdiff3 = 127;
+ const uint8_t kPdiff1 = 17;
+ const uint8_t kPdiff2 = 18;
+ const uint8_t kPdiff3 = 127;
uint8_t packet[13] = {0};
packet[0] = 0xD8; // I:1 P:1 L:0 F:1 B:1 E:0 V:0 R:0
packet[1] = 0x80 | ((kPictureId >> 8) & 0x7F); // Two byte pictureID.
@@ -582,7 +582,7 @@ TEST_F(RtpDepacketizerVp9Test, ParseRefIdx) {
}
TEST_F(RtpDepacketizerVp9Test, ParseRefIdxFailsWithNoPictureId) {
- const int16_t kPdiff = 3;
+ const uint8_t kPdiff = 3;
uint8_t packet[13] = {0};
packet[0] = 0x58; // I:0 P:1 L:0 F:1 B:1 E:0 V:0 R:0
packet[1] = (kPdiff << 1); // P,F: P_DIFF:3 N:0
@@ -592,7 +592,7 @@ TEST_F(RtpDepacketizerVp9Test, ParseRefIdxFailsWithNoPictureId) {
}
TEST_F(RtpDepacketizerVp9Test, ParseRefIdxFailsWithTooManyRefPics) {
- const int16_t kPdiff = 3;
+ const uint8_t kPdiff = 3;
uint8_t packet[13] = {0};
packet[0] = 0xD8; // I:1 P:1 L:0 F:1 B:1 E:0 V:0 R:0
packet[1] = kMaxOneBytePictureId; // I: PICTURE ID:127
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_format_vp9.cc ('k') | webrtc/modules/video_coding/main/source/jitter_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698