Skip to content

Commit

Permalink
Fix VP9 kSVC forwarding logic to not forward lower unneded layers (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarber authored Mar 1, 2022
1 parent 26943dc commit 1a75147
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions worker/src/RTC/Codecs/VP9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,17 @@ namespace RTC
}
}

// Filter spatial layers higher than current one (unless old packet).
if (packetSpatialLayer > tmpSpatialLayer && !isOldPacket)
// Unless old packet filter spatial layers that are either
// * higher than current one
// * different than the current one when KSVC is enabled and this is not a keyframe
// (interframe p bit = 1)
if (
!isOldPacket &&
(packetSpatialLayer > tmpSpatialLayer ||
(context->IsKSvc() && this->payloadDescriptor->p && packetSpatialLayer != tmpSpatialLayer)))
{
return false;
}

// Check and handle temporal layer (unless old packet).
if (!isOldPacket)
Expand Down

0 comments on commit 1a75147

Please sign in to comment.