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

Unified Diff: webrtc/common_video/h264/pps_parser.cc

Issue 2265023002: Revert of Add pps id and sps id parsing to the h.264 depacketizer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/common_video/h264/pps_parser.h ('k') | webrtc/common_video/h264/pps_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/h264/pps_parser.cc
diff --git a/webrtc/common_video/h264/pps_parser.cc b/webrtc/common_video/h264/pps_parser.cc
index 01a6c76d911ed4670016cf439ae1d8dd01cae52f..dd5d63d24619339a37d0402f1c3bdc1ea4c42c80 100644
--- a/webrtc/common_video/h264/pps_parser.cc
+++ b/webrtc/common_video/h264/pps_parser.cc
@@ -9,8 +9,6 @@
*/
#include "webrtc/common_video/h264/pps_parser.h"
-
-#include <memory>
#include "webrtc/common_video/h264/h264_common.h"
#include "webrtc/base/bitbuffer.h"
@@ -38,25 +36,6 @@
return ParseInternal(&bit_buffer);
}
-rtc::Optional<uint32_t> PpsParser::ParsePpsIdFromSlice(const uint8_t* data,
- size_t length) {
- std::unique_ptr<rtc::Buffer> slice_rbsp(H264::ParseRbsp(data, length));
- rtc::BitBuffer slice_reader(slice_rbsp->data(), slice_rbsp->size());
-
- uint32_t golomb_tmp;
- // first_mb_in_slice: ue(v)
- if (!slice_reader.ReadExponentialGolomb(&golomb_tmp))
- return rtc::Optional<uint32_t>();
- // slice_type: ue(v)
- if (!slice_reader.ReadExponentialGolomb(&golomb_tmp))
- return rtc::Optional<uint32_t>();
- // pic_parameter_set_id: ue(v)
- uint32_t slice_pps_id;
- if (!slice_reader.ReadExponentialGolomb(&slice_pps_id))
- return rtc::Optional<uint32_t>();
- return rtc::Optional<uint32_t>(slice_pps_id);
-}
-
rtc::Optional<PpsParser::PpsState> PpsParser::ParseInternal(
rtc::BitBuffer* bit_buffer) {
PpsState pps;
@@ -64,9 +43,9 @@
uint32_t bits_tmp;
uint32_t golomb_ignored;
// pic_parameter_set_id: ue(v)
- RETURN_EMPTY_ON_FAIL(bit_buffer->ReadExponentialGolomb(&pps.id));
+ RETURN_EMPTY_ON_FAIL(bit_buffer->ReadExponentialGolomb(&golomb_ignored));
// seq_parameter_set_id: ue(v)
- RETURN_EMPTY_ON_FAIL(bit_buffer->ReadExponentialGolomb(&pps.sps_id));
+ RETURN_EMPTY_ON_FAIL(bit_buffer->ReadExponentialGolomb(&golomb_ignored));
// entropy_coding_mode_flag: u(1)
uint32_t entropy_coding_mode_flag;
RETURN_EMPTY_ON_FAIL(bit_buffer->ReadBits(&entropy_coding_mode_flag, 1));
« no previous file with comments | « webrtc/common_video/h264/pps_parser.h ('k') | webrtc/common_video/h264/pps_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698