Add non_ref_for_inter_layer_pred to VP9 RTP.

This converts the reserved bit in VP9 RTP payload descriptor into the
flag which indicates whether current frame can be used for prediction
of next spatial layer or not.

VP9 encoder wrapper sets non_ref_for_inter_layer_pred=false for all
frames for now.

Bug: none
Change-Id: I32f68868686475905fb09173cffd2b6e1bedcb7c
Reviewed-on: https://webrtc-review.googlesource.com/71080
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23010}
diff --git a/modules/video_coding/codecs/vp9/include/vp9_globals.h b/modules/video_coding/codecs/vp9/include/vp9_globals.h
index f24ab3e..4d8ff3c 100644
--- a/modules/video_coding/codecs/vp9/include/vp9_globals.h
+++ b/modules/video_coding/codecs/vp9/include/vp9_globals.h
@@ -162,6 +162,7 @@
     beginning_of_frame = false;
     end_of_frame = false;
     ss_data_available = false;
+    non_ref_for_inter_layer_pred = false;
     picture_id = kNoPictureId;
     max_picture_id = kMaxTwoBytePictureId;
     tl0_pic_idx = kNoTl0PicIdx;
@@ -183,6 +184,8 @@
   bool end_of_frame;  // True if this packet is the last in a VP9 layer frame.
   bool ss_data_available;   // True if SS data is available in this payload
                             // descriptor.
+  bool non_ref_for_inter_layer_pred;  // True for frame which is not used as
+                                      // reference for inter-layer prediction.
   int16_t picture_id;       // PictureID index, 15 bits;
                             // kNoPictureId if PictureID does not exist.
   int16_t max_picture_id;   // Maximum picture ID index; either 0x7F or 0x7FFF;
diff --git a/modules/video_coding/codecs/vp9/vp9_impl.cc b/modules/video_coding/codecs/vp9/vp9_impl.cc
index 5076af2..d133e66 100644
--- a/modules/video_coding/codecs/vp9/vp9_impl.cc
+++ b/modules/video_coding/codecs/vp9/vp9_impl.cc
@@ -602,6 +602,7 @@
       ((pkt.data.frame.flags & VPX_FRAME_IS_KEY) && !codec_.VP9()->flexibleMode)
           ? true
           : false;
+  vp9_info->non_ref_for_inter_layer_pred = false;
 
   vpx_svc_layer_id_t layer_id = {0};
   vpx_codec_control(encoder_, VP9E_GET_SVC_LAYER_ID, &layer_id);
diff --git a/modules/video_coding/include/video_codec_interface.h b/modules/video_coding/include/video_codec_interface.h
index 204098c..aad3759 100644
--- a/modules/video_coding/include/video_codec_interface.h
+++ b/modules/video_coding/include/video_codec_interface.h
@@ -48,6 +48,7 @@
                              // coded frame(s).
   bool flexible_mode;
   bool ss_data_available;
+  bool non_ref_for_inter_layer_pred;
 
   // TODO(nisse): Used on receive side only. Move elsewhere?
   int tl0_pic_idx;  // Negative value to skip tl0PicIdx.