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