Bug 1060249: disable frame motion/complexity analysis in webrtc on Gonk r=gcp

This commit is contained in:
Randell Jesup 2014-08-29 21:29:17 -04:00
Родитель 2a2f6b1b89
Коммит 53878161ce
2 изменённых файлов: 15 добавлений и 0 удалений

Просмотреть файл

@ -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;