| Index: webrtc/modules/interface/module_common_types.h
|
| diff --git a/webrtc/modules/interface/module_common_types.h b/webrtc/modules/interface/module_common_types.h
|
| index 62fe69481afbb585817c413b68b6507d35688723..232e695e767b26c202014c5a9f98fdf0f3206337 100644
|
| --- a/webrtc/modules/interface/module_common_types.h
|
| +++ b/webrtc/modules/interface/module_common_types.h
|
| @@ -69,7 +69,62 @@ struct RTPVideoHeaderVP8 {
|
| // in a VP8 partition. Otherwise false
|
| };
|
|
|
| +enum TemporalStructureMode {
|
| + kTemporalStructureMode1, // 1 temporal layer structure - i.e., IPPP...
|
| + kTemporalStructureMode2, // 2 temporal layers 0-1-0-1...
|
| + kTemporalStructureMode3 // 3 temporal layers 0-2-1-2-0-2-1-2...
|
| +};
|
| +
|
| struct GofInfoVP9 {
|
| + void SetGofInfoVP9(TemporalStructureMode tm) {
|
| + switch (tm) {
|
| + case kTemporalStructureMode1:
|
| + num_frames_in_gof = 1;
|
| + temporal_idx[0] = 0;
|
| + temporal_up_switch[0] = false;
|
| + num_ref_pics[0] = 1;
|
| + pid_diff[0][0] = 1;
|
| + break;
|
| + case kTemporalStructureMode2:
|
| + num_frames_in_gof = 2;
|
| + temporal_idx[0] = 0;
|
| + temporal_up_switch[0] = false;
|
| + num_ref_pics[0] = 1;
|
| + pid_diff[0][0] = 2;
|
| +
|
| + temporal_idx[1] = 1;
|
| + temporal_up_switch[1] = true;
|
| + num_ref_pics[1] = 1;
|
| + pid_diff[1][0] = 1;
|
| + break;
|
| + case kTemporalStructureMode3:
|
| + num_frames_in_gof = 4;
|
| + temporal_idx[0] = 0;
|
| + temporal_up_switch[0] = false;
|
| + num_ref_pics[0] = 1;
|
| + pid_diff[0][0] = 4;
|
| +
|
| + temporal_idx[1] = 2;
|
| + temporal_up_switch[1] = true;
|
| + num_ref_pics[1] = 1;
|
| + pid_diff[1][0] = 1;
|
| +
|
| + temporal_idx[2] = 1;
|
| + temporal_up_switch[2] = true;
|
| + num_ref_pics[2] = 1;
|
| + pid_diff[2][0] = 2;
|
| +
|
| + temporal_idx[3] = 2;
|
| + temporal_up_switch[3] = false;
|
| + num_ref_pics[3] = 2;
|
| + pid_diff[3][0] = 1;
|
| + pid_diff[3][1] = 2;
|
| + break;
|
| + default:
|
| + assert(false);
|
| + }
|
| + }
|
| +
|
| void CopyGofInfoVP9(const GofInfoVP9& src) {
|
| num_frames_in_gof = src.num_frames_in_gof;
|
| for (size_t i = 0; i < num_frames_in_gof; ++i) {
|
|
|