mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1060249: disable frame motion/complexity analysis in webrtc on Gonk r=gcp
This commit is contained in:
parent
4a9ace7055
commit
ab0a7a2d05
@ -77,7 +77,16 @@ int VCMContentMetricsProcessing::UpdateContentData(
|
||||
if (contentMetrics == NULL) {
|
||||
return VCM_OK;
|
||||
}
|
||||
#if defined(WEBRTC_GONK)
|
||||
// "average" values that should yield kDefault in qm_select.cc
|
||||
contentMetrics->motion_magnitude = 0.05f;
|
||||
contentMetrics->spatial_pred_err = 0.03f;
|
||||
contentMetrics->spatial_pred_err_h = 0.03f;
|
||||
contentMetrics->spatial_pred_err_v = 0.03f;
|
||||
return VCM_OK;
|
||||
#else
|
||||
return ProcessContent(contentMetrics);
|
||||
#endif
|
||||
}
|
||||
|
||||
int VCMContentMetricsProcessing::ProcessContent(
|
||||
|
@ -60,6 +60,10 @@ void VCMQmMethod::UpdateContent(const VideoContentMetrics* contentMetrics) {
|
||||
}
|
||||
|
||||
void VCMQmMethod::ComputeMotionNFD() {
|
||||
#if defined(WEBRTC_GONK)
|
||||
motion_.value = (kHighMotionNfd + kLowMotionNfd)/2;
|
||||
motion_.level = kDefault;
|
||||
#else
|
||||
if (content_metrics_) {
|
||||
motion_.value = content_metrics_->motion_magnitude;
|
||||
}
|
||||
@ -71,9 +75,15 @@ void VCMQmMethod::ComputeMotionNFD() {
|
||||
} else {
|
||||
motion_.level = kDefault;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void VCMQmMethod::ComputeSpatial() {
|
||||
#if defined(WEBRTC_GONK)
|
||||
float scale2 = image_type_ > kVGA ? kScaleTexture : 1.0;
|
||||
spatial_.value = (kHighTexture + kLowTexture)*scale2/2;
|
||||
spatial_.level = kDefault;
|
||||
#else
|
||||
float spatial_err = 0.0;
|
||||
float spatial_err_h = 0.0;
|
||||
float spatial_err_v = 0.0;
|
||||
@ -95,6 +105,7 @@ void VCMQmMethod::ComputeSpatial() {
|
||||
} else {
|
||||
spatial_.level = kDefault;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ImageType VCMQmMethod::GetImageType(uint16_t width,
|
||||
|
@ -58,6 +58,7 @@ VideoContentMetrics* VPMContentAnalysis::ComputeContentMetrics(
|
||||
if (VPM_OK != Initialize(inputFrame.width(), inputFrame.height()))
|
||||
return NULL;
|
||||
}
|
||||
#if !defined(WEBRTC_GONK)
|
||||
// Compute motion metrics
|
||||
if (ca_Init_) {
|
||||
// Only interested in the Y plane.
|
||||
@ -75,6 +76,7 @@ VideoContentMetrics* VPMContentAnalysis::ComputeContentMetrics(
|
||||
|
||||
first_frame_ = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
return ContentMetrics();
|
||||
}
|
||||
@ -123,10 +125,12 @@ int32_t VPMContentAnalysis::Initialize(int width, int height) {
|
||||
return VPM_MEMORY;
|
||||
}
|
||||
|
||||
#if !defined(WEBRTC_GONK)
|
||||
prev_frame_.reset(new uint8_t[width_ * height_]); // Y only.
|
||||
if (!prev_frame_) {
|
||||
return VPM_MEMORY;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ok, all initialized
|
||||
ca_Init_ = true;
|
||||
|
Loading…
Reference in New Issue
Block a user