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

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: rebase 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 51%
copy from webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.cc
copy to webrtc/modules/video_coding/utility/qp_parser.cc
index 78b415c4c950224a459759cb681b8f04f807b6b4..62ce31351e3c16f31297b0ebca4f50132409f830 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/common_types.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 VCMEncodedFrame& frame, int* qp) {
+ switch (frame.CodecSpecific()->codecType) {
+ case kVideoCodecVP8:
+ // QP range: [0, 127].
+ return vp8::GetQp(frame.Buffer(), frame.Length(), qp);
+ default:
+ return false;
+ }
}
-LockedIsacBandwidthInfo::~LockedIsacBandwidthInfo() = default;
-
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698