VP8 RTP work

Fixing the plumbing to get the KEYIDX between VP8 wrapper and
rtp_rtcp module. Also fixing a missing pipe for temporalIdx

Review URL: http://webrtc-codereview.appspot.com/295004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1024 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2011-11-25 10:17:00 +00:00
parent 5483210c82
commit 859626570a
5 changed files with 17 additions and 0 deletions

View File

@ -647,6 +647,7 @@ RTPReceiverVideo::ReceiveVp8Codec(WebRtcRTPHeader* rtpHeader,
kNoTl0PicIdx; kNoTl0PicIdx;
toHeader->temporalIdx = fromHeader->hasTID ? fromHeader->tID : toHeader->temporalIdx = fromHeader->hasTID ? fromHeader->tID :
kNoTemporalIdx; kNoTemporalIdx;
toHeader->keyIdx = fromHeader->hasKeyIdx ? fromHeader->keyIdx : kNoKeyIdx;
toHeader->frameWidth = fromHeader->frameWidth; toHeader->frameWidth = fromHeader->frameWidth;
toHeader->frameHeight = fromHeader->frameHeight; toHeader->frameHeight = fromHeader->frameHeight;

View File

@ -33,6 +33,7 @@ struct CodecSpecificInfoVP8
bool nonReference; bool nonReference;
WebRtc_UWord8 simulcastIdx; WebRtc_UWord8 simulcastIdx;
WebRtc_UWord8 temporalIdx; WebRtc_UWord8 temporalIdx;
WebRtc_Word8 keyIdx; // negative value to skip keyIdx
}; };
union CodecSpecificInfoUnion union CodecSpecificInfoUnion

View File

@ -602,6 +602,7 @@ void VP8Encoder::PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
vp8Info->pictureId = _pictureID; vp8Info->pictureId = _pictureID;
vp8Info->simulcastIdx = _simulcastIdx;; vp8Info->simulcastIdx = _simulcastIdx;;
vp8Info->temporalIdx = kNoTemporalIdx; // TODO(pwestin) need to populate this vp8Info->temporalIdx = kNoTemporalIdx; // TODO(pwestin) need to populate this
vp8Info->keyIdx = kNoKeyIdx; // TODO(hlundin) populate this
vp8Info->nonReference = (pkt.data.frame.flags & VPX_FRAME_IS_DROPPABLE); vp8Info->nonReference = (pkt.data.frame.flags & VPX_FRAME_IS_DROPPABLE);
_pictureID = (_pictureID + 1) % 0x7FFF; // prepare next _pictureID = (_pictureID + 1) % 0x7FFF; // prepare next
} }

View File

@ -111,6 +111,8 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header)
{ {
// This is the first packet for this frame. // This is the first packet for this frame.
_codecSpecificInfo.codecSpecific.VP8.pictureId = -1; _codecSpecificInfo.codecSpecific.VP8.pictureId = -1;
_codecSpecificInfo.codecSpecific.VP8.temporalIdx = 0;
_codecSpecificInfo.codecSpecific.VP8.keyIdx = -1;
_codecSpecificInfo.codecType = kVideoCodecVP8; _codecSpecificInfo.codecType = kVideoCodecVP8;
} }
_codecSpecificInfo.codecSpecific.VP8.nonReference = _codecSpecificInfo.codecSpecific.VP8.nonReference =
@ -120,6 +122,16 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header)
_codecSpecificInfo.codecSpecific.VP8.pictureId = _codecSpecificInfo.codecSpecific.VP8.pictureId =
header->codecHeader.VP8.pictureId; header->codecHeader.VP8.pictureId;
} }
if (header->codecHeader.VP8.temporalIdx != kNoTemporalIdx)
{
_codecSpecificInfo.codecSpecific.VP8.temporalIdx =
header->codecHeader.VP8.temporalIdx;
}
if (header->codecHeader.VP8.keyIdx != kNoKeyIdx)
{
_codecSpecificInfo.codecSpecific.VP8.keyIdx =
header->codecHeader.VP8.keyIdx;
}
break; break;
} }
default: default:

View File

@ -267,6 +267,8 @@ void VCMEncodedFrameCallback::CopyCodecSpecific(const CodecSpecificInfo& info,
info.codecSpecific.VP8.nonReference; info.codecSpecific.VP8.nonReference;
(*rtp)->codecHeader.VP8.temporalIdx = (*rtp)->codecHeader.VP8.temporalIdx =
info.codecSpecific.VP8.temporalIdx; info.codecSpecific.VP8.temporalIdx;
(*rtp)->codecHeader.VP8.keyIdx =
info.codecSpecific.VP8.keyIdx;
(*rtp)->simulcastIdx = info.codecSpecific.VP8.simulcastIdx; (*rtp)->simulcastIdx = info.codecSpecific.VP8.simulcastIdx;
return; return;
} }