Use the same QP max for tests as in production

BUG=webrtc:7664

Review-Url: https://codereview.webrtc.org/2941023002
Cr-Commit-Position: refs/heads/master@{#18611}
diff --git a/webrtc/media/engine/webrtcvideoengine.cc b/webrtc/media/engine/webrtcvideoengine.cc
index 852fa39..25afbb6 100644
--- a/webrtc/media/engine/webrtcvideoengine.cc
+++ b/webrtc/media/engine/webrtcvideoengine.cc
@@ -362,8 +362,6 @@
 // duration hasn't been implemented.
 static const int kNackHistoryMs = 1000;
 
-static const int kDefaultQpMax = 56;
-
 static const int kDefaultRtcpReceiverReportSsrc = 1;
 
 // Minimum time interval for logging stats.
diff --git a/webrtc/media/engine/webrtcvideoengine.h b/webrtc/media/engine/webrtcvideoengine.h
index 29c44ce..8928b41 100644
--- a/webrtc/media/engine/webrtcvideoengine.h
+++ b/webrtc/media/engine/webrtcvideoengine.h
@@ -187,6 +187,8 @@
     ADAPTREASON_BANDWIDTH = 2,
   };
 
+  static constexpr int kDefaultQpMax = 56;
+
  private:
   class WebRtcVideoReceiveStream;
   struct VideoCodecSettings {
diff --git a/webrtc/video/BUILD.gn b/webrtc/video/BUILD.gn
index ac8af11..da31bca 100644
--- a/webrtc/video/BUILD.gn
+++ b/webrtc/video/BUILD.gn
@@ -98,6 +98,7 @@
       "../call:call_interfaces",
       "../common_video",
       "../logging:rtc_event_log_api",
+      "../media:rtc_media",
       "../media:rtc_media_base",
       "../modules/audio_mixer:audio_mixer_impl",
       "../modules/rtp_rtcp",
diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc
index 76c743c..0ccc6b8 100644
--- a/webrtc/video/video_quality_test.cc
+++ b/webrtc/video/video_quality_test.cc
@@ -29,6 +29,7 @@
 #include "webrtc/call/call.h"
 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
 #include "webrtc/logging/rtc_event_log/rtc_event_log.h"
+#include "webrtc/media/engine/webrtcvideoengine.h"
 #include "webrtc/modules/audio_mixer/audio_mixer_impl.h"
 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
@@ -1170,7 +1171,7 @@
   stream.min_bitrate_bps = params.video.min_bitrate_bps;
   stream.target_bitrate_bps = params.video.target_bitrate_bps;
   stream.max_bitrate_bps = params.video.max_bitrate_bps;
-  stream.max_qp = 52;
+  stream.max_qp = cricket::WebRtcVideoChannel::kDefaultQpMax;
   // TODO(sprang): Can we make this less of a hack?
   if (params.video.num_temporal_layers == 2) {
     stream.temporal_layer_thresholds_bps.push_back(stream.target_bitrate_bps);
@@ -1190,7 +1191,7 @@
   stream.min_bitrate_bps = 7500;
   stream.target_bitrate_bps = 37500;
   stream.max_bitrate_bps = 50000;
-  stream.max_qp = 52;
+  stream.max_qp = cricket::WebRtcVideoChannel::kDefaultQpMax;
   return stream;
 }