Revert of Change type of pid_diff (int16_t -> uint8_t) according to updates in RTP payload profile. (patchset #3 id:40001 of https://codereview.webrtc.org/1427253002/ )

Reason for revert:
Breaks bot.

Original issue's description:
> Change type of pid_diff (int16_t -> uint8_t) according to updates in RTP payload profile. Max p_diff is 8 bits.
>
> Change type of number of reference pictures (size_t -> uint8_t). Max is 2 bits.
>
> Size of WebRtcRTPHeader: 4352 -> 1784 bytes.
>
> BUG=webrtc:5144, chromium:500602
>
> Committed: https://crrev.com/81c5c7f8157f767747bd97419eb0a589207354cf
> Cr-Commit-Position: refs/heads/master@{#10504}

TBR=stefan@webrtc.org,mflodman@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5144, chromium:500602

Review URL: https://codereview.webrtc.org/1423493005

Cr-Commit-Position: refs/heads/master@{#10508}
This commit is contained in:
asapersson
2015-11-04 07:40:36 -08:00
committed by Commit bot
parent e56c763691
commit 5d4e944391
5 changed files with 17 additions and 18 deletions

View File

@ -168,7 +168,6 @@ void Vp9SsMap::AdvanceFront(uint32_t timestamp) {
ss_map_[timestamp] = gof;
}
// TODO(asapersson): Update according to updates in RTP payload profile.
bool Vp9SsMap::UpdatePacket(VCMPacket* packet) {
uint8_t gof_idx = packet->codecSpecificHeader.codecHeader.VP9.gof_idx;
if (gof_idx == kNoGofIdx)
@ -187,7 +186,7 @@ bool Vp9SsMap::UpdatePacket(VCMPacket* packet) {
// TODO(asapersson): Set vp9.ref_picture_id[i] and add usage.
vp9->num_ref_pics = it->second.num_ref_pics[gof_idx];
for (uint8_t i = 0; i < it->second.num_ref_pics[gof_idx]; ++i) {
for (size_t i = 0; i < it->second.num_ref_pics[gof_idx]; ++i) {
vp9->pid_diff[i] = it->second.pid_diff[gof_idx][i];
}
return true;

View File

@ -126,7 +126,7 @@ void VCMSessionInfo::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) {
gof_info.temporal_up_switch[idx];
packets_.front().codecSpecificHeader.codecHeader.VP9.num_ref_pics =
gof_info.num_ref_pics[idx];
for (uint8_t i = 0; i < gof_info.num_ref_pics[idx]; ++i) {
for (size_t i = 0; i < gof_info.num_ref_pics[idx]; ++i) {
packets_.front().codecSpecificHeader.codecHeader.VP9.pid_diff[i] =
gof_info.pid_diff[idx][i];
}