Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(690)

Side by Side Diff: webrtc/common_video/h264/pps_parser.h

Issue 2316993002: Only parse PPS up to PPS and SPS ids in the depacketizater. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 22 matching lines...) Expand all
33 uint32_t weighted_bipred_idc = false; 33 uint32_t weighted_bipred_idc = false;
34 uint32_t redundant_pic_cnt_present_flag = 0; 34 uint32_t redundant_pic_cnt_present_flag = 0;
35 int pic_init_qp_minus26 = 0; 35 int pic_init_qp_minus26 = 0;
36 uint32_t id = 0; 36 uint32_t id = 0;
37 uint32_t sps_id = 0; 37 uint32_t sps_id = 0;
38 }; 38 };
39 39
40 // Unpack RBSP and parse PPS state from the supplied buffer. 40 // Unpack RBSP and parse PPS state from the supplied buffer.
41 static rtc::Optional<PpsState> ParsePps(const uint8_t* data, size_t length); 41 static rtc::Optional<PpsState> ParsePps(const uint8_t* data, size_t length);
42 42
43 static bool ParsePpsIds(const uint8_t* data,
44 size_t length,
45 uint32_t* pps_id,
46 uint32_t* sps_id);
47
43 static rtc::Optional<uint32_t> ParsePpsIdFromSlice(const uint8_t* data, 48 static rtc::Optional<uint32_t> ParsePpsIdFromSlice(const uint8_t* data,
44 size_t length); 49 size_t length);
45 50
46 protected: 51 protected:
47 // Parse the PPS state, for a bit buffer where RBSP decoding has already been 52 // Parse the PPS state, for a bit buffer where RBSP decoding has already been
48 // performed. 53 // performed.
49 static rtc::Optional<PpsState> ParseInternal(rtc::BitBuffer* bit_buffer); 54 static rtc::Optional<PpsState> ParseInternal(rtc::BitBuffer* bit_buffer);
55 static bool ParsePpsIdsInternal(rtc::BitBuffer* bit_buffer,
56 uint32_t* pps_id,
57 uint32_t* sps_id);
50 }; 58 };
51 59
52 } // namespace webrtc 60 } // namespace webrtc
53 61
54 #endif // WEBRTC_COMMON_VIDEO_H264_PPS_PARSER_H_ 62 #endif // WEBRTC_COMMON_VIDEO_H264_PPS_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_video/h264/pps_parser.cc » ('j') | webrtc/common_video/h264/pps_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698