VP9: Set speed setting to 8 for ARM.
At speed 8, vp9 on ARM is currently ~2x times slower than vp8 on ARM (speed -12). Update some parameters in videoprocessor_integrationtest.cc to make tests pass on android (which uses the new speed setting). TBR=stefan@webrtc.org BUG= Review URL: https://codereview.webrtc.org/1526973004 . Cr-Commit-Position: refs/heads/master@{#11072}
This commit is contained in:
@ -657,7 +657,7 @@ TEST_F(VideoProcessorIntegrationTest, ProcessNoLossChangeBitRateVP9) {
|
|||||||
false, true, false);
|
false, true, false);
|
||||||
// Metrics for expected quality.
|
// Metrics for expected quality.
|
||||||
QualityMetrics quality_metrics;
|
QualityMetrics quality_metrics;
|
||||||
SetQualityMetrics(&quality_metrics, 35.9, 30.0, 0.90, 0.85);
|
SetQualityMetrics(&quality_metrics, 35.7, 30.0, 0.90, 0.85);
|
||||||
// Metrics for rate control.
|
// Metrics for rate control.
|
||||||
RateControlMetrics rc_metrics[3];
|
RateControlMetrics rc_metrics[3];
|
||||||
SetRateControlMetrics(rc_metrics, 0, 0, 30, 20, 20, 30, 0, 1);
|
SetRateControlMetrics(rc_metrics, 0, 0, 30, 20, 20, 30, 0, 1);
|
||||||
@ -695,7 +695,7 @@ TEST_F(VideoProcessorIntegrationTest,
|
|||||||
SetQualityMetrics(&quality_metrics, 31.5, 18.0, 0.80, 0.44);
|
SetQualityMetrics(&quality_metrics, 31.5, 18.0, 0.80, 0.44);
|
||||||
// Metrics for rate control.
|
// Metrics for rate control.
|
||||||
RateControlMetrics rc_metrics[3];
|
RateControlMetrics rc_metrics[3];
|
||||||
SetRateControlMetrics(rc_metrics, 0, 35, 50, 70, 15, 45, 0, 1);
|
SetRateControlMetrics(rc_metrics, 0, 35, 50, 75, 15, 45, 0, 1);
|
||||||
SetRateControlMetrics(rc_metrics, 1, 10, 0, 40, 10, 30, 0, 0);
|
SetRateControlMetrics(rc_metrics, 1, 10, 0, 40, 10, 30, 0, 0);
|
||||||
SetRateControlMetrics(rc_metrics, 2, 5, 0, 30, 5, 20, 0, 0);
|
SetRateControlMetrics(rc_metrics, 2, 5, 0, 30, 5, 20, 0, 0);
|
||||||
ProcessFramesAndVerify(quality_metrics,
|
ProcessFramesAndVerify(quality_metrics,
|
||||||
@ -743,10 +743,10 @@ TEST_F(VideoProcessorIntegrationTest, ProcessNoLossSpatialResizeFrameDropVP9) {
|
|||||||
1, false, false, true, true);
|
1, false, false, true, true);
|
||||||
// Metrics for expected quality.
|
// Metrics for expected quality.
|
||||||
QualityMetrics quality_metrics;
|
QualityMetrics quality_metrics;
|
||||||
SetQualityMetrics(&quality_metrics, 25.0, 13.0, 0.70, 0.40);
|
SetQualityMetrics(&quality_metrics, 25.0, 13.0, 0.70, 0.37);
|
||||||
// Metrics for rate control.
|
// Metrics for rate control.
|
||||||
RateControlMetrics rc_metrics[1];
|
RateControlMetrics rc_metrics[1];
|
||||||
SetRateControlMetrics(rc_metrics, 0, 190, 70, 135, 15, 80, 1, 1);
|
SetRateControlMetrics(rc_metrics, 0, 225, 70, 160, 15, 80, 1, 1);
|
||||||
ProcessFramesAndVerify(quality_metrics,
|
ProcessFramesAndVerify(quality_metrics,
|
||||||
rate_profile,
|
rate_profile,
|
||||||
process_settings,
|
process_settings,
|
||||||
|
@ -36,12 +36,16 @@ namespace webrtc {
|
|||||||
// Only positive speeds, range for real-time coding currently is: 5 - 8.
|
// Only positive speeds, range for real-time coding currently is: 5 - 8.
|
||||||
// Lower means slower/better quality, higher means fastest/lower quality.
|
// Lower means slower/better quality, higher means fastest/lower quality.
|
||||||
int GetCpuSpeed(int width, int height) {
|
int GetCpuSpeed(int width, int height) {
|
||||||
|
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64)
|
||||||
|
return 8;
|
||||||
|
#else
|
||||||
// For smaller resolutions, use lower speed setting (get some coding gain at
|
// For smaller resolutions, use lower speed setting (get some coding gain at
|
||||||
// the cost of increased encoding complexity).
|
// the cost of increased encoding complexity).
|
||||||
if (width * height <= 352 * 288)
|
if (width * height <= 352 * 288)
|
||||||
return 5;
|
return 5;
|
||||||
else
|
else
|
||||||
return 7;
|
return 7;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
VP9Encoder* VP9Encoder::Create() {
|
VP9Encoder* VP9Encoder::Create() {
|
||||||
|
Reference in New Issue
Block a user