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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 rtc::BitBuffer* bit_buffer) { | 75 rtc::BitBuffer* bit_buffer) { |
76 PpsState pps; | 76 PpsState pps; |
77 | 77 |
78 RETURN_EMPTY_ON_FAIL(ParsePpsIdsInternal(bit_buffer, &pps.id, &pps.sps_id)); | 78 RETURN_EMPTY_ON_FAIL(ParsePpsIdsInternal(bit_buffer, &pps.id, &pps.sps_id)); |
79 | 79 |
80 uint32_t bits_tmp; | 80 uint32_t bits_tmp; |
81 uint32_t golomb_ignored; | 81 uint32_t golomb_ignored; |
82 // entropy_coding_mode_flag: u(1) | 82 // entropy_coding_mode_flag: u(1) |
83 uint32_t entropy_coding_mode_flag; | 83 uint32_t entropy_coding_mode_flag; |
84 RETURN_EMPTY_ON_FAIL(bit_buffer->ReadBits(&entropy_coding_mode_flag, 1)); | 84 RETURN_EMPTY_ON_FAIL(bit_buffer->ReadBits(&entropy_coding_mode_flag, 1)); |
85 // TODO(pbos): Implement CABAC support if spotted in the wild. | 85 pps.entropy_coding_mode_flag = !!entropy_coding_mode_flag; |
stefan-webrtc
2016/09/30 13:33:09
I'd also prefer != 0.
kthelgason
2016/09/30 14:09:48
You guys are no fun :(
| |
86 RTC_CHECK(entropy_coding_mode_flag == 0) | |
87 << "Don't know how to parse CABAC streams."; | |
88 // bottom_field_pic_order_in_frame_present_flag: u(1) | 86 // bottom_field_pic_order_in_frame_present_flag: u(1) |
89 uint32_t bottom_field_pic_order_in_frame_present_flag; | 87 uint32_t bottom_field_pic_order_in_frame_present_flag; |
90 RETURN_EMPTY_ON_FAIL( | 88 RETURN_EMPTY_ON_FAIL( |
91 bit_buffer->ReadBits(&bottom_field_pic_order_in_frame_present_flag, 1)); | 89 bit_buffer->ReadBits(&bottom_field_pic_order_in_frame_present_flag, 1)); |
92 pps.bottom_field_pic_order_in_frame_present_flag = | 90 pps.bottom_field_pic_order_in_frame_present_flag = |
93 bottom_field_pic_order_in_frame_present_flag != 0; | 91 bottom_field_pic_order_in_frame_present_flag != 0; |
94 | 92 |
95 // num_slice_groups_minus1: ue(v) | 93 // num_slice_groups_minus1: ue(v) |
96 uint32_t num_slice_groups_minus1; | 94 uint32_t num_slice_groups_minus1; |
97 RETURN_EMPTY_ON_FAIL( | 95 RETURN_EMPTY_ON_FAIL( |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 // pic_parameter_set_id: ue(v) | 182 // pic_parameter_set_id: ue(v) |
185 if (!bit_buffer->ReadExponentialGolomb(pps_id)) | 183 if (!bit_buffer->ReadExponentialGolomb(pps_id)) |
186 return false; | 184 return false; |
187 // seq_parameter_set_id: ue(v) | 185 // seq_parameter_set_id: ue(v) |
188 if (!bit_buffer->ReadExponentialGolomb(sps_id)) | 186 if (!bit_buffer->ReadExponentialGolomb(sps_id)) |
189 return false; | 187 return false; |
190 return true; | 188 return true; |
191 } | 189 } |
192 | 190 |
193 } // namespace webrtc | 191 } // namespace webrtc |
OLD | NEW |