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

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

Issue 1979443004: Add H264 bitstream rewriting to limit frame reordering marker in header (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments Created 4 years, 6 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
« no previous file with comments | « webrtc/common_video/h264/h264_common.cc ('k') | webrtc/common_video/h264/pps_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_COMMON_VIDEO_H264_PPS_PARSER_H_
12 #define WEBRTC_COMMON_VIDEO_H264_PPS_PARSER_H_
13
14 #include "webrtc/base/common.h"
15 #include "webrtc/base/optional.h"
16
17 namespace rtc {
18 class BitBuffer;
19 }
20
21 namespace webrtc {
22
23 // A class for parsing out picture parameter set (PPS) data from a H264 NALU.
24 class PpsParser {
25 public:
26 // The parsed state of the PPS. Only some select values are stored.
27 // Add more as they are actually needed.
28 struct PpsState {
29 PpsState() = default;
30
31 bool bottom_field_pic_order_in_frame_present_flag = false;
32 bool weighted_pred_flag = false;
33 uint32_t weighted_bipred_idc = false;
34 uint32_t redundant_pic_cnt_present_flag = 0;
35 int pic_init_qp_minus26 = 0;
36 };
37
38 // Unpack RBSP and parse PPS state from the supplied buffer.
39 static rtc::Optional<PpsState> ParsePps(const uint8_t* data, size_t length);
40
41 protected:
42 // Parse the PPS state, for a bit buffer where RBSP decoding has already been
43 // performed.
44 static rtc::Optional<PpsState> ParseInternal(rtc::BitBuffer* bit_buffer);
45 };
46
47 } // namespace webrtc
48
49 #endif // WEBRTC_COMMON_VIDEO_H264_PPS_PARSER_H_
OLDNEW
« no previous file with comments | « webrtc/common_video/h264/h264_common.cc ('k') | webrtc/common_video/h264/pps_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698