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

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

Issue 2728093002: Optimize ParseRbsp method in H264 bitstream parser. (Closed)
Patch Set: Remove unused includes Created 3 years, 9 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.cc ('k') | webrtc/common_video/h264/sps_vui_rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/h264/sps_parser.cc
diff --git a/webrtc/common_video/h264/sps_parser.cc b/webrtc/common_video/h264/sps_parser.cc
index 86a39de83f522aaa8796c617650e1f1606a4a33e..3bf08539bf90d47422db9250e5b85b426e413ab3 100644
--- a/webrtc/common_video/h264/sps_parser.cc
+++ b/webrtc/common_video/h264/sps_parser.cc
@@ -11,10 +11,10 @@
#include "webrtc/common_video/h264/sps_parser.h"
#include <memory>
+#include <vector>
#include "webrtc/common_video/h264/h264_common.h"
#include "webrtc/base/bitbuffer.h"
-#include "webrtc/base/bytebuffer.h"
#include "webrtc/base/logging.h"
typedef rtc::Optional<webrtc::SpsParser::SpsState> OptionalSps;
@@ -33,8 +33,8 @@ namespace webrtc {
// Unpack RBSP and parse SPS state from the supplied buffer.
rtc::Optional<SpsParser::SpsState> SpsParser::ParseSps(const uint8_t* data,
size_t length) {
- std::unique_ptr<rtc::Buffer> unpacked_buffer = H264::ParseRbsp(data, length);
- rtc::BitBuffer bit_buffer(unpacked_buffer->data(), unpacked_buffer->size());
+ std::vector<uint8_t> unpacked_buffer = H264::ParseRbsp(data, length);
+ rtc::BitBuffer bit_buffer(unpacked_buffer.data(), unpacked_buffer.size());
return ParseSpsUpToVui(&bit_buffer);
}
« no previous file with comments | « webrtc/common_video/h264/pps_parser.cc ('k') | webrtc/common_video/h264/sps_vui_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698