Adding a LayerSync bit to VP8 RTP header
Updated RtpFormatVp8, ModuleRTPUtility, VP8Encoder and VP8Decoder
to support a new LayerSync ("Y") bit. Note, in VP8Encoder the bit
must be used together with a non-negative value for temporalIdx.
Fixing the plumbing between RTP module and and from VP8 wrapper.
Updating unit tests; all pass.
The new bit is yet to be used by the VP8 wrapper.
Review URL: http://webrtc-codereview.appspot.com/323008
git-svn-id: http://webrtc.googlecode.com/svn/trunk@1169 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -112,6 +112,7 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header)
|
||||
// This is the first packet for this frame.
|
||||
_codecSpecificInfo.codecSpecific.VP8.pictureId = -1;
|
||||
_codecSpecificInfo.codecSpecific.VP8.temporalIdx = 0;
|
||||
_codecSpecificInfo.codecSpecific.VP8.layerSync = false;
|
||||
_codecSpecificInfo.codecSpecific.VP8.keyIdx = -1;
|
||||
_codecSpecificInfo.codecType = kVideoCodecVP8;
|
||||
}
|
||||
@@ -126,6 +127,8 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header)
|
||||
{
|
||||
_codecSpecificInfo.codecSpecific.VP8.temporalIdx =
|
||||
header->codecHeader.VP8.temporalIdx;
|
||||
_codecSpecificInfo.codecSpecific.VP8.layerSync =
|
||||
header->codecHeader.VP8.layerSync;
|
||||
}
|
||||
if (header->codecHeader.VP8.keyIdx != kNoKeyIdx)
|
||||
{
|
||||
|
||||
@@ -76,6 +76,10 @@ int VCMFrameBuffer::TemporalId() const {
|
||||
return _sessionInfo.TemporalId();
|
||||
}
|
||||
|
||||
bool VCMFrameBuffer::LayerSync() const {
|
||||
return _sessionInfo.LayerSync();
|
||||
}
|
||||
|
||||
int VCMFrameBuffer::Tl0PicId() const {
|
||||
return _sessionInfo.Tl0PicId();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
|
||||
int PictureId() const;
|
||||
int TemporalId() const;
|
||||
bool LayerSync() const;
|
||||
int Tl0PicId() const;
|
||||
bool NonReference() const;
|
||||
|
||||
|
||||
@@ -262,15 +262,17 @@ void VCMEncodedFrameCallback::CopyCodecSpecific(const CodecSpecificInfo& info,
|
||||
case kVideoCodecVP8: {
|
||||
(*rtp)->codecHeader.VP8.InitRTPVideoHeaderVP8();
|
||||
(*rtp)->codecHeader.VP8.pictureId =
|
||||
info.codecSpecific.VP8.pictureId;
|
||||
info.codecSpecific.VP8.pictureId;
|
||||
(*rtp)->codecHeader.VP8.nonReference =
|
||||
info.codecSpecific.VP8.nonReference;
|
||||
info.codecSpecific.VP8.nonReference;
|
||||
(*rtp)->codecHeader.VP8.temporalIdx =
|
||||
info.codecSpecific.VP8.temporalIdx;
|
||||
info.codecSpecific.VP8.temporalIdx;
|
||||
(*rtp)->codecHeader.VP8.layerSync =
|
||||
info.codecSpecific.VP8.layerSync;
|
||||
(*rtp)->codecHeader.VP8.tl0PicIdx =
|
||||
info.codecSpecific.VP8.tl0PicIdx;
|
||||
(*rtp)->codecHeader.VP8.keyIdx =
|
||||
info.codecSpecific.VP8.keyIdx;
|
||||
info.codecSpecific.VP8.keyIdx;
|
||||
(*rtp)->simulcastIdx = info.codecSpecific.VP8.simulcastIdx;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,13 @@ int VCMSessionInfo::TemporalId() const {
|
||||
return packets_.front().codecSpecificHeader.codecHeader.VP8.temporalIdx;
|
||||
}
|
||||
|
||||
bool VCMSessionInfo::LayerSync() const {
|
||||
if (packets_.empty() ||
|
||||
packets_.front().codecSpecificHeader.codec != kRTPVideoVP8)
|
||||
return false;
|
||||
return packets_.front().codecSpecificHeader.codecHeader.VP8.layerSync;
|
||||
}
|
||||
|
||||
int VCMSessionInfo::Tl0PicId() const {
|
||||
if (packets_.empty() ||
|
||||
packets_.front().codecSpecificHeader.codec != kRTPVideoVP8)
|
||||
|
||||
@@ -63,6 +63,7 @@ class VCMSessionInfo {
|
||||
int HighSequenceNumber() const;
|
||||
int PictureId() const;
|
||||
int TemporalId() const;
|
||||
bool LayerSync() const;
|
||||
int Tl0PicId() const;
|
||||
bool NonReference() const;
|
||||
int PrepareForDecode(uint8_t* frame_buffer);
|
||||
|
||||
Reference in New Issue
Block a user