From 884d8e7f4b3d18fc7c490e88241aa347329609a4 Mon Sep 17 00:00:00 2001 From: "mikhal@webrtc.org" Date: Mon, 19 Dec 2011 18:53:05 +0000 Subject: [PATCH] video_coding: Updating sync state based on the layer flag Review URL: http://webrtc-codereview.appspot.com/333004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1236 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/video_coding/main/source/decoding_state.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/video_coding/main/source/decoding_state.cc b/src/modules/video_coding/main/source/decoding_state.cc index 32bc3c88e..cbbde9b89 100644 --- a/src/modules/video_coding/main/source/decoding_state.cc +++ b/src/modules/video_coding/main/source/decoding_state.cc @@ -121,8 +121,7 @@ void VCMDecodingState::UpdateSyncState(const VCMFrameBuffer* frame) { if (frame->TemporalId() == kNoTemporalIdx || frame->Tl0PicId() == kNoTl0PicIdx) { full_sync_ = true; - } else if (frame->FrameType() == kVideoFrameKey || - frame->NonReference()) { + } else if (frame->FrameType() == kVideoFrameKey || frame->LayerSync()) { full_sync_ = true; } else if (full_sync_) { // Verify that we are still in sync. @@ -149,7 +148,9 @@ bool VCMDecodingState::ContinuousFrame(const VCMFrameBuffer* frame) const { if (!ContinuousLayer(frame->TemporalId(), frame->Tl0PicId())) { // Base layers are not continuous or temporal layers are inactive. - if (!full_sync_) + // In the presence of temporal layers, check for Picture ID/sequence number + // continuity if sync can be restored by this frame. + if (!full_sync_ && !frame->LayerSync()) return false; else if (!ContinuousPictureId(frame->PictureId())) return ContinuousSeqNum(static_cast(frame->GetLowSeqNum())); @@ -193,7 +194,7 @@ bool VCMDecodingState::ContinuousLayer(int temporal_id, temporal_id == 0) return true; - // Current implementation: applicable for base layer only. + // Current implementation: Look for base layer continuity. if (temporal_id != 0) return false; return (static_cast(tl0_pic_id_ + 1) ==