OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 assert(false); | 124 assert(false); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 void CopyGofInfoVP9(const GofInfoVP9& src) { | 128 void CopyGofInfoVP9(const GofInfoVP9& src) { |
129 num_frames_in_gof = src.num_frames_in_gof; | 129 num_frames_in_gof = src.num_frames_in_gof; |
130 for (size_t i = 0; i < num_frames_in_gof; ++i) { | 130 for (size_t i = 0; i < num_frames_in_gof; ++i) { |
131 temporal_idx[i] = src.temporal_idx[i]; | 131 temporal_idx[i] = src.temporal_idx[i]; |
132 temporal_up_switch[i] = src.temporal_up_switch[i]; | 132 temporal_up_switch[i] = src.temporal_up_switch[i]; |
133 num_ref_pics[i] = src.num_ref_pics[i]; | 133 num_ref_pics[i] = src.num_ref_pics[i]; |
134 for (size_t r = 0; r < num_ref_pics[i]; ++r) { | 134 for (uint8_t r = 0; r < num_ref_pics[i]; ++r) { |
135 pid_diff[i][r] = src.pid_diff[i][r]; | 135 pid_diff[i][r] = src.pid_diff[i][r]; |
136 } | 136 } |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 size_t num_frames_in_gof; | 140 size_t num_frames_in_gof; |
141 uint8_t temporal_idx[kMaxVp9FramesInGof]; | 141 uint8_t temporal_idx[kMaxVp9FramesInGof]; |
142 bool temporal_up_switch[kMaxVp9FramesInGof]; | 142 bool temporal_up_switch[kMaxVp9FramesInGof]; |
143 size_t num_ref_pics[kMaxVp9FramesInGof]; | 143 uint8_t num_ref_pics[kMaxVp9FramesInGof]; |
144 int16_t pid_diff[kMaxVp9FramesInGof][kMaxVp9RefPics]; | 144 uint8_t pid_diff[kMaxVp9FramesInGof][kMaxVp9RefPics]; |
145 }; | 145 }; |
146 | 146 |
147 struct RTPVideoHeaderVP9 { | 147 struct RTPVideoHeaderVP9 { |
148 void InitRTPVideoHeaderVP9() { | 148 void InitRTPVideoHeaderVP9() { |
149 inter_pic_predicted = false; | 149 inter_pic_predicted = false; |
150 flexible_mode = false; | 150 flexible_mode = false; |
151 beginning_of_frame = false; | 151 beginning_of_frame = false; |
152 end_of_frame = false; | 152 end_of_frame = false; |
153 ss_data_available = false; | 153 ss_data_available = false; |
154 picture_id = kNoPictureId; | 154 picture_id = kNoPictureId; |
(...skipping 23 matching lines...) Expand all Loading... |
178 // kNoTl0PicIdx means no value provided. | 178 // kNoTl0PicIdx means no value provided. |
179 uint8_t temporal_idx; // Temporal layer index, or kNoTemporalIdx. | 179 uint8_t temporal_idx; // Temporal layer index, or kNoTemporalIdx. |
180 uint8_t spatial_idx; // Spatial layer index, or kNoSpatialIdx. | 180 uint8_t spatial_idx; // Spatial layer index, or kNoSpatialIdx. |
181 bool temporal_up_switch; // True if upswitch to higher frame rate is possible | 181 bool temporal_up_switch; // True if upswitch to higher frame rate is possible |
182 // starting from this frame. | 182 // starting from this frame. |
183 bool inter_layer_predicted; // Frame is dependent on directly lower spatial | 183 bool inter_layer_predicted; // Frame is dependent on directly lower spatial |
184 // layer frame. | 184 // layer frame. |
185 | 185 |
186 uint8_t gof_idx; // Index to predefined temporal frame info in SS data. | 186 uint8_t gof_idx; // Index to predefined temporal frame info in SS data. |
187 | 187 |
188 size_t num_ref_pics; // Number of reference pictures used by this layer | 188 uint8_t num_ref_pics; // Number of reference pictures used by this layer |
189 // frame. | 189 // frame. |
190 int16_t pid_diff[kMaxVp9RefPics]; // P_DIFF signaled to derive the PictureID | 190 uint8_t pid_diff[kMaxVp9RefPics]; // P_DIFF signaled to derive the PictureID |
191 // of the reference pictures. | 191 // of the reference pictures. |
192 int16_t ref_picture_id[kMaxVp9RefPics]; // PictureID of reference pictures. | 192 int16_t ref_picture_id[kMaxVp9RefPics]; // PictureID of reference pictures. |
193 | 193 |
194 // SS data. | 194 // SS data. |
195 size_t num_spatial_layers; // Always populated. | 195 size_t num_spatial_layers; // Always populated. |
196 bool spatial_layer_resolution_present; | 196 bool spatial_layer_resolution_present; |
197 uint16_t width[kMaxVp9NumberOfSpatialLayers]; | 197 uint16_t width[kMaxVp9NumberOfSpatialLayers]; |
198 uint16_t height[kMaxVp9NumberOfSpatialLayers]; | 198 uint16_t height[kMaxVp9NumberOfSpatialLayers]; |
199 GofInfoVP9 gof; | 199 GofInfoVP9 gof; |
200 }; | 200 }; |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 return unwrapped; | 801 return unwrapped; |
802 } | 802 } |
803 | 803 |
804 private: | 804 private: |
805 int64_t last_seq_; | 805 int64_t last_seq_; |
806 }; | 806 }; |
807 | 807 |
808 } // namespace webrtc | 808 } // namespace webrtc |
809 | 809 |
810 #endif // WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ | 810 #endif // WEBRTC_MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ |
OLD | NEW |