cameraservice_test: Add DepthProcessorTest to the host build.

DepthProcessorTest depends on libdynamic_depth and lib_image_io, which
up until now have had no host build. The topic-related patches add the
host_supported flag to both of them.

Some additions have been made to NVCompressor.h and DepthPhotoProcessor.cpp
to build successfully on the host. These have minimal impact.

Bug: 207411352
Test: Ran test on gLinux.
Change-Id: Ifa3a5f93690c7d4c5c6898dfd7370f090037fc37
diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp
index ec213b9..971106b 100644
--- a/services/camera/libcameraservice/Android.bp
+++ b/services/camera/libcameraservice/Android.bp
@@ -47,7 +47,6 @@
         "common/CameraDeviceBase.cpp",
         "common/CameraOfflineSessionBase.cpp",
         "common/CameraProviderManager.cpp",
-        "common/DepthPhotoProcessor.cpp",
         "common/FrameProcessorBase.cpp",
         "api1/Camera2Client.cpp",
         "api1/client2/Parameters.cpp",
@@ -197,6 +196,7 @@
     // Camera service source
 
     srcs: [
+        "common/DepthPhotoProcessor.cpp",
         "device3/CoordinateMapper.cpp",
         "device3/DistortionMapper.cpp",
         "device3/RotateAndCropMapper.cpp",
@@ -209,12 +209,17 @@
         "libbase",
         "libbinder",
         "libcamera_metadata",
+        "libdynamic_depth",
         "libexif",
+        "libjpeg",
         "liblog",
         "libutils",
+        "libxml2",
     ],
 
     include_dirs: [
+        "external/dynamic_depth/includes",
+        "external/dynamic_depth/internal",
         "frameworks/av/camera/include",
         "frameworks/av/camera/include/camera",
     ],
diff --git a/services/camera/libcameraservice/common/DepthPhotoProcessor.cpp b/services/camera/libcameraservice/common/DepthPhotoProcessor.cpp
index c995670..719ff2c 100644
--- a/services/camera/libcameraservice/common/DepthPhotoProcessor.cpp
+++ b/services/camera/libcameraservice/common/DepthPhotoProcessor.cpp
@@ -42,6 +42,10 @@
 #include <xmpmeta/xmp_data.h>
 #include <xmpmeta/xmp_writer.h>
 
+#ifndef __unused
+#define __unused __attribute__((__unused__))
+#endif
+
 using dynamic_depth::Camera;
 using dynamic_depth::Cameras;
 using dynamic_depth::CameraParams;
diff --git a/services/camera/libcameraservice/tests/Android.bp b/services/camera/libcameraservice/tests/Android.bp
index c2c7d52..bbfe3f9 100644
--- a/services/camera/libcameraservice/tests/Android.bp
+++ b/services/camera/libcameraservice/tests/Android.bp
@@ -90,7 +90,9 @@
         "libbase",
         "libbinder",
         "libcamera_metadata",
+        "libdynamic_depth",
         "libexif",
+        "libjpeg",
         "liblog",
         "libutils",
     ],
@@ -103,8 +105,10 @@
 
     srcs: [
         "ClientManagerTest.cpp",
+        "DepthProcessorTest.cpp",
         "DistortionMapperTest.cpp",
         "ExifUtilsTest.cpp",
+        "NV12Compressor.cpp",
         "RotateAndCropMapperTest.cpp",
         "ZoomRatioTest.cpp",
     ],
diff --git a/services/camera/libcameraservice/tests/NV12Compressor.h b/services/camera/libcameraservice/tests/NV12Compressor.h
index ee22d5e..a959871 100644
--- a/services/camera/libcameraservice/tests/NV12Compressor.h
+++ b/services/camera/libcameraservice/tests/NV12Compressor.h
@@ -19,6 +19,7 @@
 
 #include <setjmp.h>
 #include <stdlib.h>
+#include <stdio.h>
 extern "C" {
 #include <jpeglib.h>
 #include <jerror.h>