| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void InsertVp9Gof(uint16_t seq_num_start, | 115 void InsertVp9Gof(uint16_t seq_num_start, |
| 116 uint16_t seq_num_end, | 116 uint16_t seq_num_end, |
| 117 bool keyframe, | 117 bool keyframe, |
| 118 int32_t pid = kNoPictureId, | 118 int32_t pid = kNoPictureId, |
| 119 uint8_t sid = kNoSpatialIdx, | 119 uint8_t sid = kNoSpatialIdx, |
| 120 uint8_t tid = kNoTemporalIdx, | 120 uint8_t tid = kNoTemporalIdx, |
| 121 int32_t tl0 = kNoTl0PicIdx, | 121 int32_t tl0 = kNoTl0PicIdx, |
| 122 bool up_switch = false, | 122 bool up_switch = false, |
| 123 GofInfoVP9* ss = nullptr) { | 123 GofInfoVP9* ss = nullptr) { |
| 124 VCMPacket packet; | 124 VCMPacket packet; |
| 125 packet.timestamp = pid; |
| 125 packet.codec = kVideoCodecVP9; | 126 packet.codec = kVideoCodecVP9; |
| 126 packet.seqNum = seq_num_start; | 127 packet.seqNum = seq_num_start; |
| 127 packet.frameType = keyframe ? kVideoFrameKey : kVideoFrameDelta; | 128 packet.frameType = keyframe ? kVideoFrameKey : kVideoFrameDelta; |
| 128 packet.video_header.codecHeader.VP9.flexible_mode = false; | 129 packet.video_header.codecHeader.VP9.flexible_mode = false; |
| 129 packet.video_header.codecHeader.VP9.picture_id = pid % (1 << 15); | 130 packet.video_header.codecHeader.VP9.picture_id = pid % (1 << 15); |
| 130 packet.video_header.codecHeader.VP9.temporal_idx = tid; | 131 packet.video_header.codecHeader.VP9.temporal_idx = tid; |
| 131 packet.video_header.codecHeader.VP9.spatial_idx = sid; | 132 packet.video_header.codecHeader.VP9.spatial_idx = sid; |
| 132 packet.video_header.codecHeader.VP9.tl0_pic_idx = tl0; | 133 packet.video_header.codecHeader.VP9.tl0_pic_idx = tl0; |
| 133 packet.video_header.codecHeader.VP9.temporal_up_switch = up_switch; | 134 packet.video_header.codecHeader.VP9.temporal_up_switch = up_switch; |
| 134 if (ss != nullptr) { | 135 if (ss != nullptr) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 145 void InsertVp9Flex(uint16_t seq_num_start, | 146 void InsertVp9Flex(uint16_t seq_num_start, |
| 146 uint16_t seq_num_end, | 147 uint16_t seq_num_end, |
| 147 bool keyframe, | 148 bool keyframe, |
| 148 int32_t pid = kNoPictureId, | 149 int32_t pid = kNoPictureId, |
| 149 uint8_t sid = kNoSpatialIdx, | 150 uint8_t sid = kNoSpatialIdx, |
| 150 uint8_t tid = kNoTemporalIdx, | 151 uint8_t tid = kNoTemporalIdx, |
| 151 int32_t tl0 = kNoTl0PicIdx, | 152 int32_t tl0 = kNoTl0PicIdx, |
| 152 bool inter = false, | 153 bool inter = false, |
| 153 std::vector<uint8_t> refs = std::vector<uint8_t>()) { | 154 std::vector<uint8_t> refs = std::vector<uint8_t>()) { |
| 154 VCMPacket packet; | 155 VCMPacket packet; |
| 156 packet.timestamp = pid; |
| 155 packet.codec = kVideoCodecVP9; | 157 packet.codec = kVideoCodecVP9; |
| 156 packet.seqNum = seq_num_start; | 158 packet.seqNum = seq_num_start; |
| 157 packet.frameType = keyframe ? kVideoFrameKey : kVideoFrameDelta; | 159 packet.frameType = keyframe ? kVideoFrameKey : kVideoFrameDelta; |
| 158 packet.video_header.codecHeader.VP9.inter_layer_predicted = inter; | 160 packet.video_header.codecHeader.VP9.inter_layer_predicted = inter; |
| 159 packet.video_header.codecHeader.VP9.flexible_mode = true; | 161 packet.video_header.codecHeader.VP9.flexible_mode = true; |
| 160 packet.video_header.codecHeader.VP9.picture_id = pid % (1 << 15); | 162 packet.video_header.codecHeader.VP9.picture_id = pid % (1 << 15); |
| 161 packet.video_header.codecHeader.VP9.temporal_idx = tid; | 163 packet.video_header.codecHeader.VP9.temporal_idx = tid; |
| 162 packet.video_header.codecHeader.VP9.spatial_idx = sid; | 164 packet.video_header.codecHeader.VP9.spatial_idx = sid; |
| 163 packet.video_header.codecHeader.VP9.tl0_pic_idx = tl0; | 165 packet.video_header.codecHeader.VP9.tl0_pic_idx = tl0; |
| 164 packet.video_header.codecHeader.VP9.num_ref_pics = refs.size(); | 166 packet.video_header.codecHeader.VP9.num_ref_pics = refs.size(); |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 CheckReferencesVp9(pid + 5, 1, pid + 4); | 1218 CheckReferencesVp9(pid + 5, 1, pid + 4); |
| 1217 CheckReferencesVp9(pid + 6, 0, pid + 4); | 1219 CheckReferencesVp9(pid + 6, 0, pid + 4); |
| 1218 CheckReferencesVp9(pid + 6, 1, pid + 5); | 1220 CheckReferencesVp9(pid + 6, 1, pid + 5); |
| 1219 CheckReferencesVp9(pid + 7, 1, pid + 6); | 1221 CheckReferencesVp9(pid + 7, 1, pid + 6); |
| 1220 CheckReferencesVp9(pid + 8, 0, pid + 6); | 1222 CheckReferencesVp9(pid + 8, 0, pid + 6); |
| 1221 CheckReferencesVp9(pid + 8, 1, pid + 7); | 1223 CheckReferencesVp9(pid + 8, 1, pid + 7); |
| 1222 } | 1224 } |
| 1223 | 1225 |
| 1224 } // namespace video_coding | 1226 } // namespace video_coding |
| 1225 } // namespace webrtc | 1227 } // namespace webrtc |
| OLD | NEW |