Add vp9 QP parser.

BUG=webrtc:7662

Review-Url: https://codereview.webrtc.org/2891803003
Cr-Commit-Position: refs/heads/master@{#18260}
This commit is contained in:
jianj
2017-05-24 10:00:16 -07:00
committed by Commit bot
parent a0c5d40a9e
commit 20acdf2443
4 changed files with 303 additions and 0 deletions

View File

@ -12,6 +12,7 @@
#include "webrtc/common_types.h"
#include "webrtc/modules/video_coding/utility/vp8_header_parser.h"
#include "webrtc/modules/video_coding/utility/vp9_uncompressed_header_parser.h"
namespace webrtc {
@ -20,6 +21,9 @@ bool QpParser::GetQp(const VCMEncodedFrame& frame, int* qp) {
case kVideoCodecVP8:
// QP range: [0, 127].
return vp8::GetQp(frame.Buffer(), frame.Length(), qp);
case kVideoCodecVP9:
// QP range: [0, 255].
return vp9::GetQp(frame.Buffer(), frame.Length(), qp);
default:
return false;
}