Commit f125fd31 authored by Jasmine Chen's avatar Jasmine Chen Committed by Commit Bot

Disable EE and NR in the reprocessing request for still captures

This CL disables Edge Enhancement (EE) and Noise Reduction (NR) in the
reprocessing request for still captures.

BUG=b:143260723
TEST=Tested on kukui and inspected with Camera Metadata Inspector

Change-Id: I4ffaed4759a9aa24e2f33d1a9b178b1aae278559
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1983111Reviewed-by: default avatarShik Chen <shik@chromium.org>
Commit-Queue: Jasmine Chen <lnishan@google.com>
Auto-Submit: Jasmine Chen <lnishan@google.com>
Cr-Commit-Position: refs/heads/master@{#727951}
parent 29b7460b
......@@ -57,6 +57,9 @@ ReprocessTaskQueue CameraAppDeviceImpl::GetSingleShotReprocessOptions(
still_capture_task.effect = cros::mojom::Effect::NO_EFFECT;
still_capture_task.callback =
base::BindOnce(&OnStillCaptureDone, std::move(take_photo_callback));
// Explicitly disable edge enhancement and noise reduction for YUV -> JPG
// conversion.
DisableEeNr(&still_capture_task);
result_task_queue.push(std::move(still_capture_task));
return result_task_queue;
}
......@@ -90,6 +93,9 @@ void CameraAppDeviceImpl::ConsumeReprocessOptions(
still_capture_task.effect = cros::mojom::Effect::NO_EFFECT;
still_capture_task.callback =
base::BindOnce(&OnStillCaptureDone, std::move(take_photo_callback));
// Explicitly disable edge enhancement and noise reduction for YUV -> JPG
// conversion.
DisableEeNr(&still_capture_task);
result_task_queue.push(std::move(still_capture_task));
base::AutoLock lock(reprocess_tasks_lock_);
......@@ -276,4 +282,16 @@ void CameraAppDeviceImpl::RemoveCameraEventObserver(
std::move(callback).Run(is_success);
}
// static
void CameraAppDeviceImpl::DisableEeNr(ReprocessTask* task) {
auto ee_entry =
BuildMetadataEntry(cros::mojom::CameraMetadataTag::ANDROID_EDGE_MODE,
cros::mojom::AndroidEdgeMode::ANDROID_EDGE_MODE_OFF);
auto nr_entry = BuildMetadataEntry(
cros::mojom::CameraMetadataTag::ANDROID_NOISE_REDUCTION_MODE,
cros::mojom::AndroidNoiseReductionMode::ANDROID_NOISE_REDUCTION_MODE_OFF);
task->extra_metadata.push_back(std::move(ee_entry));
task->extra_metadata.push_back(std::move(nr_entry));
}
} // namespace media
......@@ -116,6 +116,8 @@ class CAPTURE_EXPORT CameraAppDeviceImpl : public cros::mojom::CameraAppDevice {
RemoveCameraEventObserverCallback callback) override;
private:
static void DisableEeNr(ReprocessTask* task);
std::string device_id_;
mojo::ReceiverSet<cros::mojom::CameraAppDevice> receivers_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment