Rename Codec2-related entities

Test: Builds

Bug: 112362730

Change-Id: I5d4c962f9ebacb7c71a5dc9db927484d7435dc57
diff --git a/media/codec2/hidl/1.0/mts/common/Android.bp b/media/codec2/hidl/1.0/mts/common/Android.bp
deleted file mode 100644
index 403e470..0000000
--- a/media/codec2/hidl/1.0/mts/common/Android.bp
+++ /dev/null
@@ -1,33 +0,0 @@
-cc_library_static {
-    name: "MtsMediaC2V1_0CommonUtil",
-    defaults: [
-        "VtsHalTargetTestDefaults",
-        "libstagefright_codec2-hidl-defaults",
-    ],
-
-    include_dirs: [
-        "hardware/google/av/codec2/hidl/client/include",
-    ],
-
-    srcs: [
-        "media_c2_hidl_test_common.cpp",
-    ],
-
-    export_include_dirs: ["."],
-}
-
-cc_defaults {
-    name: "MtsMediaC2V1_0Defaults",
-    defaults: [
-        "VtsHalTargetTestDefaults",
-        "libstagefright_codec2-hidl-defaults",
-    ],
-
-    static_libs: [
-        "MtsMediaC2V1_0CommonUtil",
-    ],
-
-    shared_libs: [
-        "libcodec2_hidl_client",
-    ],
-}
diff --git a/media/codec2/hidl/1.0/utils/Android.bp b/media/codec2/hidl/1.0/utils/Android.bp
index 1641e51..455de50 100644
--- a/media/codec2/hidl/1.0/utils/Android.bp
+++ b/media/codec2/hidl/1.0/utils/Android.bp
@@ -1,7 +1,7 @@
 // DO NOT DEPEND ON THIS DIRECTLY
-// use libstagefright_codec2-hidl-defaults instead
+// use libcodec2-hidl-defaults instead
 cc_library {
-    name: "libcodec2_hidl_utils@1.0",
+    name: "libcodec2_hidl@1.0",
     vendor_available: true,
 
     defaults: ["hidl_defaults"],
@@ -17,17 +17,19 @@
 
     header_libs: [
         "libsystem_headers",
-        "libstagefright_codec2_internal", // private
+        "libcodec2_internal", // private
     ],
 
     shared_libs: [
         "android.hardware.graphics.bufferqueue@1.0",
         "android.hardware.graphics.common@1.0",
-        "android.hardware.media.bufferpool@1.0",
-        "android.hardware.media.omx@1.0",
         "android.hardware.media@1.0",
-        "hardware.google.media.c2@1.0",
+        "android.hardware.media.bufferpool@1.0",
+        "android.hardware.media.c2@1.0",
+        "android.hardware.media.omx@1.0",
         "libbase",
+        "libcodec2",
+        "libcodec2_vndk",
         "libcutils",
         "libhidlbase",
         "libhidltransport",
@@ -35,8 +37,6 @@
         "liblog",
         "libstagefright_bufferpool@1.0",
         "libstagefright_bufferqueue_helper",
-        "libstagefright_codec2",
-        "libstagefright_codec2_vndk",
         "libui",
         "libutils",
     ],
@@ -46,22 +46,22 @@
     ],
 
     export_shared_lib_headers: [
-        "hardware.google.media.c2@1.0",
+        "android.hardware.media.c2@1.0",
+        "libcodec2",
         "libhidlbase",
         "libstagefright_bufferpool@1.0",
         "libstagefright_bufferqueue_helper",
-        "libstagefright_codec2",
         "libui",
     ],
 }
 
 // public dependency for Codec 2.0 HAL service implementations
 cc_defaults {
-    name: "libstagefright_codec2-hidl-defaults",
-    defaults: ["libstagefright_codec2-impl-defaults"],
+    name: "libcodec2-hidl-defaults",
+    defaults: ["libcodec2-impl-defaults"],
 
     shared_libs: [
-        "hardware.google.media.c2@1.0",
-        "libcodec2_hidl_utils@1.0",
+        "android.hardware.media.c2@1.0",
+        "libcodec2_hidl@1.0",
     ],
 }
diff --git a/media/codec2/hidl/1.0/utils/Component.cpp b/media/codec2/hidl/1.0/utils/Component.cpp
index 4465504..aa4c6b2 100644
--- a/media/codec2/hidl/1.0/utils/Component.cpp
+++ b/media/codec2/hidl/1.0/utils/Component.cpp
@@ -33,8 +33,8 @@
 #include <chrono>
 #include <thread>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -1055,5 +1055,6 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
+
diff --git a/media/codec2/hidl/1.0/utils/ComponentStore.cpp b/media/codec2/hidl/1.0/utils/ComponentStore.cpp
index 4941ede..1d1bbe0 100644
--- a/media/codec2/hidl/1.0/utils/ComponentStore.cpp
+++ b/media/codec2/hidl/1.0/utils/ComponentStore.cpp
@@ -48,8 +48,8 @@
 #include <sstream>
 #include <iomanip>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -432,5 +432,6 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
+
diff --git a/media/codec2/hidl/1.0/utils/Configurable.cpp b/media/codec2/hidl/1.0/utils/Configurable.cpp
index 50afd10..d023ba8 100644
--- a/media/codec2/hidl/1.0/utils/Configurable.cpp
+++ b/media/codec2/hidl/1.0/utils/Configurable.cpp
@@ -23,8 +23,8 @@
 #include <codec2/hidl/1.0/types.h>
 #include <C2ParamInternal.h>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -165,5 +165,6 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
+
diff --git a/media/codec2/hidl/1.0/utils/InputSurface.cpp b/media/codec2/hidl/1.0/utils/InputSurface.cpp
index 4713af4..b669460 100644
--- a/media/codec2/hidl/1.0/utils/InputSurface.cpp
+++ b/media/codec2/hidl/1.0/utils/InputSurface.cpp
@@ -27,8 +27,8 @@
 
 #include <memory>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -304,6 +304,6 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
diff --git a/media/codec2/hidl/1.0/utils/InputSurfaceConnection.cpp b/media/codec2/hidl/1.0/utils/InputSurfaceConnection.cpp
index eea4e9d..ba7c2d6 100644
--- a/media/codec2/hidl/1.0/utils/InputSurfaceConnection.cpp
+++ b/media/codec2/hidl/1.0/utils/InputSurfaceConnection.cpp
@@ -41,8 +41,8 @@
 #include <C2PlatformSupport.h>
 #include <C2Work.h>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -434,6 +434,6 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
diff --git a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/Component.h b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/Component.h
index a6e4333..36dec1c 100644
--- a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/Component.h
+++ b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/Component.h
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-#ifndef HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_COMPONENT_H
-#define HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_COMPONENT_H
+#ifndef CODEC2_HIDL_V1_0_UTILS_COMPONENT_H
+#define CODEC2_HIDL_V1_0_UTILS_COMPONENT_H
 
 #include <codec2/hidl/1.0/Configurable.h>
 #include <codec2/hidl/1.0/types.h>
 
 #include <android/hardware/media/bufferpool/1.0/IClientManager.h>
-#include <hardware/google/media/c2/1.0/IComponentListener.h>
-#include <hardware/google/media/c2/1.0/IComponentStore.h>
-#include <hardware/google/media/c2/1.0/IComponent.h>
+#include <android/hardware/media/c2/1.0/IComponentListener.h>
+#include <android/hardware/media/c2/1.0/IComponentStore.h>
+#include <android/hardware/media/c2/1.0/IComponent.h>
 #include <hidl/Status.h>
 #include <hwbinder/IBinder.h>
 
@@ -35,8 +35,8 @@
 #include <map>
 #include <memory>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -105,7 +105,7 @@
     std::shared_ptr<C2ComponentInterface> mInterface;
     sp<IComponentListener> mListener;
     sp<ComponentStore> mStore;
-    ::hardware::google::media::c2::V1_0::utils::DefaultBufferPoolSender
+    ::android::hardware::media::c2::V1_0::utils::DefaultBufferPoolSender
             mBufferPoolSender;
 
     std::mutex mBlockPoolsMutex;
@@ -168,7 +168,7 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
-#endif  // HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_COMPONENT_H
+#endif  // CODEC2_HIDL_V1_0_UTILS_COMPONENT_H
diff --git a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/ComponentStore.h b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/ComponentStore.h
index c700a5c..5821e8a 100644
--- a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/ComponentStore.h
+++ b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/ComponentStore.h
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-#ifndef HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_COMPONENTSTORE_H
-#define HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_COMPONENTSTORE_H
+#ifndef CODEC2_HIDL_V1_0_UTILS_COMPONENTSTORE_H
+#define CODEC2_HIDL_V1_0_UTILS_COMPONENTSTORE_H
 
 #include <codec2/hidl/1.0/Component.h>
 #include <codec2/hidl/1.0/Configurable.h>
-#include <hardware/google/media/c2/1.0/IComponentStore.h>
+#include <android/hardware/media/c2/1.0/IComponentStore.h>
 #include <android/hardware/media/bufferpool/1.0/IClientManager.h>
 #include <hidl/Status.h>
 
@@ -33,8 +33,8 @@
 #include <set>
 #include <vector>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -118,7 +118,7 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
-#endif  // HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_COMPONENTSTORE_H
+#endif  // CODEC2_HIDL_V1_0_UTILS_COMPONENTSTORE_H
diff --git a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/Configurable.h b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/Configurable.h
index 1c4c437..2e33a6f 100644
--- a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/Configurable.h
+++ b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/Configurable.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_CONFIGURABLE_H
-#define HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_CONFIGURABLE_H
+#ifndef CODEC2_HIDL_V1_0_UTILS_CONFIGURABLE_H
+#define CODEC2_HIDL_V1_0_UTILS_CONFIGURABLE_H
 
 #include <codec2/hidl/1.0/ConfigurableC2Intf.h>
 
@@ -23,13 +23,13 @@
 #include <C2Param.h>
 #include <C2.h>
 
-#include <hardware/google/media/c2/1.0/IConfigurable.h>
+#include <android/hardware/media/c2/1.0/IConfigurable.h>
 #include <hidl/Status.h>
 
 #include <memory>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -151,7 +151,7 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
-#endif  // HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_CONFIGURABLE_H
+#endif  // CODEC2_HIDL_V1_0_UTILS_CONFIGURABLE_H
diff --git a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/ConfigurableC2Intf.h b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/ConfigurableC2Intf.h
index c616ea3..b8801bb 100644
--- a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/ConfigurableC2Intf.h
+++ b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/ConfigurableC2Intf.h
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_CONFIGURABLEC2INTF_H
-#define HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_CONFIGURABLEC2INTF_H
+#ifndef CODEC2_HIDL_V1_0_UTILS_CONFIGURABLEC2INTF_H
+#define CODEC2_HIDL_V1_0_UTILS_CONFIGURABLEC2INTF_H
 
 #include <C2Work.h>
 #include <C2Component.h>
@@ -27,8 +27,8 @@
 #include <vector>
 #include <memory>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -74,7 +74,7 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
-#endif  // HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_CONFIGURABLEC2INTF_H
+#endif  // CODEC2_HIDL_V1_0_UTILS_CONFIGURABLEC2INTF_H
diff --git a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurface.h b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurface.h
index 0e86d63..cef258e 100644
--- a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurface.h
+++ b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurface.h
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-#ifndef HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_INPUTSURFACE_H
-#define HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_INPUTSURFACE_H
+#ifndef CODEC2_HIDL_V1_0_UTILS_INPUTSURFACE_H
+#define CODEC2_HIDL_V1_0_UTILS_INPUTSURFACE_H
 
 #include <codec2/hidl/1.0/ComponentStore.h>
 
-#include <hardware/google/media/c2/1.0/IInputSurface.h>
-#include <hardware/google/media/c2/1.0/IComponent.h>
+#include <android/hardware/media/c2/1.0/IInputSurface.h>
+#include <android/hardware/media/c2/1.0/IComponent.h>
 
 #include <android/hardware/graphics/bufferqueue/1.0/IGraphicBufferProducer.h>
 #include <android/hardware/graphics/bufferqueue/1.0/IProducerListener.h>
@@ -35,8 +35,8 @@
 
 class C2ReflectorHelper;
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -70,7 +70,7 @@
 
 // Type disambiguation
 
-    typedef ::hardware::google::media::c2::V1_0::Status Status;
+    typedef ::android::hardware::media::c2::V1_0::Status Status;
 
 // New methods from IInputSurface
 
@@ -194,7 +194,7 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
-#endif  // HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_INPUTSURFACE_H
+#endif  // CODEC2_HIDL_V1_0_UTILS_INPUTSURFACE_H
diff --git a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurfaceConnection.h b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurfaceConnection.h
index 9c8c96e..904fa9e 100644
--- a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurfaceConnection.h
+++ b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/InputSurfaceConnection.h
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-#ifndef HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_INPUTSURFACECONNECTION_H
-#define HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_INPUTSURFACECONNECTION_H
+#ifndef CODEC2_HIDL_V1_0_UTILS_INPUTSURFACECONNECTION_H
+#define CODEC2_HIDL_V1_0_UTILS_INPUTSURFACECONNECTION_H
 
 #include <codec2/hidl/1.0/Component.h>
 
-#include <hardware/google/media/c2/1.0/IComponent.h>
-#include <hardware/google/media/c2/1.0/IInputSurfaceConnection.h>
+#include <android/hardware/media/c2/1.0/IComponent.h>
+#include <android/hardware/media/c2/1.0/IInputSurfaceConnection.h>
 
 #include <media/stagefright/bqhelper/GraphicBufferSource.h>
 
@@ -32,8 +32,8 @@
 #include <memory>
 #include <mutex>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -79,7 +79,7 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
-#endif  // HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_INPUTSURFACECONNECTION_H
+#endif  // CODEC2_HIDL_V1_0_UTILS_INPUTSURFACECONNECTION_H
diff --git a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/types.h b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/types.h
index 268ca00..58f5c96 100644
--- a/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/types.h
+++ b/media/codec2/hidl/1.0/utils/include/codec2/hidl/1.0/types.h
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-#ifndef HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_TYPES_H
-#define HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_TYPES_H
+#ifndef CODEC2_HIDL_V1_0_UTILS_TYPES_H
+#define CODEC2_HIDL_V1_0_UTILS_TYPES_H
 
 #include <chrono>
 
 #include <bufferpool/ClientManager.h>
 #include <android/hardware/media/bufferpool/1.0/IClientManager.h>
 #include <android/hardware/media/bufferpool/1.0/types.h>
-#include <hardware/google/media/c2/1.0/IComponentStore.h>
-#include <hardware/google/media/c2/1.0/types.h>
+#include <android/hardware/media/c2/1.0/IComponentStore.h>
+#include <android/hardware/media/c2/1.0/types.h>
 #include <gui/IGraphicBufferProducer.h>
 
 #include <C2Component.h>
@@ -33,8 +33,8 @@
 
 using namespace std::chrono_literals;
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -362,7 +362,7 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
-#endif  // HARDWARE_GOOGLE_MEDIA_C2_V1_0_UTILS_TYPES_H
+#endif  // CODEC2_HIDL_V1_0_UTILS_TYPES_H
diff --git a/media/codec2/hidl/1.0/utils/types.cpp b/media/codec2/hidl/1.0/utils/types.cpp
index 56db4d5..5827504 100644
--- a/media/codec2/hidl/1.0/utils/types.cpp
+++ b/media/codec2/hidl/1.0/utils/types.cpp
@@ -39,8 +39,8 @@
 
 #include <media/stagefright/foundation/AUtils.h>
 
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -1798,6 +1798,6 @@
 }  // namespace V1_0
 }  // namespace c2
 }  // namespace media
-}  // namespace google
 }  // namespace hardware
+}  // namespace android
 
diff --git a/media/codec2/hidl/1.0/mts/audio/Android.bp b/media/codec2/hidl/1.0/vts/audio/Android.bp
similarity index 74%
rename from media/codec2/hidl/1.0/mts/audio/Android.bp
rename to media/codec2/hidl/1.0/vts/audio/Android.bp
index 6675b09..687754b 100644
--- a/media/codec2/hidl/1.0/mts/audio/Android.bp
+++ b/media/codec2/hidl/1.0/vts/audio/Android.bp
@@ -15,19 +15,19 @@
  */
 
 cc_test {
-    name: "MtsHidlC2V1_0TargetAudioDecTest",
-    defaults: ["MtsMediaC2V1_0Defaults"],
+    name: "VtsHidlC2V1_0TargetAudioDecTest",
+    defaults: ["VtsMediaC2V1_0Defaults"],
     srcs: [
-        "MtsHidlC2V1_0TargetAudioDecTest.cpp",
+        "VtsHidlC2V1_0TargetAudioDecTest.cpp",
         //"media_audio_hidl_test_common.cpp"
     ],
 }
 
 cc_test {
-    name: "MtsHidlC2V1_0TargetAudioEncTest",
-    defaults: ["MtsMediaC2V1_0Defaults"],
+    name: "VtsHidlC2V1_0TargetAudioEncTest",
+    defaults: ["VtsMediaC2V1_0Defaults"],
     srcs: [
-        "MtsHidlC2V1_0TargetAudioEncTest.cpp",
+        "VtsHidlC2V1_0TargetAudioEncTest.cpp",
         //"media_audio_hidl_test_common.cpp"
     ],
-}
\ No newline at end of file
+}
diff --git a/media/codec2/hidl/1.0/mts/audio/MtsHidlC2V1_0TargetAudioDecTest.cpp b/media/codec2/hidl/1.0/vts/audio/VtsHidlC2V1_0TargetAudioDecTest.cpp
similarity index 100%
rename from media/codec2/hidl/1.0/mts/audio/MtsHidlC2V1_0TargetAudioDecTest.cpp
rename to media/codec2/hidl/1.0/vts/audio/VtsHidlC2V1_0TargetAudioDecTest.cpp
diff --git a/media/codec2/hidl/1.0/mts/audio/MtsHidlC2V1_0TargetAudioEncTest.cpp b/media/codec2/hidl/1.0/vts/audio/VtsHidlC2V1_0TargetAudioEncTest.cpp
similarity index 100%
rename from media/codec2/hidl/1.0/mts/audio/MtsHidlC2V1_0TargetAudioEncTest.cpp
rename to media/codec2/hidl/1.0/vts/audio/VtsHidlC2V1_0TargetAudioEncTest.cpp
diff --git a/media/codec2/hidl/1.0/mts/audio/media_c2_audio_hidl_test_common.h b/media/codec2/hidl/1.0/vts/audio/media_c2_audio_hidl_test_common.h
similarity index 100%
rename from media/codec2/hidl/1.0/mts/audio/media_c2_audio_hidl_test_common.h
rename to media/codec2/hidl/1.0/vts/audio/media_c2_audio_hidl_test_common.h
diff --git a/media/codec2/hidl/1.0/vts/common/Android.bp b/media/codec2/hidl/1.0/vts/common/Android.bp
new file mode 100644
index 0000000..94f46ed
--- /dev/null
+++ b/media/codec2/hidl/1.0/vts/common/Android.bp
@@ -0,0 +1,33 @@
+cc_library_static {
+    name: "VtsMediaC2V1_0CommonUtil",
+    defaults: [
+        "VtsHalTargetTestDefaults",
+        "libcodec2-hidl-defaults",
+    ],
+
+    include_dirs: [
+        "frameworks/av/media/codec2/hidl/client/include",
+    ],
+
+    srcs: [
+        "media_c2_hidl_test_common.cpp",
+    ],
+
+    export_include_dirs: ["."],
+}
+
+cc_defaults {
+    name: "VtsMediaC2V1_0Defaults",
+    defaults: [
+        "VtsHalTargetTestDefaults",
+        "libcodec2-hidl-defaults",
+    ],
+
+    static_libs: [
+        "VtsMediaC2V1_0CommonUtil",
+    ],
+
+    shared_libs: [
+        "libcodec2_client",
+    ],
+}
diff --git a/media/codec2/hidl/1.0/mts/common/README.md b/media/codec2/hidl/1.0/vts/common/README.md
similarity index 100%
rename from media/codec2/hidl/1.0/mts/common/README.md
rename to media/codec2/hidl/1.0/vts/common/README.md
diff --git a/media/codec2/hidl/1.0/mts/common/media_c2_hidl_test_common.cpp b/media/codec2/hidl/1.0/vts/common/media_c2_hidl_test_common.cpp
similarity index 96%
rename from media/codec2/hidl/1.0/mts/common/media_c2_hidl_test_common.cpp
rename to media/codec2/hidl/1.0/vts/common/media_c2_hidl_test_common.cpp
index 1b2772f..fdccdbb 100644
--- a/media/codec2/hidl/1.0/mts/common/media_c2_hidl_test_common.cpp
+++ b/media/codec2/hidl/1.0/vts/common/media_c2_hidl_test_common.cpp
@@ -18,7 +18,7 @@
 #include <stdio.h>
 
 #include "media_c2_hidl_test_common.h"
-using ::hardware::google::media::c2::V1_0::FieldSupportedValues;
+using ::android::hardware::media::c2::V1_0::FieldSupportedValues;
 
 void dumpFSV(const FieldSupportedValues& sv) {
     ALOGD("Dumping FSV data");
diff --git a/media/codec2/hidl/1.0/mts/common/media_c2_hidl_test_common.h b/media/codec2/hidl/1.0/vts/common/media_c2_hidl_test_common.h
similarity index 96%
rename from media/codec2/hidl/1.0/mts/common/media_c2_hidl_test_common.h
rename to media/codec2/hidl/1.0/vts/common/media_c2_hidl_test_common.h
index 0e7db26..f765baa 100644
--- a/media/codec2/hidl/1.0/mts/common/media_c2_hidl_test_common.h
+++ b/media/codec2/hidl/1.0/vts/common/media_c2_hidl_test_common.h
@@ -19,7 +19,7 @@
 
 #include <codec2/hidl/client.h>
 
-#include <hardware/google/media/c2/1.0/types.h>
+#include <android/hardware/media/c2/1.0/types.h>
 
 #include <C2Component.h>
 #include <getopt.h>
@@ -27,8 +27,8 @@
 #include <media/stagefright/foundation/ALooper.h>
 #include <media/stagefright/foundation/Mutexed.h>
 
-using namespace ::hardware::google::media::c2::V1_0;
-using namespace ::hardware::google::media::c2::V1_0::utils;
+using namespace ::android::hardware::media::c2::V1_0;
+using namespace ::android::hardware::media::c2::V1_0::utils;
 
 using ::android::Mutexed;
 using ::android::hardware::Void;
diff --git a/media/codec2/hidl/1.0/mts/component/Android.bp b/media/codec2/hidl/1.0/vts/component/Android.bp
similarity index 81%
rename from media/codec2/hidl/1.0/mts/component/Android.bp
rename to media/codec2/hidl/1.0/vts/component/Android.bp
index 77f1d49..4b913b6 100644
--- a/media/codec2/hidl/1.0/mts/component/Android.bp
+++ b/media/codec2/hidl/1.0/vts/component/Android.bp
@@ -15,8 +15,8 @@
  */
 
 cc_test {
-    name: "MtsHidlC2V1_0TargetComponentTest",
-    defaults: ["MtsMediaC2V1_0Defaults"],
-    srcs: ["MtsHidlC2V1_0TargetComponentTest.cpp"],
+    name: "VtsHidlC2V1_0TargetComponentTest",
+    defaults: ["VtsMediaC2V1_0Defaults"],
+    srcs: ["VtsHidlC2V1_0TargetComponentTest.cpp"],
 }
 
diff --git a/media/codec2/hidl/1.0/mts/component/MtsHidlC2V1_0TargetComponentTest.cpp b/media/codec2/hidl/1.0/vts/component/VtsHidlC2V1_0TargetComponentTest.cpp
similarity index 100%
rename from media/codec2/hidl/1.0/mts/component/MtsHidlC2V1_0TargetComponentTest.cpp
rename to media/codec2/hidl/1.0/vts/component/VtsHidlC2V1_0TargetComponentTest.cpp
diff --git a/media/codec2/hidl/1.0/mts/master/Android.bp b/media/codec2/hidl/1.0/vts/master/Android.bp
similarity index 82%
rename from media/codec2/hidl/1.0/mts/master/Android.bp
rename to media/codec2/hidl/1.0/vts/master/Android.bp
index 42b3a44..e164d68 100644
--- a/media/codec2/hidl/1.0/mts/master/Android.bp
+++ b/media/codec2/hidl/1.0/vts/master/Android.bp
@@ -15,8 +15,8 @@
  */
 
 cc_test {
-    name: "MtsHidlC2V1_0TargetMasterTest",
-    defaults: ["MtsMediaC2V1_0Defaults"],
-    srcs: ["MtsHidlC2V1_0TargetMasterTest.cpp"],
+    name: "VtsHidlC2V1_0TargetMasterTest",
+    defaults: ["VtsMediaC2V1_0Defaults"],
+    srcs: ["VtsHidlC2V1_0TargetMasterTest.cpp"],
 }
 
diff --git a/media/codec2/hidl/1.0/mts/master/MtsHidlC2V1_0TargetMasterTest.cpp b/media/codec2/hidl/1.0/vts/master/VtsHidlC2V1_0TargetMasterTest.cpp
similarity index 100%
rename from media/codec2/hidl/1.0/mts/master/MtsHidlC2V1_0TargetMasterTest.cpp
rename to media/codec2/hidl/1.0/vts/master/VtsHidlC2V1_0TargetMasterTest.cpp
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_352x288_420p_30fps_32frames.yuv b/media/codec2/hidl/1.0/vts/res/bbb_352x288_420p_30fps_32frames.yuv
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_352x288_420p_30fps_32frames.yuv
rename to media/codec2/hidl/1.0/vts/res/bbb_352x288_420p_30fps_32frames.yuv
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_aac_stereo_128kbps_48000hz.aac b/media/codec2/hidl/1.0/vts/res/bbb_aac_stereo_128kbps_48000hz.aac
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_aac_stereo_128kbps_48000hz.aac
rename to media/codec2/hidl/1.0/vts/res/bbb_aac_stereo_128kbps_48000hz.aac
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_aac_stereo_128kbps_48000hz.info b/media/codec2/hidl/1.0/vts/res/bbb_aac_stereo_128kbps_48000hz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_aac_stereo_128kbps_48000hz.info
rename to media/codec2/hidl/1.0/vts/res/bbb_aac_stereo_128kbps_48000hz.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_amrwb_1ch_14kbps_16000hz.amrwb b/media/codec2/hidl/1.0/vts/res/bbb_amrwb_1ch_14kbps_16000hz.amrwb
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_amrwb_1ch_14kbps_16000hz.amrwb
rename to media/codec2/hidl/1.0/vts/res/bbb_amrwb_1ch_14kbps_16000hz.amrwb
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_amrwb_1ch_14kbps_16000hz.info b/media/codec2/hidl/1.0/vts/res/bbb_amrwb_1ch_14kbps_16000hz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_amrwb_1ch_14kbps_16000hz.info
rename to media/codec2/hidl/1.0/vts/res/bbb_amrwb_1ch_14kbps_16000hz.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_avc_176x144_300kbps_60fps.h264 b/media/codec2/hidl/1.0/vts/res/bbb_avc_176x144_300kbps_60fps.h264
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_avc_176x144_300kbps_60fps.h264
rename to media/codec2/hidl/1.0/vts/res/bbb_avc_176x144_300kbps_60fps.h264
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_avc_176x144_300kbps_60fps.info b/media/codec2/hidl/1.0/vts/res/bbb_avc_176x144_300kbps_60fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_avc_176x144_300kbps_60fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_avc_176x144_300kbps_60fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_avc_640x360_768kbps_30fps.h264 b/media/codec2/hidl/1.0/vts/res/bbb_avc_640x360_768kbps_30fps.h264
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_avc_640x360_768kbps_30fps.h264
rename to media/codec2/hidl/1.0/vts/res/bbb_avc_640x360_768kbps_30fps.h264
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_avc_640x360_768kbps_30fps.info b/media/codec2/hidl/1.0/vts/res/bbb_avc_640x360_768kbps_30fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_avc_640x360_768kbps_30fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_avc_640x360_768kbps_30fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_flac_stereo_680kbps_48000hz.flac b/media/codec2/hidl/1.0/vts/res/bbb_flac_stereo_680kbps_48000hz.flac
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_flac_stereo_680kbps_48000hz.flac
rename to media/codec2/hidl/1.0/vts/res/bbb_flac_stereo_680kbps_48000hz.flac
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_flac_stereo_680kbps_48000hz.info b/media/codec2/hidl/1.0/vts/res/bbb_flac_stereo_680kbps_48000hz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_flac_stereo_680kbps_48000hz.info
rename to media/codec2/hidl/1.0/vts/res/bbb_flac_stereo_680kbps_48000hz.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_g711alaw_1ch_8khz.info b/media/codec2/hidl/1.0/vts/res/bbb_g711alaw_1ch_8khz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_g711alaw_1ch_8khz.info
rename to media/codec2/hidl/1.0/vts/res/bbb_g711alaw_1ch_8khz.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_g711alaw_1ch_8khz.raw b/media/codec2/hidl/1.0/vts/res/bbb_g711alaw_1ch_8khz.raw
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_g711alaw_1ch_8khz.raw
rename to media/codec2/hidl/1.0/vts/res/bbb_g711alaw_1ch_8khz.raw
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_g711mulaw_1ch_8khz.info b/media/codec2/hidl/1.0/vts/res/bbb_g711mulaw_1ch_8khz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_g711mulaw_1ch_8khz.info
rename to media/codec2/hidl/1.0/vts/res/bbb_g711mulaw_1ch_8khz.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_g711mulaw_1ch_8khz.raw b/media/codec2/hidl/1.0/vts/res/bbb_g711mulaw_1ch_8khz.raw
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_g711mulaw_1ch_8khz.raw
rename to media/codec2/hidl/1.0/vts/res/bbb_g711mulaw_1ch_8khz.raw
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_gsm_1ch_8khz_13kbps.info b/media/codec2/hidl/1.0/vts/res/bbb_gsm_1ch_8khz_13kbps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_gsm_1ch_8khz_13kbps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_gsm_1ch_8khz_13kbps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_gsm_1ch_8khz_13kbps.raw b/media/codec2/hidl/1.0/vts/res/bbb_gsm_1ch_8khz_13kbps.raw
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_gsm_1ch_8khz_13kbps.raw
rename to media/codec2/hidl/1.0/vts/res/bbb_gsm_1ch_8khz_13kbps.raw
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_h263_352x288_300kbps_12fps.h263 b/media/codec2/hidl/1.0/vts/res/bbb_h263_352x288_300kbps_12fps.h263
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_h263_352x288_300kbps_12fps.h263
rename to media/codec2/hidl/1.0/vts/res/bbb_h263_352x288_300kbps_12fps.h263
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_h263_352x288_300kbps_12fps.info b/media/codec2/hidl/1.0/vts/res/bbb_h263_352x288_300kbps_12fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_h263_352x288_300kbps_12fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_h263_352x288_300kbps_12fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_hevc_176x144_176kbps_60fps.hevc b/media/codec2/hidl/1.0/vts/res/bbb_hevc_176x144_176kbps_60fps.hevc
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_hevc_176x144_176kbps_60fps.hevc
rename to media/codec2/hidl/1.0/vts/res/bbb_hevc_176x144_176kbps_60fps.hevc
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_hevc_176x144_176kbps_60fps.info b/media/codec2/hidl/1.0/vts/res/bbb_hevc_176x144_176kbps_60fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_hevc_176x144_176kbps_60fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_hevc_176x144_176kbps_60fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_hevc_640x360_1600kbps_30fps.hevc b/media/codec2/hidl/1.0/vts/res/bbb_hevc_640x360_1600kbps_30fps.hevc
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_hevc_640x360_1600kbps_30fps.hevc
rename to media/codec2/hidl/1.0/vts/res/bbb_hevc_640x360_1600kbps_30fps.hevc
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_hevc_640x360_1600kbps_30fps.info b/media/codec2/hidl/1.0/vts/res/bbb_hevc_640x360_1600kbps_30fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_hevc_640x360_1600kbps_30fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_hevc_640x360_1600kbps_30fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_mp3_stereo_192kbps_48000hz.info b/media/codec2/hidl/1.0/vts/res/bbb_mp3_stereo_192kbps_48000hz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_mp3_stereo_192kbps_48000hz.info
rename to media/codec2/hidl/1.0/vts/res/bbb_mp3_stereo_192kbps_48000hz.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_mp3_stereo_192kbps_48000hz.mp3 b/media/codec2/hidl/1.0/vts/res/bbb_mp3_stereo_192kbps_48000hz.mp3
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_mp3_stereo_192kbps_48000hz.mp3
rename to media/codec2/hidl/1.0/vts/res/bbb_mp3_stereo_192kbps_48000hz.mp3
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_mpeg2_176x144_105kbps_25fps.info b/media/codec2/hidl/1.0/vts/res/bbb_mpeg2_176x144_105kbps_25fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_mpeg2_176x144_105kbps_25fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_mpeg2_176x144_105kbps_25fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_mpeg2_176x144_105kbps_25fps.m2v b/media/codec2/hidl/1.0/vts/res/bbb_mpeg2_176x144_105kbps_25fps.m2v
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_mpeg2_176x144_105kbps_25fps.m2v
rename to media/codec2/hidl/1.0/vts/res/bbb_mpeg2_176x144_105kbps_25fps.m2v
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_mpeg2_352x288_1mbps_60fps.info b/media/codec2/hidl/1.0/vts/res/bbb_mpeg2_352x288_1mbps_60fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_mpeg2_352x288_1mbps_60fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_mpeg2_352x288_1mbps_60fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_mpeg2_352x288_1mbps_60fps.m2v b/media/codec2/hidl/1.0/vts/res/bbb_mpeg2_352x288_1mbps_60fps.m2v
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_mpeg2_352x288_1mbps_60fps.m2v
rename to media/codec2/hidl/1.0/vts/res/bbb_mpeg2_352x288_1mbps_60fps.m2v
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_mpeg4_352x288_512kbps_30fps.info b/media/codec2/hidl/1.0/vts/res/bbb_mpeg4_352x288_512kbps_30fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_mpeg4_352x288_512kbps_30fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_mpeg4_352x288_512kbps_30fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_mpeg4_352x288_512kbps_30fps.m4v b/media/codec2/hidl/1.0/vts/res/bbb_mpeg4_352x288_512kbps_30fps.m4v
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_mpeg4_352x288_512kbps_30fps.m4v
rename to media/codec2/hidl/1.0/vts/res/bbb_mpeg4_352x288_512kbps_30fps.m4v
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_opus_stereo_128kbps_48000hz.info b/media/codec2/hidl/1.0/vts/res/bbb_opus_stereo_128kbps_48000hz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_opus_stereo_128kbps_48000hz.info
rename to media/codec2/hidl/1.0/vts/res/bbb_opus_stereo_128kbps_48000hz.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_opus_stereo_128kbps_48000hz.opus b/media/codec2/hidl/1.0/vts/res/bbb_opus_stereo_128kbps_48000hz.opus
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_opus_stereo_128kbps_48000hz.opus
rename to media/codec2/hidl/1.0/vts/res/bbb_opus_stereo_128kbps_48000hz.opus
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_raw_1ch_16khz_s16le.raw b/media/codec2/hidl/1.0/vts/res/bbb_raw_1ch_16khz_s16le.raw
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_raw_1ch_16khz_s16le.raw
rename to media/codec2/hidl/1.0/vts/res/bbb_raw_1ch_16khz_s16le.raw
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_raw_1ch_8khz_s16le.raw b/media/codec2/hidl/1.0/vts/res/bbb_raw_1ch_8khz_s16le.raw
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_raw_1ch_8khz_s16le.raw
rename to media/codec2/hidl/1.0/vts/res/bbb_raw_1ch_8khz_s16le.raw
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_raw_1ch_8khz_s32le.info b/media/codec2/hidl/1.0/vts/res/bbb_raw_1ch_8khz_s32le.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_raw_1ch_8khz_s32le.info
rename to media/codec2/hidl/1.0/vts/res/bbb_raw_1ch_8khz_s32le.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_raw_1ch_8khz_s32le.raw b/media/codec2/hidl/1.0/vts/res/bbb_raw_1ch_8khz_s32le.raw
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_raw_1ch_8khz_s32le.raw
rename to media/codec2/hidl/1.0/vts/res/bbb_raw_1ch_8khz_s32le.raw
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_raw_2ch_48khz_s16le.raw b/media/codec2/hidl/1.0/vts/res/bbb_raw_2ch_48khz_s16le.raw
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_raw_2ch_48khz_s16le.raw
rename to media/codec2/hidl/1.0/vts/res/bbb_raw_2ch_48khz_s16le.raw
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vorbis_stereo_128kbps_48000hz.info b/media/codec2/hidl/1.0/vts/res/bbb_vorbis_stereo_128kbps_48000hz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vorbis_stereo_128kbps_48000hz.info
rename to media/codec2/hidl/1.0/vts/res/bbb_vorbis_stereo_128kbps_48000hz.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vorbis_stereo_128kbps_48000hz.vorbis b/media/codec2/hidl/1.0/vts/res/bbb_vorbis_stereo_128kbps_48000hz.vorbis
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vorbis_stereo_128kbps_48000hz.vorbis
rename to media/codec2/hidl/1.0/vts/res/bbb_vorbis_stereo_128kbps_48000hz.vorbis
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vp8_176x144_240kbps_60fps.info b/media/codec2/hidl/1.0/vts/res/bbb_vp8_176x144_240kbps_60fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vp8_176x144_240kbps_60fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_vp8_176x144_240kbps_60fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vp8_176x144_240kbps_60fps.vp8 b/media/codec2/hidl/1.0/vts/res/bbb_vp8_176x144_240kbps_60fps.vp8
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vp8_176x144_240kbps_60fps.vp8
rename to media/codec2/hidl/1.0/vts/res/bbb_vp8_176x144_240kbps_60fps.vp8
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vp8_640x360_2mbps_30fps.info b/media/codec2/hidl/1.0/vts/res/bbb_vp8_640x360_2mbps_30fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vp8_640x360_2mbps_30fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_vp8_640x360_2mbps_30fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vp8_640x360_2mbps_30fps.vp8 b/media/codec2/hidl/1.0/vts/res/bbb_vp8_640x360_2mbps_30fps.vp8
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vp8_640x360_2mbps_30fps.vp8
rename to media/codec2/hidl/1.0/vts/res/bbb_vp8_640x360_2mbps_30fps.vp8
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vp9_176x144_285kbps_60fps.info b/media/codec2/hidl/1.0/vts/res/bbb_vp9_176x144_285kbps_60fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vp9_176x144_285kbps_60fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_vp9_176x144_285kbps_60fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vp9_176x144_285kbps_60fps.vp9 b/media/codec2/hidl/1.0/vts/res/bbb_vp9_176x144_285kbps_60fps.vp9
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vp9_176x144_285kbps_60fps.vp9
rename to media/codec2/hidl/1.0/vts/res/bbb_vp9_176x144_285kbps_60fps.vp9
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vp9_640x360_1600kbps_30fps.info b/media/codec2/hidl/1.0/vts/res/bbb_vp9_640x360_1600kbps_30fps.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vp9_640x360_1600kbps_30fps.info
rename to media/codec2/hidl/1.0/vts/res/bbb_vp9_640x360_1600kbps_30fps.info
diff --git a/media/codec2/hidl/1.0/mts/res/bbb_vp9_640x360_1600kbps_30fps.vp9 b/media/codec2/hidl/1.0/vts/res/bbb_vp9_640x360_1600kbps_30fps.vp9
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/bbb_vp9_640x360_1600kbps_30fps.vp9
rename to media/codec2/hidl/1.0/vts/res/bbb_vp9_640x360_1600kbps_30fps.vp9
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/sine_amrnb_1ch_12kbps_8000hz.amrnb b/media/codec2/hidl/1.0/vts/res/sine_amrnb_1ch_12kbps_8000hz.amrnb
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/sine_amrnb_1ch_12kbps_8000hz.amrnb
rename to media/codec2/hidl/1.0/vts/res/sine_amrnb_1ch_12kbps_8000hz.amrnb
Binary files differ
diff --git a/media/codec2/hidl/1.0/mts/res/sine_amrnb_1ch_12kbps_8000hz.info b/media/codec2/hidl/1.0/vts/res/sine_amrnb_1ch_12kbps_8000hz.info
similarity index 100%
rename from media/codec2/hidl/1.0/mts/res/sine_amrnb_1ch_12kbps_8000hz.info
rename to media/codec2/hidl/1.0/vts/res/sine_amrnb_1ch_12kbps_8000hz.info
diff --git a/media/codec2/hidl/1.0/mts/video/Android.bp b/media/codec2/hidl/1.0/vts/video/Android.bp
similarity index 70%
rename from media/codec2/hidl/1.0/mts/video/Android.bp
rename to media/codec2/hidl/1.0/vts/video/Android.bp
index e2d9b6f..6e57ee7 100644
--- a/media/codec2/hidl/1.0/mts/video/Android.bp
+++ b/media/codec2/hidl/1.0/vts/video/Android.bp
@@ -15,14 +15,14 @@
  */
 
 cc_test {
-    name: "MtsHidlC2V1_0TargetVideoDecTest",
-    defaults: ["MtsMediaC2V1_0Defaults"],
-    srcs: ["MtsHidlC2V1_0TargetVideoDecTest.cpp"],
+    name: "VtsHidlC2V1_0TargetVideoDecTest",
+    defaults: ["VtsMediaC2V1_0Defaults"],
+    srcs: ["VtsHidlC2V1_0TargetVideoDecTest.cpp"],
 }
 
 cc_test {
-    name: "MtsHidlC2V1_0TargetVideoEncTest",
-    defaults: ["MtsMediaC2V1_0Defaults"],
-    srcs: ["MtsHidlC2V1_0TargetVideoEncTest.cpp"],
+    name: "VtsHidlC2V1_0TargetVideoEncTest",
+    defaults: ["VtsMediaC2V1_0Defaults"],
+    srcs: ["VtsHidlC2V1_0TargetVideoEncTest.cpp"],
 }
 
diff --git a/media/codec2/hidl/1.0/mts/video/MtsHidlC2V1_0TargetVideoDecTest.cpp b/media/codec2/hidl/1.0/vts/video/VtsHidlC2V1_0TargetVideoDecTest.cpp
similarity index 100%
rename from media/codec2/hidl/1.0/mts/video/MtsHidlC2V1_0TargetVideoDecTest.cpp
rename to media/codec2/hidl/1.0/vts/video/VtsHidlC2V1_0TargetVideoDecTest.cpp
diff --git a/media/codec2/hidl/1.0/mts/video/MtsHidlC2V1_0TargetVideoEncTest.cpp b/media/codec2/hidl/1.0/vts/video/VtsHidlC2V1_0TargetVideoEncTest.cpp
similarity index 100%
rename from media/codec2/hidl/1.0/mts/video/MtsHidlC2V1_0TargetVideoEncTest.cpp
rename to media/codec2/hidl/1.0/vts/video/VtsHidlC2V1_0TargetVideoEncTest.cpp
diff --git a/media/codec2/hidl/1.0/mts/video/media_c2_video_hidl_test_common.h b/media/codec2/hidl/1.0/vts/video/media_c2_video_hidl_test_common.h
similarity index 100%
rename from media/codec2/hidl/1.0/mts/video/media_c2_video_hidl_test_common.h
rename to media/codec2/hidl/1.0/vts/video/media_c2_video_hidl_test_common.h
diff --git a/media/codec2/hidl/Android.mk b/media/codec2/hidl/Android.mk
deleted file mode 100644
index 5e7c2ef..0000000
--- a/media/codec2/hidl/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-makefiles-under,$(call my-dir))
diff --git a/media/codec2/hidl/client/Android.bp b/media/codec2/hidl/client/Android.bp
index 0819055..bdc02d2 100644
--- a/media/codec2/hidl/client/Android.bp
+++ b/media/codec2/hidl/client/Android.bp
@@ -1,5 +1,5 @@
 cc_library {
-    name: "libcodec2_hidl_client",
+    name: "libcodec2_client",
 
     srcs: [
         "client.cpp",
@@ -8,10 +8,12 @@
     shared_libs: [
         "android.hardware.graphics.bufferqueue@1.0",
         "android.hardware.media.bufferpool@1.0",
-        "hardware.google.media.c2@1.0",
+        "android.hardware.media.c2@1.0",
         "libbase",
         "libbinder",
-        "libcodec2_hidl_utils@1.0",
+        "libcodec2",
+        "libcodec2_hidl@1.0",
+        "libcodec2_vndk",
         "libcutils",
         "libgui",
         "libhidlbase",
@@ -19,8 +21,6 @@
         "liblog",
         "libstagefright_bufferpool@1.0",
         "libstagefright_bufferqueue_helper",
-        "libstagefright_codec2",
-        "libstagefright_codec2_vndk",
         "libui",
         "libutils",
     ],
@@ -30,8 +30,8 @@
     ],
 
     export_shared_lib_headers: [
-        "libcodec2_hidl_utils@1.0",
-        "libstagefright_codec2",
+        "libcodec2_hidl@1.0",
+        "libcodec2",
     ],
 
 }
diff --git a/media/codec2/hidl/client/client.cpp b/media/codec2/hidl/client/client.cpp
index ff67681..ddeb4ff 100644
--- a/media/codec2/hidl/client/client.cpp
+++ b/media/codec2/hidl/client/client.cpp
@@ -35,11 +35,11 @@
 #undef LOG
 
 #include <android/hardware/media/bufferpool/1.0/IClientManager.h>
-#include <hardware/google/media/c2/1.0/IComponent.h>
-#include <hardware/google/media/c2/1.0/IComponentInterface.h>
-#include <hardware/google/media/c2/1.0/IComponentListener.h>
-#include <hardware/google/media/c2/1.0/IComponentStore.h>
-#include <hardware/google/media/c2/1.0/IConfigurable.h>
+#include <android/hardware/media/c2/1.0/IComponent.h>
+#include <android/hardware/media/c2/1.0/IComponentInterface.h>
+#include <android/hardware/media/c2/1.0/IComponentListener.h>
+#include <android/hardware/media/c2/1.0/IComponentStore.h>
+#include <android/hardware/media/c2/1.0/IConfigurable.h>
 
 #include <C2Debug.h>
 #include <C2BufferPriv.h>
@@ -53,8 +53,8 @@
 using ::android::hardware::Void;
 using ::android::TWGraphicBufferProducer;
 
-using namespace ::hardware::google::media::c2::V1_0;
-using namespace ::hardware::google::media::c2::V1_0::utils;
+using namespace ::android::hardware::media::c2::V1_0;
+using namespace ::android::hardware::media::c2::V1_0::utils;
 using namespace ::android::hardware::media::bufferpool::V1_0;
 using namespace ::android::hardware::media::bufferpool::V1_0::implementation;
 
diff --git a/media/codec2/hidl/client/include/codec2/hidl/client.h b/media/codec2/hidl/client/include/codec2/hidl/client.h
index fb59ad6..3ab3967 100644
--- a/media/codec2/hidl/client/include/codec2/hidl/client.h
+++ b/media/codec2/hidl/client/include/codec2/hidl/client.h
@@ -64,8 +64,8 @@
  */
 
 // Forward declaration of Codec2.0 HIDL interfaces
+namespace android {
 namespace hardware {
-namespace google {
 namespace media {
 namespace c2 {
 namespace V1_0 {
@@ -78,8 +78,8 @@
 } // namespace V1_0
 } // namespace c2
 } // namespace media
-} // namespace google
 } // namespace hardware
+} // namespace android
 
 namespace android {
 namespace hardware {
@@ -119,7 +119,7 @@
 // declaration of an inner class is not possible.
 struct Codec2ConfigurableClient {
 
-    typedef ::hardware::google::media::c2::V1_0::IConfigurable Base;
+    typedef ::android::hardware::media::c2::V1_0::IConfigurable Base;
 
     const C2String& getName() const;
 
@@ -156,7 +156,7 @@
 
 struct Codec2Client : public Codec2ConfigurableClient {
 
-    typedef ::hardware::google::media::c2::V1_0::IComponentStore Base;
+    typedef ::android::hardware::media::c2::V1_0::IComponentStore Base;
 
     struct Listener;
 
@@ -306,7 +306,7 @@
 
 struct Codec2Client::Component : public Codec2Client::Configurable {
 
-    typedef ::hardware::google::media::c2::V1_0::IComponent Base;
+    typedef ::android::hardware::media::c2::V1_0::IComponent Base;
 
     c2_status_t createBlockPool(
             C2Allocator::id_t id,
@@ -405,7 +405,7 @@
     // mInputBufferCount.
     mutable std::map<uint64_t, size_t> mInputBufferCount;
 
-    ::hardware::google::media::c2::V1_0::utils::DefaultBufferPoolSender
+    ::android::hardware::media::c2::V1_0::utils::DefaultBufferPoolSender
             mBufferPoolSender;
 
     std::mutex mOutputBufferQueueMutex;
@@ -430,9 +430,9 @@
 
 struct Codec2Client::InputSurface {
 public:
-    typedef ::hardware::google::media::c2::V1_0::IInputSurface Base;
+    typedef ::android::hardware::media::c2::V1_0::IInputSurface Base;
 
-    typedef ::hardware::google::media::c2::V1_0::IInputSurfaceConnection
+    typedef ::android::hardware::media::c2::V1_0::IInputSurfaceConnection
             ConnectionBase;
 
     typedef Codec2Client::InputSurfaceConnection Connection;
@@ -465,7 +465,7 @@
 
 struct Codec2Client::InputSurfaceConnection {
 
-    typedef ::hardware::google::media::c2::V1_0::IInputSurfaceConnection Base;
+    typedef ::android::hardware::media::c2::V1_0::IInputSurfaceConnection Base;
 
     c2_status_t disconnect();
 
diff --git a/media/codec2/hidl/services/Android.bp b/media/codec2/hidl/services/Android.bp
index 7a835ab..965971e 100644
--- a/media/codec2/hidl/services/Android.bp
+++ b/media/codec2/hidl/services/Android.bp
@@ -1,5 +1,5 @@
 cc_binary {
-    name: "hardware.google.media.c2@1.0-service",
+    name: "android.hardware.media.c2@1.0-service",
     defaults: ["hidl_defaults"],
     soc_specific: true,
     relative_install_path: "hw",
@@ -7,19 +7,19 @@
         "vendor.cpp",
     ],
 
-    init_rc: ["hardware.google.media.c2@1.0-service.rc"],
+    init_rc: ["android.hardware.media.c2@1.0-service.rc"],
 
     shared_libs: [
+        "android.hardware.media.c2@1.0",
         "android.hardware.media.omx@1.0",
-        "hardware.google.media.c2@1.0",
         "libavservices_minijail_vendor",
         "libbinder",
-        "libcodec2_hidl_utils@1.0",
+        "libcodec2_hidl@1.0",
+        "libcodec2_vndk",
         "libhidlbase",
         "libhidltransport",
         "libhwbinder",
         "liblog",
-        "libstagefright_codec2_vndk",
         "libstagefright_omx",
         "libstagefright_xmlparser",
         "libutils",
@@ -38,7 +38,7 @@
 }
 
 cc_library_shared {
-    name: "libmedia_codecserviceregistrant",
+    name: "libcodec2_serviceregistrant",
     // need vendor version for update packaging, system version may have more dependencies
     vendor_available: true,
     srcs: [
@@ -50,43 +50,43 @@
     ],
 
     shared_libs: [
-        "hardware.google.media.c2@1.0",
+        "android.hardware.media.c2@1.0",
+        "libcodec2_hidl@1.0",
+        "libcodec2_vndk",
         "liblog",
-        "libcodec2_hidl_utils@1.0",
-        "libstagefright_codec2_vndk",
         "libutils",
     ],
 
     // Codecs
     runtime_libs: [
-        "libstagefright_soft_c2avcdec",
-        "libstagefright_soft_c2avcenc",
-        "libstagefright_soft_c2aacdec",
-        "libstagefright_soft_c2aacenc",
-        "libstagefright_soft_c2amrnbdec",
-        "libstagefright_soft_c2amrnbenc",
-        "libstagefright_soft_c2amrwbdec",
-        "libstagefright_soft_c2amrwbenc",
-        "libstagefright_soft_c2hevcdec",
-        "libstagefright_soft_c2g711alawdec",
-        "libstagefright_soft_c2g711mlawdec",
-        "libstagefright_soft_c2mpeg2dec",
-        "libstagefright_soft_c2h263dec",
-        "libstagefright_soft_c2h263enc",
-        "libstagefright_soft_c2mpeg4dec",
-        "libstagefright_soft_c2mpeg4enc",
-        "libstagefright_soft_c2mp3dec",
-        "libstagefright_soft_c2vorbisdec",
-        "libstagefright_soft_c2opusdec",
-        "libstagefright_soft_c2vp8dec",
-        "libstagefright_soft_c2vp9dec",
-        "libstagefright_soft_c2vp8enc",
-        "libstagefright_soft_c2vp9enc",
-        "libstagefright_soft_c2rawdec",
-        "libstagefright_soft_c2flacdec",
-        "libstagefright_soft_c2flacenc",
-        "libstagefright_soft_c2gsmdec",
-        "libstagefright_soft_c2xaacdec",
+        "libcodec2_soft_avcdec",
+        "libcodec2_soft_avcenc",
+        "libcodec2_soft_aacdec",
+        "libcodec2_soft_aacenc",
+        "libcodec2_soft_amrnbdec",
+        "libcodec2_soft_amrnbenc",
+        "libcodec2_soft_amrwbdec",
+        "libcodec2_soft_amrwbenc",
+        "libcodec2_soft_hevcdec",
+        "libcodec2_soft_g711alawdec",
+        "libcodec2_soft_g711mlawdec",
+        "libcodec2_soft_mpeg2dec",
+        "libcodec2_soft_h263dec",
+        "libcodec2_soft_h263enc",
+        "libcodec2_soft_mpeg4dec",
+        "libcodec2_soft_mpeg4enc",
+        "libcodec2_soft_mp3dec",
+        "libcodec2_soft_vorbisdec",
+        "libcodec2_soft_opusdec",
+        "libcodec2_soft_vp8dec",
+        "libcodec2_soft_vp9dec",
+        "libcodec2_soft_vp8enc",
+        "libcodec2_soft_vp9enc",
+        "libcodec2_soft_rawdec",
+        "libcodec2_soft_flacdec",
+        "libcodec2_soft_flacenc",
+        "libcodec2_soft_gsmdec",
+        "libcodec2_soft_xaacdec",
     ],
 
     compile_multilib: "32",
diff --git a/media/codec2/hidl/services/C2SoftwareCodecServiceRegistrant.cpp b/media/codec2/hidl/services/C2SoftwareCodecServiceRegistrant.cpp
index 04efa44..e10ae6e 100644
--- a/media/codec2/hidl/services/C2SoftwareCodecServiceRegistrant.cpp
+++ b/media/codec2/hidl/services/C2SoftwareCodecServiceRegistrant.cpp
@@ -23,7 +23,7 @@
 #include <log/log.h>
 
 extern "C" void RegisterCodecServices() {
-    using namespace ::hardware::google::media::c2::V1_0;
+    using namespace ::android::hardware::media::c2::V1_0;
     android::sp<IComponentStore> store =
         new utils::ComponentStore(
                 android::GetCodec2PlatformComponentStore());
diff --git a/media/codec2/hidl/services/android.hardware.media.c2@1.0-service.rc b/media/codec2/hidl/services/android.hardware.media.c2@1.0-service.rc
new file mode 100644
index 0000000..8806bd1f
--- /dev/null
+++ b/media/codec2/hidl/services/android.hardware.media.c2@1.0-service.rc
@@ -0,0 +1,7 @@
+service android-hardware-media-c2-hal-1-0 /vendor/bin/hw/android.hardware.media.c2@1.0-service
+    class hal
+    user mediacodec
+    group camera mediadrm drmrpc
+    ioprio rt 4
+    writepid /dev/cpuset/foreground/tasks
+
diff --git a/media/codec2/hidl/services/hardware.google.media.c2@1.0-service.rc b/media/codec2/hidl/services/hardware.google.media.c2@1.0-service.rc
deleted file mode 100644
index 0640e6a..0000000
--- a/media/codec2/hidl/services/hardware.google.media.c2@1.0-service.rc
+++ /dev/null
@@ -1,7 +0,0 @@
-service hardware-google-media-c2-hal-1-0 /vendor/bin/hw/hardware.google.media.c2@1.0-service
-    class hal
-    user mediacodec
-    group camera mediadrm drmrpc
-    ioprio rt 4
-    writepid /dev/cpuset/foreground/tasks
-
diff --git a/media/codec2/hidl/services/vendor.cpp b/media/codec2/hidl/services/vendor.cpp
index 149d4f9..ef2f98e 100644
--- a/media/codec2/hidl/services/vendor.cpp
+++ b/media/codec2/hidl/services/vendor.cpp
@@ -15,7 +15,7 @@
  */
 
 //#define LOG_NDEBUG 0
-#define LOG_TAG "hardware.google.media.c2@1.0-service"
+#define LOG_TAG "android.hardware.media.c2@1.0-service"
 
 #include <codec2/hidl/1.0/ComponentStore.h>
 #include <hidl/HidlTransportSupport.h>
@@ -97,7 +97,7 @@
 };
 
 int main(int /* argc */, char** /* argv */) {
-    ALOGD("hardware.google.media.c2@1.0-service starting...");
+    ALOGD("android.hardware.media.c2@1.0-service starting...");
 
     signal(SIGPIPE, SIG_IGN);
     android::SetUpMinijail(kBaseSeccompPolicyPath, kExtSeccompPolicyPath);
@@ -112,7 +112,7 @@
 
     // Create IComponentStore service.
     {
-        using namespace ::hardware::google::media::c2::V1_0;
+        using namespace ::android::hardware::media::c2::V1_0;
         android::sp<IComponentStore> store;
 
         // Vendor's TODO: Replace this with