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

Unified Diff: webrtc/modules/video_coding/utility/qp_parser.cc

Issue 1340623002: Add stats for average QP per frame for VP8 (for received video streams). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: address comment Created 5 years, 2 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
Index: webrtc/modules/video_coding/utility/qp_parser.cc
diff --git a/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.cc b/webrtc/modules/video_coding/utility/qp_parser.cc
similarity index 50%
copy from webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.cc
copy to webrtc/modules/video_coding/utility/qp_parser.cc
index 78b415c4c950224a459759cb681b8f04f807b6b4..09728f98caaad1687cdb662243c26f55c4dc04a7 100644
--- a/webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.cc
+++ b/webrtc/modules/video_coding/utility/qp_parser.cc
@@ -8,15 +8,21 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h"
+#include "webrtc/modules/video_coding/utility/include/qp_parser.h"
+
+#include "webrtc/modules/video_coding/utility/include/vp8_header_parser.h"
namespace webrtc {
-LockedIsacBandwidthInfo::LockedIsacBandwidthInfo()
- : lock_(CriticalSectionWrapper::CreateCriticalSection()) {
- bwinfo_.in_use = 0;
+bool QpParser::GetQp(const uint8_t* encoded_frame,
+ size_t length,
+ VideoCodecType codec_type,
+ int* qp) {
+ if (codec_type == kVideoCodecVP8) {
+ // QP range: [0, 127].
+ return vp8::GetQp(encoded_frame, length, qp);
+ }
+ return false;
}
-LockedIsacBandwidthInfo::~LockedIsacBandwidthInfo() = default;
-
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698