Propagate spatial index to EncodedImage.

Set spatial index of assembled VP9 picture equal to spatial index of
its top spatial layer frame.

Bug: webrtc:10151
Change-Id: Iae40505864b14b01cc6787f8da99a9e3fe283956
Reviewed-on: https://webrtc-review.googlesource.com/c/115280
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26075}
This commit is contained in:
Sergey Silkin
2018-12-20 14:32:14 +01:00
committed by Commit Bot
parent 76fd7b402e
commit 61832dd018
4 changed files with 29 additions and 19 deletions

View File

@ -44,6 +44,7 @@ void VCMEncodedFrame::Free() {
void VCMEncodedFrame::Reset() {
SetTimestamp(0);
SetSpatialIndex(absl::nullopt);
_renderTimeMs = -1;
_payloadType = 0;
_frameType = kVideoFrameDelta;
@ -116,6 +117,7 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header) {
if (vp9_header.spatial_idx != kNoSpatialIdx) {
_codecSpecificInfo.codecSpecific.VP9.inter_layer_predicted =
vp9_header.inter_layer_predicted;
SetSpatialIndex(vp9_header.spatial_idx);
}
if (vp9_header.gof_idx != kNoGofIdx) {
_codecSpecificInfo.codecSpecific.VP9.gof_idx = vp9_header.gof_idx;