From 9e812fca9fc6f31979d07358ca53b72996d43c02 Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Thu, 8 Sep 2011 10:11:24 +0000 Subject: [PATCH] Adding missing parts related to VP8 partitions Review URL: http://webrtc-codereview.appspot.com/131017 git-svn-id: http://webrtc.googlecode.com/svn/trunk@561 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/interface/module_common_types.h | 9 +++++++-- src/modules/rtp_rtcp/source/rtp_receiver_video.cc | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/modules/interface/module_common_types.h b/src/modules/interface/module_common_types.h index 686493fb00..6e35a9d3be 100644 --- a/src/modules/interface/module_common_types.h +++ b/src/modules/interface/module_common_types.h @@ -53,6 +53,8 @@ struct RTPVideoHeaderVP8 pictureId = kNoPictureId; tl0PicIdx = kNoTl0PicIdx; temporalIdx = kNoTemporalIdx; + partitionId = 0; + beginningOfPartition = false; } bool nonReference; // Frame is discardable. @@ -61,6 +63,9 @@ struct RTPVideoHeaderVP8 WebRtc_Word16 tl0PicIdx; // TL0PIC_IDX, 8 bits; // kNoTl0PicIdx means no value provided. WebRtc_Word8 temporalIdx; // Temporal layer index, or kNoTemporalIdx. + int partitionId; // VP8 partition ID + bool beginningOfPartition; // True if this packet is the first + // in a VP8 partition. Otherwise false }; union RTPVideoTypeHeader { @@ -372,11 +377,11 @@ public: struct VideoContentMetrics { VideoContentMetrics(): motionMagnitudeNZ(0), sizeZeroMotion(0), spatialPredErr(0), - spatialPredErrH(0), spatialPredErrV(0), motionPredErr(0), + spatialPredErrH(0), spatialPredErrV(0), motionPredErr(0), motionHorizontalness(0), motionClusterDistortion(0), nativeWidth(0), nativeHeight(0), contentChange(false) { } void Reset(){ motionMagnitudeNZ = 0; sizeZeroMotion = 0; spatialPredErr = 0; - spatialPredErrH = 0; spatialPredErrV = 0; motionPredErr = 0; + spatialPredErrH = 0; spatialPredErrV = 0; motionPredErr = 0; motionHorizontalness = 0; motionClusterDistortion = 0; nativeWidth = 0; nativeHeight = 0; contentChange = false; } diff --git a/src/modules/rtp_rtcp/source/rtp_receiver_video.cc b/src/modules/rtp_rtcp/source/rtp_receiver_video.cc index 9dd19e278e..535cf0e423 100644 --- a/src/modules/rtp_rtcp/source/rtp_receiver_video.cc +++ b/src/modules/rtp_rtcp/source/rtp_receiver_video.cc @@ -645,6 +645,8 @@ RTPReceiverVideo::ReceiveVp8Codec(WebRtcRTPHeader* rtpHeader, kNoTl0PicIdx; toHeader->temporalIdx = fromHeader->hasTID ? fromHeader->tID : kNoTemporalIdx; + toHeader->partitionId = fromHeader->partitionID; + toHeader->beginningOfPartition = fromHeader->beginningOfPartition; if(CallbackOfReceivedPayloadData(parsedPacket.info.VP8.data, parsedPacket.info.VP8.dataLength,