Initial Release 18/312618/14 accepted/tizen/unified/20240801.021602 accepted/tizen/unified/x/20240801.044029
authorYoungHun Kim <yh8004.kim@samsung.com>
Wed, 12 Jun 2024 10:12:14 +0000 (19:12 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Sun, 28 Jul 2024 23:40:41 +0000 (08:40 +0900)
Change-Id: I1629c21656970c39f0c3840b31a6e8e5b348b6a6

123 files changed:
CMakeLists.txt [new file with mode: 0644]
LICENSE.APLv2 [new file with mode: 0644]
include/ri-api.h [new file with mode: 0755]
include/ri-category-type.h [new file with mode: 0644]
include/ri-common-type.h [new file with mode: 0755]
include/ri-dual-decoding-capability.h [new file with mode: 0644]
include/ri-module-api.h [new file with mode: 0644]
include/ri-vdec-api.h [new file with mode: 0644]
include/ri-video-capability.h [new file with mode: 0644]
include_internal/CImageCodec.h [new file with mode: 0644]
include_internal/CModelInfo.h [new file with mode: 0644]
include_internal/CMultiview.h [new file with mode: 0644]
include_internal/CResourceInfo.h [new file with mode: 0644]
include_internal/CResourceInfoDB.h [new file with mode: 0644]
include_internal/CVideoCapability.h [new file with mode: 0644]
include_internal/CVideoCodec.h [new file with mode: 0644]
include_internal/CVideoCodecNDecoding.h [new file with mode: 0644]
include_internal/CVideoDecoder.h [new file with mode: 0644]
include_internal/CVideoEncoder.h [new file with mode: 0644]
include_internal/CVideoResolution.h [new file with mode: 0644]
include_internal/category_builder/CCategoryIdBuilder.h [new file with mode: 0644]
include_internal/category_builder/CVideoDecoderCategory.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderAV1.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderAV1vr360.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderAVS.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderAVS2.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderAVS3.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderAVSPlus.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderH263.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderH264.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderH264MVC.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderH264vr360.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderHEVC.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderHEVCvr360.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderMPEG1.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderMPEG2.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderMPEG4.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderRV.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderSHVC.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderVP8.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderVP9.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderVP9vr360.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderVVC.h [new file with mode: 0644]
include_internal/category_builder/CategoryIdBuilderWMV.h [new file with mode: 0644]
include_internal/parser/CCategory.h [new file with mode: 0644]
include_internal/parser/CResourceTableProvider.h [new file with mode: 0644]
include_internal/parser/CResourceTableProviderDefault.h [new file with mode: 0644]
include_internal/parser/CResourceTableProviderLicense.h [new file with mode: 0644]
include_internal/parser/CResourceTableProviderSingle.h [new file with mode: 0644]
include_internal/parser/element/CCapabilityElement.h [new file with mode: 0644]
include_internal/parser/element/CCategoryElement.h [new file with mode: 0644]
include_internal/parser/element/CDecodingElement.h [new file with mode: 0644]
include_internal/parser/element/CDeviceElement.h [new file with mode: 0644]
include_internal/parser/element/CElement.h [new file with mode: 0644]
include_internal/parser/element/CResourceInfoDoc.h [new file with mode: 0644]
include_internal/parser/ri-parser-types.h [new file with mode: 0644]
include_internal/parser/ri-resource-info-dbmaker.h [new file with mode: 0644]
include_internal/parser/ri-resource-info-parser.h [new file with mode: 0644]
include_internal/ri-debug.h [new file with mode: 0644]
include_internal/ri-jpeg-decoder-category.h [new file with mode: 0644]
include_internal/ri-macro.h [new file with mode: 0644]
include_internal/ri-type.h [new file with mode: 0644]
include_internal/ri-video-decoder-category-type.h [new file with mode: 0644]
packaging/resource-information.spec [new file with mode: 0644]
resource-information.manifest [new file with mode: 0644]
resource-information.pc.in [new file with mode: 0644]
src/CImageCodec.cpp [new file with mode: 0755]
src/CModelInfo.cpp [new file with mode: 0755]
src/CMultiview.cpp [new file with mode: 0755]
src/CResourceInfo.cpp [new file with mode: 0755]
src/CResourceInfoDB.cpp [new file with mode: 0755]
src/CVideoCodec.cpp [new file with mode: 0755]
src/CVideoDecoder.cpp [new file with mode: 0755]
src/CVideoEncoder.cpp [new file with mode: 0755]
src/CVideoResolution.cpp [new file with mode: 0755]
src/category_builder/CCategoryIdBuilder.cpp [new file with mode: 0644]
src/category_builder/CVideoDecoderCategory.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderAV1.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderAV1vr360.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderAVS.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderAVS2.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderAVS3.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderAVSPlus.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderH263.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderH264.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderH264MVC.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderH264vr360.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderHEVC.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderHEVCvr360.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderMPEG1.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderMPEG2.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderMPEG4.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderRV.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderSHVC.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderVP8.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderVP9.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderVP9vr360.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderVVC.cpp [new file with mode: 0644]
src/category_builder/CategoryIdBuilderWMV.cpp [new file with mode: 0644]
src/parser/CCategory.cpp [new file with mode: 0644]
src/parser/CResourceTableProvider.cpp [new file with mode: 0644]
src/parser/CResourceTableProviderDefault.cpp [new file with mode: 0644]
src/parser/CResourceTableProviderLicense.cpp [new file with mode: 0644]
src/parser/element/CCategoryElement.cpp [new file with mode: 0644]
src/parser/element/CDecodingElement.cpp [new file with mode: 0644]
src/parser/element/CDeviceElement.cpp [new file with mode: 0644]
src/parser/element/CElement.cpp [new file with mode: 0644]
src/parser/element/CResourceInfoDoc.cpp [new file with mode: 0644]
src/parser/ri-resource-info-dbmaker.cpp [new file with mode: 0644]
src/parser/ri-resource-info-parser.cpp [new file with mode: 0644]
src/ri-api.cpp [new file with mode: 0755]
src/ri-dual-decoding-capability.cpp [new file with mode: 0755]
src/ri-module-api.cpp [new file with mode: 0755]
src/ri-vdec-api.cpp [new file with mode: 0755]
src/ri-video-capability.cpp [new file with mode: 0755]
src/validator/ri-validator.cpp [new file with mode: 0644]
ut/CMakeLists.txt [new file with mode: 0644]
ut/TCList.dat [new file with mode: 0644]
ut/resource-information.xml [new file with mode: 0644]
ut/testcase/ut_debug.h [new file with mode: 0644]
ut/testcase/ut_main.cpp [new file with mode: 0644]
ut/testcase/ut_table_provider_mock.h [new file with mode: 0644]
ut/testcase/ut_tc.cpp [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5f0a1a5
--- /dev/null
@@ -0,0 +1,178 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(resource-information CXX C)
+IF(VD_UNIT_TEST)
+ADD_DEFINITIONS(-DVD_UNIT_TEST)
+ENDIF(VD_UNIT_TEST)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(RI_PKGS REQUIRED
+    dlog
+    capi-system-info
+    glib-2.0
+)
+
+IF(NOT DEFINED PACKAGE_NAME)
+    SET(PACKAGE_NAME ${PROJECT_NAME})
+ENDIF(NOT DEFINED PACKAGE_NAME)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+IF(NOT DEFINED BINDIR)
+    SET(IMAGEDIR "${PREFIX}/bin")
+ENDIF(NOT DEFINED BINDIR)
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
+
+MESSAGE("VD_CFG_LICENSING : "${VD_CFG_LICENSING})
+
+IF(VD_CFG_LICENSING STREQUAL y)
+ADD_DEFINITIONS("-DLICENSE_MODEL")
+ENDIF()
+
+IF(TIZEN_PUBLIC STREQUAL y)
+ADD_DEFINITIONS("-DTIZEN_PUBLIC")
+ENDIF()
+
+SET(CATEGORY_TYPE_HEADER_PATH ${CMAKE_CURRENT_SOURCE_DIR}/include/models/COMMON)
+
+INCLUDE_DIRECTORIES(
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
+    ${CMAKE_CURRENT_SOURCE_DIR}/include_internal
+    ${CMAKE_CURRENT_SOURCE_DIR}/include_internal/parser/
+    ${CMAKE_CURRENT_SOURCE_DIR}/include_internal/parser/element/
+    ${CMAKE_CURRENT_SOURCE_DIR}/include_internal/category_builder/
+    ${RI_PKGS_INCLUDE_DIRS}
+    ${CATEGORY_TYPE_HEADER_PATH}
+    ${DECODER_SPEC_HEADER_PATH}
+    ${INPUT_SRC_SPEC_HEADER_PATH}
+)
+IF(VD_UNIT_TEST)
+ADD_SUBDIRECTORY(ut)
+ENDIF(VD_UNIT_TEST)
+
+LINK_LIBRARIES(libexpat.so)
+
+aux_source_directory(src/category_builder SRC_CATEGORY_BUILDER)
+MESSAGE("SRC_CATEGORY_BUILDER : "${SRC_CATEGORY_BUILDER})
+
+IF(TIZEN_PUBLIC STREQUAL y)
+    ADD_LIBRARY(${PROJECT_NAME} SHARED
+    src/ri-api.cpp
+    src/ri-module-api.cpp
+    src/ri-vdec-api.cpp
+    src/ri-video-capability.cpp
+    src/ri-dual-decoding-capability.cpp
+    src/CResourceInfoDB.cpp
+    src/CResourceInfo.cpp
+    src/CVideoCodec.cpp
+    src/CVideoResolution.cpp
+    src/CVideoDecoder.cpp
+    src/CVideoEncoder.cpp
+    src/CImageCodec.cpp
+    src/parser/ri-resource-info-dbmaker.cpp
+    src/parser/ri-resource-info-parser.cpp
+    src/parser/CCategory.cpp
+    src/parser/CResourceTableProvider.cpp
+    src/parser/element/CResourceInfoDoc.cpp
+    src/parser/element/CCategoryElement.cpp
+    src/parser/element/CDeviceElement.cpp
+    src/parser/element/CElement.cpp
+    src/parser/element/CDecodingElement.cpp
+    ${SRC_CATEGORY_BUILDER}
+    )
+ELSE()
+    ADD_LIBRARY(${PROJECT_NAME} SHARED
+        src/ri-api.cpp
+        src/ri-module-api.cpp
+        src/ri-vdec-api.cpp
+        src/ri-video-capability.cpp
+        src/ri-dual-decoding-capability.cpp
+        src/CResourceInfoDB.cpp
+        src/CResourceInfo.cpp
+        src/CModelInfo.cpp
+        src/CVideoCodec.cpp
+        src/CVideoResolution.cpp
+        src/CVideoDecoder.cpp
+        src/CVideoEncoder.cpp
+        src/CImageCodec.cpp
+        src/CMultiview.cpp
+        src/parser/ri-resource-info-dbmaker.cpp
+        src/parser/ri-resource-info-parser.cpp
+        src/parser/CCategory.cpp
+        src/parser/CResourceTableProvider.cpp
+        src/parser/CResourceTableProviderDefault.cpp
+        src/parser/CResourceTableProviderLicense.cpp
+        src/parser/element/CResourceInfoDoc.cpp
+        src/parser/element/CCategoryElement.cpp
+        src/parser/element/CDeviceElement.cpp
+        src/parser/element/CElement.cpp
+        src/parser/element/CDecodingElement.cpp
+        ${SRC_CATEGORY_BUILDER}
+    )
+ENDIF()
+
+IF(TIZEN_PUBLIC STREQUAL n)
+#SET(VALIDATOR_NAME ri_info_validator)
+SET(VALIDATOR_SRCS
+    src/CResourceInfoDB.cpp
+    src/CResourceInfo.cpp
+    src/CModelInfo.cpp
+    src/CVideoCodec.cpp
+    src/CVideoResolution.cpp
+    src/CImageCodec.cpp
+    src/CMultiview.cpp
+    src/CVideoDecoder.cpp
+    src/CVideoEncoder.cpp
+    src/parser/ri-resource-info-dbmaker.cpp
+    src/parser/ri-resource-info-parser.cpp
+    src/parser/CCategory.cpp
+    src/parser/CResourceTableProvider.cpp
+    src/parser/CResourceTableProviderDefault.cpp
+    src/parser/CResourceTableProviderLicense.cpp
+    src/parser/element/CCategoryElement.cpp
+    src/parser/element/CDeviceElement.cpp
+    src/parser/element/CResourceInfoDoc.cpp
+    src/parser/element/CElement.cpp
+    src/parser/element/CDecodingElement.cpp
+    src/validator/ri-validator.cpp
+    ${SRC_CATEGORY_BUILDER}
+)
+
+ADD_EXECUTABLE(${VALIDATOR_NAME} ${VALIDATOR_SRCS})
+ENDIF()
+
+CONFIGURE_FILE(resource-information.pc.in "${CMAKE_CURRENT_SOURCE_DIR}/resource-information.pc" @ONLY)
+
+FOREACH (flag ${RI_PKGS_CFLAGS})
+    SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}")
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${RI_PKGS_LDFLAGS})
+
+IF(TIZEN_PUBLIC STREQUAL n)
+TARGET_LINK_LIBRARIES(${VALIDATOR_NAME} ${RI_PKGS_LDFLAGS})
+ENDIF()
+
+SET_TARGET_PROPERTIES(${PROJECT_NAME}
+    PROPERTIES
+    VERSION ${VERSION}
+    SOVERSION ${MAJORVERSION}
+    CLEAN_DIRECT_OUTPUT 1
+)
+
+# Install
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
+
+IF(TIZEN_PUBLIC STREQUAL n)
+INSTALL(TARGETS ${VALIDATOR_NAME} DESTINATION ${BINDIR})
+ENDIF()
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ri-category-type.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ri-common-type.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ri-api.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ri-module-api.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ri-vdec-api.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ri-video-capability.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ri-dual-decoding-capability.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resource-information.pc DESTINATION ${PKGCONFIG_INSTALL_DIR})
diff --git a/LICENSE.APLv2 b/LICENSE.APLv2
new file mode 100644 (file)
index 0000000..bbe9d02
--- /dev/null
@@ -0,0 +1,206 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+\r
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+\r
+\r
diff --git a/include/ri-api.h b/include/ri-api.h
new file mode 100755 (executable)
index 0000000..b691ba5
--- /dev/null
@@ -0,0 +1,336 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _RI_API_H_
+#define _RI_API_H_
+
+#include <ri-common-type.h>
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/**
+* @brief This function returns video category id corresponding to the given parameters
+* @param [in] codec_name : video codec name to play
+* MPEG1 : "MPEG1"
+* MPEG2 : "MPEG2"
+* MPEG4 : "MPEG4"
+* H263 : "H263"
+* H264 : "H264"
+* HEVC : "HEVC"
+* VP8 : "VP8"
+* VP9 : "VP9"
+* RV : "RV"
+* WMV9 : "WMV9"
+* AVS : "AVS"
+* AVS_PLUS : "AVS+"
+*
+* @param [in] color_depth : color depth of video stream to play
+* @param [in] h_size : horizontal size of video stream to play
+* @param [in] framerate : framrate of video stream to play
+* @param [in] sampling_format : sampling format of video stream to play
+*    0x00 : others
+*    0x01 : 4:2:0
+*    0x02 : 4:2:2
+* @return video decoder category id to allocate : video decoder category id to allocate
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+* \li This function is called by a player before it requests to allocate a resource to resource manager
+*/
+
+ri_rsc_category_e ri_get_video_category_id(IN const char* codec_name, IN int color_depth, IN int h_size, IN int framerate, IN int sampling_format);
+
+/**
+* @brief This function returns mjpeg category id corresponding to the given parameters
+* @param [in] codec_name : mjpeg codec name to decode
+* MJPEG : "MJPEG"
+*
+* @param [in] h_size : horizontal size of mjpeg image to decode
+* @return jpeg decoder category id to allocate : mjpeg decoder category id to allocate
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+* \li This function is called by a player before it requests to allocate a resource to resource manager
+*/
+
+ri_rsc_category_e ri_get_jpeg_category_id(IN const char* codec_name, IN int h_size);
+
+/**
+* @brief This function returns jpeg category id corresponding to the given parameters
+* @param [in] codec_name : jpeg codec name to decode
+* JPEG : "JPEG"
+* @param [in] w_size : vertical size of jpeg image to decode
+* @param [in] h_size : horizontal size of jpeg image to decode
+* @return jpeg decoder category id to allocate : jpeg decoder category id to allocate
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+* \li This function is called by a player before it requests to allocate a resource to resource manager
+*/
+ri_rsc_category_e ri_get_sub_jpeg_category_id(IN const char* codec_name, IN int w_size, IN int h_size);
+
+/**
+* @brief This function returns category type corresponding with input device id
+* @param [in] device_id : The device id returned from resource manager
+* @param [out] category_type : The category type which device id belongs to
+* @return  ri_return_code_e
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+* \li Device id is returned by resource manager if requested resource is successfully allocated
+*/
+ri_return_code_e ri_get_category_type_by_device_id(IN int device_id, OUT int* category_type);
+/**
+* @brief This function returns video category id corresponding with input codec
+* @param [in] request_opt : The codec structure which include codec name and preffered mode
+* @param [out] return_opt : The category option structure which corresponding with input codec structure
+* @return  ri_return_code_e
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+* \li video type is returned by resource manager which corresponding with requested codec
+* \li The second parameter(return_opt) must be freed on caller side
+*/
+ri_return_code_e ri_get_video_category_id_by_codec(IN ri_category_option_request_s* request_opt, OUT ri_category_option_return_s* return_opt);
+
+/**
+* @brief This function returns device path corresponding with category id
+* @param [in] category : The category id
+* @param [out] node : The category device path which corresponding with category id
+* @return  ri_return_code_e
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+* \li device path is returned by resource manager which corresponding with category id
+* \li The second parameter(node) must be freed on caller side
+*/
+ri_return_code_e ri_get_device_info_for_fastboot(IN ri_rsc_category_e category, OUT char** node);
+
+/**
+* @brief This function returns video decoder category id corresponding with request option
+* @param [in] option : The category option which consist of codec name, color depth, h size, v size, framerate, sampling format
+* @return  ri_rsc_category_e on success, ri_return_code_e on error
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+* \li video decoder category id is returned by resource manager which corresponding with category option
+*/
+ri_rsc_category_e ri_get_capable_video_category_id(IN ri_video_category_option_request_s* option);
+
+/**
+* @brief This function returns the max width, height and framerate supported by the system for the video codec
+* @param [in] vcodec : video codec name
+* @param [out] width : max width in pixel
+* @param [out] height : max height in pixel
+* @param [out] framerate : max framerate in fps
+* @return  RI_OK on success, RI_ERROR on error
+* @pre    None
+* @post   None
+* @exception None
+* @version 3.0
+* @remark
+* \li vdec shall be one of video codecs defined in ri-common-type.h
+*/
+ri_return_code_e ri_get_max_resolution(IN const char* vcodec, OUT int *width, OUT int *height, OUT int *framerate);
+
+/**
+* @brief This function returns whether the video codec is supported or not
+* @param [in] vcodec : video codec name
+* @return  true in case vcodec is supported, otherwise false
+* @pre    None
+* @post   None
+* @exception None
+* @version 3.0
+*/
+bool ri_is_supported_video_codec(IN const char* vcodec);
+
+/**
+* @brief This function returns whether the audio codec is supported or not
+* @param [in] acodec : audio codec name
+* @return  true in case acodec is supported, otherwise false
+* @pre    None
+* @post   None
+* @exception None
+* @version 3.0
+*/
+bool ri_is_supported_audio_codec(IN const char* acodec);
+
+/**
+* @brief This function returns max width, height, framerate and number of instances supported by the system for the video codec in n-decoder mode
+* @param [in] vcodec : video codec name
+* @param [out] width : max width in pixel
+* @param [out] height : max height in pixel
+* @param [out] framerate : max framerate in fps
+* @param [out] n_instance : max number of instances
+* @return  RI_OK on success, RI_ERROR on error
+* @pre    None
+* @post   None
+* @exception None
+* @version 4.0
+* @remark
+* \li vdec shall be one of video codecs defined in ri-common-type.h
+*/
+ri_return_code_e ri_get_capability_n_decoder(IN const char* vcodec, OUT int* width, OUT int* height, OUT int* framerate, OUT int *n_instance);
+
+struct ri_video_property;
+typedef struct ri_video_property* ri_video_property_h;
+
+/**
+* @brief This function returns video decoder category id supporting the video property
+* @param [in] prop : video property handle
+* @return  ri_rsc_category_e
+* @pre    None
+* @post   None
+* @exception None
+* @version 4.0
+* @remark
+* \li If the passed video property is not supported in the model, RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED will be returned
+*/
+ri_rsc_category_e ri_get_capable_video_category(ri_video_property_h prop);
+
+/**
+* @brief This function creates a new video property handle
+* @param [in] vcodec : video codec name
+* @param [in] w : width in pixel
+* @param [in] h : height in pixel
+* @param [in] fps : framerate (frame per second)
+* @param [in] color_depth : color depth
+* @param [in] sampling_format : sampling format (ri_sampling_format)
+* @return  video property handle on success, otherwise NULL wil be returned
+* @pre    None
+* @post   None
+* @exception None
+* @version 4.0
+* @remark
+* \li Newly created video property handle must be freed by ri_video_property_free()
+*/
+ri_video_property_h ri_create_video_property(const char* vcodec, int w, int h, int fps, int color_depth, int sampling_format);
+
+/**
+* @brief This function set progressive property
+* @param [in] prop : video property handle
+* @param [in] progressive : true (the video is progressive), false (the video is not progressive)
+* @return  RI_OK on success, RI_ERROR on error
+* @pre    None
+* @post   None
+* @exception None
+* @version 4.0
+* @remark
+* \li If progressive is true, a video decoder supporting only progressive stream will be allocated
+* \li If you need a video decoder supporting both interlaced and progressive, then you don't need to call this function.
+*/
+ri_return_code_e ri_video_property_set_progressive(ri_video_property_h prop, bool progressive);
+
+/**
+* @brief This function set detiled property
+* @param [in] prop : video property handle
+* @param [in] detiled : true (the decoded streaming data is detiled), false (the decoded streaming data is not tiled)
+* @return  RI_OK on success, RI_ERROR on error
+* @pre    None
+* @post   None
+* @exception None
+* @version 6.4
+* @remark
+* \li If detiled is true, a video decoder of which output (decoded data) is detiled will be allocated.
+*/
+ri_return_code_e ri_video_property_set_detiled(ri_video_property_h prop, bool detiled);
+
+/**
+* @brief This function frees video property handle
+* @param [in] prop : video property handle
+* @return  None
+* @pre    None
+* @post   None
+* @exception None
+* @version 4.0
+*/
+void ri_video_property_free(ri_video_property_h prop);
+
+/**
+* @brief The structure for video encoder property handle
+* @version 5.0
+*/
+typedef struct ri_video_encoder_property* ri_video_encoder_property_h;
+
+/**
+* @brief This function creates a new video encoder property handle
+* @param [in] w : width in pixel
+* @param [in] h : height in pixel
+* @param [in] fps : framerate (frame per second)
+* @return  video encoder property handle on success, otherwise NULL wil be returned
+* @pre    None
+* @post   None
+* @exception None
+* @version 5.0
+* @remark
+* \li Newly created video encoder property handle must be freed by ri_video_encoder_property_free()
+*/
+ri_video_encoder_property_h ri_create_video_encoder_property(const int w, const int h, const int fps);
+
+/**
+* @brief This function set multi encoding property
+* @param [in] prop : video encoder property handle
+* @param [in] multi : true (the video encoder will be used for multi encoding), false (the video encoder will be used for single encoding)
+* @return  0 on success, -1 on error
+* @pre    None
+* @post   None
+* @exception None
+* @version 5.0
+* @remark
+* \li If multi is true, a video encoder supporting multi encoding will be allocated
+* \li If you need a video encoder for single encoding only then you don't need to call this function.
+*/
+int ri_video_encoder_property_set_multi_encoding(ri_video_encoder_property_h prop, const bool multi);
+
+/**
+* @brief This function frees video encoder property handle
+* @param [in] prop : video encoder property handle
+* @return  None
+* @pre    None
+* @post   None
+* @exception None
+* @version 5.0
+*/
+void ri_video_encoder_property_free(ri_video_encoder_property_h prop);
+
+/**
+* @brief This function returns video encoder category id supporting the video encoder property
+* @param [in] prop : video encoder property handle
+* @return positive value in case the passed video property is supported.\n
+*         negative value in case the passed video property is not supported.
+* @pre    None
+* @post   None
+* @exception None
+* @version 5.0
+* @remark
+* \li If the passed video encoder property is not supported in the model, a negative value will be returned
+*/
+int ri_get_capable_video_encoder_category(ri_video_encoder_property_h prop);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_RI_API_H_
diff --git a/include/ri-category-type.h b/include/ri-category-type.h
new file mode 100644 (file)
index 0000000..0818203
--- /dev/null
@@ -0,0 +1,374 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __RI_CATEGORY_TYPE_H__\r
+#define __RI_CATEGORY_TYPE_H__\r
+\r
+/**\r
+ * @enum ri_rsc_category_e\r
+ * @brief The id of resource category to which device belongs\r
+ *  Equals to device type\r
+ * @version 4.0\r
+ */\r
+typedef enum {\r
+       RI_CATEGORY_VIDEO_ENCODER_NOT_SUPPORTED = -6,     /**< Not supported video encoder, support since version 5.0 */\r
+       RI_CATEGORY_IMAGE_DECODER_NOT_SUPPORTED = -5,     /**< Not supported Image decoder */\r
+       RI_CATEGORY_NOT_PERMITTED = -4,                   /**< Not permitted category by resource policy */\r
+       RI_CATEGORY_MJPEG_DECODER_NOT_SUPPORTED = -3,     /**< Not supported MJPEG decoder */\r
+       RI_CATEGORY_JPEG_DECODER_NOT_SUPPORTED = -2,      /**< Not supported JPEG decoder */\r
+       RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED = -1,     /**< Not supported video decoder */\r
+       RI_CATEGORY_NONE = 0,                             /**< no category information */\r
+       RI_CATEGORY_AUDIO_DECODER = 1,                    /**< Audio Decoder */\r
+       RI_CATEGORY_AUDIO_SPDIF_ES_OUTPUT,                /**< spdif es output */\r
+       RI_CATEGORY_VIDEO_DECODER,                        /**< Video Decoder - MFD (Multi Format Decoder), FullHD */\r
+       RI_CATEGORY_DEMUX,                                /**< Demux */\r
+       RI_CATEGORY_AUDIO_ENCODER,                        /**< Audio Encoder */\r
+       RI_CATEGORY_VIDEO_ENCODER,                        /**< Video Encoder */\r
+       RI_CATEGORY_SCALER,                               /**< Main Scaler */\r
+       RI_CATEGORY_TUNER,                                /**< Tuner */\r
+       RI_CATEGORY_AUDIO_MAIN_OUT,                       /**< Logical resource to manage ALSA main out source */\r
+       RI_CATEGORY_AUDIO_REMOTE_OUT,                     /**< Logical resource to manage ALSA remote out source */\r
+       RI_CATEGORY_AUDIO_SCART_OUT,                      /**< Logical resource to manage ALSA scart out source */\r
+       RI_CATEGORY_MM_PCM_OUT,                           /**< PCM out - used by mm-player */\r
+       RI_CATEGORY_AUDIO_DECODER_PRIMARY,                /**< Primary Audio Decoder */\r
+       RI_CATEGORY_AUDIO_DECODER_SUB,                    /**< Sub Audio Decoder */\r
+       RI_CATEGORY_JPEG_DECODER,                         /**< JPEG Decoder */\r
+       RI_CATEGORY_SCALER_SUB,                           /**< Sub Scaler */\r
+       RI_CATEGORY_EXT_VIDEO_SRC,                        /**< Logical resource to manage video input path - used by player */\r
+       RI_CATEGORY_EXT_AUDIO_SRC,                        /**< Logical resource to manage audio input path - used by player */\r
+       RI_CATEGORY_EXT_HDMI_SRC,                         /**< Logical resource to manage hdmi input path - used by player */\r
+       RI_CATEGORY_VIDEO_DECODER_SUB,                    /**< Sub Video Decoder - MFD (Multi F ormat Decoder), FullHD */\r
+       RI_CATEGORY_CAMERA,                               /**< Logical resource to manage camera device */\r
+       RI_CATEGORY_DEMUX_REC,                            /**< Demux for recording */\r
+       RI_CATEGORY_TUNER_SUB,                            /**< Sub Tuner */\r
+       RI_CATEGORY_MJPEG_DECODER,                        /**< MJPEG decoder */\r
+\r
+       RI_CATEGORY_INPUT_SRC_DTV,                        /**< input source dtv */\r
+       RI_CATEGORY_INPUT_SRC_ATV,                        /**< input source atv */\r
+       RI_CATEGORY_INPUT_SRC_HDMI,                       /**< input source hdmi */\r
+       RI_CATEGORY_INPUT_SRC_COMP,                       /**< input source comp */\r
+       RI_CATEGORY_INPUT_SRC_AV,                         /**< input source av */\r
+       RI_CATEGORY_INPUT_SRC_SCART,                      /**< input source scart */\r
+\r
+       RI_CATEGORY_MIC,                                  /**< MIC */\r
+       RI_CATEGORY_EXT_COMP_SRC,                         /**< ext comp src */\r
+       RI_CATEGORY_EXT_AV_SRC,                           /**< ext av src */\r
+       RI_CATEGORY_SW_DECODER,                           /**< sw decoder */\r
+       RI_CATEGORY_VIRTUAL_RESOURCE,                     /**< deprecated */\r
+       RI_CATEGORY_VIRTUAL_TOKEN,                        /**< deprecated */\r
+       RI_CATEGORY_MMP_MEMORY_CLUSTER,                   /**< deprecated */\r
+\r
+       RI_CATEGORY_EXT_AUDIO_SRC_DVI,                    /**< external audio source DVI - LFD only */\r
+       RI_CATEGORY_EXT_AUDIO_SRC_HDMI,                   /**< external audio source HDMI - LFD only */\r
+       RI_CATEGORY_EXT_AUDIO_SRC_DP,                     /**< external audio source Display Port - LFD only */\r
+       RI_CATEGORY_EXT_AUDIO_SRC_SBB,                    /**< external audio source Magic Info I - LFD only */\r
+       RI_CATEGORY_EXT_AUDIO_SRC_OPS,                    /**< external audio source PIM(Plug In Module) - LFD only */\r
+       RI_CATEGORY_EXT_VIDEO_SRC_DVI,                    /**< external video source DVI - LFD only */\r
+       RI_CATEGORY_EXT_VIDEO_SRC_HDMI,                   /**< external video source HDMI - LFD only */\r
+       RI_CATEGORY_EXT_VIDEO_SRC_DP,                     /**< external video source Display Port - LFD only */\r
+       RI_CATEGORY_EXT_VIDEO_SRC_SBB,                    /**< external video source Magic Info I - LFD only */\r
+       RI_CATEGORY_EXT_VIDEO_SRC_OPS,                    /**< external video source PIM(Plug In Module) - LFD only */\r
+       RI_CATEGORY_EXT_PC_SRC,                           /**< external video source PC */\r
+\r
+\r
+       RI_CATEGORY_AUDIO_EVENT_COMPRESS,                 /**< audio event compress */\r
+\r
+       RI_CATEGORY_SCALER_BG,                            /**< Scaler for Background */\r
+       RI_CATEGORY_AUDIO_SUB_OUT,                        /**< Logical resource to manage ALSA sub out source */\r
+       RI_CATEGORY_GRAPHIC_PLANE,                        /**< Logical resource to manage Graphic plane */\r
+       RI_CATEGORY_DISPLAY_OUT,                          /**< Logical resource to manage display out */\r
+       RI_CATEGORY_IMAGE_DECODER,                        /**< Image decoder */\r
+       RI_CATEGORY_VIDEO_ENCODER_EXCLUSIVE,              /**< Video encoder - dedicated to duo scenario */\r
+       RI_CATEGORY_AUDIO_MAIN_OUT_SHARE,                 /**< Logical resource to manage ALSA main out source - sharable  support since version 4.0*/\r
+       RI_CATEGORY_VIDEO_ENCODER_MULTI,                  /**< Video encoder for multi encoding, support since version 5.0 */\r
+\r
+       RI_CATEGORY_JPEG_DECODER_OPTION = 500,            /**< JPEG Decoder option max*/\r
+       RI_CATEGORY_JPEG_DECODER_FHD,                     /**< FHD JPEG Decoder */\r
+       RI_CATEGORY_JPEG_DECODER_UHD,                     /**< UHD JPEG Decoder */\r
+       RI_CATEGORY_JPEG_DECODER_8K,                      /**< 8K JPEG Decoder */\r
+\r
+       RI_CATEGORY_MJPEG_DECODER_OPTION = 600,           /**< MJPEG Decoder option min*/\r
+       RI_CATEGORY_MJPEG_DECODER_FHD,                    /**< FHD MJPEG Decoder */\r
+       RI_CATEGORY_MJPEG_DECODER_UHD,                    /**< UHD MJPEG Decoder */\r
+       RI_CATEGORY_MJPEG_DECODER_8K,                     /**< 8K MJPEG Decoder */\r
+\r
+       RI_CATEGORY_HEIC_DECODER_OPTION = 650,            /**< HEIC Decoder option min */\r
+       RI_CATEGORY_HEIC_DECODER,                         /**< HEIC Decoder */\r
+\r
+       RI_CATEGORY_AUDIO_DECODER_OPTION = 700,           /**< 700: Audio decoder option */\r
+       RI_CATEGORY_AUDIO_DECODER_ANY,                    /**< 701: Audio decoder any */\r
+       RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED,          /**< 702: Audio decoder is not supported */\r
+       RI_CATEGORY_AUDIO_DECODER_MPEG,                   /**< 703: Audio decoder for MPEG (MP1, MP2, MP3) */\r
+       RI_CATEGORY_AUDIO_DECODER_AC3,                    /**< 704: Audio decoder for AC3 */\r
+       RI_CATEGORY_AUDIO_DECODER_E_AC3,                  /**< 705: Audio decoder for E-AC3 */\r
+       RI_CATEGORY_AUDIO_DECODER_TRUEHD,                 /**< 706: Audio decoder for TrueHD */\r
+       RI_CATEGORY_AUDIO_DECODER_AC4,                    /**< 707: Audio decoder for AC4 */\r
+       RI_CATEGORY_AUDIO_DECODER_VORBIS,                 /**< 708: Audio decoder for Vorbis */\r
+       RI_CATEGORY_AUDIO_DECODER_G2COOK,                 /**< 709: Audio decoder for G2Cook */\r
+       RI_CATEGORY_AUDIO_DECODER_AAC,                    /**< 710: Audio decoder for AAC */\r
+       RI_CATEGORY_AUDIO_DECODER_HE_AAC,                 /**< 711: Audio decoder for HE-AAC */\r
+       RI_CATEGORY_AUDIO_DECODER_WMA,                    /**< 712: Audio decoder for WMA */\r
+       RI_CATEGORY_AUDIO_DECODER_ADPCM,                  /**< 713: Audio decoder for ADPCM */\r
+       RI_CATEGORY_AUDIO_DECODER_MPEG_H,                 /**< 714: Audio decoder for MPEG-H */\r
+       RI_CATEGORY_AUDIO_DECODER_OPUS,                   /**< 715: Audio decoder for OPUS */\r
+       RI_CATEGORY_AUDIO_DECODER_PCM,                    /**< 716: Audio decoder for PCM */\r
+       RI_CATEGORY_AUDIO_DECODER_IAMF_OPUS,              /**< 717: Audio decoder for IAMF_OPUS */\r
+       RI_CATEGORY_AUDIO_OFFLOAD,                        /**< 718: Audio offload */\r
+\r
+       RI_CATEGORY_RADIO,                                /**< 719: Radio */\r
+\r
+       RI_CATEGORY_SCALER_OPTION = 900,                  /**< 900: Video scaler option */\r
+       RI_CATEGORY_SCALER_MULTIVIEW,                     /**< 901: Video scaler for multiview */\r
+       RI_CATEGORY_SCALER_SUB2,                          /**< 902: Video scaler sub2 */\r
+       RI_CATEGORY_SCALER_SUB3,                          /**< 903: Video scaler sub3 */\r
+       RI_CATEGORY_SCALER_VR360_DETILED,                 /**< 904: Video scaler for VR360 detailed */\r
+       RI_CATEGORY_SCALER_VR360_NATIVE_OUT,              /**< 905: Video scaler for native VR360 out */\r
+       RI_CATEGORY_SCALER_INTERLACED,                    /**< 906: Video scaler for interlaced stream */\r
+       RI_CATEGORY_SCALER_8K,                            /**< 907: Scaler for 8K output */\r
+       RI_CATEGORY_SCALER_PROGRESSIVE,                   /**< 908: Video scaler for progressive stream, support since version 4.0 */\r
+       RI_CATEGORY_SCALER_HDMI,                          /**< 909: Video scaler for HDMI input, support since version 4.0 */\r
+       RI_CATEGORY_SCALER_HDMI_SUB,                      /**< 910: Video scaler sub for HDMI input, support since version 4.0 */\r
+       RI_CATEGORY_SCALER_HDMI_MV,                       /**< 911: Video scaler for HDMI input multiview, support since version 4.0 */\r
+       RI_CATEGORY_SCALER_MINIMAP,                       /**< 912: Video scaler for Minimap, support since version 5.0 */\r
+       RI_CATEGORY_SCALER_MULTI_HDMI,                    /**< 913: Video scaler for Multi-HDMI input, support since version 5.3 */\r
+       RI_CATEGORY_SCALER_INAPP_MULTIVIEW,               /**< 914: Video scaler for inapp multiview, support since version 5.4 */\r
+       RI_CATEGORY_SCALER_GSR,                           /**< 915: Video scaler for GSR feature, support since version 6.0 */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_OPTION = 1000,\r
+       RI_CATEGORY_VIDEO_DECODER_UHD,                    /**< 1001: Video Decoder, UHD */\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_30P,     /**< 1002: video decoder for mjpeg */\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_60P,     /**< 1003: video decoder for mjpeg */\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_30P,     /**< 1004: video decoder for mjpeg */\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_60P,     /**< 1005: video decoder for mjpeg */\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_30P,     /**< 1006: video decoder for mjpeg */\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_60P,     /**< 1007: video decoder for mjpeg */\r
+       RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_30P,      /**< 1008: video decoder for h263 */\r
+       RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_60P,      /**< 1009: video decoder for h263 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P,      /**< 1010: video decoder for h264 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P,      /**< 1011: video decoder for h264 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_30P,      /**< 1012: video decoder for h264 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_60P,      /**< 1013: video decoder for h264 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_30P,      /**< 1014: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_60P,      /**< 1015: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_30P,     /**< 1016: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_60P,     /**< 1017: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_420_30P, /**< 1018: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_420_60P, /**< 1019: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_422_30P, /**< 1020: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_422_60P, /**< 1021: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_30P,      /**< 1022: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_60P,      /**< 1023: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_30P,     /**< 1024: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_60P,     /**< 1025: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_30P, /**< 1026: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_60P, /**< 1027: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_30P, /**< 1028: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_60P, /**< 1029: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_30P,       /**< 1030: video decoder for vp8 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_60P,       /**< 1031: video decoder for vp8 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_30P,       /**< 1032: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_60P,       /**< 1033: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_UHD_8BIT_30P,       /**< 1034: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_UHD_8BIT_60P,       /**< 1035: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_30P,        /**< 1036: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_60P,        /**< 1037: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_30P,      /**< 1038: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_60P,      /**< 1039: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_30P,       /**< 1040: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_60P,       /**< 1041: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_30P,  /**< 1042: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_60P,  /**< 1043: video decoder for vp9 */\r
+\r
+       //VR360\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_8BIT_30P,     /**< 1044: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_8BIT_60P,     /**< 1045: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_8BIT_30P,     /**< 1046: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_8BIT_60P,     /**< 1047: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_30P,    /**< 1048: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_60P,    /**< 1049: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_30P,    /**< 1050: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_60P,    /**< 1051: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_420_30P,/**< 1052: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_420_60P,/**< 1053: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_420_30P,/**< 1054: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_420_60P,/**< 1055: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_422_30P,/**< 1056: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_422_60P,/**< 1057: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_422_30P,/**< 1058: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_422_60P,/**< 1059: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_VR360_FHD_8BIT_30P,     /**< 1060: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_VR360_FHD_8BIT_60P,     /**< 1061: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_VR360_UHD_8BIT_30P,     /**< 1062: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_VR360_UHD_8BIT_60P,     /**< 1063: video decoder for h264 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_8BIT_30P,      /**< 1064: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_8BIT_60P,      /**< 1065: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_8BIT_30P,      /**< 1066: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_8BIT_60P,      /**< 1067: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_30P,     /**< 1068: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_60P,     /**< 1069: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_30P,     /**< 1070: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_60P,     /**< 1071: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_420_30P, /**< 1072: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_420_60P, /**< 1073: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_420_30P, /**< 1074: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_420_60P, /**< 1075: video decoder for vp9 vr360 */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_8BIT_30P,          /**< 1076: video decoder for hevc shvc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_8BIT_60P,          /**< 1077: video decoder for hevc shvc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_10BIT_30P,         /**< 1078: video decoder for hevc shvc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_10BIT_60P,         /**< 1079: video decoder for hevc shvc */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_8K_8BIT_30P,            /**< 1080: video decoder for hevc 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_8K_8BIT_60P,            /**< 1081: video decoder for hevc 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_30P,           /**< 1082: video decoder for hevc 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_60P,           /**< 1083: video decoder for hevc 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_420_30P,       /**< 1084: video decoder for hevc 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_420_60P,       /**< 1085: video decoder for hevc 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_120P,          /**< 1086: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_120P,         /**< 1087: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_120P,     /**< 1088: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_120P,     /**< 1089: video decoder for hevc */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_30P,            /**< 1090: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_60P,            /**< 1091: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_30P,           /**< 1092: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_60P,           /**< 1093: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_30P,            /**< 1094: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_60P,            /**< 1095: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_30P,           /**< 1096: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_60P,           /**< 1097: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_8K_8BIT_30P,             /**< 1098: video decoder for av1 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_8K_8BIT_60P,             /**< 1099: video decoder for av1 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_30P,            /**< 1100: video decoder for av1 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_60P,            /**< 1101: video decoder for av1 8k */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_8BIT_30P,      /**< 1102: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_8BIT_60P,      /**< 1103: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_30P,     /**< 1104: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_60P,     /**< 1105: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_8BIT_30P,      /**< 1106: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_8BIT_60P,      /**< 1107: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_30P,     /**< 1108: video decoder for vp9 vr360 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_60P,     /**< 1109: video decoder for vp9 vr360 */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_120P,          /**< 1110: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_120P,         /**< 1111: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_422_120P,     /**< 1112: video decoder for hevc */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_120P,          /**< 1113: video decoder for h264 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_HD_8BIT_30P,            /**< 1114: video decoder for h264 */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_120P,         /**< 1115: video decoder for mpeg1 */\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_120P,         /**< 1116: video decoder for mpeg2 */\r
+       RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_120P,         /**< 1117: video decoder for mpeg4 */\r
+       RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_120P,          /**< 1118: video decoder for h263 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_120P,           /**< 1119: video decoder for vp8 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_120P,           /**< 1120: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_120P,          /**< 1121: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_120P,            /**< 1122: video decoder for rv */\r
+       RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_120P,          /**< 1123: video decoder for wmv9 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_120P,           /**< 1124: video decoder for avs */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_120P,      /**< 1125: video decoder for avs+ */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_120P,           /**< 1126: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_120P,          /**< 1127: video decoder for av1 */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_30P,           /**< 1128: video decoder for avs2 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_60P,           /**< 1129: video decoder for avs2 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_120P,          /**< 1130: video decoder for avs2 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_30P,          /**< 1131: video decoder for avs2 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_60P,          /**< 1132: video decoder for avs2 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_120P,         /**< 1133: video decoder for avs2 */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_8BIT_30P,           /**< 1134: video decoder for avs2 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_8BIT_60P,           /**< 1135: video decoder for avs2 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_10BIT_30P,          /**< 1136: video decoder for avs2 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_10BIT_60P,          /**< 1137: video decoder for avs2 */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_30P,           /**< 1138: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_60P,           /**< 1139: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_30P,           /**< 1140: video decoder for vp9 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_60P,           /**< 1141: video decoder for vp9 */\r
+\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_120P,           /**< 1142: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_120P,          /**< 1143: video decoder for av1 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP8_qHD_8BIT_30P,            /**< 1144: video decoder for vp8 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_N_8BIT_30P,         /**< 1145: video decoder for h264 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_MV,        /**< 1146: video decoder for h264 multiview scenario */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_MV,        /**< 1147: video decoder for h264 multiview scenario */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PORTRAIT,  /**< 1148: video decoder for h264 portrait */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_PORTRAIT,  /**< 1149: video decoder for h264 portrait */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_INTERLACED, /**< 1150: video decoder for h264 interlaced */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_INTERLACED, /**< 1151: video decoder for h264 interlaced */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PROGRESSIVE,/**< 1152: video decoder dedicated to h264 progressive, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_PROGRESSIVE,/**< 1153: video decoder dedicated to h264 progressive, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_QuadHD_8BIT_30P,         /**< 1154: video decoder for h264, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_QuadHD_8BIT_60P,         /**< 1155: video decoder for h264, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_8BIT_30P,           /**< 1156: video decoder for HEVC, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_8BIT_60P,           /**< 1157: video decoder for HEVC, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_30P,          /**< 1158: video decoder for HEVC, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_60P,          /**< 1159: video decoder for HEVC, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_8BIT_30P,            /**< 1160: video decoder for AV1, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_8BIT_60P,            /**< 1161: video decoder for AV1, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_30P,           /**< 1162: video decoder for AV1, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_60P,           /**< 1163: video decoder for AV1, support since version 4.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_5K_8BIT_30P,             /**< 1164: video decoder for HEVC, support since version 5.3 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_5K_8BIT_60P,             /**< 1165: video decoder for HEVC, support since version 5.3 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_30P,            /**< 1166: video decoder for HEVC, support since version 5.3 */\r
+       RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_60P,            /**< 1167: video decoder for HEVC, support since version 5.3 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_5K_8BIT_30P,              /**< 1168: video decoder for AV1, support since version 5.3 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_5K_8BIT_60P,              /**< 1169: video decoder for AV1, support since version 5.3 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_30P,             /**< 1170: video decoder for AV1, support since version 5.3 */\r
+       RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_60P,             /**< 1171: video decoder for AV1, support since version 5.3 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_TRIPLE,     /**< 1172: video decoder for h264 triple decoding, support since version 5.4 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_30P,             /**< 1173: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_60P,             /**< 1174: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_120P,            /**< 1175: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_30P,            /**< 1176: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_60P,            /**< 1177: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_120P,           /**< 1178: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_30P,             /**< 1179: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_60P,             /**< 1180: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_120P,            /**< 1181: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_30P,            /**< 1182: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_60P,            /**< 1183: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_120P,           /**< 1184: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_8K_8BIT_30P,              /**< 1185: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_8K_8BIT_60P,              /**< 1186: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_8K_10BIT_30P,             /**< 1187: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VVC_8K_10BIT_60P,             /**< 1188: video decoder for VVC(H.266), support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_8K_8BIT_30P,              /**< 1189: video decoder for VP9, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_8K_8BIT_60P,              /**< 1190: video decoder for VP9, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_8K_10BIT_30P,             /**< 1191: video decoder for VP9, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_VP9_8K_10BIT_60P,             /**< 1192: video decoder for VP9, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_30P,            /**< 1193: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_60P,            /**< 1194: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_120P,           /**< 1195: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_30P,           /**< 1196: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_60P,           /**< 1197: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_120P,          /**< 1198: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_30P,            /**< 1199: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_60P,            /**< 1200: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_120P,           /**< 1201: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_30P,           /**< 1202: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_60P,           /**< 1203: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_120P,          /**< 1204: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_8K_8BIT_30P,             /**< 1205: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_8K_8BIT_60P,             /**< 1206: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_8K_10BIT_30P,            /**< 1207: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_AVS3_8K_10BIT_60P,            /**< 1208: video decoder for AVS3, support since version 6.0 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_DETILED,    /**< 1209: video decoder for h264 detiled, support since version 6.4 */\r
+       RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_DETILED     /**< 1210: video decoder for h264 detiled, support since version 6.4 */\r
+} ri_rsc_category_e;\r
+\r
+#endif// __RI_CATEGORY_TYPE_H__\r
diff --git a/include/ri-common-type.h b/include/ri-common-type.h
new file mode 100755 (executable)
index 0000000..2af029d
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _RI_RESOURCE_TYPES_H_
+#define _RI_RESOURCE_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdbool.h>
+#include <ri-category-type.h>
+
+#define IN
+#define OUT
+
+#define RI_CODEC_NAME_MPEG1 "MPEG1"
+#define RI_CODEC_NAME_MPEG2 "MPEG2"
+#define RI_CODEC_NAME_MPEG4 "MPEG4"
+#define RI_CODEC_NAME_H263 "H263"
+#define RI_CODEC_NAME_H264 "H264"
+#define RI_CODEC_NAME_HEVC "HEVC"
+#define RI_CODEC_NAME_VP8 "VP8"
+#define RI_CODEC_NAME_VP9 "VP9"
+#define RI_CODEC_NAME_RV "RV"
+#define RI_CODEC_NAME_WMV "WMV"
+#define RI_CODEC_NAME_AVS "AVS"
+#define RI_CODEC_NAME_AVS_PLUS "AVS+"
+#define RI_CODEC_NAME_MJPEG "MJPEG"
+#define RI_CODEC_NAME_JPEG "JPEG"
+#define RI_CODEC_NAME_H264_MVC "H264_MVC"
+#define RI_CODEC_NAME_HEIC "HEIC" /* support since version 3.0 */
+#define RI_CODEC_NAME_AVS2 "AVS2" /* support since version 3.0 */
+#define RI_CODEC_NAME_AVS3 "AVS3" /** AVS3.0, support since version 6.0 */
+#define RI_CODEC_NAME_VVC "VVC" /** Versatile Video Coding (H.266), support since version 6.0 */
+
+#define RI_CODEC_NAME_HEVC_VR360 "HEVC_VR360"
+#define RI_CODEC_NAME_H264_VR360 "H264_VR360"
+#define RI_CODEC_NAME_VP9_VR360 "VP9_VR360"
+#define RI_CODEC_NAME_HEVC_SHVC "HEVC_SHVC"
+#define RI_CODEC_NAME_AV1 "AV1"
+#define RI_CODEC_NAME_AV1_VR360 "AV1_VR360"
+
+#define RI_AUDIO_CODEC_NAME_MPEG "MPEG"
+#define RI_AUDIO_CODEC_NAME_MPEG_H "MPEG-H"
+#define RI_AUDIO_CODEC_NAME_AC3 "AC3"
+#define RI_AUDIO_CODEC_NAME_E_AC3 "E-AC3"
+#define RI_AUDIO_CODEC_NAME_AC4 "AC4"
+#define RI_AUDIO_CODEC_NAME_TRUEHD "TrueHD"
+#define RI_AUDIO_CODEC_NAME_VORBIS "Vorbis"
+#define RI_AUDIO_CODEC_NAME_G2COOK "G2Cook"
+#define RI_AUDIO_CODEC_NAME_AAC "AAC"
+#define RI_AUDIO_CODEC_NAME_HE_AAC "HE-AAC"
+#define RI_AUDIO_CODEC_NAME_WMA "WMA"
+#define RI_AUDIO_CODEC_NAME_ADPCM "ADPCM"
+#define RI_AUDIO_CODEC_NAME_OPUS "OPUS"
+#define RI_AUDIO_CODEC_NAME_PCM "PCM"
+#define RI_AUDIO_CODEC_NAME_IAMF_OPUS "IAMF_OPUS"
+
+/**
+* @brief The return value of resource-information API
+*/
+typedef enum {
+       RI_ERROR = -1, /**< Error */
+       RI_OK = 0      /**< Successful */
+} ri_return_code_e;
+
+/**
+ * @brief The preferred mode for resource allocation
+ */
+typedef enum {
+       RI_VDEC_MODE_SPECIFIC = 0, /**< Find a resource which has low capability */
+       RI_VDEC_MODE_FULL,         /**< Find a resource which has high capability */
+} ri_preferred_mode_e;
+
+/**
+ * @brief The category information of video decoder to want to allocate
+ */
+typedef struct {
+       const char *codec_name;             /**< video codec name */
+       ri_preferred_mode_e preferred_mode; /**< preferred mode */
+} ri_category_option_request_s;
+
+/**
+ * @brief The resource category information of video decoder
+ */
+typedef struct {
+       int category_option; /**< video resource category id which video decoder belongs to */
+       bool is_uhd_decoder; /**< true : The video decoder supporting UHD, false : The video decoder not supporting UHD */
+       char *device_node;   /**< device node of video decoder */
+} ri_category_option_return_s;
+
+/**
+ * @brief Sampling format of video.
+ */
+typedef enum {
+       RI_SAMPLING_FORMAT_OTHERS = 0x00, /**< sampling format except 4:2:0 and 4:2:2 */
+       RI_SAMPLING_FORMAT_420 = 0x01,    /**< sampling format 4:2:0 */
+       RI_SAMPLING_FORMAT_422 = 0x02     /**< sampling format 4:2:2 */
+} ri_sampling_format;
+
+/**
+ * @brief The information of video. The player needs to fill out video information in this form
+ */
+typedef struct{
+       const char *codec_name;   /**< codec name of video */
+       int color_depth;          /**< color depth of video */
+       int h_size;               /**< horizontal size of video */
+       int v_size;               /**< vertical size of video */
+       int framerate;            /**< frame rate of video */
+       int sampling_format;      /**< sample format of video - refer to ri_sampling_format */
+} ri_video_category_option_request_s;
+
+/**
+ * @brief The audio mixing mode
+ */
+typedef enum {
+       RI_MIXING_MODE_DEFAULT = 0,      /**< default mixing mode of system */
+       RI_MIXING_MODE_MULTIVIEW,        /**< mixing mode for multiview feature */
+       RI_MIXING_MODE_INTERACTION_SOUND /**< mixing mode for interaction sound feature */
+} ri_audio_mixing_mode;
+
+/**
+ * @brief The category information of audio decoder to want to allocate
+ */
+typedef struct{
+       const char *codec_name;           /**< audio codec name */
+       ri_audio_mixing_mode mixing_mode; /**< audio mixing mode */
+} ri_audio_category_option_request_s;
+
+/**
+* @brief The device id
+* @version 3.0
+*/
+typedef enum {
+       RI_DEVICE_UNDEFINED = 0,           /**< undefined device */
+       RI_DEVICE_AUDIO_MAIN_OUT = 1,      /**< audio main out */
+       RI_DEVICE_AUDIO_REMOTE_OUT,        /**< audio remote out */
+       RI_DEVICE_AUDIO_SCART_OUT,         /**< audio scart out */
+       RI_DEVICE_MM_PCM_OUT,              /**< mm pcm out */
+       RI_DEVICE_JPEG_DECODER,            /**< jpeg decoder */
+       RI_DEVICE_DEMUX0,                  /**< demux instance 0 */
+       RI_DEVICE_DEMUX1,                  /**< demux instance 1 */
+       RI_DEVICE_DEMUX2,                  /**< demux instance 2 */
+       RI_DEVICE_AUDIO_ENCODER,           /**< audio encoder */
+       RI_DEVICE_VIDEO_ENCODER,           /**< video encoder */
+       RI_DEVICE_SCALER,                  /**< video scaler (main) */
+       RI_DEVICE_EXT_VIDEO_SRC,           /**< external video source */
+       RI_DEVICE_EXT_AUDIO_SRC,           /**< external audio source */
+       RI_DEVICE_EXT_HDMI_SRC,            /**< external HDMI source */
+       RI_DEVICE_CAMERA,                  /**< camera */
+       RI_DEVICE_TUNER,                   /**< tuner */
+       RI_DEVICE_TUNER_SUB,               /**< tuner (sub) */
+       RI_DEVICE_SCALER_SUB,              /**< video scaler (sub) */
+       RI_DEVICE_AUDIO_DECODER,           /**< audio decoder (main) */
+       RI_DEVICE_AUDIO_DECODER_SUB,       /**< audio decoder (sub) */
+       RI_DEVICE_AUDIO_DECODER_PRIMARY,   /**< audio decoder (primary) */
+       RI_DEVICE_VIDEO_DECODER_MAIN,      /**< video decoder (main) */
+       RI_DEVICE_VIDEO_DECODER_SUB,       /**< video decoder (sub) */
+       RI_DEVICE_VIDEO_DECODER_UDDEC,     /**< UDDEC video decoder */
+       RI_DEVICE_VIDEO_DECODER_UDHEVC,    /**< UDHEVC video decoder */
+       RI_DEVICE_AUDIO_SPDIF_ES_OUTPUT,   /**< SPDIF ES audio output */
+       RI_DEVICE_MIC,                     /**< mic */
+       RI_DEVICE_EXT_COMP_SRC,            /**< external composite source */
+       RI_DEVICE_EXT_AV_SRC,              /**< external av source */
+       RI_DEVICE_MJPEG_DECODER,           /**< mjpeg decoder */
+       RI_DEVICE_JPEG_DECODER_UHD,        /**< jpeg decoder for UHD */
+       RI_DEVICE_MJPEG_DECODER_UHD,       /**< mjpeg decoder for UHD */
+       RI_DEVICE_SW_DECODER,              /**< software decoder */
+       RI_DEVICE_DEMUX3,                  /**< demux instance 3 */
+       RI_DEVICE_TOKEN,                   /**< deprecated */
+       RI_DEVICE_MMP_MEMORY_CLUSTER1,     /**< deprecated */
+       RI_DEVICE_MMP_MEMORY_CLUSTER2,     /**< deprecated */
+       RI_DEVICE_MMP_MEMORY_CLUSTER3,     /**< deprecated */
+       RI_DEVICE_MMP_MEMORY_CLUSTER4,     /**< deprecated */
+       RI_DEVICE_MMP_MEMORY_CLUSTER5,     /**< deprecated */
+       RI_DEVICE_MMP_MEMORY_CLUSTER_AUDIO,/**< deprecated */
+       RI_DEVICE_EXT_AUDIO_SRC_DVI,       /**< external audio source DVI - LFD only */
+       RI_DEVICE_EXT_AUDIO_SRC_HDMI,      /**< external audio source HDMI - LFD only */
+       RI_DEVICE_EXT_AUDIO_SRC_DP,        /**< external audio source Display Port - LFD only */
+       RI_DEVICE_EXT_AUDIO_SRC_SBB,       /**< external audio source Magic Info I - LFD only */
+       RI_DEVICE_EXT_AUDIO_SRC_OPS,       /**< external audio source PIM(Plug In Module) - LFD only */
+       RI_DEVICE_EXT_VIDEO_SRC_DVI,       /**< external video source DVI - LFD only */
+       RI_DEVICE_EXT_VIDEO_SRC_HDMI,      /**< external video source HDMI - LFD only */
+       RI_DEVICE_EXT_VIDEO_SRC_DP,        /**< external video source Diplay Port - LFD only */
+       RI_DEVICE_EXT_VIDEO_SRC_SBB,       /**< external video source MagicInfo I - LFD only */
+       RI_DEVICE_EXT_VIDEO_SRC_OPS,       /**< external video source PIM(Plug In Module) - LFD only */
+       RI_DEVICE_VIDEO_DECODER_DVDE0,     /**< dvde0 video decoder */
+       RI_DEVICE_VIDEO_DECODER_DVDE1,     /**< dvde1 video decoder */
+       RI_DEVICE_VIDEO_DECODER_HEN,       /**< hen video decoder */
+       RI_DEVICE_DEMUX4,                  /**< demux instance 4 */
+       RI_DEVICE_DEMUX5,                  /**< demux instance 5 */
+       RI_DEVICE_DEMUX6,                  /**< demux instance 6 */
+       RI_DEVICE_DEMUX7,                  /**< demux instance 7 */
+       RI_DEVICE_EXT_PC_SRC,              /**< external source PC */
+       RI_DEVICE_VIDEO_DECODER_VR360DEC,  /**< video decoder for VR360 */
+       RI_DEVICE_AUDIO_EVENT_COMPRESS,    /**< audio event compress */
+       RI_DEVICE_VIDEO_DECODER_HEVC_8K,   /**< video decoder for HEVC 8K */
+       RI_DEVICE_AUDIO_SUB_OUT,           /**< audio sub out */
+       RI_DEVICE_MJPEG_DECODER_SUB,       /**< mjpeg decoder (sub) */
+       RI_DEVICE_GRAPHIC_PLANE,           /**< graphic plane */
+       RI_DEVICE_VIDEO_DECODER_DVDE2,     /**< dvde2 video decoder */
+       RI_DEVICE_VIDEO_DECODER_DVDE3,     /**< dvde3 video decoder */
+       RI_DEVICE_HEIC_DECODER,            /**< heic image decoder */
+       RI_DEVICE_VIDEO_DECODER_DVDE4,     /**< dvde4 video decoder */
+       RI_DEVICE_VIDEO_DECODER_DVDE5,     /**< dvde5 video decoder */
+       RI_DEVICE_VIDEO_DECODER_DVDE6,     /**< dvde6 video decoder */
+       RI_DEVICE_VIDEO_DECODER_DVDE7,     /**< dvde7 video decoder */
+       RI_DEVICE_VIDEO_DECODER_OVDE,      /**< ovde0 video decoder */
+       RI_DEVICE_SCALER_SUB2,             /**< video scaler (sub2) */
+       RI_DEVICE_SCALER_SUB3,             /**< video scaler (sub3) */
+       RI_DEVICE_VIDEO_DECODER_MFC2,      /**< mfc2 video decoder */
+       RI_DEVICE_VIDEO_DECODER_MFC3,      /**< mfc3 video decoder */
+       RI_DEVICE_VIDEO_DECODER_MFC4,      /**< mfc4 video decoder */
+       RI_DEVICE_JPEG_DECODER_SUB,        /**< jpeg decoder (sub) */
+       RI_DEVICE_VIDEO_ENCODER_EXCLUSIVE, /**< video encoder (exclusive) */
+       RI_DEVICE_AUDIO_MAIN_OUT_SHARE0,   /**< audio main out - sharable, support since version 4.0 */
+       RI_DEVICE_AUDIO_MAIN_OUT_SHARE1,   /**< audio main out - sharable, support since version 4.0 */
+       RI_DEVICE_VIDEO_ENCODER_MULTI1,    /**< video encoder instance1 for multi encoding, support since version 5.0 */
+       RI_DEVICE_VIDEO_ENCODER_MULTI2,    /**< video encoder instance2 for multi encoding, support since version 5.0 */
+       RI_DEVICE_VIDEO_ENCODER_MULTI3,    /**< video encoder instance3 for multi encoding, support since version 5.0 */
+       RI_DEVICE_VIDEO_ENCODER_MULTI4,    /**< video encoder instance4 for multi encoding, support since version 5.0 */
+       RI_DEVICE_GSR,                     /**< video scaler for gsr feature, support since version 6.0 */
+       RI_DEVICE_AUDIO_OFFLOAD,           /**< audio offload */
+       RI_DEVICE_RADIO,                   /**< radio */
+} ri_device_e;
+#ifdef __cplusplus
+}
+#endif
+
+#endif//_RI_RESOURCE_TYPES_2_H_
diff --git a/include/ri-dual-decoding-capability.h b/include/ri-dual-decoding-capability.h
new file mode 100644 (file)
index 0000000..aaadcc3
--- /dev/null
@@ -0,0 +1,92 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __RI_DUAL_DECODING_CAPABILITY_H__\r
+#define __RI_DUAL_DECODING_CAPABILITY_H__\r
+\r
+/**\r
+* @brief video property list\r
+*/\r
+struct ri_video_property_list;\r
+\r
+/**\r
+* @brief video property list handle\r
+*/\r
+typedef struct ri_video_property_list* ri_video_property_list_h;\r
+\r
+/**\r
+* @brief Create an empty video property list\r
+* @param None\r
+* @pre None\r
+* @post None\r
+* @exception None\r
+* @return Returns an empty video property list handle\r
+* @retval video property list handle on success\r
+* @retval NULL on failure\r
+* @remark the returned list should be freed by ri_video_property_list_free() after use.\r
+*/\r
+ri_video_property_list_h ri_create_video_property_list(void);\r
+\r
+/**\r
+* @brief Add a video property in the list\r
+* @param [in] list video property list\r
+* @param [in] property video property to add\r
+* @pre None\r
+* @post the property is added to the list\r
+* @exception None\r
+* @return Returns result of add\r
+* @retval 0 on success\r
+* @retval -1 on failure\r
+*/\r
+int ri_video_property_list_add(ri_video_property_list_h list, const ri_video_property_h property);\r
+\r
+/**\r
+* @brief Remove a video property in the list\r
+* @param [in] list video property list\r
+* @param [in] property video property to remove\r
+* @pre None\r
+* @post the property is removed from the list\r
+* @exception None\r
+* @return Returns result of remove\r
+* @retval 0 on success\r
+* @retval -1 on failure\r
+*/\r
+int ri_video_property_list_remove(ri_video_property_list_h list, const ri_video_property_h property);\r
+\r
+/**\r
+* @brief Free video property list\r
+* @param [in] list video property list handle\r
+* @pre None\r
+* @post all of video properties in the list are freed along with the list.\r
+* @exception None\r
+* @return None\r
+*/\r
+void ri_video_property_list_free(ri_video_property_list_h list);\r
+\r
+/**\r
+* @brief Check if video contents with video properties in order of high resolution video first included in the list can be played simultaneously.\r
+* @param [in] list video properties of video contents to play\r
+* @pre None\r
+* @post None\r
+* @exception None\r
+* @return Returns result\r
+* @retval true This model can play multiple video contents simultaneously in the list.\r
+* @retval false This model can't play multiple video contents simultaneously in the list.\r
+* @remark list should be freed by ri_video_property_list_free() after use.\r
+*/\r
+bool ri_can_play_multiple_videos(const ri_video_property_list_h list);\r
+\r
+#endif //__RI_VIDEO_CAPABILITY_H__\r
diff --git a/include/ri-module-api.h b/include/ri-module-api.h
new file mode 100644 (file)
index 0000000..243e031
--- /dev/null
@@ -0,0 +1,604 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __RI_MODULE_API_H__
+#define __RI_MODULE_API_H__
+
+#include <ri-common-type.h>
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+#define RI_MEM_CLUSTER_NUM 8
+#define RI_VIDEO_CATEGORY_MAX (RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_DETILED + 1)
+#define RI_AUDIO_CATEGORY_MAX (RI_CATEGORY_AUDIO_DECODER_IAMF_OPUS + 1)
+#define RI_SCALER_CATEGORY_MAX (RI_CATEGORY_SCALER_GSR + 1)
+#define RI_VIRTUAL_ID_SCALER 10000
+#define RI_DEVICE_DOLBY_AUDIO -1
+
+/**
+ * @enum ri_video_resolution_e
+ * @brief The id of video resolution
+ */
+typedef enum {
+       RI_RSZ_UNDEFINED = -1,
+       RI_RSZ_FHD,
+       RI_RSZ_4K,
+       RI_RSZ_DQHD,
+       RI_RSZ_5K,
+       RI_RSZ_8K
+} ri_video_resolution_e;
+
+/**
+ * @enum ri_mv_strategoy_e
+ * @brief The multiview strategy
+ * @version 3.2
+ */
+typedef enum {
+       RI_MV_STRATEGY_NOT_SUPPORT = 0,
+       RI_MV_STRATEGY_2VIEW_2K2K_MAIN_SUB,
+       RI_MV_STRATEGY_2VIEW_2K4K_SUB_MAIN,
+       RI_MV_STRATEGY_2VIEW_4K4K_ZONE_BASE,
+       RI_MV_STRATEGY_4VIEW_4K_ZONE_BASE,
+       RI_MV_STRATEGY_2VIEW_4K_ZONE_BASE,
+       RI_MV_STRATEGY_4VIEW_4K_ZONE_BASE_ARK,
+       RI_MV_STRATEGY_2VIEW_2K4K_SUB_MAIN_ZONE_BASE,
+       RI_MV_STRATEGY_2VIEW_4K2K_MAIN_SUB,
+       RI_MV_STRATEGY_4VIEW_4K_ZONE_BASE_ROSEP,
+} ri_mv_strategoy_e;
+
+/**
+ * @enum ri_n_decoding_bw_policy_e
+ * @brief The bandwidth policy for N-decoding
+ * @version 4.0
+ */
+typedef enum {
+       RI_BW_POLICY_SHARE = 0,   /** The devices in a same group share bandwidth */
+       RI_BW_POLICY_EXCLUSIVE    /** Each device has its own bandwidth */
+} ri_n_decoding_bw_policy_e;
+
+/**
+* @brief The structure for common information of device
+*/
+typedef struct{
+       unsigned int id;                /**< device id */
+       unsigned int category;          /**< resource category id to which device belongs */
+       const char *name;               /**< device name */
+       const char *path;               /**< device node path*/
+       unsigned int bw;                /**< bandwith device spends */
+       unsigned int n_mem_clusters;    /**< the number of memory clusters */
+       unsigned int mem_clusters[RI_MEM_CLUSTER_NUM]; /**< memory cluster ids */
+       bool is_uhd_device;             /**< false: not UHD device, 1: UHD device */
+       unsigned int id_unique;         /**< unique id of device */
+       int is_main_device;             /**< 0: not main device, 1: main device */
+       const char *omx_comp_name;      /**< OMX component name corresponding to device */
+       const char *audio_codec;        /**< audio codec name */
+       int sharable_count;             /**< sharable count */
+       int mixing_count;               /**< mixing count */
+       int category_main;              /**< main category */
+} ri_device_common_attr_s;
+
+/**
+* @brief This function returns a list of device
+* @param [out] num : the number of device to be returned
+* @param [out] devices : device information
+* @return ri_return_code_e
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* \li This function is for Resource Manager to get the device list
+* \li The first(num), second(devices) parameter must be freed on caller side
+*/
+ri_return_code_e ri_get_device_list(OUT int* num, OUT ri_device_common_attr_s** devices);
+
+
+/**
+* @brief This function returns device path corresponding with device id
+* @param [in] device_id : device id
+* @param [out] device_path : device path
+* @return ri_return_code_e
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* \li This function is called by client after getting device id from ASM
+* \li The second parameter(device_path) must be freed on caller side
+*/
+ri_return_code_e ri_get_device_path_by_device_id(IN int device_id, OUT char** device_path);
+
+/**
+* @brief This function returns omx component name corresponding with device id
+* @param [in] device_id : device id
+* @param [out] name : omx component name
+* @return ri_return_code_e
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* \li This function is called by client after getting device id from ASM
+* \li The second parameter(name) must be freed on caller side
+*/
+ri_return_code_e ri_get_omx_comp_name_by_device_id(IN int device_id, OUT char** name);
+
+
+/**
+* @brief This function returns device id with corresponding node path
+* @param [in] node : device node
+* @return ri_return_code_e
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* \li This function is called by resource manager to get the device id
+*/
+unsigned int ri_get_device_id(IN char *node);
+
+/**
+* @brief This function returns system bandwidth
+* @return  system bandwidth
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* \li This function is called by resource manager to get system bandwidth
+*/
+int ri_get_system_bw(void);
+
+/**
+* @brief This function returns device name corresponding to device id
+* @param [in] device_id : device id
+* @return NULL if there isn't any device corresponding to device id or device name if there is any
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* \li This function is called by client after getting device id
+*/
+const char *ri_get_device_name_by_device_id(IN const int device_id);
+
+/**
+* @brief This function returns audio decoder category id capable of decoding given option
+* @param [in] option : The category option which consist of codec name
+* @return audio decoder category id capable of decoding given option
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* \li In case there is no audio decoder capable of decoding given option, RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED is returned
+*/
+int ri_get_capable_audio_category_id(IN ri_audio_category_option_request_s* option);
+
+/**
+* @brief This function returns whether this model supports triple decoding or not
+* @return bool : false - triple decoding is not supported, true : triple decoding is supported
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+bool ri_triple_decoding_supported(void);
+
+/**
+* @brief This function returns the converted category id of AI decoder corresponding to the give video decoder category id
+* @param [in] vdec : The video decoder category to convert to AI decoder
+* @return The converted category id of AI decoder
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+*  The vdec should be one of video decoder category ids
+*/
+int ri_get_ai_decoder_category_id(IN ri_rsc_category_e vdec);
+
+
+/**
+* @brief This function returns video decoder category id corresponding with request option and supporting n-decoding
+* @param [in] option : The category option which consist of codec name, color depth, h size, v size, framerate, sampling format
+* @return  ri_rsc_category_e on success, ri_return_code_e on error
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+* \li video decoder category id is returned by resource manager which corresponding with category option
+* \li In case there isn't any video decoder supporting n-decoding for given option, RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED will be returned
+*/
+int ri_get_n_decoder_category_id(IN ri_video_category_option_request_s* option);
+
+/**
+* @brief This function returns whether the passed category is a video decoder category or not
+* @param [in] category : resource category
+* @return true : the passed category is a video decoder category, false : isn't a video decoder category
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+bool ri_is_video_decoder_category(int category);
+
+/**
+* @brief This function returns whether the passed category is a video scaler category or not
+* @param [in] category : resource category
+* @return true : the passed category is a video scaler category, false : isn't a video scaler category
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+bool ri_is_video_scaler_category(int category);
+
+/**
+* @brief This function returns whether the passed category is an audio out category or not
+* @param [in] category : resource category
+* @return true : the passed category is an audio out category, false : isn't an audio out category
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+bool ri_is_audio_out_category(int category);
+
+/**
+* @brief This function returns whether the passed category is an audio decoder category or not
+* @param [in] category : resource category
+* @return true : the passed category is an audio decoder category, false : isn't an audio decoder category
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+bool ri_is_audio_decoder_category(int category);
+
+/**
+* @brief This function returns whether the passed category is an audio decoder category for mixing or not
+* @param [in] category : resource category
+* @return true : the passed category is an audio decoder category for mixing, false : isn't an audio decoder category
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+bool ri_is_audio_decoder_category_mixing(int category);
+
+/**
+* @brief This function returns whether the passed category is a mjpeg decoder category or not
+* @param [in] category : resource category
+* @return true : the passed category is a mjpeg decoder category, false : isn't a mjpeg decoder category
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+bool ri_is_mjpeg_decoder_category(int category);
+
+/**
+* @brief This function unmask category option bits
+* @param [in] category : resource category
+* @return unmasked category id
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+int ri_unmask_category_options(int category);
+
+/**
+* @brief This function returns class of category
+* @param [in] category : resource category
+* @return class of category
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager for internal use
+* \li Do not use for other purpose
+*/
+int ri_get_category_class(int category);
+
+/**
+* @brief This function initialize resource info db
+* @param None
+* @return None
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource manager for internal use
+* \li Do not use for other purpose
+*/
+void ri_init(void);
+
+/**
+* @brief This function returns image category id corresponding to the passed parameters
+* @param [in] codec : image codec name to decode
+* @param [in] w_size : vertical size of image to decode
+* @param [in] h_size : horizontal size of image to decode
+* @return ri_rsc_category_e on success, RI_CATEGORY_IMAGE_DECODER_NOT_SUPPORTED in case passed image is not supported
+* @pre    None
+* @post   None
+* @exception None
+* @remark
+*/
+ri_rsc_category_e ri_get_image_category_id(const char *codec, int w_size, int h_size);
+
+/**
+* @brief This function returns whether the passed device is a main device or not
+* @param [in] device_id : device id
+* @return true : the passed device is a main device, false : isn't a main device
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called for the following resources which have main/sub devices
+* \li - video decoder
+* \li - audio out
+* \li - audio decoder
+*/
+bool ri_is_main_device(const int device_id);
+
+/**
+* @brief This function returns whether the passed device supports overlay feature or not
+* @param [in] device_id : device id
+* @return true : the passed device supports overlay, false : not support overlay
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by Resource manager only.
+* \li Do not use for other purpose
+*/
+bool ri_is_overlay_supported(const int device_id);
+
+/**
+* @brief This function returns max resolution supported by the passed device
+* @param [in] device_id : device id
+* @return max resolution
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by Resource manager only.
+* \li Do not use for other purpose
+*/
+int ri_get_supported_max_resolution(const int device_id);
+
+/**
+* @brief This function returns max sampling format supported by the passed device
+* @param [in] device_id : device id
+* @return max sampling format
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by Resource manager only.
+* \li Do not use for other purpose
+*/
+int ri_get_max_sampling_format(const int device_id);
+
+/**
+* @brief This function returns number of video decoders that can be used simultaneously
+* @return int : the number of video decoders that can be used simultaneously
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by the resource manager and the resource center for internal use
+*/
+int ri_get_max_video_decoder_num(void);
+
+/**
+* @brief This function returns whether this model requires zone id based reclaim policy
+* @return bool : true : zone id based reclaim is required, false : zone id based reclaim is not required
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by the resource manager for internal use
+*/
+bool ri_get_zone_id_based_reclaim_policy(void);
+
+/**
+* @brief This function returns whether this model has video decoders that have limitation to play H264 interlaced stream
+* @return bool : true : some video decoders have limitation to playe H264 interlaced stream, false : no video decoder has limitation to play H264 interlaced stream
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by the resource center for internal use
+*/
+bool ri_is_h264_interlaced_limited_model(void);
+
+/**
+* @brief This function returns whether this model has video decoders that have limitation on MFD H264 seamless playback in Portrait mode.
+* @return bool : true : MFD video decoder doesn't support seamless playback, false : MFD video decoder supports seamless playback.
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by the resource center for internal use
+*/
+bool ri_is_h264_portrait_seamless_playback_limited_model(void);
+
+/**
+* @brief This function returns resolution of video category
+* @param [in] category : resource category
+* @return video resolution of the category. one of ri_video_resolution_e
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource center for internal use
+* \li Do not use for other purpose
+*/
+int ri_get_video_category_resolution(int category);
+
+/**
+* @brief This function returns the supported codec name of video category
+* @param [in] category : resource category
+* @param [out] codec : the supported codec name
+* @return 0 on success, otherwise negative value
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource center for internal use
+* \li Do not use for other purpose
+* \li the returned codec must be freed after use
+*/
+int ri_get_video_category_codec_name(int category, char** codec);
+
+/**
+* @brief This function returns whether this model has a limit between 8k decoder and sub scalers
+* @return bool : true : 8k decoder and sub scalers can not be used simultaneously, false : don't care limit
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by the resource manager for internal use
+*/
+bool ri_is_8k_sub_scaler_dual_limited_model(void);
+
+
+/**
+* @brief This function returns framerate of video category
+* @param [in] category : resource category
+* @return framerate of the category.
+* @pre                 None
+* @post                None
+* @exception   None
+* @version 3.0
+* @remark
+* \li This API is supposed to be called by the resource center for internal use
+* \li Do not use for other purpose
+*/
+int ri_get_video_category_framerate(int category);
+
+
+/**
+* @brief This function returns a resource strategy for multiview feature of this model
+* @return  Resource strategy for multiview feature. The one of ri_mv_strategoy_e.
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by resource center for internal use
+*/
+int ri_mv_get_resource_strategy(void);
+
+/**
+* @brief This function returns a bandwidth policy for n-decoding
+* @param [in] category_id : resource category
+* @return  Bandwidth policy
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by resource manager for internal use
+*/
+ri_n_decoding_bw_policy_e ri_get_n_decoding_bw_policy(int category_id);
+
+/**
+* @brief This function returns whether this model supports HDMI dedicated scaler or not
+* @return  true : support HDMI dedicated scaler, false : not support HDMI dedicated scaler
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by resource manager for internal use
+*/
+bool ri_support_hdmi_dedicated_scaler(void);
+
+/**
+* @brief This function returns whether the passed category id is a hdmi dedicated scaler or not
+* @param [in] category_id : resource category
+* @return  true : HDMI dedicated scaler, false : not HDMI dedicated scaler
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by resource manager for internal use
+*/
+bool ri_is_hdmi_dedicated_scaler_category(int category_id);
+
+/**
+* @brief This function returns a video decoder category dedicated to triple decoding
+* @param [in] category_id : resource category
+* @return video decoder category id that is dedicated to triple decoding
+* @retval #RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED This model doesn't support triple decoding or triple decoding is not supported for the passed category id
+* @pre                 None
+* @post                None
+* @exception   None
+* @remark
+* /li This API is supposed to be called by mm player in the model supporting H264/2K/30P triple decoding such as PontusM LFD
+*/
+int ri_get_video_category_dedicated_to_triple_decoding(int category_id);
+
+/**
+* @brief This function returns max bandwidth of the video encoder
+* @param [out] max : max bandwidth available for single encoding
+* @param [out] max_multi : max bandwidth available for multi encodings
+* @param [out] max_multi_single : max bandwidth available for a multi encoding (single)
+* @return 0 on success, otherwise negative value
+* @pre                 None
+* @post                None
+* @exception   None
+* @version             5.0
+* @remark
+* /li This API is supposed to be called by the resource manager only. Do not use for other purpose.
+*/
+int ri_get_video_encoder_bandwidth(unsigned long long *max, unsigned long long *max_multi, unsigned long long *max_multi_single);
+
+/**
+* @brief This function returns whether this model supports dual decoding for AV1 codec in multiview
+* @return  true : dual decoding for AV1 is supported, false : dual decoding for AV1 is not supported
+* @pre                 None
+* @post                None
+* @exception   None
+ * @version            5.0
+* @remark
+* /li This API is supposed to be called by resource center for internal use
+*/
+bool ri_support_dual_decoding_av1(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __RI_MODULE_API_H__
diff --git a/include/ri-vdec-api.h b/include/ri-vdec-api.h
new file mode 100644 (file)
index 0000000..aad58ed
--- /dev/null
@@ -0,0 +1,204 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __RI_VDEC_API_H__\r
+#define __RI_VDEC_API_H__\r
+\r
+#include <ri-common-type.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C"{\r
+#endif\r
+\r
+struct ri_resource_list;\r
+typedef struct ri_resource_list* ri_resource_list_h;\r
+\r
+struct ri_video_decoder;\r
+typedef struct ri_video_decoder* ri_video_decoder_h;\r
+\r
+struct ri_vcodec;\r
+typedef struct ri_vcodec* ri_video_codec_h;\r
+\r
+/**\r
+ * @brief Get a video decoder list handle\r
+ * @param[in] list video decoder list handle\r
+ * @return 0 on success, otherwise negative value\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ * @remark\r
+ * \li The returned handle  must be freed by ri_free_video_decoder_list() after use\r
+ */\r
+int ri_get_video_decoder_list(ri_resource_list_h *list);\r
+\r
+/**\r
+ * @brief Free a video decoder list handle\r
+ * @param[in] list video decoder list handle\r
+ * @return None\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+void ri_free_video_decoder_list(ri_resource_list_h list);\r
+\r
+/**\r
+ * @brief Get next video decoder handle in the video decoder list\r
+ * @param[in] list video decoder list handle\r
+ * @return next video decoder handle\r
+ *         In case there is no next video decoder handle or error, returns NULL\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+ri_video_decoder_h ri_vdec_list_get_next(ri_resource_list_h list);\r
+\r
+/**\r
+ * @brief Get previous video decoder handle in the video decoder list\r
+ * @param[in] list video decoder list handle\r
+ * @return previous video decoder handle\r
+ *         In case there is no previous video decoder handle or error, returns NULL\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+ri_video_decoder_h ri_vdec_list_get_prev(ri_resource_list_h list);\r
+\r
+/**\r
+ * @brief Get first video decoder handle in the video decoder list\r
+ * @param[in] list video decoder list handle\r
+ * @return the first video decoder handle\r
+ *         In case there is no first video decoder handle (empty video decoder list) or error, returns NULL\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+ri_video_decoder_h ri_vdec_list_get_first(ri_resource_list_h list);\r
+\r
+/**\r
+ * @brief Get last video decoder handle in the video decoder list\r
+ * @param[in] list video decoder list handle\r
+ * @return the last video decoder handle\r
+ *         In case there is no last video decoder handle (empty video decoder list) or error, returns NULL\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+ri_video_decoder_h ri_vdec_list_get_last(ri_resource_list_h list);\r
+\r
+/**\r
+ * @brief Get number of video decoder handles in the video decoder list\r
+ * @param[in] list video decoder list handle\r
+ * @return number of video decoder handles in the video decoder list\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+int ri_vdec_list_get_count(ri_resource_list_h list);\r
+\r
+/**\r
+ * @brief Get id of video decoder\r
+ * @param[in] vdec video decoder handle\r
+ * @return id of video decoder. Positive value on success, otherwise negative value\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+int ri_vdec_get_id(ri_video_decoder_h vdec);\r
+\r
+/**\r
+ * @brief Get number of video codecs supported by video decoder\r
+ * @param[in] vdec video decoder handle\r
+ * @return number of the supported video codecs\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+int ri_vdec_get_supported_codec_count(ri_video_decoder_h vdec);\r
+\r
+/**\r
+ * @brief Get next video codec handle in the video decoder\r
+ * @param[in] vdec video decoder handle\r
+ * @return next video codec handle\r
+ *         In case there is no next video codec handle or error, returns NULL\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+ri_video_codec_h ri_vdec_get_codec_next(ri_video_decoder_h vdec);\r
+\r
+/**\r
+ * @brief Get previous video codec handle in the video decoder\r
+ * @param[in] vdec video decoder handle\r
+ * @return previous video codec handle\r
+ *         In case there is no previous video codec handle or error, returns NULL\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+ri_video_codec_h ri_vdec_get_codec_prev(ri_video_decoder_h vdec);\r
+\r
+/**\r
+ * @brief Get first video codec handle in the video decoder\r
+ * @param[in] vdec video decoder handle\r
+ * @return the first video codec handle\r
+ *         In case there is no first video codec handle (empty video codec list) or error, returns NULL\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+ri_video_codec_h ri_vdec_get_codec_first(ri_video_decoder_h vdec);\r
+\r
+/**\r
+ * @brief Get last video codec handle in the video decoder\r
+ * @param[in] vdec video decoder handle\r
+ * @return the last video codec handle\r
+ *         In case there is no last video codec handle (empty video codec list) or error, returns NULL\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+ri_video_codec_h ri_vdec_get_codec_last(ri_video_decoder_h vdec);\r
+\r
+/**\r
+ * @brief Get video codec name\r
+ * @param[in] vcodec video codec handle\r
+ * @return video codec name\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ * @remark\r
+ * \li Please do not free() the returned pointer\r
+ */\r
+const char* ri_vcodec_get_name(ri_video_codec_h vcodec);\r
+\r
+/**\r
+ * @brief Get the supported max resolution for the codec\r
+ * @param[in] vcodec video codec handle\r
+ * @param[in] w width in pixel\r
+ * @param[in] h height in pixel\r
+ * @param[in] f framerate\r
+ * @return 0 on success, otherwise negative value\r
+ * @pre None\r
+ * @post None\r
+ * @exception None\r
+ */\r
+int ri_vcodec_get_max_resolution(ri_video_codec_h vcodec, int* w, int* h, int *f);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif // __RI_VDEC_API_H__\r
diff --git a/include/ri-video-capability.h b/include/ri-video-capability.h
new file mode 100644 (file)
index 0000000..48a80e7
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __RI_VIDEO_CAPABILITY_H__
+#define __RI_VIDEO_CAPABILITY_H__
+
+/**
+* @brief video decoding property
+*/
+struct ri_video_decoding_property;
+
+/**
+* @brief video decoding property handle
+* @remark This handle is used to access member variables of video decoding property
+*/
+typedef struct ri_video_decoding_property* ri_video_decoding_property_h;
+
+/**
+* @brief Create a video decoding property handle
+* @param [in] codec_name Video codec name to get video decoding property
+* @pre None
+* @post None
+* @exception None
+* @return Returns a video decoding property handle
+* @retval video decoding property handle on success
+* @retval NULL on failure
+* @remark Returned video decoding property handle should be freed by ri_video_decoding_property_free() after use.
+* @remark codec_name should not be NULL or empty string
+*/
+ri_video_decoding_property_h ri_create_video_decoding_property(const char* codec_name);
+
+/**
+* @brief Free video decoding property handle
+* @param [in] prop video decoding property handle
+* @pre None
+* @post None
+* @exception None
+* @return Returns result of free
+* @retval 0 on success
+* @retval -1 on failure
+*/
+int ri_video_decoding_property_free(ri_video_decoding_property_h prop);
+
+/**
+* @brief device property enum
+*/
+typedef enum ri_device_property_ {
+       RI_DEVICE_PROPERTY_NONE, /**< property none */
+       RI_DEVICE_PROPERTY_MAIN, /**< main device (resource) */
+       RI_DEVICE_PROPERTY_SUB /**< sub device (resource) */
+} ri_device_property;
+
+/**
+* @brief video capability
+*/
+struct ri_video_capability;
+
+/**
+* @brief video capability handle
+* @remark This handle is used to access member variables of video capability
+*/
+typedef struct ri_video_capability* ri_video_capability_h;
+
+/**
+* @brief Get device property of video capability
+* @param [in] capa video capability handle
+* @pre None
+* @post None
+* @exception None
+* @return Returns device property
+* @retval RI_DEVICE_PROPERTY_MAIN or RI_DEVICE_PROPERTY_SUB on success
+* @retval RI_DEVICE_PROPERTY_NONE on failure
+* @remark RI_DEVICE_PROPERTY_MAIN means main device (resource) supports this video capability.
+* @remark RI_DEVICE_PROPERTY_SUB means sub device (resource) supports this video capability.
+*/
+ri_device_property ri_video_capability_get_device_property(const ri_video_capability_h capa);
+
+/**
+* @brief Get width of max video resolution
+* @param [in] capa video capability handle
+* @pre None
+* @post None
+* @exception None
+* @return Returns width of max video resolution
+* @retval positive value (in pixels) on success
+* @retval -1 on failure
+*/
+int ri_video_capability_get_width(const ri_video_capability_h capa);
+
+/**
+* @brief Get height of max video resolution
+* @param [in] capa video capability handle
+* @pre None
+* @post None
+* @exception None
+* @return Returns height of max video resolution
+* @retval positive value (in pixels) on success
+* @retval -1 on failure
+*/
+int ri_video_capability_get_height(const ri_video_capability_h capa);
+
+/**
+* @brief Get FPS (Frame Per Second) of max video resolution
+* @param [in] capa video capability handle
+* @pre None
+* @post None
+* @exception None
+* @return Returns fps of max video resolution
+* @retval 0 or positive value on success
+* @retval -1 on failure
+*/
+int ri_video_capability_get_fps(const ri_video_capability_h capa);
+
+/**
+* @brief video capability list
+*/
+struct ri_video_capability_list;
+
+/**
+* @brief video capability list handle
+*/
+typedef struct ri_video_capability_list* ri_video_capability_list_h;
+
+/**
+* @brief Get dual decoding capability for passed video decoding property
+* @param [in] prop video decoding property
+* @param [out] list video capability list handle
+* @pre None
+* @post video capability handles are inserted to list
+* @exception None
+* @return Returns result
+* @retval 0 on success
+* @retval -1 on failure
+* @remark list should be freed by ri_video_capability_list_free() after use.
+* @remark You can access video capability handle in list using ri_video_capability_list_get_first() and ri_video_capability_list_get_next().
+* @remark In case dual decoding is not supported for the passed video decoding property, number of video capability handles in list will be 0 or 1.
+*/
+int ri_get_dual_decoding_capability(const ri_video_decoding_property_h prop, ri_video_capability_list_h *list);
+
+/**
+* @brief Get the first video capability handle in video capability list
+* @param [in] list video capability list handle
+* @pre None
+* @post iterator of video capability list moved to the first element
+* @exception None
+* @return Returns video capability handle
+* @retval the first video capability handle on success
+* @retval NULL on failure
+*/
+ri_video_capability_h ri_video_capability_list_get_first(ri_video_capability_list_h list);
+
+/**
+* @brief Get next video capability handle in video capability list
+* @param [in] list video capability list handle
+* @pre None
+* @post iterator of video capability list moved to next element
+* @exception None
+* @return Returns video capability handle
+* @retval next video capability handle on success
+* @retval NULL on failure or if there is no next video capability handle
+*/
+ri_video_capability_h ri_video_capability_list_get_next(ri_video_capability_list_h list);
+
+/**
+* @brief Get number of video capability handles in video capability list
+* @param [in] list video capability list handle
+* @pre None
+* @post None
+* @exception None
+* @return Returns number of video capability handles
+* @retval 0 or positive value
+*/
+int ri_video_capability_list_get_count(const ri_video_capability_list_h list);
+
+/**
+* @brief Free video capability list
+* @param [in] list video capability list handle
+* @pre None
+* @post all of video capabilities in the list are freed along with the list.
+* @exception None
+* @return Returns result of free
+* @retval 0 on success
+* @retval -1 on failure
+*/
+int ri_video_capability_list_free(ri_video_capability_list_h list);
+
+#endif //__RI_VIDEO_CAPABILITY_H__
diff --git a/include_internal/CImageCodec.h b/include_internal/CImageCodec.h
new file mode 100644 (file)
index 0000000..c371c0a
--- /dev/null
@@ -0,0 +1,40 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CIMAGE_CODEC_H__\r
+#define __CIMAGE_CODEC_H__\r
+\r
+#include <string>\r
+\r
+class CImageCodec {\r
+public:\r
+       CImageCodec(std::string name);\r
+       ~CImageCodec();\r
+\r
+       void SetMaxResolution(int w, int h) { m_width_max = w, m_height_max = h; }\r
+       void GetMaxResolution(int *w, int *h);\r
+       void SetMinResolution(int w, int h) { m_width_min = w, m_height_min = h; }\r
+       void GetMinResolution(int *w, int *h);\r
+\r
+private:\r
+       std::string m_name;\r
+       int m_width_max;\r
+       int m_height_max;\r
+       int m_width_min;\r
+       int m_height_min;\r
+};\r
+\r
+#endif// __CIMAGE_CODEC_H__
\ No newline at end of file
diff --git a/include_internal/CModelInfo.h b/include_internal/CModelInfo.h
new file mode 100644 (file)
index 0000000..3cddc85
--- /dev/null
@@ -0,0 +1,62 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CMODEL_INFO_H__\r
+#define __CMODEL_INFO_H__\r
+\r
+#include <string>\r
+#include <set>\r
+#include <map>\r
+\r
+typedef enum {\r
+       CHIPSET_ERR = -1,\r
+       CHIPSET_UNKNOWN = 0, /**< In case invalid SW Model is selected */\r
+} eChipSet;\r
+\r
+typedef enum {\r
+       CHIPSET_VENDOR_OTHERS = 0,\r
+       CHIPSET_VENDOR_SLSI\r
+} eChipSetVendor;\r
+\r
+class CModelInfo\r
+{\r
+public:\r
+       static CModelInfo& GetInstance(void);\r
+\r
+       CModelInfo();\r
+       virtual ~CModelInfo() = default;\r
+\r
+       virtual int GetResourceTableIndex(void) const;\r
+       eChipSet GetChipSet(void);\r
+\r
+       virtual bool IsEmulator(void) const;\r
+       bool IsSingleTableModel(void) const;\r
+       virtual bool SupportAndroidOnTizen(void) const;\r
+\r
+private:\r
+       void InitFeatures(void);\r
+       int ReadIndex(std::string filename) const;\r
+       std::string GetChipSetName(void);\r
+\r
+       bool m_has_dedicated_category_h264_fhd_portrait;\r
+       bool m_exclusive_bw_for_h264_fhd_n_decoding;\r
+\r
+       std::string m_chipset_name;\r
+       std::map<std::string, eChipSet> m_chipset_info;\r
+       std::map<std::string, eChipSetVendor> m_chipset_vendor; // chipset name, chipset vendor\r
+};\r
+\r
+#endif //__CMODEL_INFO_H__\r
diff --git a/include_internal/CMultiview.h b/include_internal/CMultiview.h
new file mode 100644 (file)
index 0000000..ee71952
--- /dev/null
@@ -0,0 +1,65 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CMULTIVIEW_H__\r
+#define __CMULTIVIEW_H__\r
+\r
+class CMultiview\r
+{\r
+public:\r
+       static CMultiview& GetInstance(void);\r
+\r
+       int GetStrategy(void) const { return strategy_; }\r
+       bool RequireZoneBaseReclaim(void) const { return (reclaim_policy_ == ReclaimPolicy::ZoneBase); }\r
+       bool SupportInterlacedPlaybackByMFDOnly(void) const { return (interlaced_playback_ == InterlacedPlayback::MFDOnly); }\r
+       bool SupportSeamlessPlaybackByDVDEOnly(void) const { return (seamless_playback_ == SeamlessPlayback::DVDEOnly); }\r
+       bool SupportDualDecodingAV1(void) const { return (av1_dual_decoding_ == AV1DualDecoding::Support); }\r
+\r
+private:\r
+       enum class ReclaimPolicy {\r
+               Default,    /** Reclaim the oldest allocated resource first */\r
+               ZoneBase    /** Reclaim the resource allocated in same multiview zone first */\r
+       };\r
+\r
+       enum class InterlacedPlayback {\r
+               All,        /** All video decoders support the interlaced video playback for H264 */\r
+               MFDOnly     /** Only MFD decoder supports the interlaced video playback for H264 */\r
+       };\r
+\r
+       enum class SeamlessPlayback {\r
+               All,        /** All video decoders support the seamless playback (resolution change) in portrait mode */\r
+               DVDEOnly    /** Only DVDE decoder supports the seamless playback (resolution change) in portrait mode */\r
+       };\r
+\r
+       enum class AV1DualDecoding {\r
+               Support,    /** AV1 dual decoding is supported in multiview */\r
+               NotSupport  /** AV1 dual decoding is not supported in multiview */\r
+       };\r
+\r
+       CMultiview();\r
+       ~CMultiview() = default;\r
+\r
+       void Init(void);\r
+       void SetPolicy(const int strategy, const ReclaimPolicy reclaim, const InterlacedPlayback interlaced, const SeamlessPlayback seamless, const AV1DualDecoding dual_decoding);\r
+\r
+       int strategy_;\r
+       ReclaimPolicy reclaim_policy_;\r
+       InterlacedPlayback interlaced_playback_;\r
+       SeamlessPlayback seamless_playback_;\r
+       AV1DualDecoding av1_dual_decoding_;\r
+};\r
+\r
+#endif //__CMULTIVIEW_H__\r
diff --git a/include_internal/CResourceInfo.h b/include_internal/CResourceInfo.h
new file mode 100644 (file)
index 0000000..3a582f1
--- /dev/null
@@ -0,0 +1,61 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CResourceInfo_H__\r
+#define __CResourceInfo_H__\r
+\r
+#include <map>\r
+\r
+#include <ri-category-type.h>\r
+#include <ri-video-decoder-category-type.h>\r
+\r
+class CResourceInfo\r
+{\r
+public:\r
+       CResourceInfo();\r
+       ~CResourceInfo();\r
+\r
+       static CResourceInfo* GetInstance(void);\r
+       ri_rsc_category_e GetVideoCategoryID(const char *codec_name, int color_depth, int h_size, int framerate, int sampling_format);\r
+       ri_rsc_category_e GetCapableVideoCategoryID(ri_video_category_option_request_s* option, bool n_decoding);\r
+       ri_rsc_category_e GetCapableVideoCategoryID(ri_video_property *prop, bool n_decoding);\r
+       ri_rsc_category_e GetCapableMJpegDecoderCategoryID(const char *codec_name, int h_size);\r
+       ri_rsc_category_e GetSubJpegCategoryID(const char *codec_name, int w_size, int h_size);\r
+       ri_rsc_category_e GetHEICCategoryID(const char *codec_name, int w_size, int h_size);\r
+       ri_rsc_category_e GetImageCategoryID(const char *codec_name, int w_size, int h_size);\r
+       int GetCapableAudioDecoderCategoryID(ri_audio_category_option_request_s* option);\r
+\r
+private:\r
+       static CResourceInfo* m_instance;\r
+\r
+       ri_color_depth GetColorDepthID(int color_depth, int sampling_format);\r
+       ri_framerate GetFrameRateID(int framerate);\r
+       ri_resolution GetResolutionID(int resolution);\r
+       ri_resolution GetResolutionID(int width, int height, bool n_decoding, std::string codec_name);\r
+       ri_resolution GetResolutionID(const std::string codec_name, const int w, const int h);\r
+       ri_resolution GetImageResolutionID(std::string codec, int w, int h);\r
+       ri_rsc_category_e GetCapableVideoCategoryID(std::string codec_name, int width, int height, int framerate, int sampling_format, int color_depth, bool n_decoding);\r
+       int ToPortraitCategory(int category);\r
+       bool IsValidImageResolution(std::string codec, int w, int h);\r
+       int GetMixingOption(ri_audio_mixing_mode mixing_mode);\r
+       void ConstructSupportedVideoFormat(void);\r
+       bool IsNormalMode(void);\r
+       bool NeedDedicatedCategoryH264Portrait(std::string codec_name, int w, int h);\r
+       ri_rsc_category_e ToCategoryDedicatedToProgressive(ri_rsc_category_e category_id);\r
+       ri_rsc_category_e ToCategoryDedicatedToDetiled(ri_rsc_category_e category_id);\r
+};\r
+\r
+#endif //__CResourceInfo_H__\r
diff --git a/include_internal/CResourceInfoDB.h b/include_internal/CResourceInfoDB.h
new file mode 100644 (file)
index 0000000..56ca381
--- /dev/null
@@ -0,0 +1,163 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RESOURCE_INFO_DB_H_\r
+#define _RESOURCE_INFO_DB_H_\r
+\r
+#include <map>\r
+#include <vector>\r
+#include <set>\r
+#include <string>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include <pthread.h>\r
+#include <glib.h>\r
+\r
+#include <ri-common-type.h>\r
+#include <ri-module-api.h>\r
+#include <ri-vdec-api.h>\r
+#include <ri-type.h>\r
+#include <ri-debug.h>\r
+#include <CVideoCodec.h>\r
+#include <CVideoCodecNDecoding.h>\r
+#include <CVideoDecoder.h>\r
+#include <CImageCodec.h>\r
+#include <CVideoDecoderCategory.h>\r
+#include <CCategoryIdBuilder.h>\r
+#include <CVideoCapability.h>\r
+\r
+class CategoryElement;\r
+\r
+class CResourceInfoDB\r
+{\r
+public:\r
+       CResourceInfoDB();\r
+       ~CResourceInfoDB();\r
+       static CResourceInfoDB* GetInstance(void);\r
+\r
+       ri_rsc_category_e IsSupportedVideoFormat(ri_rsc_category_e decoder_id);\r
+       ri_rsc_category_e IsNDecodingSupportedVideoFormat(ri_rsc_category_e decoder_id);\r
+       ri_rsc_category_e IsSupportedJpegFormat(ri_rsc_category_e decoder_id);\r
+       ri_rsc_category_e IsSupportedMJpegFormat(ri_rsc_category_e decoder_id);\r
+       ri_rsc_category_e IsSupportedImageFormat(ri_rsc_category_e category_id);\r
+       bool IsSupportedAudioCodec(std::string acodec);\r
+\r
+       void AddSupportedVideoFormat(ri_rsc_category_e decoder_id);\r
+       void AddSupportedJpegFormat(ri_rsc_category_e decoder_id);\r
+       void AddSupportedAudioCodec(std::string name, ri_rsc_category_e decoder_id);\r
+       void AddSupportedNDecoder(ri_rsc_category_e decoder_id);\r
+       void AddSupportedNDecoder(std::string codec_name, ri_rsc_category_e category_id, int rsz, int framerate);\r
+       void AddVideoCodec(std::string name, int resolution, int framerate);\r
+       void AddSupportedImageFormat(ri_rsc_category_e decoder_id);\r
+       void AddCategoryResolution(ri_rsc_category_e category_id, int resolution);\r
+       void AddCategoryFramerate(ri_rsc_category_e category_id, int framerate);\r
+       void AddVideoDecoder(int id, std::string codec_name, int rsz, int framerate);\r
+       int FindCategoryResolution(int category_id);\r
+       int FindCategoryFramerate(int category_id);\r
+       std::string FindCategoryVideoCodecName(int category_id);\r
+       int GetNumOfDeviceBelongsTo(int category_id);\r
+       void AddCategoryInfo(IN ri_resource_category_s* category);\r
+       void AddDeviceAttributes(IN ri_device_common_attr_s* device_attr);\r
+       void AddDeviceUniqueAttributes(IN const int id_unique, IN ri_device_unique_attr_s* device_attr);\r
+       bool HasDeviceUniqueAttributes(const int id_unique);\r
+\r
+       int Set2KSize(std::string codec_name, int w, int h, int wp, int hp);\r
+       int Set4KSize(std::string codec_name, int w, int h, int wp, int hp);\r
+       int Set8KSize(std::string codec_name, int w, int h, int wp, int hp);\r
+\r
+       unsigned int GetDeviceID(char *node);\r
+       int GetDeviceID(unsigned int category, unsigned int device_sz, int *device_id);\r
+       int GetAIDecoderCategoryId(ri_rsc_category_e vdec);\r
+       int GetVideoDecCategoryId(std::string codec_name, int rsz_id, int framerate, int color_depth);\r
+\r
+       const char *GetDeviceName(IN const int device_id);\r
+       ri_return_code_e GetOmxCompName(const int device_id, char** name);\r
+       ri_return_code_e GetDeviceNodePath(IN const int device_id, OUT char** device_path);\r
+       ri_return_code_e GetDefaultDeviceNodePath(ri_rsc_category_e category, char** node);  //for fastboot\r
+       ri_return_code_e GetCategoryType(IN int device_id, OUT int* category_type);\r
+       ri_return_code_e GetCategoryOption(const char *codec, ri_video_decoder_class_e class_value, int* category_option, bool* is_uhd_decoder, char** device_node);   \r
+       ri_return_code_e GetDeviceList(OUT int* num, OUT ri_device_common_attr_s** devices);\r
+       ri_rsc_category_e GetAudioDecoderCategoryId(const char *codec_name);\r
+       int GetCategoryClass(int category_id);\r
+       int GetMainCategory(IN int device_id);\r
+       CVideoCodec* FindVideoCodec(std::string name);\r
+       CVideoCodecNDecoding *FindNDecodingVideoCodec(std::string codec_name);\r
+\r
+       bool IsSupportTripleDecoding(void) {return (m_vdecs >= 3);}\r
+       bool IsMainDevice(const int device_id);\r
+\r
+       int GetSystemBW(void){return m_system_bw;}\r
+       void SetSystemBW(int bw){m_system_bw = bw;}\r
+       void SetMaxVideoDecoderNum(int n_vdecs) { m_vdecs = n_vdecs; }\r
+       int GetMaxVideoDecoderNum(void) { return m_vdecs; }\r
+       void SetImageMinMaxResolution(std::string codec, int w_min, int h_min, int w_max, int h_max);\r
+       void GetImageMinMaxResolution(std::string codec, int *w_min, int *h_min, int *w_max, int *h_max);\r
+       bool IsVideoDecoderCategory(ri_rsc_category_e vdec);\r
+       bool IsAudioDecoderCategory(ri_rsc_category_e adec);\r
+       bool IsAudioDecoderCategoryForMixing(ri_rsc_category_e adec);\r
+       bool IsMJpegDecoderCategory(ri_rsc_category_e category);\r
+       void PrintDeviceUniqueInfo(void);\r
+\r
+       bool IsSupportOverlay(const int device_id);\r
+       int GetMaxResolution(const int device_id);\r
+       int GetMaxSamplingFormat(const int device_id);\r
+       int GetVideoDecoderList(ri_resource_list_h *list_out);\r
+\r
+       int ToNDecodingCategory(int category);\r
+       bool Support2KPortraitResolution(std::string codec_name);\r
+       bool IsSupportedCategory(int category);\r
+\r
+       void AddVideoCapability(const std::string codec, VideoCapability *capability);\r
+       bool FindVideoCapability(const std::string codec, std::vector<VideoCapability *> &capabilities);\r
+       ri_device_common_attr_s *GetDeviceAttr(int device_id);\r
+\r
+private:\r
+       static CResourceInfoDB* m_instance;\r
+\r
+       std::map<int, ri_resource_category_s*> m_resource_categories;\r
+       std::map<int, ri_device_common_attr_s*> m_device_attr_map_by_dev_id;\r
+       std::map<int, ri_device_common_attr_s*> m_scalers;\r
+       std::map<int, ri_device_unique_attr_s*> m_device_unique_attr;\r
+       std::map<std::string, ri_rsc_category_e> m_supported_audio_codecs;\r
+       std::map<int, int> m_category_resolution; // category id, resolution id\r
+       std::map<int, int> m_category_framerate; // category id, framerate\r
+       std::set<int> m_supported_video_format;\r
+       std::set<int> m_n_decoding_supported_video_format;\r
+       std::set<int> m_supported_jpeg_format;\r
+       std::set<int> m_supported_image_format;\r
+       std::map<std::string, CVideoCodec *> m_video_codecs;\r
+       std::map<std::string, CVideoCodecNDecoding *> m_n_decoding_codecs;\r
+       std::map<std::string, CVideoDecoderCategory *> m_video_dec_categories;\r
+       std::map<std::string, CImageCodec*> m_image_codecs;\r
+       std::map<int, CVideoDecoder *> m_video_decoders;\r
+       std::map<std::string, std::vector<VideoCapability *>> video_capabilities_;\r
+\r
+       int m_system_bw;\r
+       int m_vdecs;\r
+       int m_n_scalers;\r
+\r
+       bool GetDeviceNodePathNames(int category, char** device_node);\r
+       bool GetClassOptions(const char *codec, ri_video_decoder_class_e class_value, bool *is_uhd_decoder, int *class_cat, bool *is_class_uhd, char **class_device_node);\r
+       std::string GetDeviceNodePathScaler(const int device_id);\r
+       std::string GetDeviceNameScaler(const int device_id);\r
+       bool IsSubTunerSupported(int dtv_type);\r
+       bool IsVirtualDeviceIdScaler(int device_id);\r
+       bool IsScaler(int category);\r
+       void InitVideoDecCategories(void);\r
+       bool IsCodecSupporting2KPortrait(std::string codec_name);\r
+       CCategoryIdBuilder* GetVideoDecCategoryBuilder(std::string codec_name);\r
+};\r
+#endif //_RESOURCE_INFO_DB_H_\r
diff --git a/include_internal/CVideoCapability.h b/include_internal/CVideoCapability.h
new file mode 100644 (file)
index 0000000..9720556
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+#include <string>
+
+class VideoCapability {
+public:
+       VideoCapability(const std::string device, const int w, const int h, const int fps): device_(device), width_(w), height_(h), fps_(fps) {}
+       VideoCapability(const VideoCapability& capa): device_(""), width_(0), height_(0), fps_(0) {
+               device_ = capa.GetDeviceProperty();
+               width_ = capa.GetWidth();
+               height_ = capa.GetHeight();
+               fps_ = capa.GetFPS();
+       };
+       ~VideoCapability() = default;
+
+       std::string GetDeviceProperty(void) const { return device_; }
+       int GetWidth(void) const { return width_; }
+       int GetHeight(void) const { return height_; }
+       int GetFPS(void) const { return fps_; }
+
+private:
+       std::string device_;
+       int width_;
+       int height_;
+       int fps_;
+};
\ No newline at end of file
diff --git a/include_internal/CVideoCodec.h b/include_internal/CVideoCodec.h
new file mode 100644 (file)
index 0000000..4225b30
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CVIDEO_CODEC_H__\r
+#define __CVIDEO_CODEC_H__\r
+\r
+#include <string>\r
+#include <memory>\r
+#include <set>\r
+#include <map>\r
+#include <ri-video-decoder-category-type.h>\r
+#include <CVideoResolution.h>\r
+\r
+class CVideoCodec\r
+{\r
+public:\r
+       CVideoCodec(const std::string name, const unsigned int resolution, const int fps, const bool support_2k_portrait);\r
+       ~CVideoCodec() = default;\r
+\r
+       std::string GetName(void) const { return name_; }\r
+\r
+       void CreateExtraResolution(const unsigned int resolution);\r
+       void SetResolutionSize(const unsigned int resolution, const int w, const int h, const int wp, const int hp);\r
+       void SetMaxResolution(const unsigned int resolution) { max_resolution_ = resolution; }\r
+       void SetMaxFrameRate(const int fps) { max_fps_ = fps; }\r
+       int GetMaxResolution(void) const { return max_resolution_; }\r
+       int GetMaxFrameRate(void) const { return max_fps_; }\r
+\r
+       ri_resolution GetResolutionID(const int w, const int h) const;\r
+       bool IsSizeNotSupportedByFHDDecoder(const int resolution, const int w, const int h) const;\r
+       bool Support2KPortraitResolution(void) const { return support_2k_portrait_; }\r
+\r
+private:\r
+       void InitResolutions(void);\r
+       std::shared_ptr<CVideoResolution> FindResolution(const unsigned int resolution) const;\r
+\r
+       std::string name_;\r
+       unsigned int max_resolution_;\r
+       int max_fps_;\r
+       bool support_2k_portrait_;\r
+       bool vr360_codec_;\r
+       std::map<unsigned int, std::shared_ptr<CVideoResolution>> resolutions_;\r
+       const std::set<std::string> vr360_codecs_ = {\r
+               RI_CODEC_NAME_HEVC_VR360,\r
+               RI_CODEC_NAME_H264_VR360,\r
+               RI_CODEC_NAME_VP9_VR360,\r
+               RI_CODEC_NAME_AV1_VR360\r
+       };\r
+};\r
+\r
+#endif// __CVIDEO_CODEC_H__\r
diff --git a/include_internal/CVideoCodecNDecoding.h b/include_internal/CVideoCodecNDecoding.h
new file mode 100644 (file)
index 0000000..31d5799
--- /dev/null
@@ -0,0 +1,40 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CVideoCodecNDecoding_H__\r
+#define __CVideoCodecNDecoding_H__\r
+#include <string>\r
+\r
+class CVideoCodecNDecoding\r
+{\r
+public:\r
+       CVideoCodecNDecoding(std::string codec_name, int rsz, int framerate):m_name(codec_name), m_max_rsz(rsz), m_max_fps(framerate) { }\r
+       ~CVideoCodecNDecoding() = default;\r
+\r
+       void SetMaxResolution(int rsz) { m_max_rsz = rsz; }\r
+       int GetMaxResolution(void) { return m_max_rsz; }\r
+       void SetMaxFramerate(int framerate) { m_max_fps = framerate; }\r
+       int GetMaxFramerate(void) { return m_max_fps; }\r
+       void SetCategoryId(int category_id) { m_category_id = category_id; }\r
+       int GetCategoryId(void) { return m_category_id; }\r
+\r
+private:\r
+       std::string m_name;\r
+       int m_max_rsz;\r
+       int m_max_fps;\r
+       int m_category_id;\r
+};\r
+#endif //__CVideoCodecNDecoding_H__
\ No newline at end of file
diff --git a/include_internal/CVideoDecoder.h b/include_internal/CVideoDecoder.h
new file mode 100644 (file)
index 0000000..e29189d
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CVIDEO_DECODER_H__
+#define __CVIDEO_DECODER_H__
+#include <map>
+#include <glib.h>
+#include <CVideoCodec.h>
+
+class CVideoDecoder
+{
+public:
+       CVideoDecoder(int id) { m_id = id; }
+       ~CVideoDecoder() = default;
+
+       int GetId(void) { return m_id; }
+       std::map<std::string, CVideoCodec*> GetSupportedCodecs(void) { return m_supported_codecs; }
+       void InsertVideoCodec(std::string name, int rsz, int framerate);
+
+private:
+       int m_id;
+       std::map<std::string, CVideoCodec*> m_supported_codecs;
+};
+
+#endif //__CVIDEO_DECODER_H__
\ No newline at end of file
diff --git a/include_internal/CVideoEncoder.h b/include_internal/CVideoEncoder.h
new file mode 100644 (file)
index 0000000..526f3ad
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CVIDEO_ENCODER_H__
+#define __CVIDEO_ENCODER_H__
+
+class CVideoEncoder{
+public:
+       static CVideoEncoder& GetInstance(void);
+
+       void SetMaxResolution(const int w, const int h, const int fps);
+       void GetMaxResolution(const bool multi, int *w, int *h, int *fps) const;
+       void SetMaxResolutionMultiEncoding(const int w, const int h, const int fps);
+       void GetMaxResolutionMultiEncoding(int *w, int *h, int *fps) const;
+       void SetMarginMultiEncoding(const int margin);
+       unsigned long long GetMaxBandWidthSingleEncoding(void) const;
+       unsigned long long GetMaxBandWidthMultiEncoding(void) const;
+       unsigned long long GetMaxBandWidthMultiEncodingSingle(void) const;
+
+private:
+       CVideoEncoder():max_w_(0), max_h_(0), max_fps_(0), max_w_multi_(0), max_h_multi_(0), max_fps_multi_(0), margin_(0) {}
+       ~CVideoEncoder() = default;
+
+       int max_w_;
+       int max_h_;
+       int max_fps_;
+       int max_w_multi_;
+       int max_h_multi_;
+       int max_fps_multi_;
+       int margin_;
+};
+
+#endif //__CVIDEO_ENCODER_H__
\ No newline at end of file
diff --git a/include_internal/CVideoResolution.h b/include_internal/CVideoResolution.h
new file mode 100644 (file)
index 0000000..140e735
--- /dev/null
@@ -0,0 +1,54 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CVIDEO_RESOLUTION_H__\r
+#define __CVIDEO_RESOLUTION_H__\r
+\r
+#include <memory>\r
+\r
+class CVideoResolution\r
+{\r
+public:\r
+       CVideoResolution(const unsigned int resolution);\r
+       ~CVideoResolution() = default;\r
+\r
+       void SetSize(const int w, const int h, const int wp, const int hp);\r
+       std::string GetSizeString(void) const;\r
+\r
+       bool SupportedSize(const int w, const int h) const;\r
+       bool SupportedSizeVR360(const int w, const int h) const;\r
+       bool SupportedSizeByFHDDecoder(const int w, const int h) const;\r
+\r
+       int GetWidth(void) const { return w_; }\r
+       int GetHeight(void) const { return h_; }\r
+       int GetWidthPortrait(void) const { return wp_; }\r
+       int GetHeightPortrait(void) const { return hp_; }\r
+\r
+       static void GetResolutionSize(const unsigned int resolution, int *w, int *h);\r
+\r
+private:\r
+       bool LandScapeSize(const int w, const int h) const { return (w >= h) ? true:false; }\r
+       static bool ValidResolution(const unsigned int resolution);\r
+       static void GetDefaultSize(const unsigned int resolution, int *w, int *h, int *wp, int *hp);\r
+\r
+       unsigned int resolution_;\r
+       int w_;\r
+       int h_;\r
+       int wp_;\r
+       int hp_;\r
+};\r
+\r
+#endif //__CVIDEO_RESOLUTION_H__
\ No newline at end of file
diff --git a/include_internal/category_builder/CCategoryIdBuilder.h b/include_internal/category_builder/CCategoryIdBuilder.h
new file mode 100644 (file)
index 0000000..9f822db
--- /dev/null
@@ -0,0 +1,32 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include <map>\r
+#include <ri-video-decoder-category-type.h>\r
+\r
+class CCategoryIdBuilder\r
+{\r
+public:\r
+       virtual ~CCategoryIdBuilder() {};\r
+\r
+       virtual void BuildCategoryIds(void) = 0;\r
+       static int MakeId(int rsz_id, int color_depth, int framerate);\r
+\r
+       std::map<int, int> GetCategoryIds(void);\r
+protected:\r
+       std::map<int, int> m_category_ids;\r
+};\r
diff --git a/include_internal/category_builder/CVideoDecoderCategory.h b/include_internal/category_builder/CVideoDecoderCategory.h
new file mode 100644 (file)
index 0000000..615bae5
--- /dev/null
@@ -0,0 +1,34 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include <string>\r
+#include "CCategoryIdBuilder.h"\r
+\r
+class CVideoDecoderCategory\r
+{\r
+public:\r
+       CVideoDecoderCategory(std::string codec_name, CCategoryIdBuilder* builder);\r
+       ~CVideoDecoderCategory() = default;\r
+\r
+       void CreateCategoryIds(void);\r
+       int FindVideoCategoryId(int rsz_id, int framerate, int color_depth);\r
+\r
+private:\r
+       std::string m_codec_name;\r
+       CCategoryIdBuilder* m_builder;\r
+       std::map<int, int> m_category_ids;\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderAV1.h b/include_internal/category_builder/CategoryIdBuilderAV1.h
new file mode 100644 (file)
index 0000000..607f199
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderAV1 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderAV1() = default;\r
+       ~CategoryIdBuilderAV1() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderAV1vr360.h b/include_internal/category_builder/CategoryIdBuilderAV1vr360.h
new file mode 100644 (file)
index 0000000..9f560a1
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderAV1vr360 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderAV1vr360() = default;\r
+       ~CategoryIdBuilderAV1vr360() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderAVS.h b/include_internal/category_builder/CategoryIdBuilderAVS.h
new file mode 100644 (file)
index 0000000..ed4ea88
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderAVS : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderAVS() = default;\r
+       ~CategoryIdBuilderAVS() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderAVS2.h b/include_internal/category_builder/CategoryIdBuilderAVS2.h
new file mode 100644 (file)
index 0000000..ba17a08
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderAVS2 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderAVS2() = default;\r
+       ~CategoryIdBuilderAVS2() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderAVS3.h b/include_internal/category_builder/CategoryIdBuilderAVS3.h
new file mode 100644 (file)
index 0000000..6010ccd
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+#include "CCategoryIdBuilder.h"
+class CategoryIdBuilderAVS3 : public CCategoryIdBuilder
+{
+public:
+       CategoryIdBuilderAVS3() = default;
+       ~CategoryIdBuilderAVS3() = default;
+
+       void BuildCategoryIds(void);
+};
diff --git a/include_internal/category_builder/CategoryIdBuilderAVSPlus.h b/include_internal/category_builder/CategoryIdBuilderAVSPlus.h
new file mode 100644 (file)
index 0000000..fb4a22c
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderAVSPlus : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderAVSPlus() = default;\r
+       ~CategoryIdBuilderAVSPlus() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderH263.h b/include_internal/category_builder/CategoryIdBuilderH263.h
new file mode 100644 (file)
index 0000000..40cdb27
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CCategoryIdBuilderH263 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CCategoryIdBuilderH263() = default;\r
+       ~CCategoryIdBuilderH263() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderH264.h b/include_internal/category_builder/CategoryIdBuilderH264.h
new file mode 100644 (file)
index 0000000..023ea24
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderH264 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderH264() = default;\r
+       ~CategoryIdBuilderH264() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderH264MVC.h b/include_internal/category_builder/CategoryIdBuilderH264MVC.h
new file mode 100644 (file)
index 0000000..a69d82b
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderH264MVC : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderH264MVC() = default;\r
+       ~CategoryIdBuilderH264MVC() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderH264vr360.h b/include_internal/category_builder/CategoryIdBuilderH264vr360.h
new file mode 100644 (file)
index 0000000..66a0c7f
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderH264vr360 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderH264vr360() = default;\r
+       ~CategoryIdBuilderH264vr360() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderHEVC.h b/include_internal/category_builder/CategoryIdBuilderHEVC.h
new file mode 100644 (file)
index 0000000..fa98b6d
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderHEVC : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderHEVC() = default;\r
+       ~CategoryIdBuilderHEVC() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderHEVCvr360.h b/include_internal/category_builder/CategoryIdBuilderHEVCvr360.h
new file mode 100644 (file)
index 0000000..dd78701
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderHEVCvr360 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderHEVCvr360() = default;\r
+       ~CategoryIdBuilderHEVCvr360() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderMPEG1.h b/include_internal/category_builder/CategoryIdBuilderMPEG1.h
new file mode 100644 (file)
index 0000000..c36c99d
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderMPEG1 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderMPEG1() = default;\r
+       ~CategoryIdBuilderMPEG1() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderMPEG2.h b/include_internal/category_builder/CategoryIdBuilderMPEG2.h
new file mode 100644 (file)
index 0000000..8bd441b
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderMPEG2 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderMPEG2() = default;\r
+       ~CategoryIdBuilderMPEG2() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderMPEG4.h b/include_internal/category_builder/CategoryIdBuilderMPEG4.h
new file mode 100644 (file)
index 0000000..2c13751
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+\r
+class CategoryIdBuilderMPEG4 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderMPEG4() = default;\r
+       ~CategoryIdBuilderMPEG4() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderRV.h b/include_internal/category_builder/CategoryIdBuilderRV.h
new file mode 100644 (file)
index 0000000..37ae4cf
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderRV : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderRV() = default;\r
+       ~CategoryIdBuilderRV() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderSHVC.h b/include_internal/category_builder/CategoryIdBuilderSHVC.h
new file mode 100644 (file)
index 0000000..cbe0b77
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderSHVC : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderSHVC() = default;\r
+       ~CategoryIdBuilderSHVC() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderVP8.h b/include_internal/category_builder/CategoryIdBuilderVP8.h
new file mode 100644 (file)
index 0000000..024100c
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderVP8 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderVP8() = default;\r
+       ~CategoryIdBuilderVP8() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderVP9.h b/include_internal/category_builder/CategoryIdBuilderVP9.h
new file mode 100644 (file)
index 0000000..3658327
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderVP9 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderVP9() = default;\r
+       ~CategoryIdBuilderVP9() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderVP9vr360.h b/include_internal/category_builder/CategoryIdBuilderVP9vr360.h
new file mode 100644 (file)
index 0000000..3d1ff85
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderVP9vr360 : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderVP9vr360() = default;\r
+       ~CategoryIdBuilderVP9vr360() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/category_builder/CategoryIdBuilderVVC.h b/include_internal/category_builder/CategoryIdBuilderVVC.h
new file mode 100644 (file)
index 0000000..ebeddea
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+#include "CCategoryIdBuilder.h"
+class CategoryIdBuilderVVC : public CCategoryIdBuilder
+{
+public:
+       CategoryIdBuilderVVC() = default;
+       ~CategoryIdBuilderVVC() = default;
+
+       void BuildCategoryIds(void);
+};
diff --git a/include_internal/category_builder/CategoryIdBuilderWMV.h b/include_internal/category_builder/CategoryIdBuilderWMV.h
new file mode 100644 (file)
index 0000000..3f8981c
--- /dev/null
@@ -0,0 +1,26 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#pragma once\r
+#include "CCategoryIdBuilder.h"\r
+class CategoryIdBuilderWMV : public CCategoryIdBuilder\r
+{\r
+public:\r
+       CategoryIdBuilderWMV() = default;\r
+       ~CategoryIdBuilderWMV() = default;\r
+\r
+       void BuildCategoryIds(void);\r
+};\r
diff --git a/include_internal/parser/CCategory.h b/include_internal/parser/CCategory.h
new file mode 100644 (file)
index 0000000..3722428
--- /dev/null
@@ -0,0 +1,56 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CCATEGORY_H_\r
+#define __CCATEGORY_H_\r
+\r
+#include <string>\r
+#include <ri-category-type.h>\r
+#include <ri-video-decoder-category-type.h>\r
+\r
+typedef enum {\r
+       CATEGORY_TYPE_COMMON = 0,\r
+       CATEGORY_TYPE_JPEG,\r
+       CATEGORY_TYPE_VIDEO_DECODER,\r
+       CATEGORY_TYPE_AUDIO_DECODER,\r
+       CATEGORY_TYPE_IMAGE_DECODER,\r
+       CATEGORY_TYPE_VIDEO_DECODER_NO_CODEC\r
+} category_type_e;\r
+\r
+class CCategory\r
+{\r
+public:\r
+       CCategory(std::string name, ri_rsc_category_e id, category_type_e type, std::string codec_name, ri_resolution rsz, int framerate, bool n_decoding);\r
+       ~CCategory() = default;\r
+\r
+       ri_rsc_category_e GetId(void) { return m_id; }\r
+       category_type_e GetType(void) { return m_type; }\r
+       ri_resolution GetResolution(void) { return m_rsz; }\r
+       int GetFrameRate(void) { return m_framerate; }\r
+       std::string GetCodecName(void) { return m_codec_name; }\r
+       bool SupportNDecoding(void) { return m_n_decoding; }\r
+\r
+private:\r
+       std::string m_name;\r
+       ri_rsc_category_e m_id;\r
+       category_type_e m_type;\r
+       std::string m_codec_name;\r
+       ri_resolution m_rsz;\r
+       int m_framerate;\r
+       bool m_n_decoding;\r
+};\r
+\r
+#endif//__CCATEGORY_H_\r
diff --git a/include_internal/parser/CResourceTableProvider.h b/include_internal/parser/CResourceTableProvider.h
new file mode 100644 (file)
index 0000000..9dc0176
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CRESOURCE_TABLE_PROVIDER_H__\r
+#define __CRESOURCE_TABLE_PROVIDER_H__\r
+\r
+#include <string>\r
+#include <CModelInfo.h>\r
+\r
+#define PATH_DEFAULT "/etc/config/resource_information.xml"\r
+\r
+class CResourceTableProvider\r
+{\r
+public:\r
+       CResourceTableProvider();\r
+       ~CResourceTableProvider();\r
+       CResourceTableProvider(const CResourceTableProvider &other) = delete;\r
+       CResourceTableProvider &operator = (const CResourceTableProvider &other) = delete;\r
+\r
+       std::string GetResourceTablePath(void);\r
+};\r
+\r
+#endif //__CRESOURCE_TABLE_PROVIDER_H__\r
diff --git a/include_internal/parser/CResourceTableProviderDefault.h b/include_internal/parser/CResourceTableProviderDefault.h
new file mode 100644 (file)
index 0000000..b0ee306
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __CRESOURCE_PROVIDER_TABLE_DEFAULT_H__
+#define __CRESOURCE_PROVIDER_TABLE_DEFAULT_H__
+
+#include <map>
+
+class CResourceTableProviderDefault
+{
+public:
+       CResourceTableProviderDefault(const int table_index, const int product_type, const bool support_android);
+       ~CResourceTableProviderDefault() = default;
+
+private:
+       std::string FindResourceTablePath(const std::map<int, std::string> &table_paths, const int index) const;
+       std::string FindResourceTablePathAOT(const std::map<int, std::string> &table_paths, const int index) const;
+
+       int table_index_;
+       int product_type_;
+       bool support_android_;
+};
+
+#endif // __CRESOURCE_PROVIDER_TABLE_DEFAULT_H__
diff --git a/include_internal/parser/CResourceTableProviderLicense.h b/include_internal/parser/CResourceTableProviderLicense.h
new file mode 100644 (file)
index 0000000..e04822d
--- /dev/null
@@ -0,0 +1,38 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CRESOURCE_TABLE_PROVIDER_LICENSE_H__\r
+#define __CRESOURCE_TABLE_PROVIDER_LICENSE_H__\r
+\r
+#include <string>\r
+#include <map>\r
+#include <CModelInfo.h>\r
+\r
+#define LICENSE_PATH_DEFAULT "/etc/config/resource_information.xml"\r
+\r
+class CResourceTableProviderLicense\r
+{\r
+public:\r
+       CResourceTableProviderLicense(const int table_index):table_index_(table_index) {};\r
+       ~CResourceTableProviderLicense() = default;\r
+\r
+       std::string GetResourceTablePath(void) const;\r
+\r
+private:\r
+       int table_index_;\r
+ };\r
+\r
+#endif //__CRESOURCE_TABLE_PROVIDER_LICENSE_H__\r
diff --git a/include_internal/parser/CResourceTableProviderSingle.h b/include_internal/parser/CResourceTableProviderSingle.h
new file mode 100644 (file)
index 0000000..ee817a9
--- /dev/null
@@ -0,0 +1,31 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __CRESOURCE_PROVIDER_TABLE_SINGLE_H__\r
+#define __CRESOURCE_PROVIDER_TABLE_SINGLE_H__\r
+\r
+class CResourceTableProviderSingle\r
+{\r
+public:\r
+       CResourceTableProviderSingle() = default;\r
+       ~CResourceTableProviderSingle() = default;\r
+\r
+       std::string GetResourceTablePath(void) { return DEFAULT_TABLE_PATH; }\r
+private:\r
+       const std::string DEFAULT_TABLE_PATH = "/etc/config/resource_information.xml";\r
+};\r
+\r
+#endif // __CRESOURCE_PROVIDER_TABLE_SINGLE_H__\r
diff --git a/include_internal/parser/element/CCapabilityElement.h b/include_internal/parser/element/CCapabilityElement.h
new file mode 100644 (file)
index 0000000..34e173c
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+#include <string>
+#include "CElement.h"
+#include <ri-debug.h>
+
+class CapabilityElement : public Element {
+public:
+       CapabilityElement(const std::string device, const int w, const int h, const int fps): device_(device), width_(w), height_(h), fps_(fps) {};
+       ~CapabilityElement() = default;
+
+       std::string GetDevice(void) const { return device_; }
+       int GetWidth(void) const { return width_; }
+       int GetHeight(void) const { return height_; }
+       int GetFPS(void) const { return fps_; }
+
+private:
+       CapabilityElement(): device_(""), width_(0), height_(0), fps_(0) {};
+
+       std::string device_;
+       int width_;
+       int height_;
+       int fps_;
+};
\ No newline at end of file
diff --git a/include_internal/parser/element/CCategoryElement.h b/include_internal/parser/element/CCategoryElement.h
new file mode 100644 (file)
index 0000000..6ecfc26
--- /dev/null
@@ -0,0 +1,143 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RI_CATEGORY_ELEMENT_H_\r
+#define _RI_CATEGORY_ELEMENT_H_\r
+\r
+#include <CElement.h>\r
+#include <stdlib.h>\r
+\r
+class CategoryElement : public Element\r
+{\r
+public:\r
+       CategoryElement(void){}\r
+       CategoryElement(char *category_name, char *category_type, int class_id, bool is_uhd_device);\r
+       ~CategoryElement(void);\r
+\r
+       /**\r
+       * @brief This function adds child element if it has\r
+       * @param [in] child_elem : feature element\r
+       * @return none\r
+       * @remark\r
+       * \li The feature element does not have child element so it is not available\r
+       */\r
+       virtual void AddChildElement(Element* child_elem);\r
+\r
+       /**\r
+       * @brief This function returns child element set\r
+       * @param [in] none\r
+       * @return child element set\r
+       * @remark\r
+       * \li The feature element does not have child element so it is not available\r
+       */\r
+       virtual std::set<Element*>* GetChildElement(void){return &m_child_element;}\r
+\r
+       /**\r
+       * @brief This function releases memory\r
+       * @param [in] none\r
+       * @return none\r
+       * @remark\r
+       * \li The feature element does not have child element so it is not available\r
+       */\r
+       virtual void ReleaseChildElement(void);\r
+\r
+// LCOV_EXCL_START\r
+       /**\r
+       * @brief the function sets device path\r
+       * @param [in] device_path\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void SetDevicePath(char *device_path){}\r
+\r
+       /**\r
+       * @brief the function returns device path\r
+       * @param [in] none\r
+       * @return device path\r
+       * @remark\r
+       */\r
+       virtual char *GetDevicePath(void){return m_device_path;}\r
+\r
+       /**\r
+       * @brief the function sets device path\r
+       * @param [in] device_path\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void SetOmxCompName(char *omx_comp_name){}\r
+\r
+       /**\r
+       * @brief the function returns device path\r
+       * @param [in] none\r
+       * @return device path\r
+       * @remark\r
+       */\r
+       virtual char *GetOmxCompName(void){return m_omx_comp_name;}\r
+\r
+\r
+       /**\r
+       * @brief the function sets category for promotion\r
+       * @param [in] category\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void SetPromotionCategory(ri_rsc_category_e category){m_promotion_category_enum = category;}\r
+\r
+       /**\r
+       * @brief the function gets category for promotion\r
+       * @param [in] none\r
+       * @return category\r
+       * @remark\r
+       */\r
+       virtual ri_rsc_category_e GetPromotionCategory(void){return m_promotion_category_enum;}\r
+\r
+       // LCOV_EXCL_END\r
+       /**\r
+       * @brief This function sets class ID\r
+       * @param [in] id : class id\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void SetCategoryEnum(ri_rsc_category_e category){m_category_enum = category;}\r
+\r
+       /**\r
+       * @brief This function returns class ID\r
+       * @param [in] none\r
+       * @return class ID\r
+       * @remark\r
+       */\r
+       virtual ri_rsc_category_e GetCategoryEnum(void){return m_category_enum;}\r
+\r
+       /**\r
+       * @brief the function shows device element information\r
+       * @param [in] none\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void PrintInfo(void);\r
+\r
+// LCOV_EXCL_START\r
+       virtual void SetAudioCodec(char *name) {}\r
+       virtual char *GetAudioCodec(void) {return m_audio_codec;}\r
+// LCOV_EXCL_END\r
+\r
+protected:\r
+       ri_rsc_category_e m_promotion_category_enum;\r
+       ri_rsc_category_e m_category_enum;\r
+private:\r
+};\r
+\r
+#endif //_RI_CATEGORY_ELEMENT_H_\r
diff --git a/include_internal/parser/element/CDecodingElement.h b/include_internal/parser/element/CDecodingElement.h
new file mode 100644 (file)
index 0000000..a646030
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+#include <string>
+#include "CElement.h"
+
+class DecodingElement : public Element {
+public:
+       DecodingElement(const std::string codec): codec_(codec) {}
+       ~DecodingElement();
+
+       void SetCodec(const std::string codec) { codec_ = codec; }
+       std::string GetCodec(void) const { return codec_; }
+
+       void AddChildElement(Element* child_elem) override;
+       std::set<Element*>* GetChildElement(void) override;
+       void ReleaseChildElement(void) override;
+
+private:
+       DecodingElement(): codec_("empty") {}
+
+       std::string codec_;
+};
\ No newline at end of file
diff --git a/include_internal/parser/element/CDeviceElement.h b/include_internal/parser/element/CDeviceElement.h
new file mode 100644 (file)
index 0000000..9b29a3a
--- /dev/null
@@ -0,0 +1,103 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RI_DEVICE_ELEMENT_H_\r
+#define _RI_DEVICE_ELEMENT_H_\r
+\r
+#include <CElement.h>\r
+#include <stdlib.h>\r
+\r
+class DeviceElement : public Element\r
+{\r
+public:\r
+       DeviceElement(void){}\r
+       DeviceElement(char *device_name, char *device_type, unsigned int device_bw, ri_mem_cluster_s* mem_cluster_info, int sharable_count, int mixing, int device_id, int is_main_device);\r
+       ~DeviceElement(void);\r
+\r
+       /**\r
+       * @brief This function adds child element if it has\r
+       * @param [in] child_elem : feature element\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void AddChildElement(Element* child_elem);\r
+\r
+// LCOV_EXCL_START\r
+       /**\r
+       * @brief This function returns child element set\r
+       * @param [in] none\r
+       * @return child element set\r
+       * @remark\r
+       */\r
+       virtual std::set<Element*>* GetChildElement(void){return &m_child_element;}\r
+// LCOV_EXCL_END\r
+\r
+       /**\r
+       * @brief This function releases memory\r
+       * @param [in] none\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void ReleaseChildElement(void);\r
+\r
+       /**\r
+       * @brief the function sets device path\r
+       * @param [in] device_path\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void SetDevicePath(char *device_path);\r
+\r
+       /**\r
+       * @brief the function returns device path\r
+       * @param [in] none\r
+       * @return device path\r
+       * @remark\r
+       */\r
+       virtual char *GetDevicePath(void);\r
+\r
+       /**\r
+       * @brief the function sets omx component name\r
+       * @param [in] device_path\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void SetOmxCompName(char *omx_comp_name);\r
+\r
+       /**\r
+       * @brief the function returns omx component name\r
+       * @param [in] none\r
+       * @return device path\r
+       * @remark\r
+       */\r
+       virtual char *GetOmxCompName(void);\r
+\r
+       /**\r
+       * @brief the function shows device element information\r
+       * @param [in] none\r
+       * @return none\r
+       * @remark\r
+       */\r
+       virtual void PrintInfo(void);\r
+\r
+       virtual void SetAudioCodec(char *name);\r
+       virtual char *GetAudioCodec(void) {return m_audio_codec;}\r
+\r
+protected:\r
+private:\r
+};\r
+\r
+#endif //_RI_DEVICE_ELEMENT_H_\r
diff --git a/include_internal/parser/element/CElement.h b/include_internal/parser/element/CElement.h
new file mode 100644 (file)
index 0000000..3637feb
--- /dev/null
@@ -0,0 +1,96 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RI_ELEMENT_H_\r
+#define _RI_ELEMENT_H_\r
+\r
+#include <set>\r
+#include <ri-parser-types.h>\r
+#include <ri-common-type.h>\r
+#include <ri-type.h>\r
+\r
+class Element\r
+{\r
+public:\r
+       Element(void);\r
+       Element(char *element_name, char *element_type, int class_id, bool is_uhd_device);\r
+       Element(char *element_name, char *element_type);\r
+       Element(char *element_name);\r
+       virtual ~Element(void){}\r
+\r
+       virtual void SetElementAttr(ri_element_attribute_e element_attr);\r
+       virtual ri_element_attribute_e GetElementAttr(void);\r
+       virtual char *GetElementName(void);\r
+       virtual char *GetElementType(void);\r
+       virtual void SetElementID(unsigned int element_id);\r
+       virtual int GetElementID(void);\r
+       virtual void AddChildElement(Element* child_elem)=0;\r
+       virtual std::set<Element*>* GetChildElement(void)=0;\r
+       virtual void ReleaseChildElement(void)=0;\r
+       virtual int GetNumOfChildElement(void){return m_child_element.size();}\r
+       virtual void SetClassID(int id){m_class_id = id;}\r
+       virtual int GetClassID(void){return m_class_id;}\r
+       virtual void SetDevicePath(char *device_path) {}\r
+       virtual char *GetDevicePath(void) { return m_device_path; }\r
+       virtual void SetOmxCompName(char *omx_comp_name) {}\r
+       virtual char *GetOmxCompName(void) { return m_omx_comp_name; }\r
+       virtual unsigned int GetDeviceBW(void) { return m_element_bw; }\r
+       virtual ri_mem_cluster_s* GetDeviceMemCluster(void) { return m_element_mem_cluster; }\r
+       virtual bool IsUHDDecoder(void) { return m_is_uhd_decoder; }\r
+       virtual unsigned int GetDeviceID(void) { return m_device_id; }\r
+       virtual void SetCodecName(char *codec) { m_element_codec_name = codec; }\r
+       virtual char *GetCodecName(void) { return m_element_codec_name; }\r
+       virtual int IsMainDevice(void) { return m_is_main_device; }\r
+       virtual void PrintInfo(void) {}\r
+       virtual void SetAudioCodec(char *name) {}\r
+       virtual char *GetAudioCodec(void) { return m_audio_codec; }\r
+       virtual int GetSharableCount(void) { return m_sharable_count; }\r
+       virtual int GetMixingCount(void) { return m_mixing; }\r
+       virtual void SetSupportOverlay(bool overlay) { m_is_support_overlay = overlay; }\r
+       virtual void SetMaxSamplingFormat(int sampling_format) { m_max_sampling_format = sampling_format; }\r
+       virtual void SetMaxResolution(int max_rez) { m_max_rez = max_rez; }\r
+       virtual bool GetSupportOverlay(void) { return m_is_support_overlay; }\r
+       virtual int GetMaxSamplingFormat(void) { return m_max_sampling_format; }\r
+       virtual int GetMaxResolution(void) { return m_max_rez; }\r
+\r
+protected:\r
+       ri_element_attribute_e m_element_attr; //category, device, feature\r
+       char *m_element_name;\r
+       char *m_element_type;\r
+       unsigned int m_element_bw;\r
+       ri_mem_cluster_s* m_element_mem_cluster;\r
+       int m_id;\r
+       int m_class_id; //for category\r
+\r
+       std::set<Element*> m_child_element;\r
+       int m_sharable_count;\r
+       int m_mixing;\r
+       bool m_is_uhd_decoder;\r
+       int m_device_id;\r
+       int m_is_main_device;\r
+       int m_max_rez;\r
+       bool m_is_support_overlay;\r
+       int m_max_sampling_format;\r
+       char *m_element_codec_name;\r
+\r
+       char *m_device_path;\r
+       char *m_omx_comp_name;\r
+       char *m_audio_codec;\r
+\r
+private:\r
+};\r
+\r
+#endif //_RI_ELEMENT_H_\r
diff --git a/include_internal/parser/element/CResourceInfoDoc.h b/include_internal/parser/element/CResourceInfoDoc.h
new file mode 100644 (file)
index 0000000..a431405
--- /dev/null
@@ -0,0 +1,56 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RESOURCE_INFO_DOC_H_\r
+#define _RESOURCE_INFO_DOC_H_\r
+\r
+#pragma once\r
+#include <stack>\r
+#include <vector>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#include <ri-common-type.h>\r
+#include <CElement.h>\r
+#include <CCategoryElement.h>\r
+#include <CDeviceElement.h>\r
+#include <CDecodingElement.h>\r
+\r
+class ResourceInfoDoc\r
+{\r
+public:\r
+       ResourceInfoDoc(void) = default;\r
+       ~ResourceInfoDoc(void);\r
+\r
+       void PushElement(Element *element);\r
+       void PopElement(void);\r
+       Element* TopElement(void);\r
+       void ReleaseElements(void);\r
+\r
+       void AddResourceCategory(CategoryElement *category);\r
+       std::vector<CategoryElement *> GetAllCategoryElements(void) { return category_elements_; }\r
+       void AddDecodingElement(DecodingElement *element);\r
+       std::vector<DecodingElement *> GetDecodingElements(void) { return decoding_elements_; }\r
+\r
+       void PrintInfo(void);\r
+private:\r
+       std::vector<CategoryElement *> category_elements_;\r
+       std::vector<DecodingElement *> decoding_elements_;\r
+       std::stack<Element *> context_;\r
+\r
+};\r
+\r
+#endif //_RESOURCE_INFO_DOC_H_\r
diff --git a/include_internal/parser/ri-parser-types.h b/include_internal/parser/ri-parser-types.h
new file mode 100644 (file)
index 0000000..8e1ab06
--- /dev/null
@@ -0,0 +1,35 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RI_PARSER_TYPES_H_\r
+#define _RI_PARSER_TYPES_H_\r
+\r
+/**\r
+* @brief The enumeration of element attribute\r
+*/\r
+typedef enum {\r
+       ELEMENT_ROOT,\r
+       ELEMENT_GROUP,\r
+       ELEMENT_CATEGORY,\r
+       ELEMENT_DEVICE,\r
+       ELEMENT_FEATURE,\r
+       ELEMENT_RESTRICTION,\r
+       ELEMENT_NAME_PROMOTION_RULE\r
+} ri_element_attribute_e;\r
+\r
+#define RI_CLASS_N_DECODING 100\r
+\r
+#endif //_RI_PARSER_TYPES_H_
\ No newline at end of file
diff --git a/include_internal/parser/ri-resource-info-dbmaker.h b/include_internal/parser/ri-resource-info-dbmaker.h
new file mode 100644 (file)
index 0000000..9ee7470
--- /dev/null
@@ -0,0 +1,32 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RESOURCE_INFO_DB_MAKER_H_\r
+#define _RESOURCE_INFO_DB_MAKER_H_\r
+\r
+#include <set>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#include <ri-common-type.h>\r
+#include <CCategoryElement.h>\r
+#include <CDeviceElement.h>\r
+#include <CResourceInfoDB.h>\r
+\r
+\r
+int ConstructResourceDB(void* InfoDB, std::vector<CategoryElement*>* device_info);\r
+\r
+#endif //_RESOURCE_INFO_DB_MAKER_H_
\ No newline at end of file
diff --git a/include_internal/parser/ri-resource-info-parser.h b/include_internal/parser/ri-resource-info-parser.h
new file mode 100644 (file)
index 0000000..177c672
--- /dev/null
@@ -0,0 +1,43 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RESOURCE_INFO_PARSER_H_\r
+#define _RESOURCE_INFO_PARSER_H_\r
+\r
+#include <CCategory.h>\r
+#include <CResourceInfoDoc.h>\r
+#include <CResourceInfoDB.h>\r
+\r
+int ParseXMLFile(void* InfoDB);\r
+int ParseXMLFile(void* InfoDB, const char *filename);\r
+int m_GetXMLRawData(const char *filepath, char **xmlData);\r
+int m_ParseResourceInfo(char *xmlRawData, int rawDataSize);\r
+void m_RegisterResourcesToDB(CResourceInfoDB* InfoDB);\r
+void m_ProcessCharacterData (void *userData, const char *s, int len);\r
+void m_ProcessStartElement(void *userData, const char *name, const char **atts);\r
+void m_ProcessEndElement(void *userData, const char *name);\r
+void m_ProcessDeviceStartElement(const char **atts);\r
+void m_ProcessCategoryStartElement(const char **atts);\r
+void m_ReleaseElements(ResourceInfoDoc* infoDoc);\r
+void m_printXMLDocInfo(ResourceInfoDoc* infoDoc);\r
+int m_GetIntAttributeValue(const char **atts, const char *attribute_name);\r
+int m_GetStringAttributeValue(const char **atts, const char *attribute_name, char **attribute_value);\r
+const char *m_GetAttributeValue(const char **atts, const char *attribute_name);\r
+void RegisterVideoCapabilities(CResourceInfoDB* db);\r
+\r
+CCategory *FindVideoCategory(int category_id);\r
+\r
+#endif //_RESOURCE_INFO_PARSER_H_\r
diff --git a/include_internal/ri-debug.h b/include_internal/ri-debug.h
new file mode 100644 (file)
index 0000000..1fa0c54
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RI_DEBUG_H_\r
+#define _RI_DEBUG_H_\r
+\r
+#include <dlog.h>\r
+\r
+#ifdef LOG_TAG\r
+#undef LOG_TAG\r
+#endif //LOG_TAG\r
+\r
+#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))\r
+\r
+#define LOG_TAG "RSC_INFO"\r
+\r
+#ifndef RI_ERR\r
+#define RI_ERR(fmt, args...) SLOGE(fmt, ##args)\r
+#endif\r
+\r
+#ifndef RI_DBG\r
+#define RI_DBG(fmt, args...) SLOGD(fmt, ##args)\r
+#endif\r
+\r
+#ifndef RI_INFO\r
+#define RI_INFO(fmt, args...) SLOGI(fmt, ##args)\r
+#endif\r
+\r
+#define RI_ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))\r
+\r
+#endif //_RI_DEBUG_H_\r
diff --git a/include_internal/ri-jpeg-decoder-category.h b/include_internal/ri-jpeg-decoder-category.h
new file mode 100644 (file)
index 0000000..9bcab62
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __RI_JPEG_DECODER_CATEGORY__\r
+#define __RI_JPEG_DECODER_CATEGORY__\r
+\r
+/* The number of codec supported by jpeg decoder */\r
+#define NUM_OF_JPEG_CODEC 2\r
+\r
+/* The number of resolution to cover jpeg decoder dependencies */\r
+/* FHD, UHD */\r
+#define NUM_OF_JPEG_RESOLUTION 8\r
+\r
+/* Do not change order of enum because these enums are used in array ri_jpeg_decoder_categories in order */\r
+typedef enum {\r
+       RI_JPEG_CODEC_JPEG = 0, // JPEG\r
+       RI_JPEG_CODEC_MJPEG   // MJPEG\r
+} ri_jpeg_codec;\r
+\r
+static ri_rsc_category_e RI_JPEG_DECODER_CATEGORY[NUM_OF_JPEG_CODEC][NUM_OF_JPEG_RESOLUTION]=\r
+{\r
+       //JPEG\r
+       { RI_CATEGORY_JPEG_DECODER_FHD, RI_CATEGORY_JPEG_DECODER_FHD, RI_CATEGORY_JPEG_DECODER_FHD, RI_CATEGORY_JPEG_DECODER_UHD, RI_CATEGORY_JPEG_DECODER_UHD, RI_CATEGORY_JPEG_DECODER_UHD, RI_CATEGORY_JPEG_DECODER_8K, RI_CATEGORY_JPEG_DECODER_8K},\r
+       //MJPEG\r
+       { RI_CATEGORY_MJPEG_DECODER_FHD, RI_CATEGORY_MJPEG_DECODER_FHD, RI_CATEGORY_MJPEG_DECODER_FHD, RI_CATEGORY_MJPEG_DECODER_UHD, RI_CATEGORY_JPEG_DECODER_UHD, RI_CATEGORY_MJPEG_DECODER_UHD, RI_CATEGORY_JPEG_DECODER_8K, RI_CATEGORY_MJPEG_DECODER_8K}\r
+};\r
+\r
+#endif// __RI_JPEG_DECODER_CATEGORY__\r
diff --git a/include_internal/ri-macro.h b/include_internal/ri-macro.h
new file mode 100644 (file)
index 0000000..c071fd8
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef _RI_MACRO_H_\r
+#define _RI_MACRO_H_\r
+\r
+#include <ri-debug.h>\r
+\r
+#define RI_FREE(a) \\r
+               if (a) \\r
+               { \\r
+                       free(a); \\r
+                       a = NULL; \\r
+               }\r
+\r
+#define RI_RETURN_MINUS_IF_NULL(a, msg) \\r
+               if (!a) \\r
+               { \\r
+                       RI_ERR("%s", msg); \\r
+                       return -1; \\r
+               }\r
+\r
+#define RI_RETURN_IF_NULL(a, msg) \\r
+               if (!a) \\r
+               { \\r
+                       RI_ERR("%s", msg); \\r
+                       return; \\r
+               }\r
+\r
+#define RI_RETURN_NULL_IF_NULL(a, msg) \\r
+               if (!a) \\r
+               { \\r
+                       RI_ERR("%s", msg); \\r
+                       return NULL; \\r
+               }\r
+\r
+#endif //_RI_MACRO_H_\r
diff --git a/include_internal/ri-type.h b/include_internal/ri-type.h
new file mode 100644 (file)
index 0000000..493a2d4
--- /dev/null
@@ -0,0 +1,120 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __RI_TYPE_H__\r
+#define __RI_TYPE_H__\r
+\r
+#include <glib.h>\r
+#include <ri-module-api.h>\r
+\r
+/**\r
+* @brief The structure corresponding to resource category element defined in resource_information.xml\r
+*        This structure contains contents of category element\r
+*/\r
+typedef struct {\r
+       int id;             /**< category id */\r
+       int class_id;       /**< class id */\r
+       const char *name;   /**< category name */\r
+       bool is_uhd_device; /**< 0: not UHD device, 1: UHD device */\r
+       int num_of_dev;     /**< The number of devices which belong to this category */\r
+       const char *codec;  /**< The codec name this category supports */\r
+} ri_resource_category_s;\r
+\r
+/**\r
+* @brief The structure for device specific information\r
+*/\r
+typedef struct {\r
+       unsigned int id;           /**< device id */\r
+       unsigned int category;     /**< resource category id to which device belongs */\r
+       const char *name;          /**< device name */\r
+       const char *path;          /**< device node path */\r
+       const char *omx_comp_name; /**< OMX component name corresponding to device */\r
+       bool main_device;          /**< true : main device, false : sub device */\r
+       bool support_overlay;      /**< true : support overlay bg, false : not support */\r
+       int max_rez;               /**< max resolution */\r
+       int max_sampling_format;   /**< max sampling format */\r
+} ri_device_unique_attr_s;\r
+\r
+/**\r
+* @brief The structure for memory cluster\r
+*/\r
+typedef struct {\r
+       unsigned int count;\r
+       unsigned int ids[RI_MEM_CLUSTER_NUM];\r
+} ri_mem_cluster_s;\r
+\r
+/**\r
+* @brief The class of resource category\r
+*/\r
+typedef enum {\r
+       RI_VIDEO_CATEGORY_CLASS_LOW = 0, /**< Low class */\r
+       RI_VIDEO_CATEGORY_CLASS_HIGH,    /**< High class */\r
+} ri_video_decoder_class_e;\r
+\r
+/**\r
+* @brief The internal audio mixing option\r
+*/\r
+typedef enum {\r
+       RI_MIXING_OPT_DEFAULT = 0,                        /**< default mixing option */\r
+       RI_MIXING_OPT_MULTIVIEW = RI_MIXING_OPT_DEFAULT,  /**< mixing option for multiview feature */\r
+       RI_MIXING_OPT_INTERACTION_SOUND = (0x1 << 24)     /**< mixing option for interaction sound feature */\r
+} ri_mixing_opt;\r
+\r
+\r
+#define RI_CATEGORY_VIDEO_DECODER_MIN RI_CATEGORY_VIDEO_DECODER_UHD\r
+#define RI_CATEGORY_VIDEO_DECODER_MAX RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_60P\r
+\r
+#define RI_CATEGORY_AUDIO_DECODER_MIN RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED\r
+#define RI_CATEGORY_AUDIO_DECODER_MAX RI_CATEGORY_AUDIO_DECODER_IAMF_OPUS\r
+\r
+struct ri_resource_list {\r
+       int n_rsc;\r
+       GList *rsc_list;\r
+       GList *iter;\r
+};\r
+\r
+struct ri_video_decoder {\r
+       int id;\r
+       int n_codecs;\r
+       GList *codec_list;\r
+       GList *iter;\r
+};\r
+\r
+struct ri_vcodec {\r
+       char* codec_name;\r
+       int rsz_id;\r
+       int framerate;\r
+};\r
+\r
+struct ri_video_property {\r
+       char* codec_name;\r
+       int width;\r
+       int height;\r
+       int fps;\r
+       int color_depth;\r
+       int sampling_format;\r
+       bool progressive;\r
+       bool detiled;\r
+};\r
+\r
+struct ri_video_encoder_property {\r
+       int width;\r
+       int height;\r
+       int fps;\r
+       bool multi;\r
+};\r
+\r
+#endif //__RI_TYPE_H__\r
diff --git a/include_internal/ri-video-decoder-category-type.h b/include_internal/ri-video-decoder-category-type.h
new file mode 100644 (file)
index 0000000..76eaf4b
--- /dev/null
@@ -0,0 +1,98 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __RI_VIDEO_DECODER_CATEGORY_TYPE_H__\r
+#define __RI_VIDEO_DECODER_CATEGORY_TYPE_H__\r
+\r
+#include <ri-common-type.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C"{\r
+#endif\r
+\r
+/* The number of video codec supported by video decoder */\r
+#define NUM_OF_VIDEO_CODEC 19\r
+\r
+/* The number of color depth to cover video decoder dependencies */\r
+/* 8bit, 10bit, 10bit 4:2:0, 10bit 4:2:2 */\r
+#define NUM_OF_COLOR_DEPTH 4\r
+\r
+/* The number of resolution to cover video decoder dependencies */\r
+/* FHD, UHD, 8K */\r
+#define NUM_OF_RESOLUTION 3\r
+\r
+/* The number of frame rate to cover video decoder dependencies */\r
+/* 30P, 60P, 120P */\r
+#define NUM_OF_FRAMERATE 3\r
+\r
+/* width of qHD */\r
+#define qHD_W 960\r
+/* height of qHD */\r
+#define qHD_H 540\r
+/* width of HD */\r
+#define HD_W 1280\r
+/* height of HD */\r
+#define HD_H 720\r
+/* Max width of FHD */\r
+#define FHD_W 1920\r
+/* Max height of FHD */\r
+#define FHD_H 1088\r
+/* Max height of FHD in vertical mode */\r
+#define FHD_H_V 1080\r
+/* Max width of 4K UHD */\r
+#define UHD_4K_W 4096\r
+/* Max height of 4K UHD */\r
+#define UHD_4K_H 2160\r
+/* Max width of 5K */\r
+#define UHD_5K_W 5120\r
+/* Max height of 5K */\r
+#define UHD_5K_H 2880\r
+/* Max width of 8K UHD */\r
+#define UHD_8K_W 7680\r
+/* Max height of 8K UHD */\r
+#define UHD_8K_H 4320\r
+\r
+typedef enum {\r
+       RI_COLOR_DEPTH_8BIT = 0,\r
+       RI_COLOR_DEPTH_10BIT,\r
+       RI_COLOR_DEPTH_10BIT_420,\r
+       RI_COLOR_DEPTH_10BIT_422\r
+} ri_color_depth;\r
+\r
+typedef enum {\r
+       RI_RESOLUTION_UNDEFINED = -1,\r
+       RI_RESOLUTION_qHD = 0,\r
+       RI_RESOLUTION_HD,\r
+       RI_RESOLUTION_FHD,    /**< 1920 x 1080 */\r
+       RI_RESOLUTION_QuadHD, /**< 2560 x 1440 */\r
+       RI_RESOLUTION_DQHD,   /**< 5120 x 1440 (32:9) */\r
+       RI_RESOLUTION_4K_UHD, /**< 4096 x 2160 */\r
+       RI_RESOLUTION_5K,     /**< 5120 x 2880 (16:9) */\r
+       RI_RESOLUTION_8K_UHD  /**< 7280 x 4560 */\r
+} ri_resolution;\r
+\r
+typedef enum {\r
+       RI_FRAMERATE_UNDEFINED = -1,\r
+       RI_FRAMERATE_30 = 0,\r
+       RI_FRAMERATE_60,\r
+       RI_FRAMERATE_120\r
+} ri_framerate;\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+#endif //__RI_VIDEO_DECODER_CATEGORY_TYPE_H__\r
+\r
diff --git a/packaging/resource-information.spec b/packaging/resource-information.spec
new file mode 100644 (file)
index 0000000..700d031
--- /dev/null
@@ -0,0 +1,151 @@
+Name:       resource-information
+Summary:    Resource Information
+Version:    0.1
+Release:    0
+Group:      Multimedia/Libraries
+License:    Apache-2.0
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: cmake
+BuildRequires: expat-devel
+BuildRequires: expat
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(glib-2.0)
+
+%if ( "%{vdut}" == "=c" || "%{vdut}" == "=u" )
+BuildRequires:  pkgconfig(gtest_gmock)
+%endif
+
+%define _pkgconfigdir %{_libdir}/pkgconfig
+%define _packagedir %{_libdir}/%{name}
+%define _pkgdir %TZ_SYS_RW_APP/%{name}
+%define _includedir %{_libdir}/%{name}
+%define _bindir %{TZ_SYS_BIN}
+
+%description
+This package provides information of hardware devices of Tizen
+
+%package devel
+Summary: resource_information header files, static libraries
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+This package contains the header files and static libraries
+for resource-information.
+
+%package validator
+Summary: resource_information file validator
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description validator
+This package provides binary for checking validity of resource-information file
+
+%if 0%{?vd_gcov:1}
+%package gcov
+Summary: gcov enabled package
+Group: gcov package
+
+%description gcov
+This package is gcov package for coverage measurement.
+%endif
+
+%prep
+
+%setup -q
+
+%if ( "%{vdut}" == "=c" || "%{vdut}" == "=u" )
+%define _vd_unit_test -DVD_UNIT_TEST=1
+%package ut
+Summary: Unit testing package with gtest
+%description ut
+Description: Unit testing package with gtest
+%files ut
+%defattr(-,root,root,-)
+%{_pkgdir}-ut/*
+%endif
+
+%build
+
+
+%ifarch armv7l
+%else
+echo EMULATOR
+export CFLAGS="$CFLAGS -DBUILD_EMULATOR"
+export CXXFLAGS="$CXXFLAGS -DBUILD_EMULATOR"
+%endif
+
+export CFLAGS="$CFLAGS %{?__vd_cflags}"
+export CXXFLAGS="$CXXFLAGS %{?__vd_cxxflags}"
+
+%if 0%{?vd_gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+cmake . \
+    %{?_vd_unit_test:%_vd_unit_test} \
+    -DCMAKE_INSTALL_PREFIX=%{_packagedir} \
+    -DPACKAGE_NAME=%{name} \
+    -DBINDIR=%{_bindir} \
+    -DINCLUDEDIR=%{_includedir} \
+    -DPKGCONFIG_INSTALL_DIR=%{_pkgconfigdir} \
+    -DVERSION=%{version} \
+    -DMAJORVERSION=${MAJORVER} \
+    -DLIBDIR=%{_libdir} \
+    -DTZ_SYS_RW_APP=%{TZ_SYS_RW_APP} \
+    -DVD_CFG_LICENSING=%{_vd_cfg_licensing}
+
+%if ("%{vdut}" == "=c")
+%define _covfile %{name}-ut.cov
+export COVFILE=~/%{_covfile}
+cov01 -1
+%endif
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%if 0%{?vd_gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+find . \( -name '*.gcno' -o -name '*.cpp' -o -name '*.c' -o -name '*.h' \) ! -path "./ut/*" ! -path "./test/*" ! -path "*/CompilerIdCXX/*" ! -path "*/CompilerIdC/*" -exec cp --parents -r '{}' %{buildroot}%{_datadir}/gcov/obj ';'
+%endif
+
+%clean
+%if ("%{vdut}" == "=c")
+mv ~/%{_covfile} ~/rpmbuild/RPMS/armv7l/
+echo %{_covfile} > ~/rpmbuild/RPMS/armv7l/covfile.txt
+%endif
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/*.so.*
+%manifest resource-information.manifest
+%license LICENSE.APLv2
+
+%files devel
+%defattr(-,root,root,-)
+%{_pkgconfigdir}/resource-information.pc
+%{_includedir}/*.h
+%{_libdir}/*.so
+
+%files validator
+%defattr(-,root,root,-)
+#%{TZ_SYS_BIN}/ri_info_validator
+
+%if 0%{?vd_gcov:1}
+%files gcov
+%{_datadir}/gcov/*
+%endif
+
+%post
+
+%postun
diff --git a/resource-information.manifest b/resource-information.manifest
new file mode 100644 (file)
index 0000000..75b0fa5
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+    <request>
+        <domain name="_"/>
+    </request>
+</manifest>
diff --git a/resource-information.pc.in b/resource-information.pc.in
new file mode 100644 (file)
index 0000000..a8b64ef
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: resource_info
+Description: This package contains the resource information of Tizen device
+Version: @VERSION@
+Libs: -L${libdir} -lresource-information
+Cflags: -I${includedir} -I${libdir}
+CXXflags: -I${includedir} -I${libdir}
diff --git a/src/CImageCodec.cpp b/src/CImageCodec.cpp
new file mode 100755 (executable)
index 0000000..9f95ddf
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <assert.h>\r
+#include <CImageCodec.h>\r
+\r
+CImageCodec::CImageCodec(std::string name)\r
+{\r
+       m_name = name;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+CImageCodec::~CImageCodec()\r
+{\r
+}\r
+// LCOV_EXCL_END\r
+\r
+void CImageCodec::GetMaxResolution(int *w, int *h)\r
+{\r
+       *w = m_width_max;\r
+       *h = m_height_max;\r
+}\r
+\r
+void CImageCodec::GetMinResolution(int *w, int *h)\r
+{\r
+       *w = m_width_min;\r
+       *h = m_height_min;\r
+}\r
diff --git a/src/CModelInfo.cpp b/src/CModelInfo.cpp
new file mode 100755 (executable)
index 0000000..825a0a0
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <system_info.h>
+#include <ri-debug.h>
+#include <CModelInfo.h>
+
+enum {
+       FEATURE_NOT_DEFINED = -1,
+       FEATURE_NOT_SUPPORTED,
+       FEATURE_SUPPORTED
+};
+
+struct chipset_info{
+       const char *chipset_name;
+       eChipSet chipset_id;
+       eChipSetVendor vendor;
+};
+
+CModelInfo& CModelInfo::GetInstance(void)
+{
+       static CModelInfo instance_;
+       return instance_;
+}
+
+CModelInfo::CModelInfo(void): m_has_dedicated_category_h264_fhd_portrait(false), m_exclusive_bw_for_h264_fhd_n_decoding(false)
+{
+       InitFeatures();
+}
+
+void CModelInfo::InitFeatures(void)
+{
+       if (IsSingleTableModel())
+               return;
+
+       int rm_index = GetResourceTableIndex();
+       if (rm_index < 0) {
+               RI_ERR("failed to initialize features");
+               return;
+       }
+}
+
+bool CModelInfo::IsSingleTableModel(void) const
+{
+       if (IsEmulator())
+               return true;
+
+       return false;
+}
+
+bool CModelInfo::IsEmulator(void) const
+{
+#ifdef BUILD_EMULATOR
+       return true;
+#else
+       return false;
+#endif
+}
+
+eChipSet CModelInfo::GetChipSet(void)
+{
+       auto it = m_chipset_info.find(GetChipSetName());
+       return (it == m_chipset_info.end()) ? CHIPSET_ERR : it->second;
+}
+
+std::string CModelInfo::GetChipSetName(void)
+{
+       if (!m_chipset_name.empty())
+               return m_chipset_name;
+
+       char *chipset_name = nullptr;
+       if (system_info_get_custom_string("com.samsung/featureconf/product.chipset", &chipset_name) != SYSTEM_INFO_ERROR_NONE) {
+               RI_ERR("failed to get chipset name");
+               return "";
+       }
+
+       if (!chipset_name) {
+               RI_ERR("Invalid chipset name");
+               return "";
+       }
+
+       RI_ERR("chipset name : (%s)", chipset_name);
+
+       m_chipset_name.assign(chipset_name);
+
+       if (chipset_name)
+               free(chipset_name);
+
+       return m_chipset_name;
+}
+
+int CModelInfo::ReadIndex(std::string filename) const
+{
+       FILE *fp = fopen(filename.c_str(), "rb");
+       if (!fp) {
+               RI_ERR("failed to open (%s) - errno(%d)", filename.c_str(), errno);
+               return -1;
+       }
+
+       char str[10] = {0,};
+       size_t str_size = fread(str, sizeof(char), sizeof(str) - 1, fp);
+       if (str_size == 0) {
+               fclose(fp);
+               return -1;
+       }
+
+       str[str_size] = '\0';
+       fclose(fp);
+       return atoi(str);
+}
+
+int CModelInfo::GetResourceTableIndex(void) const
+{
+       std::string index_path = "/proc/device-tree/resource-manager/rm_tbl_idx";
+       int index = -1;
+       int RETRY_FOR_2SEC = 100;
+       int SLEEP_20MS = 20000;
+
+       do {
+               index = ReadIndex(index_path);
+               if (index >= 0) {
+                       RI_INFO("resource table index : (%d)", index);
+                       return index;
+               }
+
+               RI_ERR("read fail (%s:%d)", index_path.c_str(), errno);
+               if (errno == ENOENT)
+                       usleep(SLEEP_20MS);
+       } while(--RETRY_FOR_2SEC > 0);
+
+       RI_ERR("failed to read resource table index : timeout!");
+       return index;
+}
+
+bool CModelInfo::SupportAndroidOnTizen(void) const
+{
+       bool result = false;
+       std::string fms_key = "com.samsung/featureconf/android_on_tizen.support";
+
+       if (system_info_get_custom_bool(fms_key.c_str(), &result) != SYSTEM_INFO_ERROR_NONE) {
+               RI_ERR("failed to get (%s)", fms_key.c_str());
+               return result;
+       }
+
+       RI_INFO("android on tizen support (%d)", result);
+       return result;
+}
diff --git a/src/CMultiview.cpp b/src/CMultiview.cpp
new file mode 100755 (executable)
index 0000000..9e4dba7
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <pthread.h>
+#include <system_info.h>
+
+#include <ri-debug.h>
+#include <ri-module-api.h>
+#include <CModelInfo.h>
+#include <CMultiview.h>
+
+// LCOV_EXCL_START
+
+CMultiview::CMultiview(void):strategy_(RI_MV_STRATEGY_NOT_SUPPORT), reclaim_policy_(ReclaimPolicy::Default), interlaced_playback_(InterlacedPlayback::All), \
+                                                       seamless_playback_(SeamlessPlayback::All), av1_dual_decoding_(AV1DualDecoding::Support)
+{
+       Init();
+}
+
+CMultiview& CMultiview::GetInstance(void)
+{
+       static CMultiview instance_;
+       return instance_;
+}
+
+void CMultiview::SetPolicy(const int strategy, const ReclaimPolicy reclaim, const InterlacedPlayback interlaced, const SeamlessPlayback seamless, const AV1DualDecoding dual_decoding)
+{
+       strategy_ = strategy;
+       reclaim_policy_ = reclaim;
+       interlaced_playback_ = interlaced;
+       seamless_playback_ = seamless;
+       av1_dual_decoding_ = dual_decoding;
+}
+
+void CMultiview::Init(void)
+{
+       CModelInfo &model_info = CModelInfo::GetInstance();
+       if (model_info.IsEmulator()) {
+               SetPolicy(RI_MV_STRATEGY_NOT_SUPPORT, ReclaimPolicy::Default, InterlacedPlayback::All, SeamlessPlayback::All, AV1DualDecoding::Support);
+               return;
+       }
+
+       struct multiview_policy_s {
+               int rm_index;
+               int strategy;
+               ReclaimPolicy reclaim;
+               InterlacedPlayback interlaced;
+               SeamlessPlayback seamless;
+               AV1DualDecoding av1_dual_decoding;
+       };
+
+       int rm_index = model_info.GetResourceTableIndex();
+       RI_ERR("rm_index(%d)", rm_index);
+}
+// LCOV_EXCL_STOP
diff --git a/src/CResourceInfo.cpp b/src/CResourceInfo.cpp
new file mode 100755 (executable)
index 0000000..940926a
--- /dev/null
@@ -0,0 +1,467 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <stdio.h>\r
+#include <unistd.h>\r
+#include <string.h>\r
+#include <string>\r
+#include <fcntl.h>\r
+#include <system_info.h>\r
+\r
+\r
+#include <ri-common-type.h>\r
+#include <ri-debug.h>\r
+#include <ri-jpeg-decoder-category.h>\r
+\r
+#include <CModelInfo.h>\r
+#include <CVideoCodec.h>\r
+#include <CResourceInfoDB.h>\r
+#include <CResourceInfo.h>\r
+\r
+#define IS_FHD_RESOLUTION_HORIZONTAL(w, h)  (w <= FHD_W && h <= FHD_H)\r
+#define IS_FHD_RESOLUTION_VERTICAL(w, h) (w <= FHD_H_V && h <= FHD_W)\r
+#define IS_4K_RESOLUTION_HORIZONTAL(w, h) ((w > FHD_W || h > FHD_H) && (w <= UHD_4K_W && h <= UHD_4K_H))\r
+#define IS_4K_RESOLUTION_VERTICAL(w, h) ((w > FHD_H_V || h > FHD_W) && (w <= UHD_4K_H && h <= UHD_4K_W))\r
+\r
+#define IS_FRAMERATE_30P(f) ((f > 0) && (f <= 30))\r
+#define IS_FRAMERATE_60P(f) ((f > 30) && (f <= 60))\r
+#define IS_FRAMERATE_120P(f) ((f > 60) && (f <= 120))\r
+\r
+CResourceInfo* CResourceInfo::m_instance = NULL;\r
+\r
+CResourceInfo::CResourceInfo(void)\r
+{\r
+}\r
+\r
+CResourceInfo::~CResourceInfo(void){}\r
+\r
+CResourceInfo* CResourceInfo::GetInstance(void)\r
+{\r
+       if (m_instance == NULL) {\r
+               m_instance = new CResourceInfo;\r
+       }\r
+\r
+       return m_instance;\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::GetVideoCategoryID(const char *codec_name, int color_depth, int h_size, int framerate, int sampling_format)\r
+{\r
+       ri_video_category_option_request_s option;\r
+\r
+       option.codec_name = codec_name;\r
+       option.color_depth = color_depth;\r
+       option.h_size = h_size;\r
+       option.v_size = 1;\r
+       option.framerate = framerate;\r
+       option.sampling_format = sampling_format;\r
+\r
+       return GetCapableVideoCategoryID(&option, false);\r
+}\r
+\r
+bool CResourceInfo::NeedDedicatedCategoryH264Portrait(std::string codec_name, int w, int h)\r
+{\r
+       if (codec_name.compare(RI_CODEC_NAME_H264))\r
+               return false;\r
+\r
+       CVideoCodec* codec = CResourceInfoDB::GetInstance()->FindVideoCodec(RI_CODEC_NAME_H264);\r
+       if (!codec)\r
+               return false;\r
+\r
+       return codec->IsSizeNotSupportedByFHDDecoder(RI_RESOLUTION_FHD, w, h);\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::GetCapableVideoCategoryID(std::string codec_name, int width, int height, int framerate, int sampling_format, int color_depth, bool n_decoding)\r
+{\r
+       RI_INFO("codec(%s)/color_depth(%d)/h(%d)/v(%d)/frame(%d)/sampling(%d)", codec_name.c_str(), color_depth, width, height, framerate, sampling_format);\r
+\r
+       int rsz_id = GetResolutionID(width, height, n_decoding, codec_name);\r
+       if (rsz_id == RI_RESOLUTION_UNDEFINED) {\r
+               RI_ERR("failed to get resolution id codec(%s)/h(%d)/v(%d)\n", codec_name.c_str(), width, height);\r
+               return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       int color_depth_id = GetColorDepthID(color_depth, sampling_format);\r
+       if (color_depth_id == (ri_color_depth) RI_ERROR) {\r
+               RI_ERR("failed to get color depth id(%d)\n", color_depth_id);\r
+               return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       int framerate_id = GetFrameRateID(framerate);\r
+       if (framerate_id == RI_FRAMERATE_UNDEFINED) {\r
+               RI_ERR("failed to get framerate(%d)\n",framerate_id);\r
+               return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       //support 1280*720 60p dual decoding, so convert it to 30\r
+       if ((!codec_name.compare(RI_CODEC_NAME_H264_MVC)) && (framerate_id == RI_FRAMERATE_60) && (width <= 1280))\r
+               framerate_id = RI_FRAMERATE_30;\r
+\r
+       CResourceInfoDB *db = CResourceInfoDB::GetInstance();\r
+       int category_id = db->GetVideoDecCategoryId(codec_name, rsz_id, framerate_id, color_depth_id);\r
+\r
+// LCOV_EXCL_START\r
+       if (n_decoding)\r
+               category_id = db->ToNDecodingCategory(category_id);\r
+\r
+       if (NeedDedicatedCategoryH264Portrait(codec_name, width, height))\r
+               category_id = ToPortraitCategory(category_id);\r
+// LCOV_EXCL_END\r
+       RI_INFO("n_decoding(%d), category id : %d", n_decoding, category_id);\r
+\r
+       return (n_decoding) ? db->IsNDecodingSupportedVideoFormat((ri_rsc_category_e) category_id):db->IsSupportedVideoFormat((ri_rsc_category_e) category_id);\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::GetCapableVideoCategoryID(ri_video_category_option_request_s* option, bool n_decoding)\r
+{\r
+       return GetCapableVideoCategoryID(option->codec_name, option->h_size, option->v_size, option->framerate, option->sampling_format, option->color_depth, n_decoding);\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::GetCapableVideoCategoryID(ri_video_property* prop, bool n_decoding)\r
+{\r
+       ri_rsc_category_e category_id = GetCapableVideoCategoryID(prop->codec_name, prop->width, prop->height, prop->fps, prop->sampling_format, prop->color_depth, n_decoding);\r
+       if (prop->detiled)\r
+               return ToCategoryDedicatedToDetiled(category_id);\r
+       return (prop->progressive) ? ToCategoryDedicatedToProgressive(category_id):category_id;\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::ToCategoryDedicatedToProgressive(ri_rsc_category_e category_id)\r
+{\r
+       ri_rsc_category_e result = category_id;\r
+       switch(category_id) {\r
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P:\r
+                       if (CResourceInfoDB::GetInstance()->IsSupportedVideoFormat(RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PROGRESSIVE) != RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED)\r
+                               result = RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PROGRESSIVE;\r
+                       break;\r
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P:\r
+                       if (CResourceInfoDB::GetInstance()->IsSupportedVideoFormat(RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_PROGRESSIVE) != RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED)\r
+                               result = RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_PROGRESSIVE;\r
+                       break;\r
+               default:\r
+                       break;\r
+       }\r
+       RI_INFO("category id  (%d > %d)", category_id, result);\r
+       return result;\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::ToCategoryDedicatedToDetiled(ri_rsc_category_e category_id)\r
+{\r
+       ri_rsc_category_e result = category_id;\r
+       switch(category_id) {\r
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P:\r
+                       result = RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_DETILED;\r
+                       break;\r
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P:\r
+                       result = RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_DETILED;\r
+                       break;\r
+               default:\r
+                       break;\r
+       }\r
+       RI_INFO("category id  (%d > %d)", category_id, result);\r
+       return result;\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::GetCapableMJpegDecoderCategoryID(const char *codec_name, int h_size)\r
+{\r
+       int jpeg_codec_id = RI_JPEG_CODEC_MJPEG;\r
+\r
+       if (!codec_name) {\r
+               RI_ERR("invalid param");\r
+               return RI_CATEGORY_MJPEG_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       std::string codec(codec_name);\r
+\r
+       RI_INFO("codec(%s)/h(%d)", codec_name, h_size);\r
+\r
+       if (codec.compare(RI_CODEC_NAME_MJPEG)) {\r
+               RI_ERR("unknown jpeg codec (%s)", codec.c_str());\r
+               return RI_CATEGORY_MJPEG_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       ri_resolution resolution_id = GetResolutionID(h_size);\r
+\r
+       if (resolution_id == RI_RESOLUTION_UNDEFINED) {\r
+               RI_ERR("failed to get resolution id (%d)", h_size);\r
+               return RI_CATEGORY_MJPEG_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       ri_rsc_category_e category_id = RI_JPEG_DECODER_CATEGORY[jpeg_codec_id][resolution_id];\r
+\r
+       return CResourceInfoDB::GetInstance()->IsSupportedMJpegFormat(category_id);\r
+}\r
+\r
+ri_resolution CResourceInfo::GetResolutionID(int resolution)\r
+{\r
+       ri_resolution result = RI_RESOLUTION_UNDEFINED;\r
+\r
+       if (resolution < FHD_W && resolution > 0) {\r
+               result = RI_RESOLUTION_FHD;\r
+       } else if (resolution > FHD_W && resolution <= UHD_4K_W) {\r
+               result = RI_RESOLUTION_4K_UHD;\r
+       } else {\r
+               result = RI_RESOLUTION_8K_UHD;\r
+       }\r
+\r
+       return result;\r
+}\r
+\r
+ri_resolution CResourceInfo::GetResolutionID(const std::string codec_name, const int w, const int h)\r
+{\r
+       std::string name = (!codec_name.compare(RI_CODEC_NAME_H264_MVC)) ? RI_CODEC_NAME_H264 : codec_name;\r
+\r
+       CVideoCodec *codec = CResourceInfoDB::GetInstance()->FindVideoCodec(name);\r
+       if (!codec)\r
+               return RI_RESOLUTION_UNDEFINED;\r
+\r
+       return codec->GetResolutionID(w, h);\r
+}\r
+\r
+ri_resolution CResourceInfo::GetResolutionID(int w, int h, bool n_decoding, std::string codec_name)\r
+{\r
+       ri_resolution result = RI_RESOLUTION_UNDEFINED;\r
+\r
+       if (w <= 0 || h <= 0) {\r
+               RI_ERR("not supported (%d * %d)", w, h);\r
+               return RI_RESOLUTION_UNDEFINED;\r
+       }\r
+\r
+       result = GetResolutionID(codec_name, w, h);\r
+\r
+       if (!n_decoding) {\r
+               if (result == RI_RESOLUTION_HD || result == RI_RESOLUTION_qHD)\r
+                       result = RI_RESOLUTION_FHD;\r
+       }\r
+\r
+       RI_INFO("video resolution(%d) by w(%d) & h(%d)", result, w, h);\r
+       return result;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+int CResourceInfo::ToPortraitCategory(int category)\r
+{\r
+       int result = category;\r
+       switch(category) {\r
+               case RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_30P:\r
+                       result = RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PORTRAIT;\r
+                       break;\r
+               case RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_60P:\r
+                       result = RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_PORTRAIT;\r
+                       break;\r
+               default:\r
+                       break;\r
+       }\r
+\r
+       RI_INFO("(%d > %d)", category, result);\r
+       return result;\r
+}\r
+// LCOV_EXCL_END\r
+\r
+bool CResourceInfo::IsValidImageResolution(std::string codec, int w, int h)\r
+{\r
+       if (w <= 0 || h <= 0) {\r
+               RI_ERR("not supported (%d * %d)", w, h);\r
+               return false;\r
+       }\r
+\r
+       int max_w = 0;\r
+       int max_h = 0;\r
+       int min_w = 0;\r
+       int min_h = 0;\r
+\r
+       CResourceInfoDB::GetInstance()->GetImageMinMaxResolution(codec, &min_w, &min_h, &max_w, &max_h);\r
+       if (w > max_w || h > max_h) {\r
+               RI_ERR("[%s] not supported (%d * %d), max(%d * %d)", codec.c_str(), w, h, max_w, max_h);\r
+               return false;\r
+       }\r
+\r
+       if (w < min_w || h < min_h) {\r
+               RI_ERR("[%s] not supported (%d * %d), min(%d * %d)", codec.c_str(), w, h, min_w, min_h);\r
+               return false;\r
+       }\r
+\r
+       return true;\r
+}\r
+\r
+ri_resolution CResourceInfo::GetImageResolutionID(std::string codec, int w, int h)\r
+{\r
+       if (!IsValidImageResolution(codec, w, h))\r
+               return RI_RESOLUTION_UNDEFINED;\r
+\r
+       ri_resolution result = RI_RESOLUTION_FHD;\r
+\r
+       if (!IS_FHD_RESOLUTION_HORIZONTAL(w, h)) {\r
+               result = IS_4K_RESOLUTION_HORIZONTAL(w, h) ? RI_RESOLUTION_4K_UHD:RI_RESOLUTION_8K_UHD;\r
+       }\r
+\r
+       return result;\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::GetSubJpegCategoryID(const char *codec_name,int w_size,int h_size)\r
+{\r
+       int jpeg_codec_id = RI_JPEG_CODEC_JPEG;\r
+\r
+       if (!codec_name) {\r
+               RI_ERR("invalid param");\r
+               return RI_CATEGORY_JPEG_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       RI_INFO("codec(%s)/w(%d)/h(%d)", codec_name, w_size, h_size);\r
+\r
+       std::string codec(codec_name);\r
+\r
+       if (codec.compare(RI_CODEC_NAME_JPEG)) {\r
+               RI_ERR("unknown jpeg codec (%s)", codec.c_str());\r
+               return RI_CATEGORY_JPEG_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       ri_resolution resolution_id = GetImageResolutionID(codec, w_size, h_size);\r
+\r
+       if (resolution_id == RI_RESOLUTION_UNDEFINED)\r
+               return RI_CATEGORY_JPEG_DECODER_NOT_SUPPORTED;\r
+\r
+       ri_rsc_category_e category_id = RI_JPEG_DECODER_CATEGORY[jpeg_codec_id][resolution_id];\r
+\r
+       if (resolution_id == RI_RESOLUTION_8K_UHD) {\r
+               bool dec_8k_exist = (CResourceInfoDB::GetInstance()->IsSupportedJpegFormat(category_id) == RI_CATEGORY_JPEG_DECODER_NOT_SUPPORTED) ?false:true;\r
+\r
+               category_id = (!dec_8k_exist) ?RI_CATEGORY_JPEG_DECODER_UHD:RI_CATEGORY_JPEG_DECODER_8K;\r
+       }\r
+\r
+       return CResourceInfoDB::GetInstance()->IsSupportedJpegFormat(category_id);\r
+}\r
+// LCOV_EXCL_START\r
+ri_rsc_category_e CResourceInfo::GetHEICCategoryID(const char *codec_name, int w_size, int h_size)\r
+{\r
+       std::string codec(codec_name);\r
+\r
+       ri_resolution resolution_id = GetImageResolutionID(codec, w_size, h_size);\r
+       if (resolution_id == RI_RESOLUTION_UNDEFINED)\r
+               return RI_CATEGORY_IMAGE_DECODER_NOT_SUPPORTED;\r
+\r
+       return CResourceInfoDB::GetInstance()->IsSupportedImageFormat(RI_CATEGORY_HEIC_DECODER);\r
+}\r
+\r
+ri_rsc_category_e CResourceInfo::GetImageCategoryID(const char *codec_name, int w_size, int h_size)\r
+{\r
+       ri_rsc_category_e result;\r
+       std::string codec(codec_name);\r
+\r
+       if (!codec.compare(RI_CODEC_NAME_JPEG)) {\r
+               result = GetSubJpegCategoryID(codec_name, w_size, h_size);\r
+               return (result == RI_CATEGORY_JPEG_DECODER_NOT_SUPPORTED) ? RI_CATEGORY_IMAGE_DECODER_NOT_SUPPORTED:result;\r
+       }\r
+\r
+       if (!codec.compare(RI_CODEC_NAME_HEIC))\r
+               return GetHEICCategoryID(codec_name, w_size, h_size);\r
+\r
+       RI_ERR("not supported (%s)", codec_name);\r
+       return RI_CATEGORY_IMAGE_DECODER_NOT_SUPPORTED;\r
+}\r
+// LCOV_EXCL_END\r
+\r
+ri_color_depth CResourceInfo::GetColorDepthID(int color_depth, int sampling_format)\r
+{\r
+       if (color_depth == 8) { //sampling_format, RI_SAMPLING_FORMAT_OTHERS\r
+               return RI_COLOR_DEPTH_8BIT;\r
+       } else if (color_depth == 10 && sampling_format == RI_SAMPLING_FORMAT_420) {\r
+               return RI_COLOR_DEPTH_10BIT_420;\r
+       } else if (color_depth == 10 && sampling_format == RI_SAMPLING_FORMAT_422) {\r
+               return RI_COLOR_DEPTH_10BIT_422;\r
+       } else if (color_depth == 10) { //sampling_format, RI_SAMPLING_FORMAT_OTHERS\r
+               return RI_COLOR_DEPTH_10BIT;\r
+       } else {\r
+               RI_ERR("unknown color depth (%d)\n", color_depth);\r
+               return (ri_color_depth)-1;\r
+       }\r
+}\r
+\r
+ri_framerate CResourceInfo::GetFrameRateID(int framerate)\r
+{\r
+       ri_framerate framerate_e = RI_FRAMERATE_UNDEFINED;\r
+\r
+       if (IS_FRAMERATE_30P(framerate)) {\r
+               framerate_e = RI_FRAMERATE_30;\r
+       } else if (IS_FRAMERATE_60P(framerate)) {\r
+               framerate_e = RI_FRAMERATE_60;\r
+       } else if (IS_FRAMERATE_120P(framerate)) {\r
+               framerate_e = RI_FRAMERATE_120;\r
+       } else {\r
+               RI_ERR("unexpected frame rate (%d)\n", framerate);\r
+       }\r
+\r
+       return framerate_e;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+int CResourceInfo::GetMixingOption(ri_audio_mixing_mode mixing_mode)\r
+{\r
+       int result = -1;\r
+\r
+       switch(mixing_mode) {\r
+               case RI_MIXING_MODE_DEFAULT:\r
+                       result = RI_MIXING_OPT_DEFAULT;\r
+                       break;\r
+               case RI_MIXING_MODE_MULTIVIEW:\r
+                       result = RI_MIXING_OPT_MULTIVIEW;\r
+                       break;\r
+               case RI_MIXING_MODE_INTERACTION_SOUND:\r
+                       result = RI_MIXING_OPT_INTERACTION_SOUND;\r
+                       break;\r
+               default:\r
+                       RI_ERR("undefined mixing mode(%d)", mixing_mode);\r
+                       result = RI_MIXING_OPT_DEFAULT;\r
+                       break;\r
+       }\r
+\r
+       return result;\r
+}\r
+\r
+bool CResourceInfo::IsNormalMode(void)\r
+{\r
+       const char *rsc_event_name = "/tmp/.rsc_policy_activated";\r
+       //return (LwipcWaitEvent(rsc_event_name, 0) == 0;\r
+\r
+       return access(rsc_event_name, F_OK) == 0;\r
+}\r
+\r
+int CResourceInfo::GetCapableAudioDecoderCategoryID(ri_audio_category_option_request_s* option)\r
+{\r
+       if (!option || !option->codec_name) {\r
+               RI_ERR("invalid parameter!");\r
+               return RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       int mixing_option = GetMixingOption(option->mixing_mode);\r
+       if (mixing_option < 0) {\r
+               RI_ERR("invalid mixing mode(%d)", option->mixing_mode);\r
+               return RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       int category_id = CResourceInfoDB::GetInstance()->GetAudioDecoderCategoryId(option->codec_name);\r
+\r
+       RI_INFO("codec(%s)/mixing(%d)/result(%d)", option->codec_name, option->mixing_mode, category_id);\r
+\r
+       if (category_id == RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED)\r
+               return category_id;\r
+\r
+       if (option->mixing_mode == RI_MIXING_MODE_MULTIVIEW && IsNormalMode()) {\r
+               RI_INFO("normal mode : category id (%d > %d)", category_id, RI_CATEGORY_AUDIO_DECODER);\r
+               return RI_CATEGORY_AUDIO_DECODER;\r
+       }\r
+\r
+       return (category_id | mixing_option);\r
+}\r
+// LCOV_EXCL_STOP\r
diff --git a/src/CResourceInfoDB.cpp b/src/CResourceInfoDB.cpp
new file mode 100755 (executable)
index 0000000..8a239c8
--- /dev/null
@@ -0,0 +1,1119 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <assert.h>\r
+#include <pthread.h>\r
+\r
+#include <system_info.h>\r
+\r
+#include <ri-resource-info-parser.h>\r
+#include <CCategoryElement.h>\r
+#include <CDeviceElement.h>\r
+#include <CModelInfo.h>\r
+#include <CVideoCodec.h>\r
+#include <CVideoCodecNDecoding.h>\r
+#include <CategoryIdBuilderMPEG1.h>\r
+#include <CategoryIdBuilderMPEG2.h>\r
+#include <CategoryIdBuilderMPEG4.h>\r
+#include <CategoryIdBuilderH263.h>\r
+#include <CategoryIdBuilderH264.h>\r
+#include <CategoryIdBuilderHEVC.h>\r
+#include <CategoryIdBuilderVP8.h>\r
+#include <CategoryIdBuilderVP9.h>\r
+#include <CategoryIdBuilderRV.h>\r
+#include <CategoryIdBuilderWMV.h>\r
+#include <CategoryIdBuilderAVS.h>\r
+#include <CategoryIdBuilderAVSPlus.h>\r
+#include <CategoryIdBuilderH264MVC.h>\r
+#include <CategoryIdBuilderHEVCvr360.h>\r
+#include <CategoryIdBuilderH264vr360.h>\r
+#include <CategoryIdBuilderVP9vr360.h>\r
+#include <CategoryIdBuilderSHVC.h>\r
+#include <CategoryIdBuilderAV1.h>\r
+#include <CategoryIdBuilderAV1vr360.h>\r
+#include <CategoryIdBuilderAVS2.h>\r
+#include <CategoryIdBuilderAVS3.h>\r
+#include <CategoryIdBuilderVVC.h>\r
+#include <CResourceInfoDB.h>\r
+\r
+static pthread_mutex_t db_instance_mutex = PTHREAD_MUTEX_INITIALIZER;\r
+\r
+CResourceInfoDB::CResourceInfoDB(void)\r
+{\r
+       m_system_bw = 0;\r
+}\r
+\r
+CResourceInfoDB::~CResourceInfoDB(void){}\r
+\r
+CResourceInfoDB* CResourceInfoDB::m_instance = NULL;\r
+\r
+CResourceInfoDB* CResourceInfoDB::GetInstance(void)\r
+{\r
+       pthread_mutex_lock(&db_instance_mutex);\r
+\r
+       if (m_instance == NULL) {\r
+               m_instance = new CResourceInfoDB;\r
+               ParseXMLFile(static_cast<void*>(m_instance));\r
+               m_instance->InitVideoDecCategories();\r
+       }\r
+\r
+       pthread_mutex_unlock(&db_instance_mutex);\r
+       return m_instance;\r
+}\r
+\r
+ri_rsc_category_e CResourceInfoDB::IsSupportedVideoFormat(ri_rsc_category_e category_id)\r
+{\r
+       std::set<int>::iterator iter = m_supported_video_format.find(category_id);\r
+\r
+       return (iter == m_supported_video_format.end()) ? RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED : category_id;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+ri_rsc_category_e CResourceInfoDB::IsNDecodingSupportedVideoFormat(ri_rsc_category_e category_id)\r
+{\r
+       std::set<int>::iterator iter = m_n_decoding_supported_video_format.find(category_id);\r
+\r
+       if (iter == m_n_decoding_supported_video_format.end()) {\r
+               if (category_id != RI_CATEGORY_VIDEO_DECODER_H264_HD_8BIT_30P)\r
+                       return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;\r
+\r
+               iter = m_n_decoding_supported_video_format.find(RI_CATEGORY_VIDEO_DECODER_H264_FHD_N_8BIT_30P);\r
+               return (iter == m_n_decoding_supported_video_format.end()) ? RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED : RI_CATEGORY_VIDEO_DECODER_H264_FHD_N_8BIT_30P;\r
+       } else {\r
+               return category_id;\r
+       }\r
+}\r
+// LCOV_EXCL_END\r
+\r
+ri_rsc_category_e CResourceInfoDB::IsSupportedJpegFormat(ri_rsc_category_e category_id)\r
+{\r
+       std::set<int>::iterator iter = m_supported_jpeg_format.find(category_id);\r
+\r
+       return (iter == m_supported_jpeg_format.end()) ? RI_CATEGORY_JPEG_DECODER_NOT_SUPPORTED : category_id;\r
+}\r
+\r
+ri_rsc_category_e CResourceInfoDB::IsSupportedMJpegFormat(ri_rsc_category_e category_id)\r
+{\r
+       std::set<int>::iterator iter = m_supported_jpeg_format.find(category_id);\r
+\r
+       return (iter == m_supported_jpeg_format.end()) ? RI_CATEGORY_MJPEG_DECODER_NOT_SUPPORTED : category_id;\r
+}\r
+\r
+void CResourceInfoDB::AddSupportedVideoFormat(ri_rsc_category_e decoder_id)\r
+{\r
+       m_supported_video_format.insert(decoder_id);\r
+}\r
+\r
+void CResourceInfoDB::AddSupportedNDecoder(ri_rsc_category_e decoder_id)\r
+{\r
+       m_n_decoding_supported_video_format.insert(decoder_id);\r
+}\r
+\r
+void CResourceInfoDB::AddSupportedNDecoder(std::string codec_name, ri_rsc_category_e category_id, int rsz, int framerate)\r
+{\r
+       CVideoCodecNDecoding* codec = nullptr;\r
+\r
+       auto it = m_n_decoding_codecs.find(codec_name);\r
+       if (it == m_n_decoding_codecs.end()) {\r
+               codec = new CVideoCodecNDecoding(codec_name, rsz, framerate);\r
+               codec->SetCategoryId(category_id);\r
+               m_n_decoding_codecs.insert(std::pair<std::string, CVideoCodecNDecoding*>(codec_name, codec));\r
+       } else {\r
+               codec = it->second;\r
+               if (rsz > codec->GetMaxResolution()) {\r
+                       codec->SetMaxResolution(rsz);\r
+                       codec->SetMaxFramerate(framerate);\r
+                       codec->SetCategoryId(category_id);\r
+               } else if ((rsz == codec->GetMaxResolution()) && (framerate > codec->GetMaxFramerate())) {\r
+                       codec->SetMaxFramerate(framerate);\r
+                       codec->SetCategoryId(category_id);\r
+               }\r
+       }\r
+}\r
+\r
+void CResourceInfoDB::AddSupportedJpegFormat(ri_rsc_category_e decoder_id)\r
+{\r
+       m_supported_jpeg_format.insert(decoder_id);\r
+}\r
+\r
+void CResourceInfoDB::AddSupportedImageFormat(ri_rsc_category_e decoder_id)\r
+{\r
+       m_supported_image_format.insert(decoder_id);\r
+}\r
+\r
+// LCOV_EXCL_START\r
+ri_rsc_category_e CResourceInfoDB::IsSupportedImageFormat(ri_rsc_category_e category_id)\r
+{\r
+       auto iter = m_supported_image_format.find(category_id);\r
+\r
+       return (iter == m_supported_image_format.end()) ? RI_CATEGORY_IMAGE_DECODER_NOT_SUPPORTED : category_id;\r
+}\r
+// LCOV_EXCL_END\r
+\r
+bool CResourceInfoDB::IsSupportedAudioCodec(std::string acodec)\r
+{\r
+       auto it = m_supported_audio_codecs.find(acodec);\r
+       bool result = (it != m_supported_audio_codecs.end());\r
+       RI_INFO("acodec(%s:%d)", acodec.c_str(), result);\r
+       return result;\r
+}\r
+\r
+void CResourceInfoDB::AddSupportedAudioCodec(std::string name, ri_rsc_category_e decoder_id)\r
+{\r
+       auto it = m_supported_audio_codecs.find(name);\r
+       if (it != m_supported_audio_codecs.end())\r
+               return;\r
+\r
+       m_supported_audio_codecs.insert(std::pair<std::string, ri_rsc_category_e>(name, decoder_id));\r
+}\r
+\r
+void CResourceInfoDB::AddCategoryResolution(ri_rsc_category_e category_id, int resolution)\r
+{\r
+       m_category_resolution.insert(std::pair<int, int>(category_id, resolution));\r
+}\r
+\r
+// LCOV_EXCL_START\r
+int CResourceInfoDB::FindCategoryResolution(int category_id)\r
+{\r
+       auto it = m_category_resolution.find(category_id);\r
+       if (it == m_category_resolution.end()) {\r
+               RI_ERR("category(%d) not found", category_id);\r
+               return -1;\r
+       }\r
+       RI_INFO("category resolution(%d:%d)", category_id, it->second);\r
+       return it->second;\r
+}\r
+// LCOV_EXCL_END\r
+\r
+void CResourceInfoDB::AddCategoryFramerate(ri_rsc_category_e category_id, int framerate)\r
+{\r
+       m_category_framerate.insert(std::pair<int, int>(category_id, framerate));\r
+}\r
+\r
+// LCOV_EXCL_START\r
+int CResourceInfoDB::FindCategoryFramerate(int category_id)\r
+{\r
+       auto it = m_category_framerate.find(category_id);\r
+       if (it == m_category_framerate.end()) {\r
+               RI_ERR("category(%d) not found", category_id);\r
+               return -1;\r
+       }\r
+       RI_INFO("category framerate(%d:%d)", category_id, it->second);\r
+       return it->second;\r
+}\r
+// LCOV_EXCL_END\r
+\r
+void CResourceInfoDB::AddVideoCodec(std::string name, int resolution, int framerate)\r
+{\r
+       CVideoCodec *vcodec;\r
+\r
+       if (name.empty())\r
+               return;\r
+\r
+       auto it = m_video_codecs.find(name);\r
+       if (it == m_video_codecs.end()) {\r
+               vcodec = new CVideoCodec(name, resolution, framerate, IsCodecSupporting2KPortrait(name));\r
+               m_video_codecs.insert(std::pair<std::string, CVideoCodec*>(name, vcodec));\r
+       } else {\r
+               vcodec = it->second;\r
+               if (resolution > vcodec->GetMaxResolution()) {\r
+                       vcodec->SetMaxResolution(resolution);\r
+                       vcodec->SetMaxFrameRate(framerate);\r
+               } else if (framerate > vcodec->GetMaxFrameRate()) {\r
+                       vcodec->SetMaxFrameRate(framerate);\r
+               }\r
+       }\r
+\r
+       if (resolution == RI_RESOLUTION_QuadHD || resolution == RI_RESOLUTION_DQHD || resolution == RI_RESOLUTION_5K)\r
+               vcodec->CreateExtraResolution(resolution);\r
+}\r
+\r
+// LCOV_EXCL_START\r
+ri_rsc_category_e CResourceInfoDB::GetAudioDecoderCategoryId(const char *codec_name)\r
+{\r
+       auto it = m_supported_audio_codecs.find(std::string(codec_name));\r
+       return (it == m_supported_audio_codecs.end()) ? RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED : it->second;\r
+}\r
+\r
+int CResourceInfoDB::GetCategoryClass(int category_id)\r
+{\r
+       auto it = m_resource_categories.find(category_id);\r
+\r
+       return (it == m_resource_categories.end()) ? 0 : it->second->class_id;;\r
+}\r
+// LCOV_EXCL_END\r
+\r
+void CResourceInfoDB::AddCategoryInfo(ri_resource_category_s* category)\r
+{\r
+       assert(category);\r
+       m_resource_categories.insert(std::pair<int, ri_resource_category_s*>(category->id, category));\r
+}\r
+\r
+void CResourceInfoDB::AddDeviceAttributes(ri_device_common_attr_s* device_attr)\r
+{\r
+       assert(device_attr);\r
+\r
+       if (IsScaler(device_attr->category)) {\r
+               m_scalers.insert(std::pair<int, ri_device_common_attr_s*>(device_attr->id, device_attr));\r
+               m_n_scalers = m_scalers.size();\r
+       }\r
+\r
+       m_device_attr_map_by_dev_id.insert(std::pair<int, ri_device_common_attr_s*>(device_attr->id, device_attr));\r
+}\r
+\r
+void CResourceInfoDB::AddDeviceUniqueAttributes(IN const int id_unique, IN ri_device_unique_attr_s* device_attr)\r
+{\r
+       m_device_unique_attr.insert(std::pair<int, ri_device_unique_attr_s*>(id_unique, device_attr));\r
+}\r
+\r
+bool CResourceInfoDB::HasDeviceUniqueAttributes(const int id_unique)\r
+{\r
+       auto it = m_device_unique_attr.find(id_unique);\r
+       return (it == m_device_unique_attr.end()) ? false:true;\r
+}\r
+\r
+ri_return_code_e CResourceInfoDB::GetCategoryType(int device_id, int* category_type)\r
+{\r
+       std::map<int, ri_device_unique_attr_s*>::iterator iter = m_device_unique_attr.find(device_id);\r
+\r
+       if (iter == m_device_unique_attr.end()) {\r
+               if (IsVirtualDeviceIdScaler(device_id)) {\r
+                       RI_INFO("DevID[%d]/CatID[%d] Get Category type", device_id, RI_CATEGORY_SCALER);\r
+                       *category_type = RI_CATEGORY_SCALER;\r
+                       return RI_OK;\r
+               }\r
+\r
+               RI_ERR("DevID[%d] Cannot find category type", device_id);\r
+               return RI_ERROR;\r
+       }\r
+\r
+       RI_INFO("DevID[%d:%s]/CatID[%d] Get Category type", iter->first, iter->second->name, iter->second->category);\r
+\r
+       *category_type = iter->second->category;\r
+\r
+       return RI_OK;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+int CResourceInfoDB::GetMainCategory(IN int device_id)\r
+{\r
+       auto it = m_device_unique_attr.find(device_id);\r
+       if (it == m_device_unique_attr.end()) {\r
+               RI_ERR("can't find main category(%d)", device_id);\r
+               return 0;\r
+       }\r
+\r
+       return it->second->category;\r
+}\r
+\r
+std::string CResourceInfoDB::GetDeviceNodePathScaler(const int device_id)\r
+{\r
+       auto it = m_scalers.begin();\r
+       return (it == m_scalers.end()) ? std::string("") : std::string(it->second->path);\r
+}\r
+\r
+std::string CResourceInfoDB::GetDeviceNameScaler(const int device_id)\r
+{\r
+       auto it = m_scalers.begin();\r
+       return (it == m_scalers.end()) ? std::string("") : std::string(it->second->name);\r
+}\r
+\r
+ri_return_code_e CResourceInfoDB::GetDeviceNodePath(const int device_id, char** device_path)\r
+{\r
+       std::map<int, ri_device_unique_attr_s*>::iterator iter = m_device_unique_attr.find(device_id);\r
+       std::string path;\r
+\r
+       if (iter == m_device_unique_attr.end()) {\r
+               if (IsVirtualDeviceIdScaler(device_id)) {\r
+                       path = GetDeviceNodePathScaler(device_id);\r
+                       *device_path = strdup(path.c_str());\r
+                       RI_INFO("DEVICE ID : %d, DEVICE PATH : %s", device_id, *device_path);\r
+                       return RI_OK;\r
+               }\r
+               RI_INFO("DEVICE ID : %d CANNOT GET PATH", device_id);\r
+               return RI_ERROR;\r
+       }\r
+\r
+       if (device_id == RI_DEVICE_UNDEFINED)\r
+               return RI_ERROR;\r
+\r
+       *device_path = strdup(iter->second->path);\r
+\r
+       RI_INFO("DEVICE ID : %d, DEVICE PATH : %s", device_id, *device_path);\r
+\r
+       return RI_OK;\r
+}\r
+\r
+const char *CResourceInfoDB::GetDeviceName(const int device_id)\r
+{\r
+       std::map<int, ri_device_unique_attr_s*>::iterator iter = m_device_unique_attr.find(device_id);\r
+       std::string name;\r
+       if (iter == m_device_unique_attr.end()) {\r
+               if (IsVirtualDeviceIdScaler(device_id)) {\r
+                       name = GetDeviceNameScaler(device_id);\r
+                       RI_INFO("DEVICE ID : %d, DEVICE NAME : %s", device_id, name.c_str());\r
+                       return strdup(name.c_str());\r
+               }\r
+\r
+               RI_INFO("[NULL] DEVICE ID : %d CANNOT GET NAME", device_id);\r
+               return NULL;\r
+       }\r
+\r
+       if (device_id == RI_DEVICE_UNDEFINED) {\r
+               RI_INFO("[NULL] DEVICE ID : %d RI_DEVICE_UNDEFINED", device_id);\r
+               return NULL;\r
+       }\r
+\r
+       RI_INFO("DEVICE ID : %d, DEVICE NAME : %s", device_id, iter->second->name);\r
+\r
+       return iter->second->name;\r
+}\r
+\r
+bool CResourceInfoDB::IsMainDevice(const int device_id)\r
+{\r
+       auto it = m_device_unique_attr.find(device_id);\r
+       if (it == m_device_unique_attr.end()) {\r
+               RI_ERR("invalid device id (%d)", device_id);\r
+               return false;\r
+       }\r
+       return it->second->main_device;\r
+}\r
+\r
+ri_return_code_e CResourceInfoDB::GetOmxCompName(const int device_id, char** name)\r
+{\r
+       std::map<int, ri_device_unique_attr_s*>::iterator iter = m_device_unique_attr.find(device_id);\r
+\r
+       if (iter == m_device_unique_attr.end()) {\r
+               if (IsVirtualDeviceIdScaler(device_id)) {\r
+                       *name = strdup("");\r
+                       RI_INFO("DEVICE ID : %d, OMX COMPONENT NAME : %s", device_id, *name);\r
+                       return RI_OK;\r
+               }\r
+               return RI_ERROR;\r
+       }\r
+\r
+       if (device_id == RI_DEVICE_UNDEFINED)\r
+               return RI_ERROR;\r
+\r
+       *name = strdup(iter->second->omx_comp_name);\r
+\r
+       RI_INFO("DEVICE ID : %d, OMX COMPONENT NAME : %s", device_id, *name);\r
+\r
+       return RI_OK;\r
+}\r
+\r
+ri_return_code_e CResourceInfoDB::GetDeviceList(OUT int* num, OUT ri_device_common_attr_s** devices)\r
+{\r
+       if (m_device_attr_map_by_dev_id.empty()) {\r
+               if (ParseXMLFile(this) < 0) {\r
+                       RI_ERR("COULD NOT GET DEVICE INFO");\r
+                       return RI_ERROR;\r
+               }\r
+\r
+               InitVideoDecCategories();\r
+       }\r
+\r
+       *num = m_device_attr_map_by_dev_id.size();\r
+       *devices = (ri_device_common_attr_s*) malloc (sizeof(ri_device_common_attr_s) * (*num));\r
+       assert(*devices);\r
+\r
+       unsigned int cnt = 0;\r
+\r
+       for (auto const &it : m_device_attr_map_by_dev_id) {\r
+               (*devices)[cnt].id = it.second->id;\r
+               (*devices)[cnt].category = it.second->category;\r
+               (*devices)[cnt].name = it.second->name;\r
+               (*devices)[cnt].path = it.second->path;\r
+               (*devices)[cnt].bw = it.second->bw;\r
+\r
+               (*devices)[cnt].n_mem_clusters = it.second->n_mem_clusters;\r
+               for (unsigned int i = 0; i < it.second->n_mem_clusters; i++)\r
+                       (*devices)[cnt].mem_clusters[i] = it.second->mem_clusters[i];\r
+\r
+               (*devices)[cnt].sharable_count = it.second->sharable_count;\r
+               (*devices)[cnt].mixing_count = it.second->mixing_count;\r
+               (*devices)[cnt].is_uhd_device = it.second->is_uhd_device;\r
+               (*devices)[cnt].id_unique = it.second->id_unique;\r
+               (*devices)[cnt].is_main_device = it.second->is_main_device;\r
+               (*devices)[cnt].audio_codec = it.second->audio_codec;\r
+\r
+               int main_category = GetMainCategory(it.second->id_unique);\r
+               (*devices)[cnt].category_main = (main_category != 0) ? main_category:it.second->category;\r
+\r
+               cnt++;\r
+       }\r
+\r
+       return RI_OK;\r
+}\r
+\r
+\r
+int CResourceInfoDB::GetDeviceID(unsigned int category, unsigned int device_sz, int* device_id)\r
+{\r
+       if (device_id == NULL) {\r
+               RI_ERR("INVALID INPUT");\r
+               return RI_ERROR;\r
+       }\r
+\r
+       unsigned int cnt = 0;\r
+\r
+       for (std::map<int, ri_device_common_attr_s*>::iterator iter = m_device_attr_map_by_dev_id.begin(); iter != m_device_attr_map_by_dev_id.end(); iter++) {\r
+               if (iter->second->category == category) {\r
+                       device_id[cnt] = iter->second->id;\r
+                       cnt++;\r
+\r
+                       if (cnt >= device_sz) {\r
+                               //RI_ERR("INVALID NUMBER");\r
+                               break;\r
+                       }\r
+               }\r
+       }\r
+\r
+       if (cnt == 0) {\r
+               RI_ERR("no device according to category(%d)", category);\r
+               return RI_ERROR;\r
+       }\r
+\r
+       return RI_OK;\r
+}\r
+\r
+ri_device_common_attr_s* CResourceInfoDB::GetDeviceAttr(int device_id)\r
+{\r
+       auto it = m_device_attr_map_by_dev_id.find(device_id);\r
+\r
+       if (it == m_device_attr_map_by_dev_id.end()) {\r
+               RI_ERR("cannot find device_attr according to device_id(%d)", device_id);\r
+               return NULL;\r
+       }\r
+\r
+       return it->second;\r
+}\r
+// LCOV_EXCL_STOP\r
+\r
+bool CResourceInfoDB::GetDeviceNodePathNames(int category, char** device_node)\r
+{\r
+       for (std::map<int, ri_device_common_attr_s*>::iterator iter = m_device_attr_map_by_dev_id.begin(); iter != m_device_attr_map_by_dev_id.end(); iter++) {\r
+               if (iter->second->category == (unsigned int)category) {\r
+                       *device_node = strndup(iter->second->path, strlen(iter->second->path));\r
+                       return true;\r
+               }\r
+       }\r
+       RI_INFO("cat[%d] has no device", category);\r
+       return false;\r
+}\r
+\r
+bool CResourceInfoDB::GetClassOptions(const char *codec, ri_video_decoder_class_e class_value, bool* is_uhd_decoder, int* class_cat, bool* is_class_uhd, char** class_device_node)\r
+{\r
+       int low_class = 99999;\r
+       int high_class = 0; //uhd\r
+       bool is_exist = false;\r
+       char *tmp_device_node = NULL;\r
+       std::string codec_name;\r
+\r
+       for (auto &iter : m_resource_categories) {\r
+               ri_resource_category_s* category = iter.second;\r
+\r
+               if (!category)\r
+                       continue;\r
+               if ((category->class_id == 0) || (category->class_id >= 100))\r
+                       continue;\r
+\r
+               codec_name.assign(category->codec);\r
+               if (!codec_name.compare(codec) && GetDeviceNodePathNames(category->id, &tmp_device_node)) {\r
+                       if (class_value == RI_VIDEO_CATEGORY_CLASS_LOW) {\r
+                               if (low_class > category->class_id) {\r
+                                       low_class = category->class_id;\r
+                                       *is_class_uhd = category->is_uhd_device;\r
+                                       *class_cat = category->id;\r
+\r
+                                       if (*class_device_node)\r
+                                               free(*class_device_node);\r
+                                       *class_device_node = strndup(tmp_device_node, strlen(tmp_device_node));\r
+                               }\r
+                       } else if (class_value == RI_VIDEO_CATEGORY_CLASS_HIGH) {\r
+                               if (high_class < category->class_id) {\r
+                                       high_class = category->class_id;\r
+                                       *is_class_uhd = category->is_uhd_device;\r
+                                       *class_cat = category->id;\r
+\r
+                                       if (*class_device_node)\r
+                                               free(*class_device_node);\r
+                                       *class_device_node = strndup(tmp_device_node, strlen(tmp_device_node));\r
+                               }\r
+                       }\r
+                       RI_INFO("found it!! CODEC[%s] category[%d/%s] %s", category->codec, category->id, category->name, (*is_uhd_decoder == true) ? "UHDdecoder" : "");\r
+                       is_exist = true;\r
+               }\r
+\r
+               if (tmp_device_node) {\r
+                       free(tmp_device_node);\r
+                       tmp_device_node = NULL;\r
+               }\r
+       }\r
+\r
+       return is_exist;\r
+}\r
+ri_return_code_e CResourceInfoDB::GetCategoryOption(const char *codec, ri_video_decoder_class_e class_value, int *category_option, bool *is_uhd_decoder, char **device_node)\r
+{\r
+       bool is_class_uhd = false;\r
+       int class_cat = 0;\r
+       char *class_device_node = NULL;\r
+\r
+       *category_option = RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;\r
+       *is_uhd_decoder = false;\r
+       *device_node = NULL;\r
+\r
+       if (!GetClassOptions(codec, class_value, is_uhd_decoder, &class_cat, &is_class_uhd, &class_device_node)) {\r
+               RI_ERR("No resource category corresponding with requested info (codec:%s)", codec);\r
+               return RI_ERROR;\r
+       }\r
+\r
+       if (!class_device_node)\r
+               return RI_ERROR;\r
+\r
+       *category_option = class_cat;\r
+       *is_uhd_decoder = is_class_uhd;\r
+       *device_node = strndup(class_device_node, strlen(class_device_node));\r
+\r
+       RI_INFO("%s class request. ret option[%d]. is_uhd[%s]. node[%s]", (class_value ? "High" : "Low"),*category_option, (*is_uhd_decoder == true) ?"true":"false", *device_node);\r
+\r
+       free(class_device_node);\r
+       return RI_OK;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+unsigned int CResourceInfoDB::GetDeviceID(char *node)\r
+{\r
+       unsigned int id = 0;\r
+       std::string path;\r
+\r
+       for (std::map<int, ri_device_common_attr_s*>::iterator iter = m_device_attr_map_by_dev_id.begin(); iter != m_device_attr_map_by_dev_id.end(); iter++) {\r
+               path.assign(iter->second->path);\r
+               if (!path.compare(node))\r
+                       id = (int)(iter->second->id_unique);\r
+       }\r
+\r
+       RI_INFO("device node[%s] - device id[%d]", node, id);\r
+       return id;\r
+}\r
+// LCOV_EXCL_STOP\r
+\r
+ri_return_code_e CResourceInfoDB::GetDefaultDeviceNodePath(ri_rsc_category_e category, char** node)\r
+{\r
+       for (std::map<int, ri_device_common_attr_s*>::iterator iter = m_device_attr_map_by_dev_id.begin(); iter != m_device_attr_map_by_dev_id.end(); iter++) {\r
+               if (iter->second->category == (unsigned int)category) {\r
+                       *node = strndup(iter->second->path, strlen(iter->second->path));\r
+                       RI_INFO("category[%d] node[%s]", (unsigned int)category, *node);\r
+\r
+                       return RI_OK;\r
+               }\r
+       }\r
+\r
+       return RI_ERROR;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+\r
+void CResourceInfoDB::PrintDeviceUniqueInfo(void)\r
+{\r
+       for (std::map<int, ri_device_unique_attr_s*>::iterator iter = m_device_unique_attr.begin(); iter != m_device_unique_attr.end(); iter++) {\r
+               RI_DBG("DevID[%d:%s]/CatID[%d]", iter->first, iter->second->name, iter->second->category);\r
+       }\r
+}\r
+// LCOV_EXCL_STOP\r
+\r
+// LCOV_EXCL_START\r
+bool CResourceInfoDB::IsVideoDecoderCategory(ri_rsc_category_e vdec)\r
+{\r
+       if (vdec > RI_CATEGORY_VIDEO_DECODER_OPTION && vdec < RI_VIDEO_CATEGORY_MAX)\r
+               return true;\r
+       if (vdec == RI_CATEGORY_VIDEO_DECODER || vdec == RI_CATEGORY_VIDEO_DECODER_SUB)\r
+               return true;\r
+\r
+       return false;\r
+}\r
+\r
+bool CResourceInfoDB::IsAudioDecoderCategory(ri_rsc_category_e adec)\r
+{\r
+       if (adec > RI_CATEGORY_AUDIO_DECODER_OPTION && adec < RI_AUDIO_CATEGORY_MAX)\r
+               return true;\r
+       if (adec == RI_CATEGORY_AUDIO_DECODER || adec == RI_CATEGORY_AUDIO_DECODER_SUB)\r
+               return true;\r
+\r
+       return false;\r
+}\r
+\r
+bool CResourceInfoDB::IsAudioDecoderCategoryForMixing(ri_rsc_category_e adec)\r
+{\r
+       return (adec > RI_CATEGORY_AUDIO_DECODER_OPTION && adec < RI_AUDIO_CATEGORY_MAX) ? true:false;\r
+}\r
+\r
+bool CResourceInfoDB::IsMJpegDecoderCategory(ri_rsc_category_e category)\r
+{\r
+       if (category > RI_CATEGORY_MJPEG_DECODER_OPTION && category <= RI_CATEGORY_MJPEG_DECODER_8K)\r
+               return true;\r
+       if (category == RI_CATEGORY_MJPEG_DECODER)\r
+               return true;\r
+\r
+       return false;\r
+}\r
+\r
+int CResourceInfoDB::GetAIDecoderCategoryId(ri_rsc_category_e vdec)\r
+{\r
+       // This feature is deprecated since Tizen6.5 because there is no chipset requiring upscaling\r
+       RI_INFO("vdec : (%d)", vdec);\r
+       return vdec;\r
+}\r
+// LCOV_EXCL_STOP\r
+\r
+CVideoCodec* CResourceInfoDB::FindVideoCodec(std::string name)\r
+{\r
+       auto it = m_video_codecs.find(name);\r
+       return (it == m_video_codecs.end()) ? NULL : it->second;\r
+}\r
+\r
+CVideoCodecNDecoding *CResourceInfoDB::FindNDecodingVideoCodec(std::string codec_name)\r
+{\r
+       auto it = m_n_decoding_codecs.find(codec_name);\r
+       return (it == m_n_decoding_codecs.end()) ? NULL : it->second;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+bool CResourceInfoDB::IsVirtualDeviceIdScaler(int device_id)\r
+{\r
+       if (device_id < RI_VIRTUAL_ID_SCALER)\r
+               return false;\r
+\r
+       int id_max = (RI_VIRTUAL_ID_SCALER + m_n_scalers - 1);\r
+\r
+       return (device_id <= id_max);\r
+}\r
+\r
+bool CResourceInfoDB::IsScaler(int category)\r
+{\r
+       bool result = false;\r
+\r
+       switch(category) {\r
+               case RI_CATEGORY_SCALER:\r
+               case RI_CATEGORY_SCALER_SUB:\r
+               case RI_CATEGORY_SCALER_SUB2:\r
+               case RI_CATEGORY_SCALER_SUB3:\r
+               case RI_CATEGORY_SCALER_BG:\r
+                       result = true;\r
+                       break;\r
+               default:\r
+                       break;\r
+       }\r
+\r
+       return result;\r
+}\r
+// LCOV_EXCL_STOP\r
+\r
+CCategoryIdBuilder* CResourceInfoDB::GetVideoDecCategoryBuilder(std::string codec_name)\r
+{\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_MPEG1)))\r
+               return new CategoryIdBuilderMPEG1();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_MPEG2)))\r
+               return new CategoryIdBuilderMPEG2();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_MPEG4)))\r
+               return new CategoryIdBuilderMPEG4();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_H263)))\r
+               return new CCategoryIdBuilderH263();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_H264)))\r
+               return new CategoryIdBuilderH264();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_HEVC)))\r
+               return new CategoryIdBuilderHEVC();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_VP8)))\r
+               return new CategoryIdBuilderVP8();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_VP9)))\r
+               return new CategoryIdBuilderVP9();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_RV)))\r
+               return new CategoryIdBuilderRV();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_WMV)))\r
+               return new CategoryIdBuilderWMV();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_AVS)))\r
+               return new CategoryIdBuilderAVS();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_AVS_PLUS)))\r
+               return new CategoryIdBuilderAVSPlus();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_H264_MVC)))\r
+               return new CategoryIdBuilderH264MVC();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_HEVC_VR360)))\r
+               return new CategoryIdBuilderHEVCvr360();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_H264_VR360)))\r
+               return new CategoryIdBuilderH264vr360();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_VP9_VR360)))\r
+               return new CategoryIdBuilderVP9vr360();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_HEVC_SHVC)))\r
+               return new CategoryIdBuilderSHVC();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_AV1)))\r
+               return new CategoryIdBuilderAV1();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_AV1_VR360)))\r
+               return new CategoryIdBuilderAV1vr360();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_AVS2)))\r
+               return new CategoryIdBuilderAVS2();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_VVC)))\r
+               return new CategoryIdBuilderVVC();\r
+\r
+       if (!codec_name.compare(std::string(RI_CODEC_NAME_AVS3)))\r
+               return new CategoryIdBuilderAVS3();\r
+\r
+       RI_ERR("unexpected codec (%s)", codec_name.c_str());\r
+       return nullptr;\r
+}\r
+\r
+struct video_2K_portrait_rsz_support{\r
+       const char *codec_name;\r
+       bool support;\r
+};\r
+\r
+bool CResourceInfoDB::IsCodecSupporting2KPortrait(std::string codec_name)\r
+{\r
+       video_2K_portrait_rsz_support video_codecs[] = {\r
+               {RI_CODEC_NAME_MPEG1, false},\r
+               {RI_CODEC_NAME_MPEG2, false},\r
+               {RI_CODEC_NAME_MPEG4, false},\r
+               {RI_CODEC_NAME_H263, false},\r
+               {RI_CODEC_NAME_H264, true},\r
+               {RI_CODEC_NAME_HEVC, true},\r
+               {RI_CODEC_NAME_VP8, false},\r
+               {RI_CODEC_NAME_VP9, true},\r
+               {RI_CODEC_NAME_RV, false},\r
+               {RI_CODEC_NAME_WMV, false},\r
+               {RI_CODEC_NAME_AVS, false},\r
+               {RI_CODEC_NAME_AVS_PLUS, false},\r
+               {RI_CODEC_NAME_H264_MVC, true},\r
+               {RI_CODEC_NAME_HEVC_VR360, true},\r
+               {RI_CODEC_NAME_H264_VR360, true},\r
+               {RI_CODEC_NAME_VP9_VR360, true},\r
+               {RI_CODEC_NAME_HEVC_SHVC, true},\r
+               {RI_CODEC_NAME_AV1, true},\r
+               {RI_CODEC_NAME_AV1_VR360, true},\r
+               {RI_CODEC_NAME_AVS2, true},\r
+               {RI_CODEC_NAME_AVS3, true},\r
+               {RI_CODEC_NAME_VVC, true}\r
+       };\r
+\r
+       for (unsigned int i = 0; i < ARRAY_SIZE(video_codecs); i++) {\r
+               if (!codec_name.compare(video_codecs[i].codec_name))\r
+                       return video_codecs[i].support;\r
+       }\r
+\r
+       RI_ERR("undefined video codec(%s)", codec_name.c_str());\r
+       return false;\r
+}\r
+\r
+bool CResourceInfoDB::Support2KPortraitResolution(std::string codec_name)\r
+{\r
+       CVideoCodec* codec = FindVideoCodec(codec_name);\r
+\r
+       return (!codec) ? false:codec->Support2KPortraitResolution();\r
+}\r
+\r
+void CResourceInfoDB::InitVideoDecCategories(void)\r
+{\r
+       const char *video_codecs[] = {\r
+               RI_CODEC_NAME_MPEG1,\r
+               RI_CODEC_NAME_MPEG2,\r
+               RI_CODEC_NAME_MPEG4,\r
+               RI_CODEC_NAME_H263,\r
+               RI_CODEC_NAME_H264,\r
+               RI_CODEC_NAME_HEVC,\r
+               RI_CODEC_NAME_VP8,\r
+               RI_CODEC_NAME_VP9,\r
+               RI_CODEC_NAME_RV,\r
+               RI_CODEC_NAME_WMV,\r
+               RI_CODEC_NAME_AVS,\r
+               RI_CODEC_NAME_AVS_PLUS,\r
+               RI_CODEC_NAME_H264_MVC,\r
+               RI_CODEC_NAME_HEVC_VR360,\r
+               RI_CODEC_NAME_H264_VR360,\r
+               RI_CODEC_NAME_VP9_VR360,\r
+               RI_CODEC_NAME_HEVC_SHVC,\r
+               RI_CODEC_NAME_AV1,\r
+               RI_CODEC_NAME_AV1_VR360,\r
+               RI_CODEC_NAME_AVS2,\r
+               RI_CODEC_NAME_AVS3,\r
+               RI_CODEC_NAME_VVC\r
+       };\r
+\r
+       std::string codec_name;\r
+       CVideoDecoderCategory* vdec_category;\r
+\r
+       for (unsigned int i = 0; i < ARRAY_SIZE(video_codecs); i++) {\r
+               codec_name.assign(video_codecs[i]);\r
+               vdec_category = new CVideoDecoderCategory(codec_name, GetVideoDecCategoryBuilder(codec_name));\r
+               vdec_category->CreateCategoryIds();\r
+               m_video_dec_categories.insert(std::pair<std::string, CVideoDecoderCategory*>(codec_name, vdec_category));\r
+       }\r
+\r
+}\r
+\r
+int CResourceInfoDB::GetVideoDecCategoryId(std::string codec_name, int rsz_id, int framerate, int color_depth)\r
+{\r
+       auto it = m_video_dec_categories.find(codec_name);\r
+\r
+       //RI_INFO("size(%d) - codec name (%s)/rsz_id(%d)/framerate(%d)/color_depth(%d)", m_video_dec_categories.size(), codec_name.c_str(), rsz_id, framerate, color_depth);\r
+\r
+       if (it == m_video_dec_categories.end()) {\r
+               RI_ERR("codec not found (%s)", codec_name.c_str());\r
+               return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;\r
+       }\r
+\r
+       return it->second->FindVideoCategoryId(rsz_id, framerate, color_depth);\r
+}\r
+\r
+void CResourceInfoDB::SetImageMinMaxResolution(std::string codec, int w_min, int h_min, int w_max, int h_max)\r
+{\r
+       CImageCodec *img = NULL;\r
+       auto it = m_image_codecs.find(codec);\r
+\r
+       if (it == m_image_codecs.end()) {\r
+               img = new CImageCodec(codec);\r
+               m_image_codecs.insert(std::pair<std::string, CImageCodec*>(codec, img));\r
+       } else {\r
+               img = it->second;\r
+       }\r
+\r
+       img->SetMaxResolution(w_max, h_max);\r
+       img->SetMinResolution(w_min, h_min);\r
+}\r
+\r
+void CResourceInfoDB::GetImageMinMaxResolution(std::string codec, int *w_min, int *h_min, int *w_max, int *h_max)\r
+{\r
+       auto it = m_image_codecs.find(codec);\r
+       if (it == m_image_codecs.end()) {\r
+               RI_ERR("not supported codec(%s)", codec.c_str());\r
+               *w_min = 0;\r
+               *h_min = 0;\r
+               *w_max = 0;\r
+               *h_max = 0;\r
+               return;\r
+       }\r
+\r
+       CImageCodec *img = it->second;\r
+       img->GetMaxResolution(w_max, h_max);\r
+       img->GetMinResolution(w_min, h_min);\r
+}\r
+\r
+// LCOV_EXCL_START\r
+bool CResourceInfoDB::IsSupportOverlay(const int device_id)\r
+{\r
+       auto it = m_device_unique_attr.find(device_id);\r
+       return (it == m_device_unique_attr.end()) ? false : it->second->support_overlay;\r
+}\r
+\r
+int CResourceInfoDB::GetMaxResolution(const int device_id)\r
+{\r
+       auto it = m_device_unique_attr.find(device_id);\r
+       return (it == m_device_unique_attr.end()) ? 0 : it->second->max_rez;\r
+}\r
+\r
+int CResourceInfoDB::GetMaxSamplingFormat(const int device_id)\r
+{\r
+       auto it = m_device_unique_attr.find(device_id);\r
+       return (it == m_device_unique_attr.end()) ? 0 : it->second->max_sampling_format;\r
+}\r
+\r
+int CResourceInfoDB::ToNDecodingCategory(int category)\r
+{\r
+       if (category == RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P)\r
+               return RI_CATEGORY_VIDEO_DECODER_H264_FHD_N_8BIT_30P;\r
+\r
+       return category;\r
+}\r
+\r
+int CResourceInfoDB::Set2KSize(std::string codec_name, int w, int h, int wp, int hp)\r
+{\r
+       CVideoCodec* codec = FindVideoCodec(codec_name);\r
+       if (!codec) {\r
+               RI_ERR("codec(%s) not found", codec_name.c_str());\r
+               return -1;\r
+       }\r
+\r
+       codec->SetResolutionSize(RI_RESOLUTION_FHD, w, h, wp, hp);\r
+       return 0;\r
+}\r
+\r
+int CResourceInfoDB::Set4KSize(std::string codec_name, int w, int h, int wp, int hp)\r
+{\r
+       CVideoCodec* codec = FindVideoCodec(codec_name);\r
+       if (!codec) {\r
+               RI_ERR("codec(%s) not found", codec_name.c_str());\r
+               return -1;\r
+       }\r
+\r
+       codec->SetResolutionSize(RI_RESOLUTION_4K_UHD, w, h, wp, hp);\r
+       return 0;\r
+}\r
+\r
+int CResourceInfoDB::Set8KSize(std::string codec_name, int w, int h, int wp, int hp)\r
+{\r
+       CVideoCodec* codec = FindVideoCodec(codec_name);\r
+       if (!codec) {\r
+               RI_ERR("codec(%s) not found", codec_name.c_str());\r
+               return -1;\r
+       }\r
+\r
+       codec->SetResolutionSize(RI_RESOLUTION_8K_UHD, w, h, wp, hp);\r
+       return 0;\r
+}\r
+// LCOV_EXCL_STOP\r
+\r
+void CResourceInfoDB::AddVideoDecoder(int id, std::string codec_name, int rsz, int framerate)\r
+{\r
+       const auto &it = m_video_decoders.find(id);\r
+       if (it != m_video_decoders.end()) {\r
+               it->second->InsertVideoCodec(codec_name, rsz, framerate);\r
+               return;\r
+       }\r
+\r
+       CVideoDecoder *vdec = new CVideoDecoder(id);\r
+       vdec->InsertVideoCodec(codec_name, rsz, framerate);\r
+       m_video_decoders.insert(std::pair<int, CVideoDecoder *>(id, vdec));\r
+}\r
+\r
+// LCOV_EXCL_START\r
+int CResourceInfoDB::GetVideoDecoderList(ri_resource_list_h *list_out)\r
+{\r
+       if (!list_out)\r
+               return -1;\r
+\r
+       ri_resource_list* vdec_list = (ri_resource_list*) calloc(1, sizeof(ri_resource_list));\r
+       assert(vdec_list);\r
+\r
+       for (const auto &it_vdec : m_video_decoders) {\r
+               ri_video_decoder* vdec = (ri_video_decoder*) calloc(1, sizeof(ri_video_decoder));\r
+               assert(vdec);\r
+               vdec->id = it_vdec.second->GetId();\r
+               RI_INFO("vdec->id : %d", vdec->id);\r
+\r
+               std::map<std::string, CVideoCodec*> codecs = it_vdec.second->GetSupportedCodecs();\r
+\r
+               for (const auto &it_codec : codecs) {\r
+                       ri_vcodec* vcodec = (ri_vcodec*) calloc(1, sizeof(ri_vcodec));\r
+                       assert(vcodec);\r
+                       vcodec->codec_name = strndup(it_codec.second->GetName().c_str(), it_codec.second->GetName().length());\r
+                       vcodec->rsz_id = it_codec.second->GetMaxResolution();\r
+                       vcodec->framerate = it_codec.second->GetMaxFrameRate();\r
+                       RI_INFO("vcodec name : %s, rsz_id : %d, framerate : %d", vcodec->codec_name, vcodec->rsz_id, vcodec->framerate);\r
+                       vdec->codec_list = g_list_append(vdec->codec_list, vcodec);\r
+               }\r
+               vdec->n_codecs = g_list_length(vdec->codec_list);\r
+               RI_INFO("vdec->n_codecs : %d", vdec->n_codecs);\r
+               vdec->iter = vdec->codec_list;\r
+\r
+               vdec_list->rsc_list = g_list_append(vdec_list->rsc_list, vdec);\r
+       }\r
+\r
+       vdec_list->n_rsc = g_list_length(vdec_list->rsc_list);\r
+       vdec_list->iter = vdec_list->rsc_list;\r
+       *list_out = vdec_list;\r
+\r
+       return 0;\r
+}\r
+\r
+std::string CResourceInfoDB::FindCategoryVideoCodecName(int category_id)\r
+{\r
+       std::string codec_name("");\r
+\r
+       auto it = m_resource_categories.find(category_id);\r
+       if (it == m_resource_categories.end()) {\r
+               RI_ERR("category not found(%d)", category_id);\r
+               return codec_name;\r
+       }\r
+\r
+       ri_resource_category_s* cat = it->second;\r
+       codec_name.assign(cat->codec);\r
+\r
+       RI_INFO("category codec name (%d:%s)", category_id, codec_name.c_str());\r
+       return codec_name;\r
+}\r
+// LCOV_EXCL_END\r
+\r
+int CResourceInfoDB::GetNumOfDeviceBelongsTo(int category_id)\r
+{\r
+       auto it = m_resource_categories.find(category_id);\r
+       if (it == m_resource_categories.end()) {\r
+               RI_ERR("category not found(%d)", category_id);\r
+               return 0;\r
+       }\r
+\r
+       ri_resource_category_s* category = it->second;\r
+       RI_INFO("number of devices belongs to (%d) : (%d)", category_id, category->num_of_dev);\r
+       return category->num_of_dev;\r
+}\r
+\r
+bool CResourceInfoDB::IsSupportedCategory(int category)\r
+{\r
+       auto it = m_resource_categories.find(category);\r
+       return (it != m_resource_categories.end());\r
+}\r
+\r
+void CResourceInfoDB::AddVideoCapability(const std::string codec, VideoCapability *capability)\r
+{\r
+       if (!capability) {\r
+               RI_ERR("invalid capability");\r
+               return;\r
+       }\r
+\r
+       RI_INFO("(%s:%s:%d:%d:%d)", codec.c_str(), capability->GetDeviceProperty().c_str(), capability->GetWidth(), capability->GetHeight(), capability->GetFPS());\r
+\r
+       auto it = video_capabilities_.find(codec);\r
+       if (it == video_capabilities_.end()) {\r
+               std::vector<VideoCapability*> capabilities;\r
+               capabilities.push_back(capability);\r
+               video_capabilities_[codec] = capabilities;\r
+               return;\r
+       }\r
+\r
+       it->second.push_back(capability);\r
+}\r
+\r
+bool CResourceInfoDB::FindVideoCapability(const std::string codec, std::vector<VideoCapability*> &capabilities)\r
+{\r
+       auto it = video_capabilities_.find(codec);\r
+       if (it == video_capabilities_.end()) {\r
+               RI_INFO("not found (%s)", codec.c_str());\r
+               return false;\r
+       }\r
+\r
+       for (auto itc : it->second)\r
+               capabilities.push_back(new VideoCapability(*itc));\r
+\r
+       RI_INFO("found (%s:%zu)", codec.c_str(), capabilities.size());\r
+       return true;\r
+}\r
diff --git a/src/CVideoCodec.cpp b/src/CVideoCodec.cpp
new file mode 100755 (executable)
index 0000000..2d6013c
--- /dev/null
@@ -0,0 +1,118 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-debug.h>\r
+#include <CVideoCodec.h>\r
+\r
+CVideoCodec::CVideoCodec(const std::string name, const unsigned int resolution, const int fps, const bool support_2k_portrait):\\r
+       name_(name), max_resolution_(resolution), max_fps_(fps), support_2k_portrait_(support_2k_portrait), vr360_codec_(false)\r
+{\r
+       InitResolutions();\r
+       auto it = vr360_codecs_.find(name);\r
+       if (it != vr360_codecs_.end())\r
+               vr360_codec_ = true;\r
+}\r
+\r
+void CVideoCodec::InitResolutions(void)\r
+{\r
+       unsigned int default_resolutions[] = {\r
+               RI_RESOLUTION_qHD,\r
+               RI_RESOLUTION_HD,\r
+               RI_RESOLUTION_FHD,\r
+               RI_RESOLUTION_4K_UHD,\r
+               RI_RESOLUTION_8K_UHD\r
+       };\r
+\r
+       for (unsigned int i = 0; i < ARRAY_SIZE(default_resolutions); i++)\r
+               resolutions_.insert(std::pair<unsigned int, std::shared_ptr<CVideoResolution>>(default_resolutions[i], std::make_shared<CVideoResolution>(default_resolutions[i])));\r
+}\r
+\r
+// LCOV_EXCL_START\r
+void CVideoCodec::CreateExtraResolution(const unsigned int resolution)\r
+{\r
+       auto it = resolutions_.find(resolution);\r
+       if (it != resolutions_.end())\r
+               return;\r
+\r
+       RI_INFO("create resolution (%u)", resolution);\r
+       resolutions_.insert(std::pair<unsigned int, std::shared_ptr<CVideoResolution>>(resolution, std::make_shared<CVideoResolution>(resolution)));\r
+}\r
+\r
+void CVideoCodec::SetResolutionSize(const unsigned int resolution, const int w, const int h, const int wp, const int hp)\r
+{\r
+       auto it = resolutions_.find(resolution);\r
+       if (it == resolutions_.end()) {\r
+               RI_ERR("resolution (%u) not found", resolution);\r
+               return;\r
+       }\r
+\r
+       it->second->SetSize(w, h, wp, hp);\r
+       RI_INFO("codec(%s:%u) - %s", name_.c_str(), resolution, it->second->GetSizeString().c_str());\r
+}\r
+// LCOV_EXCL_END\r
+\r
+ri_resolution CVideoCodec::GetResolutionID(const int w, const int h) const\r
+{\r
+       ri_resolution resolutions[] = {\r
+               RI_RESOLUTION_qHD,\r
+               RI_RESOLUTION_HD,\r
+               RI_RESOLUTION_FHD,\r
+               RI_RESOLUTION_QuadHD,\r
+               RI_RESOLUTION_4K_UHD,\r
+               RI_RESOLUTION_DQHD,\r
+               RI_RESOLUTION_5K,\r
+               RI_RESOLUTION_8K_UHD\r
+       };\r
+\r
+       for (unsigned int i = 0; i < ARRAY_SIZE(resolutions); i++) {\r
+               std::shared_ptr<CVideoResolution> resolution = FindResolution(resolutions[i]);\r
+               if (resolution == nullptr)\r
+                       continue;\r
+\r
+               if (vr360_codec_) {\r
+                       if (resolution->SupportedSizeVR360(w, h))\r
+                               return resolutions[i];\r
+               } else {\r
+                       if (resolution->SupportedSize(w, h))\r
+                               return resolutions[i];\r
+               }\r
+       }\r
+\r
+       RI_ERR("unexpected size (%s : %d * %d)", name_.c_str(), w, h);\r
+       return RI_RESOLUTION_UNDEFINED;\r
+}\r
+\r
+std::shared_ptr<CVideoResolution> CVideoCodec::FindResolution(const unsigned int resolution) const\r
+{\r
+       auto it = resolutions_.find(resolution);\r
+       if (it == resolutions_.end()) {\r
+               RI_ERR("resolution (%u) not found", resolution);\r
+               return nullptr;\r
+       }\r
+\r
+       return it->second;\r
+}\r
+\r
+bool CVideoCodec::IsSizeNotSupportedByFHDDecoder(const int resolution, const int w, const int h) const\r
+{\r
+       auto it = resolutions_.find(resolution);\r
+       if (it == resolutions_.end()) {\r
+               RI_ERR("resolution (%u) not found", resolution);\r
+               return false;\r
+       }\r
+\r
+       return it->second->SupportedSizeByFHDDecoder(w, h) ? false:true;\r
+}\r
diff --git a/src/CVideoDecoder.cpp b/src/CVideoDecoder.cpp
new file mode 100755 (executable)
index 0000000..204dafe
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <CVideoCodec.h>\r
+#include <CVideoDecoder.h>\r
+\r
+void CVideoDecoder::InsertVideoCodec(std::string name, int rsz, int framerate)\r
+{\r
+       const auto &it = m_supported_codecs.find(name);\r
+\r
+       if (it == m_supported_codecs.end()) {\r
+               m_supported_codecs.insert(std::pair<std::string, CVideoCodec*>(name, new CVideoCodec(name, rsz, framerate, false)));\r
+               return;\r
+       }\r
+\r
+       CVideoCodec *codec = it->second;\r
+       if (rsz > codec->GetMaxResolution()) {\r
+               codec->SetMaxResolution(rsz);\r
+               codec->SetMaxFrameRate(framerate);\r
+       } else if ((rsz == codec->GetMaxResolution()) && (framerate > codec->GetMaxFrameRate())) {\r
+               codec->SetMaxFrameRate(framerate);\r
+       }\r
+}\r
diff --git a/src/CVideoEncoder.cpp b/src/CVideoEncoder.cpp
new file mode 100755 (executable)
index 0000000..8e19ebc
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ri-debug.h>
+#include <CVideoEncoder.h>
+
+CVideoEncoder& CVideoEncoder::GetInstance() {
+       static CVideoEncoder instance_;
+       return instance_;
+}
+
+void CVideoEncoder::SetMaxResolution(const int w, const int h, const int fps)
+{
+       if (w < 0 || h < 0 || fps < 0) {
+               RI_ERR("invalid param (%d * %d * %d)", w, h, fps);
+               return;
+       }
+
+       max_w_ = w;
+       max_h_ = h;
+       max_fps_ = fps;
+}
+
+void CVideoEncoder::GetMaxResolution(const bool multi, int *w, int *h, int *fps) const
+{
+       if (!w || !h || !fps) {
+               RI_ERR("invalid param");
+               return;
+       }
+
+       if (multi) {
+               GetMaxResolutionMultiEncoding(w, h, fps);
+               return;
+       }
+
+       *w = max_w_;
+       *h = max_h_;
+       *fps = max_fps_;
+}
+
+void CVideoEncoder::SetMaxResolutionMultiEncoding(const int w, const int h, const int fps)
+{
+       if (w < 0 || h < 0 || fps < 0) {
+               RI_ERR("invalid param (%d * %d * %d)", w, h, fps);
+               return;
+       }
+
+       max_w_multi_ = w;
+       max_h_multi_ = h;
+       max_fps_multi_ = fps;
+}
+
+void CVideoEncoder::GetMaxResolutionMultiEncoding(int *w, int *h, int *fps) const
+{
+       if (!w || !h || !fps) {
+               RI_ERR("invalid param");
+               return;
+       }
+
+       *w = max_w_multi_;
+       *h = max_h_multi_;
+       *fps = max_fps_multi_;
+}
+
+void CVideoEncoder::SetMarginMultiEncoding(const int margin)
+{
+       if (margin < 0) {
+               RI_ERR("invalid param");
+               return;
+       }
+       margin_ = margin;
+}
+
+unsigned long long CVideoEncoder::GetMaxBandWidthSingleEncoding(void) const
+{
+       return (unsigned long long) max_w_ * max_h_ * max_fps_;
+}
+
+unsigned long long CVideoEncoder::GetMaxBandWidthMultiEncoding(void) const
+{
+       return (unsigned long long) max_w_ * max_h_ * max_fps_ * margin_ / 100;
+}
+
+unsigned long long CVideoEncoder::GetMaxBandWidthMultiEncodingSingle(void) const
+{
+       return (unsigned long long) max_w_multi_ * max_h_multi_ * max_fps_multi_;
+}
diff --git a/src/CVideoResolution.cpp b/src/CVideoResolution.cpp
new file mode 100755 (executable)
index 0000000..ca819c9
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <iostream>
+#include <sstream>
+#include <ri-debug.h>
+#include <ri-video-decoder-category-type.h>
+#include <CModelInfo.h>
+#include <CVideoResolution.h>
+
+typedef struct {
+       int w;
+       int h;
+       int wp;
+       int hp;
+} resolution_size_s;
+
+static resolution_size_s default_size[] = {
+       {960, 540, 0, 0},         /** RI_RESOLUTION_qHD, dedicated to n-decoding, not support the portrait resolution */
+       {1280, 720, 0, 0},        /** RI_RESOLUTION_HD, dedicated to n-decoding, not support the portrait resolution */
+       {1920, 1088, 1088, 1920}, /** RI_RESOLUTION_FHD */
+       {2560, 1440, 1440, 2560}, /** RI_RESOLUTION_QuadHD */
+       {5120, 1440, 1440, 5120}, /** RI_RESOLUTION_DQHD */
+       {4096, 2160, 2160, 4096}, /** RI_RESOLUTION_4K_UHD */
+       {5120, 2880, 2880, 5120}, /** RI_RESOLUTION_5K */
+       {7680, 4320, 4320, 7680}  /** RI_RESOLUTION_8K_UHD */
+};
+
+CVideoResolution::CVideoResolution(const unsigned int resolution):resolution_(resolution), w_(0), h_(0), wp_(0), hp_(0)
+{
+       if (!ValidResolution(resolution))
+               return;
+
+       w_ = default_size[resolution].w;
+       h_ = default_size[resolution].h;
+       wp_ = default_size[resolution].wp;
+       hp_ = default_size[resolution].hp;
+}
+
+void CVideoResolution::SetSize(const int w, const int h, const int wp, const int hp)
+{
+       if (w > 0) w_ = w;
+       if (h > 0) h_ = h;
+       if (wp > 0) wp_ = wp;
+       if (hp > 0) hp_ = hp;
+}
+
+bool CVideoResolution::SupportedSize(const int w, const int h) const
+{
+       return (LandScapeSize(w, h)) ? (w <= w_ && h <= h_) : (w <= wp_ && h <= hp_);
+}
+
+bool CVideoResolution::SupportedSizeVR360(const int w, const int h) const
+{
+       return (w <= w_ && h <= h_);
+}
+
+bool CVideoResolution::SupportedSizeByFHDDecoder(const int w, const int h) const
+{
+       int dw = 0, dh = 0, dwp = 0, dhp = 0;
+       GetDefaultSize(RI_RESOLUTION_FHD, &dw, &dh, &dwp, &dhp);
+       if ((w_ == dw) && (h_ == dh) && (wp_ == dwp) && (hp_ == dhp))
+               return true;
+
+       return ((w <= dh && h <= dw) && (h > hp_)) ? false : true;
+}
+
+void CVideoResolution::GetDefaultSize(const unsigned int resolution, int *w, int *h, int *wp, int *hp)
+{
+       if (!w || !h || !wp || !hp)
+               return;
+       if (!ValidResolution(resolution))
+               return;
+
+       *w = default_size[resolution].w;
+       *h = default_size[resolution].h;
+       *wp = default_size[resolution].wp;
+       *hp = default_size[resolution].hp;
+}
+
+void CVideoResolution::GetResolutionSize(const unsigned int resolution, int *w, int *h)
+{
+       if (!w || !h)
+               return;
+
+       int dw = 0, dh = 0, dwp = 0, dhp = 0;
+       GetDefaultSize(resolution, &dw, &dh, &dwp, &dhp);
+
+       *w = dw;
+       *h = dh;
+}
+
+std::string CVideoResolution::GetSizeString(void) const
+{
+       std::ostringstream ss;
+       ss << "(" << w_ << "*" << h_ << ")(" << wp_ << "*" << hp_ << ")";
+       return ss.str();
+}
+
+bool CVideoResolution::ValidResolution(const unsigned int resolution)
+{
+       if (resolution > RI_RESOLUTION_8K_UHD) {
+               RI_ERR("invalid resolution (%u)", resolution);
+               return false;
+       }
+
+       return true;
+}
diff --git a/src/category_builder/CCategoryIdBuilder.cpp b/src/category_builder/CCategoryIdBuilder.cpp
new file mode 100644 (file)
index 0000000..6bb0a52
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <CCategoryIdBuilder.h>\r
+\r
+int CCategoryIdBuilder::MakeId(int rsz_id, int color_depth, int framerate)\r
+{\r
+       return ((color_depth << 18) | (rsz_id << 10) | framerate);\r
+}\r
+\r
+std::map<int, int> CCategoryIdBuilder::GetCategoryIds(void)\r
+{\r
+       return m_category_ids;\r
+}\r
diff --git a/src/category_builder/CVideoDecoderCategory.cpp b/src/category_builder/CVideoDecoderCategory.cpp
new file mode 100644 (file)
index 0000000..cb8e36e
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CVideoDecoderCategory.h>\r
+\r
+CVideoDecoderCategory::CVideoDecoderCategory(std::string codec_name, CCategoryIdBuilder* builder)\r
+{\r
+       m_codec_name = codec_name;\r
+       m_builder = builder;\r
+}\r
+\r
+void CVideoDecoderCategory::CreateCategoryIds(void)\r
+{\r
+       m_builder->BuildCategoryIds();\r
+       m_category_ids = m_builder->GetCategoryIds();\r
+\r
+       delete m_builder;\r
+}\r
+\r
+int CVideoDecoderCategory::FindVideoCategoryId(int rsz_id, int framerate, int color_depth)\r
+{\r
+       int id = CCategoryIdBuilder::MakeId(rsz_id, color_depth, framerate);\r
+\r
+       auto it = m_category_ids.find(id);\r
+\r
+       return (it == m_category_ids.end()) ? RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED : it->second;\r
+}\r
+\r
diff --git a/src/category_builder/CategoryIdBuilderAV1.cpp b/src/category_builder/CategoryIdBuilderAV1.cpp
new file mode 100644 (file)
index 0000000..3c71a30
--- /dev/null
@@ -0,0 +1,92 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderAV1.h>\r
+\r
+void CategoryIdBuilderAV1::BuildCategoryIds(void)\r
+{\r
+       // 8bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_5K_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_5K_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_8K_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_8K_8BIT_60P));\r
+\r
+       // 10bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_60P));\r
+\r
+       // 10bit 4:2:0\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_60P));\r
+\r
+       // 10bit 4:2:2\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderAV1vr360.cpp b/src/category_builder/CategoryIdBuilderAV1vr360.cpp
new file mode 100644 (file)
index 0000000..f0d5f02
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderAV1vr360.h>\r
+\r
+void CategoryIdBuilderAV1vr360::BuildCategoryIds(void)\r
+{\r
+       // 8bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_8BIT_60P));\r
+\r
+       // 10bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_60P));\r
+\r
+       // 10bit 4:2:0\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderAVS.cpp b/src/category_builder/CategoryIdBuilderAVS.cpp
new file mode 100644 (file)
index 0000000..4bee080
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderAVS.h>\r
+\r
+void CategoryIdBuilderAVS::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderAVS2.cpp b/src/category_builder/CategoryIdBuilderAVS2.cpp
new file mode 100644 (file)
index 0000000..23bf4ad
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderAVS2.h>\r
+\r
+void CategoryIdBuilderAVS2::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_10BIT_60P));\r
+}
\ No newline at end of file
diff --git a/src/category_builder/CategoryIdBuilderAVS3.cpp b/src/category_builder/CategoryIdBuilderAVS3.cpp
new file mode 100644 (file)
index 0000000..ac0137c
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ri-category-type.h>
+#include <CategoryIdBuilderAVS3.h>
+
+void CategoryIdBuilderAVS3::BuildCategoryIds(void)
+{
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_8K_8BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_8K_8BIT_60P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_8K_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_8K_10BIT_60P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS3_8K_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS3_8K_10BIT_60P));
+}
\ No newline at end of file
diff --git a/src/category_builder/CategoryIdBuilderAVSPlus.cpp b/src/category_builder/CategoryIdBuilderAVSPlus.cpp
new file mode 100644 (file)
index 0000000..d8039b7
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderAVSPlus.h>\r
+\r
+void CategoryIdBuilderAVSPlus::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderH263.cpp b/src/category_builder/CategoryIdBuilderH263.cpp
new file mode 100644 (file)
index 0000000..18da4d5
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderH263.h>\r
+\r
+void CCategoryIdBuilderH263::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderH264.cpp b/src/category_builder/CategoryIdBuilderH264.cpp
new file mode 100644 (file)
index 0000000..61cacae
--- /dev/null
@@ -0,0 +1,34 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderH264.h>\r
+\r
+void CategoryIdBuilderH264::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_qHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_HD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_HD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_HD_8BIT_30P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_QuadHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_QuadHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_QuadHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_H264_QuadHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderH264MVC.cpp b/src/category_builder/CategoryIdBuilderH264MVC.cpp
new file mode 100644 (file)
index 0000000..6a4308b
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderH264MVC.h>\r
+\r
+void CategoryIdBuilderH264MVC::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderH264vr360.cpp b/src/category_builder/CategoryIdBuilderH264vr360.cpp
new file mode 100644 (file)
index 0000000..1ccdcbc
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderH264vr360.h>\r
+\r
+void CategoryIdBuilderH264vr360::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_VR360_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_H264_VR360_FHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_H264_VR360_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_H264_VR360_UHD_8BIT_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderHEVC.cpp b/src/category_builder/CategoryIdBuilderHEVC.cpp
new file mode 100644 (file)
index 0000000..7ca9105
--- /dev/null
@@ -0,0 +1,90 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderHEVC.h>\r
+\r
+void CategoryIdBuilderHEVC::BuildCategoryIds(void)\r
+{\r
+       // 8bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_5K_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_5K_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_8K_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_8K_8BIT_60P));\r
+\r
+       // 10bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_60P));\r
+\r
+       // 10bit 4:2:0\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_420_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_420_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_60P));\r
+\r
+       // 10bit 4:2:2\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_422_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_422_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_422_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_DQHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_5K, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderHEVCvr360.cpp b/src/category_builder/CategoryIdBuilderHEVCvr360.cpp
new file mode 100644 (file)
index 0000000..547352d
--- /dev/null
@@ -0,0 +1,49 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include "CategoryIdBuilderHEVCvr360.h"\r
+\r
+void CategoryIdBuilderHEVCvr360::BuildCategoryIds(void)\r
+{\r
+       // 8bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_8BIT_60P));\r
+\r
+       // 10bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_60P));\r
+\r
+       // 10bit 4:2:0\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_420_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_420_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_420_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_420_60P));\r
+\r
+       // 10bit 4:2:2\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_422_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_422_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_422_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_422, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_422_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderMPEG1.cpp b/src/category_builder/CategoryIdBuilderMPEG1.cpp
new file mode 100644 (file)
index 0000000..29185f7
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderMPEG1.h>\r
+\r
+void CategoryIdBuilderMPEG1::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderMPEG2.cpp b/src/category_builder/CategoryIdBuilderMPEG2.cpp
new file mode 100644 (file)
index 0000000..867ed55
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderMPEG2.h>\r
+\r
+void CategoryIdBuilderMPEG2::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderMPEG4.cpp b/src/category_builder/CategoryIdBuilderMPEG4.cpp
new file mode 100644 (file)
index 0000000..d2c776c
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderMPEG4.h>\r
+\r
+void CategoryIdBuilderMPEG4::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderRV.cpp b/src/category_builder/CategoryIdBuilderRV.cpp
new file mode 100644 (file)
index 0000000..57db9d5
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+* Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderRV.h>\r
+\r
+void CategoryIdBuilderRV::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderSHVC.cpp b/src/category_builder/CategoryIdBuilderSHVC.cpp
new file mode 100644 (file)
index 0000000..8955907
--- /dev/null
@@ -0,0 +1,33 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderSHVC.h>\r
+\r
+void CategoryIdBuilderSHVC::BuildCategoryIds(void)\r
+{\r
+       // 8bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_8BIT_60P));\r
+\r
+       // 10bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_10BIT_60P));\r
+\r
+       // 10bit 4:2:0\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_10BIT_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderVP8.cpp b/src/category_builder/CategoryIdBuilderVP8.cpp
new file mode 100644 (file)
index 0000000..dadc475
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderVP8.h>\r
+\r
+void CategoryIdBuilderVP8::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_qHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP8_qHD_8BIT_30P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_120P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderVP9.cpp b/src/category_builder/CategoryIdBuilderVP9.cpp
new file mode 100644 (file)
index 0000000..facbeae
--- /dev/null
@@ -0,0 +1,51 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderVP9.h>\r
+\r
+void CategoryIdBuilderVP9::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_120P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_UHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_8K_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_8K_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_8K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_8K_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_8K_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_8K_10BIT_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderVP9vr360.cpp b/src/category_builder/CategoryIdBuilderVP9vr360.cpp
new file mode 100644 (file)
index 0000000..412789b
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderVP9vr360.h>\r
+\r
+void CategoryIdBuilderVP9vr360::BuildCategoryIds(void)\r
+{\r
+       // 8bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_8BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_8BIT_60P));\r
+\r
+       // 10bit\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_60P));\r
+\r
+       // 10bit 4:2:0\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_420_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_420_60P));\r
+\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_420_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_420_60P));\r
+}\r
diff --git a/src/category_builder/CategoryIdBuilderVVC.cpp b/src/category_builder/CategoryIdBuilderVVC.cpp
new file mode 100644 (file)
index 0000000..51a1575
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ri-category-type.h>
+#include <CategoryIdBuilderVVC.h>
+
+void CategoryIdBuilderVVC::BuildCategoryIds(void)
+{
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_60P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_4K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_120P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_8K_8BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_8K_8BIT_60P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_8K_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_8K_10BIT_60P));
+
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_VVC_8K_10BIT_30P));
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_8K_UHD, RI_COLOR_DEPTH_10BIT_420, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_VVC_8K_10BIT_60P));
+}
\ No newline at end of file
diff --git a/src/category_builder/CategoryIdBuilderWMV.cpp b/src/category_builder/CategoryIdBuilderWMV.cpp
new file mode 100644 (file)
index 0000000..929e7e6
--- /dev/null
@@ -0,0 +1,25 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <ri-category-type.h>\r
+#include <CategoryIdBuilderWMV.h>\r
+\r
+void CategoryIdBuilderWMV::BuildCategoryIds(void)\r
+{\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_30), RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_30P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_60), RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_60P));\r
+       m_category_ids.insert(std::pair<int, int>(MakeId(RI_RESOLUTION_FHD, RI_COLOR_DEPTH_8BIT, RI_FRAMERATE_120), RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_120P));\r
+}\r
diff --git a/src/parser/CCategory.cpp b/src/parser/CCategory.cpp
new file mode 100644 (file)
index 0000000..f8e01c2
--- /dev/null
@@ -0,0 +1,22 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <CCategory.h>\r
+\r
+CCategory::CCategory(std::string name, ri_rsc_category_e id, category_type_e type, std::string codec_name, ri_resolution rsz, int framerate, bool n_decoding)\r
+:m_name(name), m_id(id), m_type(type), m_codec_name(codec_name), m_rsz(rsz), m_framerate(framerate), m_n_decoding(n_decoding)\r
+{\r
+}\r
diff --git a/src/parser/CResourceTableProvider.cpp b/src/parser/CResourceTableProvider.cpp
new file mode 100644 (file)
index 0000000..0b2aaac
--- /dev/null
@@ -0,0 +1,37 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <assert.h>\r
+#include <stdlib.h>\r
+\r
+#include <system_info.h>\r
+\r
+#include <ri-debug.h>\r
+#include <CModelInfo.h>\r
+#include <CResourceTableProvider.h>\r
+\r
+CResourceTableProvider::CResourceTableProvider()\r
+{\r
+}\r
+\r
+CResourceTableProvider::~CResourceTableProvider()\r
+{\r
+}\r
+\r
+std::string CResourceTableProvider::GetResourceTablePath(void)\r
+{\r
+       return PATH_DEFAULT;\r
+}\r
diff --git a/src/parser/CResourceTableProviderDefault.cpp b/src/parser/CResourceTableProviderDefault.cpp
new file mode 100644 (file)
index 0000000..e5469f3
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ri-debug.h>
+#include <system_info.h>
+#include <CResourceTableProvider.h>
+#include <CResourceTableProviderDefault.h>
+
+CResourceTableProviderDefault::CResourceTableProviderDefault(const int table_index, const int product_type, const bool support_android):table_index_(table_index), product_type_(product_type), support_android_(support_android)
+{
+}
+
+std::string CResourceTableProviderDefault::FindResourceTablePath(const std::map<int, std::string> &table_paths, const int index) const
+{
+       auto it = table_paths.find(index);
+       if (it == table_paths.end()) {
+               RI_ERR("path not found (%d)", index);
+               return PATH_DEFAULT;
+       }
+       return it->second;
+}
+
+std::string CResourceTableProviderDefault::FindResourceTablePathAOT(const std::map<int, std::string> &table_paths, const int index) const
+{
+       auto it = table_paths.find(index);
+       if (it == table_paths.end()) {
+               RI_ERR("path not found (%d)", index);
+               return "";
+       }
+       return it->second;
+}
diff --git a/src/parser/CResourceTableProviderLicense.cpp b/src/parser/CResourceTableProviderLicense.cpp
new file mode 100644 (file)
index 0000000..21b3832
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ri-debug.h>
+#include <CResourceTableProviderLicense.h>
+
+std::string CResourceTableProviderLicense::GetResourceTablePath(void) const
+{
+       return LICENSE_PATH_DEFAULT;
+}
diff --git a/src/parser/element/CCategoryElement.cpp b/src/parser/element/CCategoryElement.cpp
new file mode 100644 (file)
index 0000000..0592a27
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <CCategoryElement.h>\r
+\r
+#include <CDeviceElement.h>\r
+#include <ri-debug.h>\r
+\r
+CategoryElement::CategoryElement(char *category_name, char *category_type, int class_id, bool is_uhd_device)\r
+{\r
+       m_element_name = category_name;\r
+       m_element_type = category_type;\r
+       m_class_id = class_id;\r
+       m_id = 0;\r
+       SetElementAttr(ELEMENT_CATEGORY);\r
+       m_is_uhd_decoder = is_uhd_device;\r
+}\r
+\r
+CategoryElement::~CategoryElement()\r
+{\r
+       ReleaseChildElement();\r
+       m_child_element.clear();\r
+}\r
+\r
+void CategoryElement::AddChildElement(Element* child_elem)\r
+{\r
+       m_child_element.insert(child_elem);\r
+}\r
+\r
+void CategoryElement::ReleaseChildElement(void)\r
+{\r
+       for (std::set<Element*>::iterator iter = m_child_element.begin(); iter != m_child_element.end(); iter++)\r
+       {\r
+               DeviceElement* pDevice = dynamic_cast<DeviceElement*>(*iter);\r
+               delete pDevice;\r
+       }\r
+}\r
+\r
+// LCOV_EXCL_START\r
+void CategoryElement::PrintInfo(void)\r
+{\r
+       RI_DBG("= CATEGORY INFO");\r
+       RI_DBG("= Category Name : %s", m_element_name);\r
+       RI_DBG("= Category Type : %s", m_element_type);\r
+       RI_DBG("= Category ID : %d", m_id);\r
+       RI_DBG("= Class : %d", m_class_id);\r
+\r
+       for (std::set<Element*>::iterator iter = m_child_element.begin(); iter != m_child_element.end(); iter++) {\r
+               DeviceElement* device = dynamic_cast<DeviceElement*>(*iter);\r
+               if (device == NULL)\r
+                       RI_DBG("= cannot get device element");\r
+               else\r
+                       device->PrintInfo();\r
+       }\r
+       RI_DBG("---------------------------------------------\n");\r
+}\r
+// LCOV_EXCL_STOP\r
diff --git a/src/parser/element/CDecodingElement.cpp b/src/parser/element/CDecodingElement.cpp
new file mode 100644 (file)
index 0000000..ffca69b
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ri-debug.h>
+#include <CDecodingElement.h>
+#include <CCapabilityElement.h>
+
+DecodingElement::~DecodingElement()
+{
+       ReleaseChildElement();
+}
+
+void DecodingElement::AddChildElement(Element* child_elem)
+{
+       m_child_element.insert(child_elem);
+}
+
+std::set<Element*>* DecodingElement::GetChildElement(void)
+{
+       return &m_child_element;
+}
+
+void DecodingElement::ReleaseChildElement(void)
+{
+       for (auto &it : m_child_element) {
+               CapabilityElement* capability = dynamic_cast<CapabilityElement *>(it);
+               delete capability;
+       }
+
+       m_child_element.clear();
+}
\ No newline at end of file
diff --git a/src/parser/element/CDeviceElement.cpp b/src/parser/element/CDeviceElement.cpp
new file mode 100644 (file)
index 0000000..870e5df
--- /dev/null
@@ -0,0 +1,91 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <CDeviceElement.h>\r
+\r
+#include <ri-debug.h>\r
+\r
+DeviceElement::DeviceElement(char *device_name,\r
+                                                                       char *device_type,\r
+                                                                       unsigned int device_bw,\r
+                                                                       ri_mem_cluster_s* mem_cluster_info,\r
+                                                                       int sharable_count,\r
+                                                                       int mixing,\r
+                                                                       int device_id,\r
+                                                                       int is_main_device\r
+                                                                       )\r
+{\r
+       m_element_name = device_name;\r
+       m_element_type = device_type;\r
+       m_element_bw = device_bw;\r
+       m_element_mem_cluster = mem_cluster_info;\r
+       m_sharable_count = sharable_count;\r
+       m_mixing = mixing;\r
+       m_device_id = device_id;\r
+       m_is_main_device = is_main_device;\r
+\r
+       SetElementAttr(ELEMENT_DEVICE);\r
+\r
+       m_class_id = 0;\r
+       m_id = 0;\r
+}\r
+\r
+DeviceElement::~DeviceElement()\r
+{\r
+       m_child_element.clear();\r
+}\r
+\r
+void DeviceElement::AddChildElement(Element* child_elem)\r
+{\r
+       m_child_element.insert(child_elem);\r
+}\r
+\r
+void DeviceElement::ReleaseChildElement(void){}\r
+\r
+void DeviceElement::SetDevicePath(char *device_path)\r
+{\r
+       m_device_path = strdup(device_path);\r
+}\r
+\r
+char *DeviceElement::GetDevicePath(void)\r
+{\r
+       return m_device_path;\r
+}\r
+\r
+void DeviceElement::SetAudioCodec(char *name)\r
+{\r
+       m_audio_codec = strdup(name);\r
+}\r
+\r
+\r
+void DeviceElement::SetOmxCompName(char *omx_comp_name)\r
+{\r
+       m_omx_comp_name = strdup(omx_comp_name);\r
+}\r
+\r
+char *DeviceElement::GetOmxCompName(void)\r
+{\r
+       return m_omx_comp_name;\r
+}\r
+\r
+// LCOV_EXCL_START\r
+void DeviceElement::PrintInfo(void)\r
+{\r
+       RI_DBG("===== DEVICE INFO");\r
+       RI_DBG("=        Device Name : %s", m_element_name);\r
+       RI_DBG("=        Device id : %d", m_id);\r
+}\r
+// LCOV_EXCL_STOP\r
diff --git a/src/parser/element/CElement.cpp b/src/parser/element/CElement.cpp
new file mode 100644 (file)
index 0000000..58d871f
--- /dev/null
@@ -0,0 +1,63 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <cstddef>\r
+#include <CElement.h>\r
+\r
+\r
+Element::Element(void):m_element_name(NULL), m_element_type(NULL), m_class_id(0)\r
+{}\r
+\r
+Element::Element(char *element_name, char *element_type, int class_id, bool is_uhd_device)\r
+:m_element_name(element_name), m_element_type(element_type), m_class_id(class_id), m_is_uhd_decoder(is_uhd_device)\r
+{}\r
+\r
+Element::Element(char *element_name, char *element_type):m_element_name(element_name), m_element_type(element_type), m_class_id(0)\r
+{}\r
+\r
+Element::Element(char *element_name):m_element_name(element_name), m_element_type(NULL), m_class_id(0)\r
+{}\r
+\r
+void Element::SetElementAttr(ri_element_attribute_e element_attr)\r
+{\r
+       //RI_DBG("[DEVICE ELEMENT] element attr : %s", element_attr);\r
+       m_element_attr = element_attr;\r
+}\r
+\r
+ri_element_attribute_e Element::GetElementAttr(void)\r
+{\r
+       return m_element_attr;\r
+}\r
+\r
+char *Element::GetElementName(void)\r
+{\r
+       return m_element_name;\r
+}\r
+\r
+char *Element::GetElementType(void)\r
+{\r
+       return m_element_type;\r
+}\r
+\r
+int Element::GetElementID(void)\r
+{\r
+       return m_id;\r
+}\r
+\r
+void Element::SetElementID(unsigned int element_id)\r
+{\r
+       m_id = element_id;\r
+}\r
diff --git a/src/parser/element/CResourceInfoDoc.cpp b/src/parser/element/CResourceInfoDoc.cpp
new file mode 100644 (file)
index 0000000..f968b3c
--- /dev/null
@@ -0,0 +1,90 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <CResourceInfoDoc.h>\r
+#include <ri-debug.h>\r
+\r
+ResourceInfoDoc::~ResourceInfoDoc(void)\r
+{\r
+       ReleaseElements();\r
+}\r
+\r
+void ResourceInfoDoc::AddResourceCategory(CategoryElement* category)\r
+{\r
+       if (!category) {\r
+               RI_ERR("invalid category");\r
+               return;\r
+       }\r
+\r
+       category_elements_.push_back(category);\r
+}\r
+\r
+void ResourceInfoDoc::PushElement(Element* element)\r
+{\r
+       context_.push(element);\r
+}\r
+\r
+Element* ResourceInfoDoc::TopElement(void)\r
+{\r
+       if (context_.empty())\r
+               return nullptr;\r
+\r
+       return context_.top();\r
+}\r
+\r
+void ResourceInfoDoc::PopElement(void)\r
+{\r
+       if (context_.empty()) {\r
+               RI_ERR("Context stack is empty, there is no element to pop");\r
+               return;\r
+       }\r
+\r
+       return context_.pop();\r
+}\r
+\r
+void ResourceInfoDoc::ReleaseElements(void)\r
+{\r
+       for (auto &it : category_elements_)\r
+               delete it;\r
+\r
+       category_elements_.clear();\r
+\r
+       for (auto &it : decoding_elements_)\r
+               delete it;\r
+\r
+       decoding_elements_.clear();\r
+}\r
+\r
+void ResourceInfoDoc::AddDecodingElement(DecodingElement* element)\r
+{\r
+       if (!element) {\r
+               RI_ERR("invalid element");\r
+               return;\r
+       }\r
+\r
+       decoding_elements_.push_back(element);\r
+}\r
+\r
+// LCOV_EXCL_START\r
+void ResourceInfoDoc::PrintInfo(void)\r
+{\r
+       RI_DBG("\n---------------- INFORMATION ----------------");\r
+       for (auto &it : category_elements_) {\r
+               CategoryElement* category = dynamic_cast<CategoryElement*>(it);\r
+               category->PrintInfo();\r
+       }\r
+}\r
+// LCOV_EXCL_STOP\r
diff --git a/src/parser/ri-resource-info-dbmaker.cpp b/src/parser/ri-resource-info-dbmaker.cpp
new file mode 100644 (file)
index 0000000..bf634b5
--- /dev/null
@@ -0,0 +1,127 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <assert.h>\r
+#include <ri-resource-info-parser.h>\r
+#include <ri-resource-info-dbmaker.h>\r
+\r
+static void CopyToResourceCategory(CategoryElement* category_element, ri_resource_category_s* category)\r
+{\r
+       category->id = category_element->GetCategoryEnum();\r
+       category->class_id = category_element->GetClassID();\r
+       category->num_of_dev = category_element->GetNumOfChildElement();\r
+       category->is_uhd_device = category_element->IsUHDDecoder();\r
+\r
+       char *category_name = category_element->GetElementName();\r
+       category->name = (category_name == NULL) ? strndup("", strlen("")): strndup(category_name, strlen(category_name));\r
+\r
+       char *codec_name = category_element->GetCodecName();\r
+       category->codec = (codec_name == NULL) ? strndup("", strlen("")): strndup(codec_name, strlen(codec_name));\r
+}\r
+\r
+static void CopyToDevice(DeviceElement* dev_element, CategoryElement* category_element, ri_device_common_attr_s* device)\r
+{\r
+       device->id = dev_element->GetElementID();\r
+       device->category = category_element->GetCategoryEnum();\r
+       device->path = dev_element->GetDevicePath();\r
+       device->bw = dev_element->GetDeviceBW();\r
+       device->id_unique = dev_element->GetDeviceID();\r
+       device->sharable_count = dev_element->GetSharableCount();\r
+       device->mixing_count = dev_element->GetMixingCount();\r
+       device->is_uhd_device = category_element->IsUHDDecoder();\r
+       device->is_main_device = dev_element->IsMainDevice();\r
+       device->omx_comp_name = dev_element->GetOmxCompName();\r
+       device->audio_codec = dev_element->GetAudioCodec();\r
+\r
+       char *dev_name = dev_element->GetElementName();\r
+       device->name = (dev_name == NULL) ? strndup("", strlen("")): strndup(dev_name, strlen(dev_name));\r
+\r
+       ri_mem_cluster_s* mem_info = dev_element->GetDeviceMemCluster();\r
+\r
+       if (mem_info == NULL) {\r
+               RI_ERR("can't get memory cluster info for (%s)", device->name);\r
+               device->n_mem_clusters = 0;\r
+       } else {\r
+               device->n_mem_clusters = mem_info->count;\r
+\r
+               for (unsigned int i = 0; i < mem_info->count; i++)\r
+                       device->mem_clusters[i] = mem_info->ids[i];\r
+\r
+               free(mem_info);\r
+       }\r
+\r
+}\r
+\r
+static void CopyToDeviceUniqueAttritue(DeviceElement* dev_elem, CategoryElement* category_elem, ri_device_unique_attr_s* attr)\r
+{\r
+       attr->id = dev_elem->GetDeviceID();\r
+       attr->category = category_elem->GetCategoryEnum();\r
+       attr->path = dev_elem->GetDevicePath();\r
+       attr->omx_comp_name = dev_elem->GetOmxCompName();\r
+       attr->main_device = (dev_elem->IsMainDevice());\r
+       attr->support_overlay = dev_elem->GetSupportOverlay();\r
+       attr->max_rez = dev_elem->GetMaxResolution();\r
+       attr->max_sampling_format = dev_elem->GetMaxSamplingFormat();\r
+\r
+       //RI_INFO("id(%d)/support_overlay(%d)/max_rez(%d)/max_sampling(%d)", attr->id, attr->support_overlay, attr->max_rez, attr->max_sampling_format);\r
+\r
+       char *dev_name = dev_elem->GetElementName();\r
+       attr->name = (dev_name == NULL) ? strndup("", strlen("")): strndup(dev_name, strlen(dev_name));\r
+}\r
+\r
+int ConstructResourceDB(void *InfoDB, std::vector<CategoryElement*>* device_info)\r
+{\r
+       CResourceInfoDB* db = static_cast<CResourceInfoDB*>(InfoDB);\r
+       bool is_vdec_category = false;\r
+\r
+       for (std::vector<CategoryElement*>::iterator iter = device_info->begin(); iter != device_info->end(); iter++) {\r
+               CategoryElement* category_element = *iter;\r
+               ri_resource_category_s* category = (ri_resource_category_s*) malloc (sizeof(ri_resource_category_s));\r
+\r
+               assert(category);\r
+\r
+               CopyToResourceCategory(category_element, category);\r
+               db->AddCategoryInfo(category);\r
+\r
+               CCategory* cat = FindVideoCategory(category->id);\r
+               is_vdec_category = (cat == nullptr) ? false:true;\r
+\r
+               for (std::set<Element*>::iterator iter_dev = category_element->GetChildElement()->begin(); iter_dev != category_element->GetChildElement()->end(); iter_dev++)  {\r
+                       DeviceElement* dev_elem = dynamic_cast<DeviceElement*>(*iter_dev);\r
+                       assert(dev_elem);\r
+\r
+                       ri_device_common_attr_s* device = (ri_device_common_attr_s*) malloc (sizeof(ri_device_common_attr_s));\r
+                       assert(device);\r
+\r
+                       CopyToDevice(dev_elem, category_element, device);\r
+\r
+                       db->AddDeviceAttributes(device);\r
+\r
+                       if (is_vdec_category && !cat->SupportNDecoding())\r
+                               db->AddVideoDecoder(device->id_unique, cat->GetCodecName(), cat->GetResolution(), cat->GetFrameRate());\r
+\r
+                       if (db->HasDeviceUniqueAttributes(device->id_unique))\r
+                               continue;\r
+\r
+                       ri_device_unique_attr_s* dev_unique_attr = (ri_device_unique_attr_s*) malloc (sizeof(ri_device_unique_attr_s));\r
+                       assert(dev_unique_attr);\r
+\r
+                       CopyToDeviceUniqueAttritue(dev_elem, category_element, dev_unique_attr);\r
+                       db->AddDeviceUniqueAttributes(device->id_unique, dev_unique_attr);\r
+               }\r
+       }\r
+       return RI_OK;\r
+}\r
diff --git a/src/parser/ri-resource-info-parser.cpp b/src/parser/ri-resource-info-parser.cpp
new file mode 100644 (file)
index 0000000..fd5bc90
--- /dev/null
@@ -0,0 +1,1339 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <expat.h>
+#include <assert.h>
+#include <map>
+#include <sstream>
+#include <vector>
+#include <algorithm>
+#include <system_info.h>
+
+#include <ri-video-decoder-category-type.h>
+#include <ri-resource-info-parser.h>
+#include <CResourceInfoDB.h>
+#include <CResourceTableProvider.h>
+#include <CModelInfo.h>
+#include <CVideoEncoder.h>
+#include <CCategory.h>
+#include <CDecodingElement.h>
+#include <CCapabilityElement.h>
+
+#include <ri-resource-info-dbmaker.h>
+#include <ri-parser-types.h>
+#include <ri-debug.h>
+#include <ri-common-type.h>
+
+#define MEM_CLUSTER_NOT_FOUND 9999
+
+static ResourceInfoDoc* g_XMLDoc = NULL;
+static unsigned int g_ResourceID = 0;
+static CResourceInfoDB* m_InfoDB = NULL;
+
+typedef enum {
+       PARSE_ERROR  = -1,
+       PARSE_OK = 0
+} ri_parser_return_e;
+
+typedef struct _parser_device_type{
+       const char *name;
+       ri_device_e id;
+} parser_device_type;
+
+typedef struct _parser_category_type{
+       const char *name;
+       ri_rsc_category_e id;
+       category_type_e type;
+       const char *codec_name;
+       ri_resolution resolution;
+       int framerate;
+       bool n_decoding;
+} parser_category_type;
+
+int m_GetDeviceIDEnum(char *device_name);
+int m_GetDeviceIDLicense(const char *device_name);
+ri_rsc_category_e m_GetCategoryTypeEnum(char *category_type, char **codec, CResourceInfoDB *InfoDB, int class_id);
+void m_ProcessSystemStartElement(const char **atts, CResourceInfoDB *InfoDB);
+void m_ProcessVCodecStartElement(const char **atts, CResourceInfoDB *InfoDB);
+
+static std::map<std::string, int> m_devices;
+static std::map<std::string, int> m_devices_license;
+static void CreateDevices(void)
+{
+       parser_device_type dev_table[] = {
+               {"sec_audio_main_out", RI_DEVICE_AUDIO_MAIN_OUT},
+               {"sec_audio-remote-out", RI_DEVICE_AUDIO_REMOTE_OUT},
+               {"sec_audio-scart-out", RI_DEVICE_AUDIO_SCART_OUT},
+               {"sec_audio-mm-pcm-out", RI_DEVICE_MM_PCM_OUT},
+               {"sec_audio-event-compress", RI_DEVICE_AUDIO_EVENT_COMPRESS},
+               {"sec_jpeg_dec0", RI_DEVICE_JPEG_DECODER},
+               {"demux0", RI_DEVICE_DEMUX0},
+               {"sec_demux0", RI_DEVICE_DEMUX0},
+               {"sec_demux1", RI_DEVICE_DEMUX1},
+               {"sec_demux2", RI_DEVICE_DEMUX2},
+               {"sec_demux3", RI_DEVICE_DEMUX3},
+               {"sec_demux4", RI_DEVICE_DEMUX4},
+               {"sec_demux5", RI_DEVICE_DEMUX5},
+               {"sec_demux6", RI_DEVICE_DEMUX6},
+               {"sec_demux7", RI_DEVICE_DEMUX7},
+               {"sec_aud_enc0", RI_DEVICE_AUDIO_ENCODER},
+               {"sec_vid_enc0", RI_DEVICE_VIDEO_ENCODER},
+               {"sec_scaler0", RI_DEVICE_SCALER},
+               {"ext_video_src", RI_DEVICE_EXT_VIDEO_SRC},
+               {"ext_audio_src", RI_DEVICE_EXT_AUDIO_SRC},
+               {"ext_hdmi_src", RI_DEVICE_EXT_HDMI_SRC},
+               {"camera0", RI_DEVICE_CAMERA},
+               {"sec_tuner0", RI_DEVICE_TUNER},
+               {"sec_tuner1", RI_DEVICE_TUNER_SUB},
+               {"sec_scaler1", RI_DEVICE_SCALER_SUB},
+               {"sec_aud_dec0", RI_DEVICE_AUDIO_DECODER},
+               {"sec_aud_dec1", RI_DEVICE_AUDIO_DECODER_SUB},
+               {"sec_aud_dec2", RI_DEVICE_AUDIO_DECODER_PRIMARY},
+               {"sec_vid_dec0", RI_DEVICE_VIDEO_DECODER_MAIN},
+               {"sec_vid_dec_sub", RI_DEVICE_VIDEO_DECODER_SUB},
+               {"sec_vid_dec_uddec", RI_DEVICE_VIDEO_DECODER_UDDEC},
+               {"sec_vid_dec_udhevc", RI_DEVICE_VIDEO_DECODER_UDHEVC},
+               {"mic0", RI_DEVICE_MIC},
+               {"ext_comp_src", RI_DEVICE_EXT_COMP_SRC},
+               {"ext_av_src", RI_DEVICE_EXT_AV_SRC},
+               {"sec_jpeg_dec0_uhd", RI_DEVICE_JPEG_DECODER_UHD},
+               {"sec_mjpeg_dec0", RI_DEVICE_MJPEG_DECODER},
+               {"sec_mjpeg_dec0_uhd", RI_DEVICE_MJPEG_DECODER_UHD},
+               {"sw_decoder", RI_DEVICE_SW_DECODER},
+               {"mmp_mem_cluster1", RI_DEVICE_MMP_MEMORY_CLUSTER1},
+               {"mmp_mem_cluster2", RI_DEVICE_MMP_MEMORY_CLUSTER2},
+               {"mmp_mem_cluster3", RI_DEVICE_MMP_MEMORY_CLUSTER3},
+               {"mmp_mem_cluster4", RI_DEVICE_MMP_MEMORY_CLUSTER4},
+               {"mmp_mem_cluster5", RI_DEVICE_MMP_MEMORY_CLUSTER5},
+               {"mmp_mem_cluster5", RI_DEVICE_MMP_MEMORY_CLUSTER5},
+               {"mmp_mem_cluster_audio", RI_DEVICE_MMP_MEMORY_CLUSTER_AUDIO},
+               {"ext_audio_src_dvi", RI_DEVICE_EXT_AUDIO_SRC_DVI},
+               {"ext_audio_src_hdmi", RI_DEVICE_EXT_AUDIO_SRC_HDMI},
+               {"ext_audio_src_dp", RI_DEVICE_EXT_AUDIO_SRC_DP},
+               {"ext_audio_src_sbb", RI_DEVICE_EXT_AUDIO_SRC_SBB},
+               {"ext_audio_src_ops", RI_DEVICE_EXT_AUDIO_SRC_OPS},
+               {"ext_video_src_dvi", RI_DEVICE_EXT_VIDEO_SRC_DVI},
+               {"ext_video_src_hdmi", RI_DEVICE_EXT_VIDEO_SRC_HDMI},
+               {"ext_video_src_dp", RI_DEVICE_EXT_VIDEO_SRC_DP},
+               {"ext_video_src_sbb", RI_DEVICE_EXT_VIDEO_SRC_SBB},
+               {"ext_video_src_ops", RI_DEVICE_EXT_VIDEO_SRC_OPS},
+               {"sec_vid_dec_dvde0", RI_DEVICE_VIDEO_DECODER_DVDE0},
+               {"sec_vid_dec_dvde1", RI_DEVICE_VIDEO_DECODER_DVDE1},
+               {"sec_vid_dec_hen", RI_DEVICE_VIDEO_DECODER_HEN},
+               {"ext_pc_src", RI_DEVICE_EXT_PC_SRC},
+               {"sec_vid_dec_vr360dec", RI_DEVICE_VIDEO_DECODER_VR360DEC},
+               {"sec_vid_dec_hevc8k", RI_DEVICE_VIDEO_DECODER_HEVC_8K},
+               {"sec_audio_sub_out", RI_DEVICE_AUDIO_SUB_OUT},
+               {"sec_mjpeg_dec1", RI_DEVICE_MJPEG_DECODER_SUB},
+               {"sec_graphic_plane", RI_DEVICE_GRAPHIC_PLANE},
+               {"sec_vid_dec_dvde2", RI_DEVICE_VIDEO_DECODER_DVDE2},
+               {"sec_vid_dec_dvde3", RI_DEVICE_VIDEO_DECODER_DVDE3},
+               {"sec_heic_dec", RI_DEVICE_HEIC_DECODER},
+               {"sec_vid_dec_dvde4", RI_DEVICE_VIDEO_DECODER_DVDE4},
+               {"sec_vid_dec_dvde5", RI_DEVICE_VIDEO_DECODER_DVDE5},
+               {"sec_vid_dec_dvde6", RI_DEVICE_VIDEO_DECODER_DVDE6},
+               {"sec_vid_dec_dvde7", RI_DEVICE_VIDEO_DECODER_DVDE7},
+               {"sec_vid_dec_ovde", RI_DEVICE_VIDEO_DECODER_OVDE},
+               {"sec_scaler2", RI_DEVICE_SCALER_SUB2},
+               {"sec_scaler3", RI_DEVICE_SCALER_SUB3},
+               {"sec_vid_dec_mfc2", RI_DEVICE_VIDEO_DECODER_MFC2},
+               {"sec_vid_dec_mfc3", RI_DEVICE_VIDEO_DECODER_MFC3},
+               {"sec_vid_dec_mfc4", RI_DEVICE_VIDEO_DECODER_MFC4},
+               {"sec_jpeg_dec1", RI_DEVICE_JPEG_DECODER_SUB},
+               {"sec_vid_enc99", RI_DEVICE_VIDEO_ENCODER_EXCLUSIVE},
+               {"sec_audio_main_out_share0", RI_DEVICE_AUDIO_MAIN_OUT_SHARE0},
+               {"sec_audio_main_out_share1", RI_DEVICE_AUDIO_MAIN_OUT_SHARE1},
+               {"sec_vid_enc1", RI_DEVICE_VIDEO_ENCODER_MULTI1},
+               {"sec_vid_enc2", RI_DEVICE_VIDEO_ENCODER_MULTI2},
+               {"sec_vid_enc3", RI_DEVICE_VIDEO_ENCODER_MULTI3},
+               {"sec_vid_enc4", RI_DEVICE_VIDEO_ENCODER_MULTI4},
+               {"sec_scaler_gsr", RI_DEVICE_GSR},
+               {"audio_offload", RI_DEVICE_AUDIO_OFFLOAD},
+               {"radio0", RI_DEVICE_RADIO}
+       };
+
+       for (unsigned int i = 0; i < ARRAY_SIZE(dev_table); i++) {
+               m_devices.insert(std::pair<std::string, int>(dev_table[i].name, dev_table[i].id));
+       }
+}
+
+static void ClearDevices(void)
+{
+       m_devices.clear();
+}
+
+static int FindDeviceId(std::string name)
+{
+       auto it = m_devices.find(name);
+       return (it == m_devices.end()) ? RI_DEVICE_UNDEFINED : it->second;
+}
+
+static int FindDeviceIdLicense(std::string name)
+{
+       auto it = m_devices_license.find(name);
+       return (it == m_devices_license.end()) ? RI_DEVICE_UNDEFINED : it->second;
+}
+
+static std::map<std::string, CCategory*> m_categories;
+static std::map<int, CCategory*> m_video_categories;
+static void CreateCategoryTable(void)
+{
+       parser_category_type cat_table[] = {
+               {"audio-decoder",RI_CATEGORY_AUDIO_DECODER,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-event-compress",RI_CATEGORY_AUDIO_EVENT_COMPRESS,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder",RI_CATEGORY_VIDEO_DECODER,CATEGORY_TYPE_VIDEO_DECODER_NO_CODEC,"", RI_RESOLUTION_FHD, 60, false},
+               {"audio-main-out",RI_CATEGORY_AUDIO_MAIN_OUT,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"demux",RI_CATEGORY_DEMUX,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-encoder",RI_CATEGORY_AUDIO_ENCODER,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-encoder",RI_CATEGORY_VIDEO_ENCODER,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler",RI_CATEGORY_SCALER,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"tuner",RI_CATEGORY_TUNER,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-remote-out",RI_CATEGORY_AUDIO_REMOTE_OUT,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-scart-out",RI_CATEGORY_AUDIO_SCART_OUT,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"mm-pcm-playback",RI_CATEGORY_MM_PCM_OUT,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-sub",RI_CATEGORY_AUDIO_DECODER_SUB,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-primary",RI_CATEGORY_AUDIO_DECODER_PRIMARY,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-sub",RI_CATEGORY_VIDEO_DECODER_SUB,CATEGORY_TYPE_VIDEO_DECODER_NO_CODEC,"", RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-uhd",RI_CATEGORY_VIDEO_DECODER_UHD,CATEGORY_TYPE_VIDEO_DECODER_NO_CODEC,"", RI_RESOLUTION_4K_UHD, 60, false},
+               {"jpeg-decoder",RI_CATEGORY_JPEG_DECODER,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"mjpeg-decoder",RI_CATEGORY_MJPEG_DECODER,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_FHD, 30, false},
+               {"scaler-sub",RI_CATEGORY_SCALER_SUB,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext-video-src",RI_CATEGORY_EXT_VIDEO_SRC,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext-audio-src",RI_CATEGORY_EXT_AUDIO_SRC,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext-hdmi-src",RI_CATEGORY_EXT_HDMI_SRC,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"camera",RI_CATEGORY_CAMERA,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"demux-rec",RI_CATEGORY_DEMUX_REC,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"tuner-sub",RI_CATEGORY_TUNER_SUB,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"jpeg-decoder-jpeg/fhd/8b",RI_CATEGORY_JPEG_DECODER_FHD,CATEGORY_TYPE_JPEG,"", RI_RESOLUTION_FHD, 0, false},
+               {"jpeg-decoder-jpeg/uhd/8b",RI_CATEGORY_JPEG_DECODER_UHD,CATEGORY_TYPE_JPEG,"", RI_RESOLUTION_4K_UHD, 0, false},
+               {"jpeg-decoder-mjpeg/fhd/8b",RI_CATEGORY_MJPEG_DECODER_FHD,CATEGORY_TYPE_JPEG,"", RI_RESOLUTION_FHD, 30, false},
+               {"jpeg-decoder-mjpeg/uhd/8b",RI_CATEGORY_MJPEG_DECODER_UHD,CATEGORY_TYPE_JPEG,"", RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-mpeg1/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_MPEG1, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-mpeg1/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_MPEG1, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-mpeg2/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_MPEG2, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-mpeg2/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_MPEG2, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-mpeg4/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_MPEG4, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-mpeg4/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_MPEG4, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-h263/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_H263, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-h263/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_H263, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-h264/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-h264/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-h264/fhd/8b/120p",RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_120P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-h264/uhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_H264, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-h264/uhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_H264, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-hevc/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-hevc/fhd/8b/120p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_120P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-hevc/fhd/10b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-hevc/fhd/10b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-hevc/fhd/10b/120p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_120P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-hevc/fhd/10b420/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_420_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-hevc/fhd/10b420/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_420_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-hevc/fhd/10b422/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_422_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-hevc/fhd/10b422/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_10BIT_422_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-hevc/uhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/uhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/uhd/8b/120p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_120P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-hevc/uhd/10b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/uhd/10b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/uhd/10b/120p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_120P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-hevc/uhd/10b420/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/uhd/10b420/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/uhd/10b420/120p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_420_120P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-hevc/uhd/10b422/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/uhd/10b422/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/uhd/10b422/120p",RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_10BIT_422_120P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_HEVC, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-vp8/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_VP8, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-vp8/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_VP8, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-vp9/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_VP9, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-vp9/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_VP9, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-vp9/uhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_VP9_UHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_VP9, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-vp9/uhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_VP9_UHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_VP9, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-rv/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_RV, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-rv/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_RV, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-wmv9/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_WMV, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-wmv9/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_WMV, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-avs/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_AVS, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-avs/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_AVS, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-avs_plus/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_30P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_AVS_PLUS, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-avs_plus/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_60P,CATEGORY_TYPE_VIDEO_DECODER,RI_CODEC_NAME_AVS_PLUS, RI_RESOLUTION_FHD, 60, false},
+               {"mic",RI_CATEGORY_MIC,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext-comp-src",RI_CATEGORY_EXT_COMP_SRC,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext-av-src",RI_CATEGORY_EXT_AV_SRC,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"sw-decoder",RI_CATEGORY_SW_DECODER,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_audio_src_dvi",RI_CATEGORY_EXT_AUDIO_SRC_DVI,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_audio_src_hdmi",RI_CATEGORY_EXT_AUDIO_SRC_HDMI,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_audio_src_dp",RI_CATEGORY_EXT_AUDIO_SRC_DP,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_audio_src_sbb",RI_CATEGORY_EXT_AUDIO_SRC_SBB,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_audio_src_ops",RI_CATEGORY_EXT_AUDIO_SRC_OPS,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_video_src_dvi",RI_CATEGORY_EXT_VIDEO_SRC_DVI,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_video_src_hdmi",RI_CATEGORY_EXT_VIDEO_SRC_HDMI,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_video_src_dp",RI_CATEGORY_EXT_VIDEO_SRC_DP,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_video_src_sbb",RI_CATEGORY_EXT_VIDEO_SRC_SBB,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_video_src_ops",RI_CATEGORY_EXT_VIDEO_SRC_OPS,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"ext_pc_src",RI_CATEGORY_EXT_PC_SRC,CATEGORY_TYPE_COMMON,"", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-hevc/vr360/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-hevc/vr360/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-hevc/vr360/uhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/vr360/uhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/vr360/fhd/10b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-hevc/vr360/fhd/10b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-hevc/vr360/uhd/10b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/vr360/uhd/10b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/vr360/fhd/10b420/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_420_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-hevc/vr360/fhd/10b420/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_420_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-hevc/vr360/uhd/10b420/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_420_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/vr360/uhd/10b420/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_420_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/vr360/fhd/10b422/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_422_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-hevc/vr360/fhd/10b422/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_FHD_10BIT_422_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-hevc/vr360/uhd/10b422/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_422_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/vr360/uhd/10b422/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_VR360_UHD_10BIT_422_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-h264/vr360/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_H264_VR360_FHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-h264/vr360/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_H264_VR360_FHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-h264/vr360/uhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_H264_VR360_UHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-h264/vr360/uhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_H264_VR360_UHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-vp9/vr360/fhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-vp9/vr360/fhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-vp9/vr360/uhd/8b/30p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-vp9/vr360/uhd/8b/60p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-vp9/vr360/fhd/10b/30p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-vp9/vr360/fhd/10b/60p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-vp9/vr360/uhd/10b/30p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-vp9/vr360/uhd/10b/60p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-vp9/vr360/fhd/10b420/30p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_420_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-vp9/vr360/fhd/10b420/60p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_FHD_10BIT_420_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-vp9/vr360/uhd/10b420/30p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_420_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-vp9/vr360/uhd/10b420/60p",RI_CATEGORY_VIDEO_DECODER_VP9_VR360_UHD_10BIT_420_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/shvc/8b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_SHVC, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/shvc/8b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_SHVC, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/shvc/10b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_SHVC, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-hevc/shvc/10b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_SHVC_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC_SHVC, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-hevc/8k/8b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_8K_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-hevc/8k/8b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_8K_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-hevc/8k/10b/30p",RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-hevc/8k/10b/60p",RI_CATEGORY_VIDEO_DECODER_HEVC_8K_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_8K_UHD, 60, false},
+               {"audio-decoder-mpeg", RI_CATEGORY_AUDIO_DECODER_MPEG, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_MPEG, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-ac3", RI_CATEGORY_AUDIO_DECODER_AC3, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_AC3, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-eac3", RI_CATEGORY_AUDIO_DECODER_E_AC3, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_E_AC3, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-truehd", RI_CATEGORY_AUDIO_DECODER_TRUEHD, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_TRUEHD, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-ac4", RI_CATEGORY_AUDIO_DECODER_AC4, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_AC4, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-vorbis", RI_CATEGORY_AUDIO_DECODER_VORBIS, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_VORBIS, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-g2cook", RI_CATEGORY_AUDIO_DECODER_G2COOK, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_G2COOK, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-aac", RI_CATEGORY_AUDIO_DECODER_AAC, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_AAC, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-heaac", RI_CATEGORY_AUDIO_DECODER_HE_AAC, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_HE_AAC, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-wma", RI_CATEGORY_AUDIO_DECODER_WMA, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_WMA, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-adpcm", RI_CATEGORY_AUDIO_DECODER_ADPCM, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_ADPCM, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-mpegh", RI_CATEGORY_AUDIO_DECODER_MPEG_H, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_MPEG_H, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-opus", RI_CATEGORY_AUDIO_DECODER_OPUS, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_OPUS, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-pcm", RI_CATEGORY_AUDIO_DECODER_PCM, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_PCM, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-decoder-iamf-opus", RI_CATEGORY_AUDIO_DECODER_IAMF_OPUS, CATEGORY_TYPE_AUDIO_DECODER, RI_AUDIO_CODEC_NAME_IAMF_OPUS, RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-offload", RI_CATEGORY_AUDIO_OFFLOAD, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"radio", RI_CATEGORY_RADIO, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"jpeg-decoder-jpeg/8k/8b", RI_CATEGORY_JPEG_DECODER_8K, CATEGORY_TYPE_JPEG, "", RI_RESOLUTION_8K_UHD, 0, false},
+               {"scaler-bg", RI_CATEGORY_SCALER_BG, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"audio-sub-out", RI_CATEGORY_AUDIO_SUB_OUT, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"graphic-plane", RI_CATEGORY_GRAPHIC_PLANE, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"display-out", RI_CATEGORY_DISPLAY_OUT, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-av1/fhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-av1/fhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-av1/uhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-av1/uhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-av1/fhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-av1/fhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-av1/uhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-av1/uhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-av1/8k/8b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_8K_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-av1/8k/8b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_8K_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-av1/8k/10b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-av1/8k/10b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-av1/vr360/fhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-av1/vr360/fhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-av1/vr360/fhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1_VR360, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-av1/vr360/fhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1_VR360, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-av1/vr360/uhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-av1/vr360/uhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-av1/vr360/uhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1_VR360, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-av1/vr360/uhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1_VR360, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-h264/hd-n4/8b/30p", RI_CATEGORY_VIDEO_DECODER_H264_HD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_HD, 30, true},
+               {"img-decoder-heic", RI_CATEGORY_HEIC_DECODER, CATEGORY_TYPE_IMAGE_DECODER, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-mpeg1/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_MPEG1, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-mpeg2/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_MPEG2_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_MPEG2, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-mpeg4/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_MPEG4_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_MPEG4, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-h263/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_H263_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H263, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-vp8/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_VP8_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP8, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-rv/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_RV_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_RV, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-wmv9/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_WMV9_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_WMV, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-avs/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_AVS_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-avs_plus/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_AVS_PLUS_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS_PLUS, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-vp9/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-vp9/fhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-vp9/fhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-vp9/fhd/10b/120p", RI_CATEGORY_VIDEO_DECODER_VP9_FHD_10BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-vp9/uhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-vp9/uhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_VP9_UHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-av1/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-av1/fhd/10b/120p", RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-avs2/fhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-avs2/fhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-avs2/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-avs2/fhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-avs2/fhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-avs2/fhd/10b/120p", RI_CATEGORY_VIDEO_DECODER_AVS2_FHD_10BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-avs2/uhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-avs2/uhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-avs2/uhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-avs2/uhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AVS2_UHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS2, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-av1/uhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-av1/uhd/10b/120p", RI_CATEGORY_VIDEO_DECODER_AV1_UHD_10BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_4K_UHD, 120, false},
+               {"scaler-mv", RI_CATEGORY_SCALER_MULTIVIEW, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-sub2", RI_CATEGORY_SCALER_SUB2, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-sub3", RI_CATEGORY_SCALER_SUB3, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-vr360-detiled", RI_CATEGORY_SCALER_VR360_DETILED, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-vp8/sd-n4/8b/30p", RI_CATEGORY_VIDEO_DECODER_VP8_qHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP8, RI_RESOLUTION_qHD, 30, true},
+               {"scaler-vr360-out", RI_CATEGORY_SCALER_VR360_NATIVE_OUT, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-interlaced", RI_CATEGORY_SCALER_INTERLACED, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-h264/fhd-n2/8b/30p", RI_CATEGORY_VIDEO_DECODER_H264_FHD_N_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 30, true},
+               {"video-decoder-h264/fhd/8b/30p/mv", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_MV, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-h264/fhd/8b/60p/mv", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_MV, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 60, false},
+               {"video-encoder-exclusive", RI_CATEGORY_VIDEO_ENCODER_EXCLUSIVE, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-h264/fhd/8b/30p/portrait", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PORTRAIT, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-h264/fhd/8b/60p/portrait", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_PORTRAIT, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 60, false},
+               {"scaler-8k", RI_CATEGORY_SCALER_8K, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-progressive", RI_CATEGORY_SCALER_PROGRESSIVE, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-h264/fhd/8b/30p/interlaced", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_INTERLACED, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-h264/fhd/8b/60p/interlaced", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_INTERLACED, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-h264/fhd/8b/30p/progressive", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PROGRESSIVE, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-h264/fhd/8b/60p/progressive", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_PROGRESSIVE, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 60, false},
+               {"audio-main-out-share", RI_CATEGORY_AUDIO_MAIN_OUT_SHARE, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-h264/qhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_H264_QuadHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_QuadHD, 30, false},
+               {"video-decoder-h264/qhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_H264_QuadHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_QuadHD, 60, false},
+               {"video-decoder-hevc/dqhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_DQHD, 30, false},
+               {"video-decoder-hevc/dqhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_DQHD, 60, false},
+               {"video-decoder-hevc/dqhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_DQHD, 30, false},
+               {"video-decoder-hevc/dqhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_HEVC_DQHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_DQHD, 60, false},
+               {"video-decoder-av1/dqhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_DQHD, 30, false},
+               {"video-decoder-av1/dqhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_DQHD, 60, false},
+               {"video-decoder-av1/dqhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_DQHD, 30, false},
+               {"video-decoder-av1/dqhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_DQHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_DQHD, 60, false},
+               {"scaler-hdmi", RI_CATEGORY_SCALER_HDMI, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-hdmi-sub", RI_CATEGORY_SCALER_HDMI_SUB, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-hdmi-mv", RI_CATEGORY_SCALER_HDMI_MV, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-encoder-multi", RI_CATEGORY_VIDEO_ENCODER_MULTI, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-minimap", RI_CATEGORY_SCALER_MINIMAP, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-multi-hdmi", RI_CATEGORY_SCALER_MULTI_HDMI, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-hevc/5k/8b/30p", RI_CATEGORY_VIDEO_DECODER_HEVC_5K_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_5K, 30, false},
+               {"video-decoder-hevc/5k/8b/60p", RI_CATEGORY_VIDEO_DECODER_HEVC_5K_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_5K, 60, false},
+               {"video-decoder-hevc/5k/10b/30p", RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_5K, 30, false},
+               {"video-decoder-hevc/5k/10b/60p", RI_CATEGORY_VIDEO_DECODER_HEVC_5K_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_HEVC, RI_RESOLUTION_5K, 60, false},
+               {"video-decoder-av1/5k/8b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_5K_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_5K, 30, false},
+               {"video-decoder-av1/5k/8b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_5K_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_5K, 60, false},
+               {"video-decoder-av1/5k/10b/30p", RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_5K, 30, false},
+               {"video-decoder-av1/5k/10b/60p", RI_CATEGORY_VIDEO_DECODER_AV1_5K_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AV1, RI_RESOLUTION_5K, 60, false},
+               {"video-decoder-h264/fhd/8b/30p/triple", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_TRIPLE, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 30, false},
+               {"scaler-inapp-mv", RI_CATEGORY_SCALER_INAPP_MULTIVIEW, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"scaler-gsr", RI_CATEGORY_SCALER_GSR, CATEGORY_TYPE_COMMON, "", RI_RESOLUTION_UNDEFINED, 0, false},
+               {"video-decoder-vvc/fhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-vvc/fhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-vvc/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_VVC_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-vvc/fhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-vvc/fhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-vvc/fhd/10b/120p", RI_CATEGORY_VIDEO_DECODER_VVC_FHD_10BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-vvc/uhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-vvc/uhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-vvc/uhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_VVC_UHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-vvc/uhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-vvc/uhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-vvc/uhd/10b/120p", RI_CATEGORY_VIDEO_DECODER_VVC_UHD_10BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-vvc/8k/8b/30p", RI_CATEGORY_VIDEO_DECODER_VVC_8K_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-vvc/8k/8b/60p", RI_CATEGORY_VIDEO_DECODER_VVC_8K_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-vvc/8k/10b/30p", RI_CATEGORY_VIDEO_DECODER_VVC_8K_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-vvc/8k/10b/60p", RI_CATEGORY_VIDEO_DECODER_VVC_8K_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VVC, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-vp9/8k/8b/30p", RI_CATEGORY_VIDEO_DECODER_VP9_8K_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-vp9/8k/8b/60p", RI_CATEGORY_VIDEO_DECODER_VP9_8K_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-vp9/8k/10b/30p", RI_CATEGORY_VIDEO_DECODER_VP9_8K_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-vp9/8k/10b/60p", RI_CATEGORY_VIDEO_DECODER_VP9_8K_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_VP9, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-avs3/fhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-avs3/fhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-avs3/fhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-avs3/fhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-avs3/fhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_FHD, 60, false},
+               {"video-decoder-avs3/fhd/10b/120p", RI_CATEGORY_VIDEO_DECODER_AVS3_FHD_10BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_FHD, 120, false},
+               {"video-decoder-avs3/uhd/8b/30p", RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-avs3/uhd/8b/60p", RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-avs3/uhd/8b/120p", RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_8BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-avs3/uhd/10b/30p", RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_4K_UHD, 30, false},
+               {"video-decoder-avs3/uhd/10b/60p", RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_4K_UHD, 60, false},
+               {"video-decoder-avs3/uhd/10b/120p", RI_CATEGORY_VIDEO_DECODER_AVS3_UHD_10BIT_120P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_4K_UHD, 120, false},
+               {"video-decoder-avs3/8k/8b/30p", RI_CATEGORY_VIDEO_DECODER_AVS3_8K_8BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-avs3/8k/8b/60p", RI_CATEGORY_VIDEO_DECODER_AVS3_8K_8BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-avs3/8k/10b/30p", RI_CATEGORY_VIDEO_DECODER_AVS3_8K_10BIT_30P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_8K_UHD, 30, false},
+               {"video-decoder-avs3/8k/10b/60p", RI_CATEGORY_VIDEO_DECODER_AVS3_8K_10BIT_60P, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_AVS3, RI_RESOLUTION_8K_UHD, 60, false},
+               {"video-decoder-h264/fhd/8b/30p/detiled", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_DETILED, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 30, false},
+               {"video-decoder-h264/fhd/8b/60p/detiled", RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_60P_DETILED, CATEGORY_TYPE_VIDEO_DECODER, RI_CODEC_NAME_H264, RI_RESOLUTION_FHD, 60, false}
+       };
+
+       for (unsigned int i = 0; i < ARRAY_SIZE(cat_table); i++) {
+               m_categories.insert(std::pair<std::string, CCategory*>(std::string(cat_table[i].name), new CCategory(cat_table[i].name, cat_table[i].id, cat_table[i].type, cat_table[i].codec_name, cat_table[i].resolution, cat_table[i].framerate, cat_table[i].n_decoding)));
+
+               if (cat_table[i].type == CATEGORY_TYPE_VIDEO_DECODER)
+                       m_video_categories.insert(std::pair<int, CCategory*>(cat_table[i].id, new CCategory(cat_table[i].name, cat_table[i].id, cat_table[i].type, cat_table[i].codec_name, cat_table[i].resolution, cat_table[i].framerate, cat_table[i].n_decoding)));
+       }
+}
+
+static void ClearCategoryTable(void)
+{
+       std::for_each(m_categories.begin(), m_categories.end(), [](std::pair<std::string, CCategory *> e) { delete e.second; });
+       m_categories.clear();
+
+       std::for_each(m_video_categories.begin(), m_video_categories.end(), [](std::pair<int, CCategory *> e) { delete e.second; });
+       m_video_categories.clear();
+}
+
+static CCategory *FindCategory(std::string name)
+{
+       auto it = m_categories.find(name);
+       return (it == m_categories.end()) ? nullptr : it->second;
+}
+
+CCategory* FindVideoCategory(int category_id)
+{
+       auto it = m_video_categories.find(category_id);
+       return (it == m_video_categories.end()) ? nullptr : it->second;
+}
+
+static std::map<std::string, unsigned int> m_mem_clusters;
+static void CreateMemClusters(void)
+{
+       const unsigned int n_mem_clusters = 37; // '0' ~ 'z'
+       for (unsigned int i = 0; i < n_mem_clusters; i++) {
+               std::ostringstream ss;
+               ss << "mem_cluster_" << i;
+               m_mem_clusters.insert(std::pair<std::string, unsigned int>(ss.str(), i));
+       }
+}
+
+static void ClearMemClusters(void)
+{
+       m_mem_clusters.clear();
+}
+
+static unsigned int FindMemClusterID(std::string mc)
+{
+       auto it = m_mem_clusters.find(mc);
+       return (it == m_mem_clusters.end()) ? MEM_CLUSTER_NOT_FOUND : it->second;
+}
+
+int ParseXMLFile(void* InfoDB)
+{
+       int fileSize = 0;
+       std::string filename;
+
+       m_InfoDB = static_cast<CResourceInfoDB*>(InfoDB);
+
+       CResourceTableProvider table_provider;
+
+       filename = table_provider.GetResourceTablePath();
+       if (filename.empty()) {
+               RI_ERR("Invalid resource file path");
+               return -1;
+       }
+
+       RI_INFO("resource table : (%s)", filename.c_str());
+
+       char* xmlRawData = NULL;
+
+       fileSize = m_GetXMLRawData(filename.c_str(), &xmlRawData);
+
+       if (fileSize == -1) {
+               RI_ERR("fail to get XMLdata\n");
+               if (xmlRawData) {
+                       free(xmlRawData);
+                       xmlRawData = NULL;
+               }
+               return -1;
+       }
+
+       RI_INFO("Succeed to get XMLData");
+
+       CreateMemClusters();
+       CreateCategoryTable();
+
+       CreateDevices();
+
+       if (m_ParseResourceInfo(xmlRawData, fileSize) != PARSE_OK) {
+               RI_ERR("ParseResourceInfo ERROR");
+               m_ReleaseElements(g_XMLDoc);
+
+               if (xmlRawData) {
+                       free(xmlRawData);
+                       xmlRawData = NULL;
+               }
+
+               ClearMemClusters();
+               ClearCategoryTable();
+               ClearDevices();
+               return -1;
+       }
+
+       if (xmlRawData) {
+               free(xmlRawData);
+               xmlRawData = NULL;
+       }
+
+       m_RegisterResourcesToDB(m_InfoDB);
+       RegisterVideoCapabilities(m_InfoDB);
+       m_ReleaseElements(g_XMLDoc);
+       ClearMemClusters();
+       ClearCategoryTable();
+
+       ClearDevices();
+       RI_INFO("parsing resource table done");
+       return 0;
+}
+
+// LCOV_EXCL_START
+int ParseXMLFile(void* InfoDB, const char *filename)
+{
+       int fileSize = 0;
+
+       if (filename == NULL) {
+               printf("Invalid resource file path\n");
+               return -1;
+       }
+
+       m_InfoDB = static_cast<CResourceInfoDB*>(InfoDB);
+
+       char *xmlRawData = NULL;
+
+       fileSize = m_GetXMLRawData(filename, &xmlRawData);
+
+       if (fileSize == -1) {
+               printf("fail to get XML data (%s)\n", filename);
+
+               //variable xmlRawData going out of scope leaks the storage it points to.
+               if (xmlRawData) {
+                       free(xmlRawData);
+                       xmlRawData = NULL;
+               }
+
+               return -1;
+       }
+
+       if (m_ParseResourceInfo(xmlRawData, fileSize) != PARSE_OK) {
+               if (xmlRawData) {
+                       free(xmlRawData);
+                       xmlRawData = NULL;
+               }
+
+               return -1;
+       }
+
+       if (xmlRawData) {
+               free(xmlRawData);
+               xmlRawData = NULL;
+       }
+
+       return 0;
+}
+// LCOV_EXCL_STOP
+
+int m_GetXMLRawData(const char *filepath, char **xmlData)
+{
+       if (filepath == NULL) {
+               RI_ERR("XML file path is null");
+               return -1;
+       }
+
+       FILE *xmlFile;
+
+       //Open xml file
+       xmlFile = fopen(filepath, "rb");
+
+       if (xmlFile == NULL) {
+               RI_ERR("Failed to open file %s", filepath);
+               return -1;
+       }
+
+       struct stat sbuf;
+       int statResult = -1;
+
+       //Get file size
+       statResult = stat(filepath, &sbuf);
+
+       if (statResult == -1) {
+               fclose(xmlFile);
+               RI_ERR("Failed to stat %s", filepath);
+               return -1;
+       }
+
+       int fileSize = sbuf.st_size;
+
+       RI_DBG("XML file size is %d", fileSize);
+
+       char *fileData = (char*) calloc(1, fileSize+1);
+       assert(fileData);
+
+       //Read file
+       int readByte = 0;
+
+       readByte = fread(fileData, 1, fileSize+1, xmlFile);
+
+       if (readByte == -1) {
+               fclose(xmlFile);
+               RI_ERR("Failed to read xml file (%s)", filepath);
+
+               free(fileData);
+               fileData = NULL;
+
+               return -1;
+       }
+
+       //Add null character at the end of data
+       fileData[fileSize] = 0;
+
+       RI_DBG("Read file size is %d", readByte);
+
+       *xmlData = fileData;
+
+       //Close xml file
+       fclose(xmlFile);
+
+       return fileSize;
+}
+
+
+int m_ParseResourceInfo(char *xmlRawData, int rawDataSize)
+{
+       XML_Parser xmlParser = NULL;
+
+       /*
+       With Expat, you may also specify an encoding at the time of creating a parser.
+       This is useful when the encoding information may come from a source outside the document itself (like a higher level protocol.)
+       */
+
+       xmlParser = XML_ParserCreate(NULL);
+       if (!xmlParser) {
+               RI_ERR("parser create error\n");
+               return PARSE_ERROR;
+       }
+
+       XML_SetElementHandler(xmlParser, m_ProcessStartElement, m_ProcessEndElement);
+       XML_SetCharacterDataHandler (xmlParser, m_ProcessCharacterData);
+
+       if (XML_Parse(xmlParser, xmlRawData, rawDataSize, 1) == XML_STATUS_ERROR) {
+               RI_ERR("Failed to parse xml data (Error from expat library)\n");
+               return PARSE_ERROR;
+       }
+
+       XML_ParserFree(xmlParser);
+       return PARSE_OK;
+}
+
+void m_RegisterResourcesToDB(CResourceInfoDB* InfoDB)
+{
+       std::vector<CategoryElement*> categories = g_XMLDoc->GetAllCategoryElements();
+       ConstructResourceDB(static_cast<void *>(InfoDB), &categories);
+}
+
+void RegisterVideoCapabilities(CResourceInfoDB* db)
+{
+       std::vector<DecodingElement*> capabilities = g_XMLDoc->GetDecodingElements();
+       for (auto it : capabilities) {
+               for (auto itc : *it->GetChildElement()) {
+                       CapabilityElement *cap = dynamic_cast<CapabilityElement*>(itc);
+                       if (!cap)
+                               continue;
+                       db->AddVideoCapability(it->GetCodec(), new VideoCapability(cap->GetDevice(), cap->GetWidth(), cap->GetHeight(), cap->GetFPS()));
+               }
+       }
+}
+
+void m_ProcessCharacterData (void *userData, const char *s, int len)
+{
+       // do nothing...
+}
+
+static void free_char(char** p)
+{
+       if (*p)
+               free(*p);
+}
+
+static void ProcessDecodingStartElement(const char **atts, CResourceInfoDB* InfoDB)
+{
+       if (!g_XMLDoc) {
+               RI_ERR("invalid ResourceInfoDoc");
+               return;
+       }
+
+       char *codec __attribute__ ((__cleanup__(free_char))) = NULL;
+       if (m_GetStringAttributeValue(atts, "codec", &codec) == PARSE_ERROR) {
+               RI_ERR("failed to get attribute value of codec");
+               return;
+       }
+
+       if (codec == NULL || strlen(codec) == 0) {
+               RI_ERR("invalid codec");
+               return;
+       }
+
+       DecodingElement *decoding = new DecodingElement(codec);
+       g_XMLDoc->AddDecodingElement(decoding);
+       g_XMLDoc->PushElement(decoding);
+}
+
+static void ProcessCapabilityStartElement(const char **atts)
+{
+       if (!g_XMLDoc) {
+               RI_ERR("invalid ResourceInfoDoc");
+               return;
+       }
+
+       DecodingElement *decoding_element = dynamic_cast<DecodingElement*>(g_XMLDoc->TopElement());
+       if (!decoding_element) {
+               RI_ERR("decoding element not found");
+               return;
+       }
+
+       RI_INFO("Leave ???");
+#if 0
+       char *device __attribute__ ((__cleanup__(free_char))) = NULL;
+       if (m_GetStringAttributeValue(atts, "device", &device) == PARSE_ERROR) {
+               RI_ERR("failed to get attribute value of device");
+               return;
+       }
+
+       int width = m_GetIntAttributeValue(atts, "w");
+       int height = m_GetIntAttributeValue(atts, "h");
+       int fps = m_GetIntAttributeValue(atts, "fps");
+
+       CapabilityElement *capability = new CapabilityElement(device, width, height, fps);
+       decoding_element->AddChildElement(capability);
+
+#endif
+}
+
+void m_ProcessStartElement(void *userData, const char *name, const char **atts)
+{
+       if (!strcmp(name, "device"))
+               m_ProcessDeviceStartElement(atts);
+       else if (!strcmp(name, "category"))
+               m_ProcessCategoryStartElement(atts);
+       else if (!strcmp(name, "vcodec"))
+               m_ProcessVCodecStartElement(atts, m_InfoDB);
+       else if (!strcmp(name, "system"))
+               m_ProcessSystemStartElement(atts, m_InfoDB);
+       else if (!strcmp(name, "decoding"))
+               ProcessDecodingStartElement(atts, m_InfoDB);
+       else if (!strcmp(name, "capability"))
+               ProcessCapabilityStartElement(atts);
+       else if (!strcmp(name, "resourceinformationfile")) {
+               if (g_XMLDoc) {
+                       RI_ERR("Failed to parse resourceinformationfile element...need to create ResourceInfoDoc first");
+                       return;
+               }
+               g_XMLDoc = new ResourceInfoDoc();
+       }
+}
+
+
+void m_ProcessEndElement(void *userData, const char *name)
+{
+       if (strcmp(name, "category") && strcmp(name, "device"))
+               return;
+
+       g_XMLDoc->PopElement();
+}
+
+static void GetMemClusters(const char *src, std::vector<std::string> *v)
+{
+       if (!src || v == nullptr)
+               return;
+
+       std::string mem_clusters(src);
+       std::string delimeter = ";";
+
+       auto s = 0;
+       auto e = mem_clusters.find(delimeter);
+
+       while (e != std::string::npos) {
+               v->push_back(mem_clusters.substr(s, e - s));
+               s = e + delimeter.length();
+               e = mem_clusters.find(delimeter, s);
+       }
+
+       v->push_back(mem_clusters.substr(s, e));
+}
+
+void m_ProcessDeviceStartElement(const char **atts)
+{
+       if (!g_XMLDoc) {
+               RI_ERR("Failed to Device element...need to create ResourceInfoDoc first");
+               //assert malformed
+               return;
+       }
+
+       CategoryElement* pCategoryElement = dynamic_cast<CategoryElement*>(g_XMLDoc->TopElement());
+
+       if (pCategoryElement == NULL) {
+               RI_ERR("DYNAMIC CASTING FAILURE!");
+               return;;
+       }
+
+       if (pCategoryElement->GetElementAttr() != ELEMENT_CATEGORY) {
+               RI_ERR("Previous element shall be ELEMENT_NAME_CATEGORY");
+               return;
+       }
+
+       char *device_name = NULL;
+       int retval = m_GetStringAttributeValue(atts, "name", &device_name);
+
+       if (retval == PARSE_ERROR) {
+               //assert - malformed XML
+               RI_ERR("Failed to get attribute value of device path");
+               return;
+       }
+
+       if (device_name == NULL) {
+               device_name = strdup("none");
+               assert(device_name);
+       }
+
+       int device_enum_type = m_GetDeviceIDEnum(device_name);
+
+       char *device_path = NULL;
+       retval = m_GetStringAttributeValue(atts, "path", &device_path);
+
+       if (retval == PARSE_ERROR) {
+               //assert - malformed XML
+               RI_ERR("Failed to get attribute value of device path");
+
+               //variable device_name going out of scope leaks the storage it points to.
+               if (device_name) {
+                       free(device_name);
+                       device_name = NULL;
+               }
+               return;
+       }
+
+       char *device_mem_cluster = NULL;
+
+       retval = m_GetStringAttributeValue(atts, "dependence", &device_mem_cluster);
+
+       ri_mem_cluster_s* mem_cluster_info = (ri_mem_cluster_s*) calloc(1, sizeof(ri_mem_cluster_s));
+       assert(mem_cluster_info);
+
+       if (retval == PARSE_ERROR) {
+               mem_cluster_info->count = 0;
+       } else {
+               std::vector<std::string> mem_clusters;
+               GetMemClusters((const char*) device_mem_cluster, &mem_clusters);
+
+               for (auto &it : mem_clusters) {
+                       int mc_id = FindMemClusterID(it);
+                       if (mc_id == MEM_CLUSTER_NOT_FOUND) {
+                               RI_ERR("id for (%s:%s) not found", device_name, it.c_str());
+                               continue;
+                       }
+
+                       mem_cluster_info->ids[mem_cluster_info->count++] = mc_id;
+               }
+       }
+
+       if (device_mem_cluster) {
+               free(device_mem_cluster);
+               device_mem_cluster = NULL;
+       }
+
+       int device_bw = m_GetIntAttributeValue(atts, "bandwidth");
+       int sharable_count = m_GetIntAttributeValue(atts, "sharable");
+       int mixing = m_GetIntAttributeValue(atts, "mixing");
+
+       /* Get Resolution info */
+       int is_main_device = 0;
+
+       char *device_attribute = NULL;
+       retval = m_GetStringAttributeValue(atts, "attribute", &device_attribute);
+
+       if (retval != PARSE_ERROR) {
+               if (!strcmp(device_attribute, "main"))
+                       is_main_device = 1;
+       }
+
+       if (device_attribute) {
+               free(device_attribute);
+               device_attribute = NULL;
+       }
+
+       char *omx = NULL;
+       retval = m_GetStringAttributeValue(atts, "omx_comp_name", &omx);
+
+       if (retval == PARSE_ERROR)
+               omx = strdup("");
+
+       char *audio_codec = NULL;
+       retval = m_GetStringAttributeValue(atts, "acodec", &audio_codec);
+
+       if (retval == PARSE_ERROR)
+               audio_codec = strdup("");
+
+       int overlay = m_GetIntAttributeValue(atts, "overlay");
+       int max_rez = m_GetIntAttributeValue(atts, "max_rez");
+       int max_sampling_format = m_GetIntAttributeValue(atts, "max_format");
+
+       DeviceElement* pDeviceElement = new DeviceElement(device_name, pCategoryElement->GetElementType(), device_bw, mem_cluster_info, sharable_count, mixing, device_enum_type, is_main_device);
+
+       if (pDeviceElement == NULL) {
+               RI_ERR("cannot get device element. Dev[%s]", device_name);
+
+               if (device_name) {
+                       free(device_name);
+                       device_name = NULL;
+               }
+
+               free(mem_cluster_info);
+               mem_cluster_info = NULL;
+
+               if (omx) {
+                       free(omx);
+                       omx = NULL;
+               }
+
+               if (audio_codec)
+                       free(audio_codec);
+
+               return;
+       }
+
+       pDeviceElement->SetElementID(g_ResourceID++);
+       pDeviceElement->SetDevicePath(device_path);
+       pDeviceElement->SetOmxCompName(omx);
+       pDeviceElement->SetAudioCodec(audio_codec);
+       pDeviceElement->SetMaxResolution(max_rez);
+       pDeviceElement->SetMaxSamplingFormat(max_sampling_format);
+       pDeviceElement->SetSupportOverlay(overlay);
+
+       if (audio_codec) {
+               free(audio_codec);
+               audio_codec = NULL;
+       }
+
+       /* Set Child Element */
+       pCategoryElement->AddChildElement(pDeviceElement);
+
+       g_XMLDoc->PushElement(pDeviceElement);
+}
+
+
+void m_ProcessSystemStartElement(const char **atts, CResourceInfoDB *InfoDB)
+{
+       int bw_total = m_GetIntAttributeValue(atts, "bw");
+       RI_INFO("bw : %d", bw_total);
+       InfoDB->SetSystemBW(bw_total);
+
+       int max_vdec = m_GetIntAttributeValue(atts, "max_vdec");
+       RI_INFO("max_vdec : %d", max_vdec);
+       InfoDB->SetMaxVideoDecoderNum(max_vdec);
+
+       int jpeg_w = m_GetIntAttributeValue(atts, "jpg_w");
+       int jpeg_h = m_GetIntAttributeValue(atts, "jpg_h");
+
+       RI_INFO("jpeg max resolution (%d * %d)", jpeg_w, jpeg_h);
+       InfoDB->SetImageMinMaxResolution(RI_CODEC_NAME_JPEG, 1, 1, jpeg_w, jpeg_h);
+
+       int heic_w = m_GetIntAttributeValue(atts, "heic_w");
+       int heic_h = m_GetIntAttributeValue(atts, "heic_h");
+       int heic_w_min = m_GetIntAttributeValue(atts, "heic_w_min");
+       int heic_h_min = m_GetIntAttributeValue(atts, "heic_h_min");
+
+       RI_INFO("heic min/max resolution (%d * %d)/(%d * %d)", heic_w_min, heic_h_min, heic_w, heic_h);
+       InfoDB->SetImageMinMaxResolution(RI_CODEC_NAME_HEIC, heic_w_min, heic_h_min, heic_w, heic_h);
+
+       int enc_w = m_GetIntAttributeValue(atts, "enc_w");
+       int enc_h = m_GetIntAttributeValue(atts, "enc_h");
+       int enc_f = m_GetIntAttributeValue(atts, "enc_f");
+       int enc_w_multi = m_GetIntAttributeValue(atts, "enc_w_multi");
+       int enc_h_multi = m_GetIntAttributeValue(atts, "enc_h_multi");
+       int enc_f_multi = m_GetIntAttributeValue(atts, "enc_f_multi");
+       int margin = m_GetIntAttributeValue(atts, "enc_margin");
+       RI_INFO("encoder max resolution (%d * %d * %d fps)", enc_w, enc_h, enc_f);
+       RI_INFO("encoder max resolution (%d * %d * %d fps) * (%d) for multi encoding", enc_w_multi, enc_h_multi, enc_f_multi, margin);
+
+       CVideoEncoder& encoder = CVideoEncoder::GetInstance();
+       encoder.SetMaxResolution(enc_w, enc_h, enc_f);
+       encoder.SetMaxResolutionMultiEncoding(enc_w_multi, enc_h_multi, enc_f_multi);
+       encoder.SetMarginMultiEncoding(margin);
+}
+
+void m_ProcessVCodecStartElement(const char **atts, CResourceInfoDB* InfoDB)
+{
+       char *codec_name = NULL;
+       if (m_GetStringAttributeValue(atts, "name", &codec_name) == PARSE_ERROR) {
+               RI_ERR("Failed to get attribute value of  codec name");
+               return;
+       }
+
+       int w_2k = m_GetIntAttributeValue(atts, "w_2k");
+       int h_2k = m_GetIntAttributeValue(atts, "h_2k");
+       int wp_2k = m_GetIntAttributeValue(atts, "wp_2k");
+       int hp_2k = m_GetIntAttributeValue(atts, "hp_2k");
+
+       if (w_2k > 0 || h_2k > 0 || wp_2k > 0 || hp_2k > 0)
+               InfoDB->Set2KSize(codec_name, w_2k, h_2k, wp_2k, hp_2k);
+
+       int w_4k = m_GetIntAttributeValue(atts, "w_4k");
+       int h_4k = m_GetIntAttributeValue(atts, "h_4k");
+       int wp_4k = m_GetIntAttributeValue(atts, "wp_4k");
+       int hp_4k = m_GetIntAttributeValue(atts, "hp_4k");
+
+       if (w_4k > 0 || h_4k > 0 || wp_4k > 0 || hp_4k > 0)
+               InfoDB->Set4KSize(codec_name, w_4k, h_4k, wp_4k, hp_4k);
+
+       int w_8k = m_GetIntAttributeValue(atts, "w_8k");
+       int h_8k = m_GetIntAttributeValue(atts, "h_8k");
+       int wp_8k = m_GetIntAttributeValue(atts, "wp_8k");
+       int hp_8k = m_GetIntAttributeValue(atts, "hp_8k");
+
+       if (w_8k > 0 || h_8k > 0 || wp_8k > 0 || hp_8k > 0)
+               InfoDB->Set8KSize(codec_name, w_8k, h_8k, wp_8k, hp_8k);
+}
+
+void m_ProcessCategoryStartElement(const char **atts)
+{
+       if (!g_XMLDoc) {
+               RI_ERR("Failed to Category element...need to create ResourceInfoDoc first");
+               return;
+       }
+
+       /* Get category name */
+       char *category_name = NULL;
+       int retval = m_GetStringAttributeValue(atts, "name", &category_name);
+
+       if (retval == PARSE_ERROR) {
+               RI_ERR("Failed to get attribute value of  category name");
+               return;
+       }
+
+       /* Get Category Type */
+       char *category_type = NULL;
+       retval = m_GetStringAttributeValue(atts, "type", &category_type);
+
+       if (retval == PARSE_ERROR) {
+               RI_ERR("Failed to get attribute value of  category type");
+
+               if (category_name) {
+                       free(category_name);
+                       category_name = NULL;
+               }
+               return;
+       }
+
+       /* Get Category Class ID */
+       int category_class_id = m_GetIntAttributeValue(atts, "class");
+       /* Find Category Type */
+       char *codec_name = NULL;
+       ri_rsc_category_e category_id = m_GetCategoryTypeEnum(category_type, &codec_name, m_InfoDB, category_class_id);
+
+       if (category_class_id == RI_CLASS_N_DECODING)
+               m_InfoDB->AddSupportedNDecoder(category_id);
+
+       /* Get Resolution info */
+       bool is_uhd = false;
+
+       char *resolution_info = NULL;
+       retval = m_GetStringAttributeValue(atts, "resolution", &resolution_info);
+
+       if (retval == PARSE_ERROR) {
+               //RI_DBG("CATEGORY(%s) does not have resolution info", category_type);
+       } else {
+               if (!strcmp(resolution_info, "uhd"))
+                       is_uhd = true;
+       }
+
+       if (resolution_info) {
+               free(resolution_info);
+               resolution_info = NULL;
+       }
+
+       /* Put the element into the Category Class */
+       CategoryElement* pCategoryElement = new CategoryElement(category_name, category_type, category_class_id, is_uhd);
+
+       if (pCategoryElement == NULL) {
+               RI_ERR("cannot get category element. Cat[%s]", category_name);
+
+               if (category_name) {
+                       free(category_name);
+                       category_name = NULL;
+               }
+
+               if (category_type) {
+                       free(category_type);
+                       category_type = NULL;
+               }
+               return;
+       }
+
+       pCategoryElement->SetCategoryEnum(category_id);
+       pCategoryElement->SetCodecName(codec_name);
+
+       //RI_DBG("Category Name : %s, Category Type : %s, Category Class ID : %d", category_name, category_type, category_class_id);
+
+       g_XMLDoc->AddResourceCategory(pCategoryElement);
+       g_XMLDoc->PushElement(pCategoryElement);
+}
+
+void m_ReleaseElements(ResourceInfoDoc* infoDoc)
+{
+       if (!infoDoc)
+               return;
+
+       infoDoc->ReleaseElements();
+}
+
+// LCOV_EXCL_START
+void m_printXMLDocInfo(ResourceInfoDoc* infoDoc)
+{
+       if (!infoDoc)
+               return;
+
+       infoDoc->PrintInfo();
+}
+// LCOV_EXCL_STOP
+
+int m_GetIntAttributeValue(const char **atts, const char *attribute_name)
+{
+       const char *value = m_GetAttributeValue(atts, attribute_name);
+       return (value == NULL) ? 0 : atoi(value);
+}
+
+
+int m_GetStringAttributeValue(const char** atts, const char *attribute_name, char **attribute_value)
+{
+       const char *value;
+       value = m_GetAttributeValue(atts, attribute_name);
+
+       /* Failed to find the attribute corresponding to attribute_name */
+       if (value == NULL) {
+               return PARSE_ERROR;
+       }
+
+       *attribute_value = strndup(value, strlen(value));
+
+       return (*attribute_value) ? PARSE_OK:PARSE_ERROR;
+}
+
+
+const char *m_GetAttributeValue(const char **atts, const char *attribute_name)
+{
+       /*
+       Attributes are passed to the start handler as a pointer to a vector of char pointers.
+       Each attribute seen in a start (or empty) tag occupies 2 consecutive places in this vector: the attribute name followed by the attribute value. 
+       These pairs are terminated by a null pointer.
+       Note that an empty tag generates a call to both start and end handlers (in that order).
+       */
+
+       int index_of_attr_vector = 0;
+
+       for (index_of_attr_vector = 0;atts[index_of_attr_vector]; index_of_attr_vector+=2) {
+               if (!strcmp(atts[index_of_attr_vector], attribute_name)) {
+                       return atts[index_of_attr_vector+1];
+               }
+       }
+
+       return NULL;
+}
+
+int m_GetDeviceIDEnum(char *device_name)
+{
+       if (!device_name) {
+               RI_ERR("Invalid device name");
+               return RI_DEVICE_UNDEFINED;
+       }
+
+       int device_id = FindDeviceId(device_name);
+
+       if (device_id == RI_DEVICE_UNDEFINED)
+               RI_ERR("can't find device id of (%s)", device_name);
+       return device_id;
+}
+
+int m_GetDeviceIDLicense(const char *device_name)
+{
+       if (!device_name) {
+               RI_ERR("Invalid device name");
+               return RI_DEVICE_UNDEFINED;
+       }
+
+       int device_id = FindDeviceIdLicense(device_name);
+
+       if (device_id == RI_DEVICE_UNDEFINED)
+               RI_ERR("can't find device id of (%s)", device_name);
+
+       return device_id;
+}
+
+ri_rsc_category_e m_GetCategoryTypeEnum(char *category_name, char **codec, CResourceInfoDB *InfoDB, int class_id)
+{
+       if (!category_name) {
+               RI_ERR("Invalid category name");
+               return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+       }
+
+       CCategory *category = FindCategory(category_name);
+       if (!category) {
+               RI_ERR("Invalid category name (%s)", category_name);
+               return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+       }
+
+       ri_rsc_category_e category_id = category->GetId();
+       category_type_e category_type = category->GetType();
+
+       switch(category_type) {
+               case CATEGORY_TYPE_JPEG:
+                       InfoDB->AddSupportedJpegFormat(category_id);
+                       InfoDB->AddSupportedImageFormat(category_id);
+                       InfoDB->AddCategoryResolution(category_id, category->GetResolution());
+                       InfoDB->AddCategoryFramerate(category_id, category->GetFrameRate());
+                       break;
+               case CATEGORY_TYPE_VIDEO_DECODER:
+                       InfoDB->AddSupportedVideoFormat(category_id);
+                       InfoDB->AddVideoCodec(category->GetCodecName(), category->GetResolution(), category->GetFrameRate());
+                       InfoDB->AddCategoryResolution(category_id, category->GetResolution());
+                       InfoDB->AddCategoryFramerate(category_id, category->GetFrameRate());
+                       if (class_id == RI_CLASS_N_DECODING)
+                               InfoDB->AddSupportedNDecoder(category->GetCodecName(), category_id, category->GetResolution(), category->GetFrameRate());
+                       break;
+               case CATEGORY_TYPE_VIDEO_DECODER_NO_CODEC:
+                       InfoDB->AddCategoryResolution(category_id, category->GetResolution());
+                       InfoDB->AddCategoryFramerate(category_id, category->GetFrameRate());
+                       break;
+               case CATEGORY_TYPE_AUDIO_DECODER:
+                       InfoDB->AddSupportedAudioCodec(category->GetCodecName(), category_id);
+                       break;
+               case CATEGORY_TYPE_IMAGE_DECODER:
+                       InfoDB->AddSupportedImageFormat(category_id);
+                       break;
+               default:
+                       break;
+       }
+
+       *codec = (category->GetCodecName().empty()) ? strdup("") : strndup(category->GetCodecName().c_str(), category->GetCodecName().length());
+
+       return category_id;
+}
diff --git a/src/ri-api.cpp b/src/ri-api.cpp
new file mode 100755 (executable)
index 0000000..4b1d06b
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <ri-api.h>
+#include <ri-macro.h>
+#include <CResourceInfoDB.h>
+#include <CResourceInfo.h>
+#include <CVideoEncoder.h>
+#include <CVideoCodec.h>
+#include <CVideoResolution.h>
+
+ri_rsc_category_e ri_get_video_category_id(IN const char *codec_name, IN int color_depth, IN int h_size, IN int framerate, IN int sampling_format)
+{
+       return CResourceInfo::GetInstance()->GetVideoCategoryID(codec_name, color_depth, h_size, framerate, sampling_format);
+}
+
+ri_rsc_category_e ri_get_jpeg_category_id(IN const char *codec_name, IN int h_size)
+{
+       return CResourceInfo::GetInstance()->GetCapableMJpegDecoderCategoryID(codec_name, h_size);
+}
+
+ri_rsc_category_e ri_get_sub_jpeg_category_id(IN const char *codec_name, IN int w_size, IN int h_size)
+{
+       return CResourceInfo::GetInstance()->GetSubJpegCategoryID(codec_name, w_size, h_size);
+}
+
+ri_return_code_e ri_get_category_type_by_device_id(IN int device_id, OUT int* category_type)
+{
+       return CResourceInfoDB::GetInstance()->GetCategoryType(device_id, category_type);
+}
+
+ri_return_code_e ri_get_device_info_for_fastboot(IN ri_rsc_category_e category, OUT char** node)
+{
+       return CResourceInfoDB::GetInstance()->GetDefaultDeviceNodePath(category, node);
+}
+
+ri_rsc_category_e ri_get_capable_video_category_id(IN ri_video_category_option_request_s* option)
+{
+       return CResourceInfo::GetInstance()->GetCapableVideoCategoryID(option, false);
+}
+
+ri_return_code_e ri_get_video_category_id_by_codec(IN ri_category_option_request_s* request_opt, OUT ri_category_option_return_s* return_opt)
+{
+       if (request_opt->codec_name == NULL) {
+               RI_ERR("invalid codec name");
+               return RI_ERROR;
+       }
+
+       std::string req_codec(request_opt->codec_name);
+       std::string converted_codec(request_opt->codec_name);
+       ri_video_decoder_class_e class_value = RI_VIDEO_CATEGORY_CLASS_LOW;
+
+       RI_INFO("ri_get_video_category_id_by_codec. codec(%s). full_mode(%d)", request_opt->codec_name, (int)request_opt->preferred_mode);
+
+       if (!req_codec.compare("AVS")) {
+               converted_codec.assign("AVS+");
+               class_value = RI_VIDEO_CATEGORY_CLASS_HIGH;
+       } else if (!req_codec.compare("H265")) {
+               converted_codec.assign("HEVC");
+               class_value = (request_opt->preferred_mode == RI_VDEC_MODE_FULL) ? RI_VIDEO_CATEGORY_CLASS_HIGH: RI_VIDEO_CATEGORY_CLASS_LOW;
+       } else if (!req_codec.compare(RI_CODEC_NAME_HEVC_SHVC)) {
+               class_value = (request_opt->preferred_mode == RI_VDEC_MODE_FULL) ? RI_VIDEO_CATEGORY_CLASS_HIGH: RI_VIDEO_CATEGORY_CLASS_LOW;
+       }
+
+       return CResourceInfoDB::GetInstance()->GetCategoryOption(converted_codec.c_str(), class_value, &(return_opt->category_option), &(return_opt->is_uhd_decoder), &(return_opt->device_node));
+}
+
+ri_return_code_e ri_get_max_resolution(IN const char *vcodec, OUT int *width, OUT int *height, OUT int *framerate)
+{
+       if (!vcodec || !width || !height || !framerate) {
+               RI_ERR("invalid param");
+               return RI_ERROR;
+       }
+
+       int resolution = RI_RESOLUTION_UNDEFINED;
+       CVideoCodec *codec = CResourceInfoDB::GetInstance()->FindVideoCodec(std::string(vcodec));
+
+       if (!codec) {
+               RI_ERR("not supported codec (%s)", vcodec);
+               return RI_ERROR;
+       }
+
+       *framerate = codec->GetMaxFrameRate();
+       resolution = codec->GetMaxResolution();
+
+       CVideoResolution::GetResolutionSize(resolution, width, height);
+
+       RI_INFO("(%s:(%d*%d)-(%d)", vcodec, *width, *height, *framerate);
+
+       return RI_OK;
+}
+
+bool ri_is_supported_video_codec(const char *vcodec)
+{
+       if (!vcodec) {
+               RI_ERR("invalid param");
+               return false;
+       }
+
+       CVideoCodec *codec = CResourceInfoDB::GetInstance()->FindVideoCodec(std::string(vcodec));
+       return (!codec) ? false:true;
+}
+
+bool ri_is_supported_audio_codec(IN const char *acodec)
+{
+       if (!acodec) {
+               RI_ERR("invalid param");
+               return false;
+       }
+
+       return CResourceInfoDB::GetInstance()->IsSupportedAudioCodec(std::string(acodec));
+}
+
+ri_return_code_e ri_get_capability_n_decoder(IN const char *vcodec, OUT int *width, OUT int *height, OUT int *framerate, OUT int *n_instance)
+{
+       if (!vcodec || !width || !height || !framerate || !n_instance) {
+               RI_ERR("invalid param");
+               return RI_ERROR;
+       }
+       CResourceInfoDB* db = CResourceInfoDB::GetInstance();
+       CVideoCodecNDecoding *codec = db->FindNDecodingVideoCodec(vcodec);
+       if (!codec) {
+               RI_ERR("n-decoding not supported (%s)", vcodec);
+               *width = 0; *height = 0, *framerate = 0, *n_instance = 0;
+               return RI_OK;
+       }
+
+       *framerate = codec->GetMaxFramerate();
+       CVideoResolution::GetResolutionSize(codec->GetMaxResolution(), width, height);
+       *n_instance = db->GetNumOfDeviceBelongsTo(codec->GetCategoryId());
+
+       RI_INFO("n decoder (%s) : (%d*%d@%dp)-(%d)", vcodec, *width, *height, *framerate, *n_instance);
+       return RI_OK;
+}
+
+ri_video_property_h ri_create_video_property(const char *vcodec, int w, int h, int fps, int color_depth, int sampling_format)
+{
+       RI_RETURN_NULL_IF_NULL(vcodec, "invalid param");
+
+       ri_video_property *prop = (ri_video_property*) calloc(1, sizeof(ri_video_property));
+       prop->width = w;
+       prop->height = h;
+       prop->fps = fps;
+       prop->color_depth = color_depth;
+       prop->sampling_format = sampling_format;
+       prop->codec_name = strndup(vcodec, strlen(vcodec));
+       prop->progressive = false;
+       prop->detiled = false;
+       return prop;
+}
+
+void ri_video_property_free(ri_video_property_h prop)
+{
+       RI_RETURN_IF_NULL(prop, "invalid param");
+       RI_FREE(prop->codec_name);
+       RI_FREE(prop);
+}
+
+ri_return_code_e ri_video_property_set_progressive(ri_video_property_h prop, bool progressive)
+{
+       if (!prop) {
+               RI_ERR("invalid param");
+               return RI_ERROR;
+       }
+       prop->progressive = progressive;
+       return RI_OK;
+}
+
+ri_return_code_e ri_video_property_set_detiled(ri_video_property_h prop, bool detiled)
+{
+       if (!prop) {
+               RI_ERR("invalid param");
+               return RI_ERROR;
+       }
+       prop->detiled = detiled;
+       return RI_OK;
+}
+
+ri_rsc_category_e ri_get_capable_video_category(ri_video_property_h prop)
+{
+       if (!prop) {
+               RI_ERR("invalid param");
+               return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+       }
+       return CResourceInfo::GetInstance()->GetCapableVideoCategoryID(prop, false);
+}
+
+ri_video_encoder_property_h ri_create_video_encoder_property(const int w, const int h, const int fps)
+{
+       ri_video_encoder_property *prop = (ri_video_encoder_property*) calloc(1, sizeof(ri_video_encoder_property));
+       prop->width = w;
+       prop->height = h;
+       prop->fps = fps;
+       prop->multi = false;
+       return prop;
+}
+
+int ri_video_encoder_property_set_multi_encoding(ri_video_encoder_property_h prop, const bool multi)
+{
+       RI_RETURN_MINUS_IF_NULL(prop, "invalid param");
+       prop->multi = multi;
+       return 0;
+}
+
+void ri_video_encoder_property_free(ri_video_encoder_property_h prop)
+{
+       RI_RETURN_IF_NULL(prop, "invalid param");
+       RI_FREE(prop);
+}
+
+int ri_get_capable_video_encoder_category(ri_video_encoder_property_h prop)
+{
+       int max_w = 0;
+       int max_h = 0;
+       int max_fps = 0;
+
+       RI_RETURN_MINUS_IF_NULL(prop, "invalid property");
+       RI_INFO("rsz - w(%d)/h(%d)/f(%d)/multi(%d)", prop->width, prop->height, prop->fps, prop->multi);
+
+       CVideoEncoder& encoder = CVideoEncoder::GetInstance();
+       encoder.GetMaxResolution(prop->multi, &max_w, &max_h, &max_fps);
+
+       if ((prop->width > max_w) || (prop->height > max_h) || (prop->fps > max_fps)) {
+               RI_ERR("not supported w(%d)/h(%d)/f(%d) - max w(%d)/h(%d)/f(%d)", prop->width, prop->height, prop->fps, max_w, max_h, max_fps);
+               return -1;
+       }
+
+       return (prop->width * prop->height * prop->fps);
+}
diff --git a/src/ri-dual-decoding-capability.cpp b/src/ri-dual-decoding-capability.cpp
new file mode 100755 (executable)
index 0000000..0d54dfd
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <glib.h>
+#include <ri-macro.h>
+#include <ri-debug.h>
+#include <ri-video-capability.h>
+#include <CResourceInfoDB.h>
+
+#include <ri-api.h>
+#include <ri-dual-decoding-capability.h>
+#include <set>
+
+#define MAX_DEVICE_NUM 256
+
+struct ri_video_property_list {
+       GList *list;
+};
+
+ri_video_property_list_h ri_create_video_property_list(void)
+{
+       ri_video_property_list* vlist = static_cast<ri_video_property_list*>(calloc(1, sizeof(ri_video_property_list)));
+       if (!vlist) {
+               RI_ERR("failed to create list");
+               return nullptr;
+       }
+
+       return vlist;
+}
+
+int ri_video_property_list_add(ri_video_property_list_h list, const ri_video_property_h property)
+{
+       if (!property || !list) {
+               RI_ERR("invalid param");
+               return -1;
+       }
+
+       list->list = g_list_append(list->list, property);
+
+       RI_INFO("add video: c(%s), w(%d), h(%d), f(%d), cl(%d), s(%d), p(%d), d(%d)/count(%d)", \
+                       property->codec_name, property->width, property->height, property->fps, \
+                       property->color_depth, property->sampling_format, property->progressive, \
+                       property->detiled, g_list_length(list->list));
+
+       return 0;
+}
+
+int ri_video_property_list_remove(ri_video_property_list_h list, const ri_video_property_h property)
+{
+       if (!property || !list) {
+               RI_ERR("invalid param");
+               return -1;
+       }
+
+       list->list = g_list_remove(list->list, property);
+
+       RI_INFO("remove video: c(%s), w(%d), h(%d), f(%d), cl(%d), s(%d), p(%d), d(%d)/count(%d)", \
+                       property->codec_name, property->width, property->height, property->fps, \
+                       property->color_depth, property->sampling_format, property->progressive, \
+                       property->detiled, g_list_length(list->list));
+
+       return 0;
+}
+
+void _free_video_property(gpointer data)
+{
+       if (!data)
+               return;
+
+       ri_video_property *prop = static_cast<ri_video_property*>(data);
+       ri_video_property_free(prop);
+}
+
+void ri_video_property_list_free(ri_video_property_list_h list)
+{
+       if (!list) {
+               RI_ERR("invalid param");
+               return;
+       }
+
+       g_list_free_full(list->list, _free_video_property);
+       free(list);
+}
+
+static void _ri_update_mcluster_bw(ri_device_common_attr_s *device_attr, std::set<int>*mclusters, int *total_bw)
+{
+       unsigned int n = 0;
+
+       if (!device_attr) {
+               RI_ERR("invalid param");
+               return;
+       }
+
+       while (n < device_attr->n_mem_clusters) {
+               mclusters->insert(device_attr->mem_clusters[n]);
+               RI_INFO("memory cluster(%d) added", device_attr->mem_clusters[n]);
+               n++;
+       }
+
+       *total_bw = *total_bw - device_attr->bw;
+       RI_ERR("total available bw(%d)", *total_bw);
+}
+
+static bool _ri_check_available_mcluster_bw(ri_device_common_attr_s *device_attr, std::set<int>*mclusters, int total_bw)
+{
+       unsigned int m = 0;
+       while (m < device_attr->n_mem_clusters) {
+               if (mclusters->find(device_attr->mem_clusters[m]) != mclusters->end()) {
+                       RI_ERR("memory_cluster(%d) is not free", device_attr->mem_clusters[m]);
+                       break;
+               }
+               m++;
+       }
+
+       int avail_bw = total_bw - device_attr->bw;
+       if (avail_bw < 0) {
+               RI_ERR("bw(%d/%d) is not available", device_attr->bw, total_bw);
+               return false;
+       }
+
+       return (m == device_attr->n_mem_clusters);
+}
+
+static bool _ri_check_and_update_mcluster_bw_by_category_id(int category_id, std::set<int>*mclusters, int *total_bw)
+{
+       int device_id[MAX_DEVICE_NUM];
+       int n_devices = CResourceInfoDB::GetInstance()->GetNumOfDeviceBelongsTo(category_id);
+
+       if (n_devices == 0 || CResourceInfoDB::GetInstance()->GetDeviceID(category_id, MAX_DEVICE_NUM, device_id) != RI_OK) {
+               RI_ERR("category_id(%d), no device found", category_id);
+               return false;
+       }
+
+       for (int i = 0; i < n_devices; i++) {
+               ri_device_common_attr_s *device_attr = CResourceInfoDB::GetInstance()->GetDeviceAttr(device_id[i]);
+               if (!device_attr)
+                       continue;
+
+               if (!_ri_check_available_mcluster_bw(device_attr, mclusters, *total_bw))
+                       continue;
+
+               RI_INFO("category_id(%d), total memory_cluster(%d)", category_id, device_attr->n_mem_clusters);
+               _ri_update_mcluster_bw(device_attr, mclusters, total_bw);
+               if (*total_bw < 0)
+                       return false;
+
+               RI_INFO("category_id(%d/%d) success with device_num(%d), n_cluster(%d)", device_attr->id, category_id, i, device_attr->n_mem_clusters);
+               return true;
+       }
+
+       return false;
+}
+
+bool ri_can_play_multiple_videos(const ri_video_property_list_h list)
+{
+       if (!list) {
+               RI_ERR("invalid param");
+               return false;
+       }
+
+       int systembw_avail = ri_get_system_bw();
+       std::set<int> mem_clusters;
+
+       for (GList *item = g_list_first(list->list); item != NULL; item = g_list_next(item)) {
+               ri_video_property *prop = static_cast<ri_video_property*>(item->data);
+               ri_rsc_category_e category_id = ri_get_capable_video_category(prop);
+               if (category_id <= RI_CATEGORY_NONE) {
+                       RI_ERR("all videos play not supported !!");
+                       mem_clusters.clear();
+                       return false;
+               }
+
+               RI_INFO("capable category-success(%d) for c(%s), w(%d), h(%d), f(%d), cl(%d), s(%d), p(%d), d(%d)", \
+                               category_id, prop->codec_name, prop->width, prop->height, prop->fps, \
+                               prop->color_depth, prop->sampling_format, prop->progressive, \
+                               prop->detiled);
+
+               if (!_ri_check_and_update_mcluster_bw_by_category_id(category_id, &mem_clusters, &systembw_avail)) {
+                       RI_ERR("capable category(%d) not supported for codec(%s)", category_id, prop->codec_name);
+                       mem_clusters.clear();
+                       return false;
+               }
+       }
+
+       mem_clusters.clear();
+
+       RI_INFO("all videos play supported !!");
+       return true;
+}
diff --git a/src/ri-module-api.cpp b/src/ri-module-api.cpp
new file mode 100755 (executable)
index 0000000..f13c02c
--- /dev/null
@@ -0,0 +1,341 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+#include <ri-module-api.h>
+#include <ri-video-decoder-category-type.h>
+#include <CResourceInfoDB.h>
+#include <CResourceInfo.h>
+#include <CMultiview.h>
+#include <CModelInfo.h>
+#include <CVideoEncoder.h>
+
+// LCOV_EXCL_START
+ri_return_code_e ri_get_device_list(OUT int* num, OUT ri_device_common_attr_s** devices)
+{
+       return CResourceInfoDB::GetInstance()->GetDeviceList(num, devices);
+}
+
+ri_return_code_e ri_get_device_path_by_device_id(IN const int device_id, OUT char** device_path)
+{
+       return CResourceInfoDB::GetInstance()->GetDeviceNodePath(device_id, device_path);
+}
+
+ri_return_code_e ri_get_omx_comp_name_by_device_id(IN const int device_id, OUT char** name)
+{
+       return CResourceInfoDB::GetInstance()->GetOmxCompName(device_id, name);
+}
+
+unsigned int ri_get_device_id(IN char *node)
+{
+       return CResourceInfoDB::GetInstance()->GetDeviceID(node);
+}
+
+const char *ri_get_device_name_by_device_id(IN const int device_id)
+{
+       return CResourceInfoDB::GetInstance()->GetDeviceName(device_id);
+}
+
+int ri_get_capable_audio_category_id(IN ri_audio_category_option_request_s* option)
+{
+       return CResourceInfo::GetInstance()->GetCapableAudioDecoderCategoryID(option);
+}
+
+int ri_get_system_bw(void)
+{
+       return CResourceInfoDB::GetInstance()->GetSystemBW();
+}
+
+bool ri_triple_decoding_supported(void)
+{
+       return CResourceInfoDB::GetInstance()->IsSupportTripleDecoding();
+}
+
+int ri_get_max_video_decoder_num(void)
+{
+       return CResourceInfoDB::GetInstance()->GetMaxVideoDecoderNum();
+}
+
+int ri_get_ai_decoder_category_id(IN ri_rsc_category_e vdec)
+{
+       return CResourceInfoDB::GetInstance()->GetAIDecoderCategoryId(vdec);
+}
+
+bool ri_is_video_decoder_category(int category)
+{
+       return CResourceInfoDB::GetInstance()->IsVideoDecoderCategory((ri_rsc_category_e) category);
+}
+
+bool ri_is_mjpeg_decoder_category(int category)
+{
+       return CResourceInfoDB::GetInstance()->IsMJpegDecoderCategory((ri_rsc_category_e) category);
+}
+
+bool ri_is_video_scaler_category(int category)
+{
+       if (category == RI_CATEGORY_SCALER)
+               return true;
+       if (category == RI_CATEGORY_SCALER_BG)
+               return true;
+       if (category == RI_CATEGORY_SCALER_SUB)
+               return true;
+       if ((category > RI_CATEGORY_SCALER_OPTION) && (category < RI_SCALER_CATEGORY_MAX))
+               return true;
+
+       return false;
+}
+
+bool ri_is_audio_out_category(int category)
+{
+       bool result = false;
+       switch(category) {
+               case RI_CATEGORY_AUDIO_MAIN_OUT:
+               case RI_CATEGORY_AUDIO_SUB_OUT:
+               case RI_CATEGORY_AUDIO_MAIN_OUT_SHARE:
+                       result = true;
+                       break;
+               default:
+                       result = false;
+                       break;
+       }
+
+       return result;
+}
+
+bool ri_is_audio_decoder_category(int category)
+{
+       return CResourceInfoDB::GetInstance()->IsAudioDecoderCategory((ri_rsc_category_e) category);
+}
+
+bool ri_is_audio_decoder_category_mixing(int category)
+{
+       return CResourceInfoDB::GetInstance()->IsAudioDecoderCategoryForMixing((ri_rsc_category_e) category);
+}
+
+int ri_unmask_category_options(int category)
+{
+       int result = category;
+
+       result = (result & ~RI_MIXING_OPT_DEFAULT);
+       result = (result & ~RI_MIXING_OPT_MULTIVIEW);
+       result = (result & ~RI_MIXING_OPT_INTERACTION_SOUND);
+
+       return result;
+}
+
+int ri_get_n_decoder_category_id(ri_video_category_option_request_s* option)
+{
+       return CResourceInfo::GetInstance()->GetCapableVideoCategoryID(option, true);
+}
+
+int ri_get_category_class(int category)
+{
+       return CResourceInfoDB::GetInstance()->GetCategoryClass(category);
+}
+
+void ri_init(void)
+{
+       CResourceInfoDB *db = CResourceInfoDB::GetInstance();
+       assert(db);
+}
+
+ri_rsc_category_e ri_get_image_category_id(const char *codec, int w_size, int h_size)
+{
+       if (!codec) {
+               RI_ERR("invalid codec");
+               return RI_CATEGORY_IMAGE_DECODER_NOT_SUPPORTED;
+       }
+
+       return CResourceInfo::GetInstance()->GetImageCategoryID(codec, w_size, h_size);
+}
+
+bool ri_is_main_device(const int device_id)
+{
+       return CResourceInfoDB::GetInstance()->IsMainDevice(device_id);
+}
+
+bool ri_is_overlay_supported(const int device_id)
+{
+       return CResourceInfoDB::GetInstance()->IsSupportOverlay(device_id);
+}
+
+int ri_get_supported_max_resolution(const int device_id)
+{
+       return CResourceInfoDB::GetInstance()->GetMaxResolution(device_id);
+}
+
+int ri_get_max_sampling_format(const int device_id)
+{
+       return CResourceInfoDB::GetInstance()->GetMaxSamplingFormat(device_id);
+}
+
+bool ri_get_zone_id_based_reclaim_policy(void)
+{
+       return true;
+}
+
+bool ri_is_h264_interlaced_limited_model(void)
+{
+       return false;
+}
+
+bool ri_is_h264_portrait_seamless_playback_limited_model(void)
+{
+       return false;
+}
+
+int to_ri_video_resolution(int resolution)
+{
+       int result = RI_RSZ_UNDEFINED;
+
+       switch(resolution) {
+               case RI_RESOLUTION_qHD:
+               case RI_RESOLUTION_HD:
+               case RI_RESOLUTION_FHD:
+                       result = RI_RSZ_FHD;
+                       break;
+               case RI_RESOLUTION_4K_UHD:
+                       result = RI_RSZ_4K;
+                       break;
+               case RI_RESOLUTION_DQHD:
+                       result = RI_RSZ_DQHD;
+                       break;
+               case RI_RESOLUTION_5K:
+                       result = RI_RSZ_5K;
+                       break;
+               case RI_RESOLUTION_8K_UHD:
+                       result = RI_RSZ_8K;
+                       break;
+               default:
+                       break;
+       }
+       RI_INFO("rsz (%d > %d)", resolution, result);
+       return result;
+}
+
+int ri_get_video_category_resolution(int category)
+{
+       return to_ri_video_resolution(CResourceInfoDB::GetInstance()->FindCategoryResolution(category));
+}
+
+int ri_get_video_category_framerate(int category)
+{
+       return CResourceInfoDB::GetInstance()->FindCategoryFramerate(category);
+}
+
+bool ri_is_8k_sub_scaler_dual_limited_model(void)
+{
+       return false;
+}
+
+int ri_mv_get_resource_strategy(void)
+{
+       return RI_MV_STRATEGY_NOT_SUPPORT;
+}
+
+int ri_get_video_category_codec_name(int category, char** codec)
+{
+       if (!codec) {
+               RI_ERR("invalid param");
+               return -1;
+       }
+
+       std::string codec_name = CResourceInfoDB::GetInstance()->FindCategoryVideoCodecName(category);
+       *codec = strndup(codec_name.c_str(), codec_name.length());
+       return 0;
+}
+
+ri_n_decoding_bw_policy_e ri_get_n_decoding_bw_policy(int category_id)
+{
+       if (category_id != RI_CATEGORY_VIDEO_DECODER_H264_FHD_N_8BIT_30P) {
+               RI_ERR("unexpected category id (%d)", category_id);
+               return RI_BW_POLICY_SHARE;
+       }
+
+       return RI_BW_POLICY_SHARE;
+}
+
+bool ri_support_hdmi_dedicated_scaler(void)
+{
+       return CResourceInfoDB::GetInstance()->IsSupportedCategory(RI_CATEGORY_SCALER_HDMI);
+}
+
+bool ri_is_hdmi_dedicated_scaler_category(int category_id)
+{
+       bool result = false;
+
+       switch(category_id) {
+               case RI_CATEGORY_SCALER_HDMI:
+               case RI_CATEGORY_SCALER_HDMI_SUB:
+               case RI_CATEGORY_SCALER_HDMI_MV:
+                       result = true;
+                       break;
+               default:
+                       break;
+       }
+
+       return result;
+}
+
+int ri_get_video_category_dedicated_to_triple_decoding(int category_id)
+{
+       if (!ri_triple_decoding_supported()) {
+               RI_ERR("triple decoding not supported (%d)", category_id);
+               return RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+       }
+
+       int result = RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+
+       switch(category_id) {
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P:
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_INTERLACED:
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_MV:
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PORTRAIT:
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_TRIPLE:
+               case RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_PROGRESSIVE:
+                       result = (CResourceInfoDB::GetInstance()->IsSupportedCategory(RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_TRIPLE)) ? RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P_TRIPLE : RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+                       break;
+               default:
+                       break;
+       }
+
+       RI_INFO("dedicated to triple decoding (%d > %d)", category_id, result);
+       return result;
+}
+
+int ri_get_video_encoder_bandwidth(unsigned long long *max, unsigned long long *max_multi, unsigned long long *max_multi_single)
+{
+       if (!max || !max_multi) {
+               RI_ERR("invalid param");
+               return -1;
+       }
+
+       CVideoEncoder& encoder = CVideoEncoder::GetInstance();
+       *max = encoder.GetMaxBandWidthSingleEncoding();
+       *max_multi = encoder.GetMaxBandWidthMultiEncoding();
+       *max_multi_single = encoder.GetMaxBandWidthMultiEncodingSingle();
+       RI_INFO("max(%llu), max_multi(%llu), max_multi_single(%llu)", *max, *max_multi, *max_multi_single);
+       return 0;
+}
+
+bool ri_support_dual_decoding_av1(void)
+{
+       return true;
+}
+
+// LCOV_EXCL_STOP
diff --git a/src/ri-vdec-api.cpp b/src/ri-vdec-api.cpp
new file mode 100755 (executable)
index 0000000..473dfff
--- /dev/null
@@ -0,0 +1,183 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <sys/types.h>\r
+#include <unistd.h>\r
+#include <assert.h>\r
+#include <glib.h>\r
+#include <ri-macro.h>\r
+#include <ri-vdec-api.h>\r
+#include <CVideoCodec.h>\r
+#include <CVideoResolution.h>\r
+#include <CResourceInfoDB.h>\r
+\r
+// LCOV_EXCL_START\r
+\r
+int ri_get_video_decoder_list(ri_resource_list_h *list)\r
+{\r
+       RI_RETURN_MINUS_IF_NULL(list, "invalid param");\r
+       return CResourceInfoDB::GetInstance()->GetVideoDecoderList(list);\r
+}\r
+\r
+static void ri_free_video_codec(gpointer data)\r
+{\r
+       ri_vcodec *vcodec = (ri_vcodec *) data;\r
+       RI_RETURN_IF_NULL(vcodec, "invalid vcodec");\r
+\r
+       RI_FREE(vcodec->codec_name);\r
+       RI_FREE(vcodec);\r
+}\r
+\r
+static void ri_free_video_decoder(gpointer data)\r
+{\r
+       ri_video_decoder *vdec = (ri_video_decoder *) data;\r
+       RI_RETURN_IF_NULL(vdec, "invalid vdec");\r
+\r
+       g_list_free_full(vdec->codec_list, ri_free_video_codec);\r
+       RI_FREE(vdec);\r
+}\r
+\r
+void ri_free_video_decoder_list(ri_resource_list_h list)\r
+{\r
+       RI_RETURN_IF_NULL(list, "invalid list");\r
+\r
+       g_list_free_full(list->rsc_list, ri_free_video_decoder);\r
+       RI_FREE(list);\r
+}\r
+\r
+ri_video_decoder_h ri_vdec_list_get_next(ri_resource_list_h list)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(list, "invalid list");\r
+\r
+       GList *tmp = g_list_next(list->iter);\r
+       RI_RETURN_NULL_IF_NULL(tmp, "no next video decoder");\r
+\r
+       list->iter = tmp;\r
+       return (ri_video_decoder_h) list->iter->data;\r
+}\r
+\r
+ri_video_decoder_h ri_vdec_list_get_prev(ri_resource_list_h list)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(list, "invalid list");\r
+\r
+       GList *tmp = g_list_previous(list->iter);\r
+       RI_RETURN_NULL_IF_NULL(tmp, "no prev video decoder");\r
+\r
+       list->iter = tmp;\r
+       return (ri_video_decoder_h) list->iter->data;\r
+}\r
+\r
+ri_video_decoder_h ri_vdec_list_get_first(ri_resource_list_h list)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(list, "invalid list");\r
+\r
+       GList *tmp = g_list_first(list->rsc_list);\r
+       RI_RETURN_NULL_IF_NULL(tmp, "no first video decoder");\r
+\r
+       list->iter = tmp;\r
+       return (ri_video_decoder_h) list->iter->data;\r
+}\r
+\r
+ri_video_decoder_h ri_vdec_list_get_last(ri_resource_list_h list)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(list, "invalid list");\r
+\r
+       GList *tmp = g_list_last(list->rsc_list);\r
+       RI_RETURN_NULL_IF_NULL(tmp, "no last video decoder");\r
+\r
+       list->iter = tmp;\r
+       return (ri_video_decoder_h) list->iter->data;\r
+}\r
+\r
+int ri_vdec_list_get_count(ri_resource_list_h list)\r
+{\r
+       return (list) ? list->n_rsc:0;\r
+}\r
+\r
+int ri_vdec_get_id(ri_video_decoder_h vdec)\r
+{\r
+       RI_RETURN_MINUS_IF_NULL(vdec, "invalid vdec");\r
+       return vdec->id;\r
+}\r
+\r
+int ri_vdec_get_supported_codec_count(ri_video_decoder_h vdec)\r
+{\r
+       return (vdec) ? vdec->n_codecs:0;\r
+}\r
+\r
+ri_video_codec_h ri_vdec_get_codec_next(ri_video_decoder_h vdec)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(vdec, "invalid vdec");\r
+\r
+       GList *tmp = g_list_next(vdec->iter);\r
+       RI_RETURN_NULL_IF_NULL(tmp, "no next video codec");\r
+\r
+       vdec->iter = tmp;\r
+       return (ri_video_codec_h) vdec->iter->data;\r
+}\r
+\r
+ri_video_codec_h ri_vdec_get_codec_prev(ri_video_decoder_h vdec)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(vdec, "invalid vdec");\r
+\r
+       GList *tmp = g_list_previous(vdec->iter);\r
+       RI_RETURN_NULL_IF_NULL(tmp, "no prev video codec");\r
+\r
+       vdec->iter = tmp;\r
+       return (ri_video_codec_h) vdec->iter->data;\r
+}\r
+\r
+ri_video_codec_h ri_vdec_get_codec_first(ri_video_decoder_h vdec)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(vdec, "invalid vdec");\r
+\r
+       GList *tmp = g_list_first(vdec->codec_list);\r
+       RI_RETURN_NULL_IF_NULL(tmp, "no first video codec");\r
+\r
+       vdec->iter = tmp;\r
+       return (ri_video_codec_h) vdec->iter->data;\r
+}\r
+\r
+ri_video_codec_h ri_vdec_get_codec_last(ri_video_decoder_h vdec)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(vdec, "invalid vdec");\r
+\r
+       GList *tmp = g_list_last(vdec->codec_list);\r
+       RI_RETURN_NULL_IF_NULL(tmp, "no last video codec");\r
+\r
+       vdec->iter = tmp;\r
+       return (ri_video_codec_h) vdec->iter->data;\r
+}\r
+\r
+const char* ri_vcodec_get_name(ri_video_codec_h vcodec)\r
+{\r
+       RI_RETURN_NULL_IF_NULL(vcodec, "invalid vcodec");\r
+       return vcodec->codec_name;\r
+}\r
+\r
+int ri_vcodec_get_max_resolution(ri_video_codec_h vcodec, int *w, int *h, int *f)\r
+{\r
+       RI_RETURN_MINUS_IF_NULL(vcodec, "invalid vcodec");\r
+       RI_RETURN_MINUS_IF_NULL(w, "invalid param");\r
+       RI_RETURN_MINUS_IF_NULL(h, "invalid param");\r
+       RI_RETURN_MINUS_IF_NULL(f, "invalid param");\r
+\r
+       CVideoResolution::GetResolutionSize(vcodec->rsz_id, w, h);\r
+       *f = vcodec->framerate;\r
+       return 0;\r
+}\r
+\r
+// LCOV_EXCL_STOP\r
diff --git a/src/ri-video-capability.cpp b/src/ri-video-capability.cpp
new file mode 100755 (executable)
index 0000000..8ad9ce9
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <glib.h>
+#include <ri-macro.h>
+#include <ri-debug.h>
+#include <ri-video-capability.h>
+#include <CResourceInfoDB.h>
+
+struct ri_video_decoding_property {
+       char *codec_name;
+};
+
+ri_video_decoding_property_h ri_create_video_decoding_property(const char *codec_name)
+{
+       if (!codec_name || strlen(codec_name) == 0) {
+               RI_ERR("invalid codec_name");
+               return NULL;
+       }
+
+       ri_video_decoding_property* prop = (ri_video_decoding_property*) calloc(1, sizeof(ri_video_decoding_property));
+       prop->codec_name = strdup(codec_name);
+       return prop;
+}
+
+int ri_video_decoding_property_free(ri_video_decoding_property_h prop)
+{
+       RI_RETURN_MINUS_IF_NULL(prop, "invalid prop");
+
+       if (prop->codec_name)
+               free(prop->codec_name);
+
+       free(prop);
+       return 0;
+}
+
+struct ri_video_capability {
+       ri_device_property device_prop;
+       int width;
+       int height;
+       int fps;
+};
+
+ri_device_property ri_video_capability_get_device_property(const ri_video_capability_h capa)
+{
+       if (!capa) {
+               RI_ERR("invalid capa");
+               return RI_DEVICE_PROPERTY_NONE;
+       }
+       RI_INFO("(%d)", capa->device_prop);
+       return capa->device_prop;
+}
+
+int ri_video_capability_get_width(const ri_video_capability_h capa)
+{
+       RI_RETURN_MINUS_IF_NULL(capa, "invalid capa");
+       RI_INFO("(%d)", capa->width);
+       return capa->width;
+}
+
+int ri_video_capability_get_height(const ri_video_capability_h capa)
+{
+       RI_RETURN_MINUS_IF_NULL(capa, "invalid capa");
+       RI_INFO("(%d)", capa->height);
+       return capa->height;
+}
+
+int ri_video_capability_get_fps(const ri_video_capability_h capa)
+{
+       RI_RETURN_MINUS_IF_NULL(capa, "invalid capa");
+       RI_INFO("(%d)", capa->fps);
+       return capa->fps;
+}
+
+struct ri_video_capability_list {
+       GList *list;
+       GList *iter;
+};
+
+int ri_get_dual_decoding_capability(const ri_video_decoding_property_h prop, ri_video_capability_list_h *list)
+{
+       if (!prop || !list) {
+               RI_ERR("invalid param");
+               if (list) *list = nullptr;
+               return -1;
+       }
+
+       ri_video_capability_list *capa_list = (ri_video_capability_list *) calloc(1, sizeof(ri_video_capability_list));
+       if (!capa_list) {
+               RI_ERR("failed to create list");
+               *list = nullptr;
+               return -1;
+       }
+
+       std::string codec_name = prop->codec_name;
+       std::vector<VideoCapability*> capabilities;
+       CResourceInfoDB::GetInstance()->FindVideoCapability("dual-decoding-" + codec_name, capabilities);
+
+       for (auto it : capabilities) {
+               ri_video_capability* capa = (ri_video_capability *) calloc(1, sizeof(ri_video_capability));
+               capa->device_prop = (it->GetDeviceProperty().compare("main") == 0) ? RI_DEVICE_PROPERTY_MAIN : RI_DEVICE_PROPERTY_SUB;
+               capa->width = it->GetWidth();
+               capa->height = it->GetHeight();
+               capa->fps = it->GetFPS();
+               capa_list->list = g_list_append(capa_list->list, capa);
+               RI_INFO("(%s:%s:%d:%d:%d)", prop->codec_name, it->GetDeviceProperty().c_str(), capa->width, capa->height, capa->fps);
+               delete it;
+       }
+
+       capabilities.clear();
+
+       capa_list->iter = g_list_first(capa_list->list);
+       *list = capa_list;
+
+       RI_INFO("codec(%s)/count(%d)", prop->codec_name, g_list_length(capa_list->list));
+       return 0;
+}
+
+ri_video_capability_h ri_video_capability_list_get_first(ri_video_capability_list_h list)
+{
+       RI_RETURN_NULL_IF_NULL(list, "invalid list");
+
+       GList *tmp = g_list_first(list->list);
+       RI_RETURN_NULL_IF_NULL(tmp, "no first");
+
+       list->iter = tmp;
+       return (ri_video_capability_h) list->iter->data;
+}
+
+ri_video_capability_h ri_video_capability_list_get_next(ri_video_capability_list_h list)
+{
+       RI_RETURN_NULL_IF_NULL(list, "invalid list");
+
+       GList *tmp = g_list_next(list->iter);
+       RI_RETURN_NULL_IF_NULL(tmp, "no next capability");
+
+       list->iter = tmp;
+       return (ri_video_capability_h) list->iter->data;
+}
+
+int ri_video_capability_list_get_count(const ri_video_capability_list_h list)
+{
+       if (!list) {
+               RI_ERR("invalid list");
+               return 0;
+       }
+
+       return g_list_length(list->list);
+}
+
+static void ri_video_capability_free(gpointer data)
+{
+       RI_RETURN_IF_NULL(data, "invalid data");
+
+       ri_video_capability *cap = (ri_video_capability *) data;
+       free(cap);
+}
+
+int ri_video_capability_list_free(ri_video_capability_list_h list)
+{
+       RI_RETURN_MINUS_IF_NULL(list, "invalid list");
+       g_list_free_full(list->list, ri_video_capability_free);
+       free(list);
+       return 0;
+}
diff --git a/src/validator/ri-validator.cpp b/src/validator/ri-validator.cpp
new file mode 100644 (file)
index 0000000..f676b79
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <stdio.h>\r
+\r
+#include <CResourceInfoDB.h>\r
+\r
+#include <ri-resource-info-parser.h>\r
+\r
+// LCOV_EXCL_START\r
+static void print_help(const char *argv)\r
+{\r
+       printf("Usage : %s {resource info file path}\n", argv);\r
+}\r
+\r
+int main(int argc, char *argv[])\r
+{\r
+       if (argc != 2) {\r
+               printf("invalid argument(%d)\n", argc);\r
+               print_help(argv[0]);\r
+               return -1;\r
+       }\r
+\r
+       CResourceInfoDB* infoDB = new CResourceInfoDB();\r
+\r
+       if (ParseXMLFile(static_cast<void*> (infoDB), argv[1]) != 0) {\r
+               printf("%c[1;33m",27);\r
+               printf("[ FAIL ] invalid resource info file : %s", argv[1]);\r
+               printf("%c[0m\n",27);\r
+               return -1;\r
+       }\r
+\r
+       printf("[ PASS ] valid resource info file %s\n", argv[1]);\r
+\r
+       return 0;\r
+}\r
+// LCOV_EXCL_END\r
diff --git a/ut/CMakeLists.txt b/ut/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ecdc604
--- /dev/null
@@ -0,0 +1,46 @@
+INCLUDE(FindPkgConfig)
+pkg_check_modules(PKGS REQUIRED
+       dlog
+       glib-2.0
+       ttrace
+       capi-system-info
+       vconf
+       gtest gmock
+       libtzplatform-config
+)
+
+FOREACH (flag ${PKGS_CXXFLAGS})
+       SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}")
+
+SET(INCLUDE_DIR_TO_TEST ${CMAKE_CURRENT_SOURCE_DIR}/../include
+                       ${CMAKE_CURRENT_SOURCE_DIR}/../include_internal
+                       ${CMAKE_CURRENT_SOURCE_DIR}/../include_internal/parser
+                       ${CMAKE_CURRENT_SOURCE_DIR}/../include_internal/parser/element
+)
+
+LINK_LIBRARIES(libexpat.so)
+
+SET(SRC_TABLE_PROVIDER
+       ${CMAKE_CURRENT_SOURCE_DIR}/../src/CModelInfo.cpp
+       ${CMAKE_CURRENT_SOURCE_DIR}/../src/parser/CResourceTableProvider.cpp
+)
+
+FILE(GLOB SRC_TESTCASE "${CMAKE_CURRENT_SOURCE_DIR}/testcase/*.cpp")
+ADD_EXECUTABLE(${PROJECT_NAME}-ut ${SRC_TESTCASE} ${SRC_TABLE_PROVIDER})
+
+INCLUDE_DIRECTORIES(${INCLUDE_DIR_GTEST} ${INCLUDE_DIR_TO_TEST})
+INCLUDE_DIRECTORIES(${PKGS_INCLUDE_DIRS})
+
+TARGET_LINK_LIBRARIES(resource-information-ut ${CMAKE_THREAD_LIBS_INIT} ${PKGS_LDFLAGS} resource-information)
+
+MESSAGE("INSTALL DIR :" ${TZ_SYS_RW_APP}/resource-information-ut/bin)
+
+INSTALL(TARGETS ${PROJECT_NAME}-ut DESTINATION ${TOMATO_DIR}/bin)
+INSTALL(FILES
+       ${CMAKE_CURRENT_SOURCE_DIR}/TCList.dat
+       ${CMAKE_CURRENT_SOURCE_DIR}/resource-information.xml
+       DESTINATION ${TOMATO_DIR}/tc
+)
\ No newline at end of file
diff --git a/ut/TCList.dat b/ut/TCList.dat
new file mode 100644 (file)
index 0000000..61423d6
--- /dev/null
@@ -0,0 +1 @@
+resource-information.xml
\ No newline at end of file
diff --git a/ut/resource-information.xml b/ut/resource-information.xml
new file mode 100644 (file)
index 0000000..58c6b9c
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<TestCase Name="RM_TEST" Description="resource-information test" LogFilter="RSC_MNG:* RSC_MNG_SERVER:* RSCMGR_TOMATO:* TOMATOCLIENT:* RSC_INFO:* RSC_MNG_SERVER_TEST:*">
+    <Procedure Number="1" Description="resource-information unit test">
+        <Step Name="start resource-information unit test" Type="EXT_TEST_PACKAGE" Permission="ROOT" Command="export COVFILE=/opt/data/vdut/resource-information-ut.cov; /opt/usr/apps/tomato/testcase/resource-information-ut/bin/resource-information-ut --gtest_output=xml:/opt/data/vdut/resource-information-ut.xml">
+            <Input Expirytime="1200" />
+            <Output Type="DetectFile" FilePath="/opt/data/vdut/resource-information-ut.xml" />
+        </Step>
+    </Procedure>
+</TestCase>
diff --git a/ut/testcase/ut_debug.h b/ut/testcase/ut_debug.h
new file mode 100644 (file)
index 0000000..6b44275
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __UT_DEBUG_H__
+#define __UT_DEBUG_H__
+
+#include <stdlib.h>
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif//LOG_TAG
+
+#define LOG_TAG "RSC_INFO_TEST"
+#define RI_TEST_MSG(fmt, arg...) \
+       do { SLOGE(fmt, ##arg); } while(0)
+
+#endif //__UT_DEBUG_H__
\ No newline at end of file
diff --git a/ut/testcase/ut_main.cpp b/ut/testcase/ut_main.cpp
new file mode 100644 (file)
index 0000000..cfc554b
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdio.h>
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+
+GTEST_API_ int main(int argc, char **argv)
+{
+       testing::InitGoogleTest(&argc, argv);
+       testing::InitGoogleMock(&argc, argv);
+       return RUN_ALL_TESTS();
+}
diff --git a/ut/testcase/ut_table_provider_mock.h b/ut/testcase/ut_table_provider_mock.h
new file mode 100644 (file)
index 0000000..1ebe776
--- /dev/null
@@ -0,0 +1,34 @@
+/*\r
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __TC_TABLE_PROVIDER_MOCK__\r
+#define __TC_TABLE_PROVIDER_MOCK__\r
+#include "gmock/gmock.h"\r
+#include "gtest/gtest.h"\r
+#include <CModelInfo.h>\r
+#include <CResourceTableProvider.h>\r
+\r
+using namespace testing;\r
+\r
+class MockModelInfo : public CModelInfo\r
+{\r
+public:\r
+       MOCK_CONST_METHOD0(GetResourceTableIndex, int());\r
+       MOCK_CONST_METHOD0(IsEmulator, bool());\r
+       MOCK_CONST_METHOD0(SupportAndroidOnTizen, bool());\r
+};\r
+\r
+#endif //__TC_TABLE_PROVIDER_MOCK__\r
diff --git a/ut/testcase/ut_tc.cpp b/ut/testcase/ut_tc.cpp
new file mode 100644 (file)
index 0000000..1481d16
--- /dev/null
@@ -0,0 +1,599 @@
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "gtest/gtest.h"
+#include <system_info.h>
+#include <ri-api.h>
+#include <ri-module-api.h>
+#include <CResourceInfoDB.h>
+
+#include <expat.h>
+#include <stdlib.h>
+#include <lwipc.h>
+#include "ut_debug.h"
+
+static bool _read_rm_index(const char* filename, int* data)
+{
+       FILE* fp = NULL;
+       char str[10] = {0,};
+       size_t str_size;
+
+       if (!data)
+               return false;
+
+       fp = fopen(filename, "rb");
+
+       if (!fp)
+               return false;
+
+       str_size = fread(str, sizeof(char), sizeof(str)-1, fp);
+
+       str[str_size] = '\0';
+
+       if (str_size == 0) {
+               fclose(fp);
+               return false;
+       }
+
+       *data = atoi(str);
+
+       fclose(fp);
+       fp = NULL;
+
+       return true;
+}
+
+static bool is_8k_model(void)
+{
+       return false
+}
+
+TEST(ut_rm_api, ri_get_jpeg_category_id)
+{
+       EXPECT_EQ(RI_CATEGORY_MJPEG_DECODER_FHD, ri_get_jpeg_category_id("MJPEG", 1920));
+       EXPECT_EQ(RI_CATEGORY_MJPEG_DECODER_UHD, ri_get_jpeg_category_id("MJPEG", 3840));
+       EXPECT_EQ(RI_CATEGORY_MJPEG_DECODER_NOT_SUPPORTED, ri_get_jpeg_category_id("JPEG", 1920));
+}
+
+TEST(ut_rm_api, ri_get_jpeg_category_id_n1)
+{
+       EXPECT_EQ(RI_CATEGORY_MJPEG_DECODER_NOT_SUPPORTED, ri_get_jpeg_category_id(NULL, 1920));
+}
+
+TEST(ut_rm_api, ri_get_sub_jpeg_category_id)
+{
+       EXPECT_EQ(RI_CATEGORY_JPEG_DECODER_FHD, ri_get_sub_jpeg_category_id("JPEG", 1920, 1080));
+       EXPECT_EQ(RI_CATEGORY_JPEG_DECODER_UHD, ri_get_sub_jpeg_category_id("JPEG", 3840, 1920));
+}
+
+TEST(ut_rm_api, ri_get_sub_jpeg_category_id_n1)
+{
+       EXPECT_EQ(RI_CATEGORY_JPEG_DECODER_NOT_SUPPORTED, ri_get_sub_jpeg_category_id(NULL, 1920, 1080));
+}
+
+TEST(ut_rm_api, ri_get_device_path_by_device_id)
+{
+       char *path = NULL;
+       EXPECT_EQ(RI_OK, ri_get_device_path_by_device_id(RI_DEVICE_AUDIO_MAIN_OUT,&path));
+       EXPECT_STREQ("alsa_control_main_out",path);
+}
+
+TEST(ut_rm_api, ri_get_omx_comp_name_by_device_id)
+{
+       char *name = NULL;
+       EXPECT_EQ(RI_OK, ri_get_omx_comp_name_by_device_id(RI_DEVICE_AUDIO_DECODER,&name));
+       EXPECT_STREQ("OMX.SDP.AUDIO.DECODER.INST0",name);
+}
+
+TEST(ut_rm_api, ri_get_category_type_by_device_id)
+{
+       int category_id=0;
+       EXPECT_EQ(RI_OK, ri_get_category_type_by_device_id(RI_DEVICE_AUDIO_MAIN_OUT, &category_id));
+       EXPECT_EQ(RI_CATEGORY_AUDIO_MAIN_OUT,category_id);
+}
+
+TEST(ut_rm_api, ri_get_device_list)
+{
+       int num_of_device = 0;
+       ri_device_common_attr_s* device_list = NULL;
+       EXPECT_EQ(RI_OK, ri_get_device_list(&num_of_device, &device_list));
+}
+
+TEST(ut_rm_api, ri_get_device_id)
+{
+       char path[22] = "alsa_control_main_out";
+       EXPECT_EQ(RI_DEVICE_AUDIO_MAIN_OUT, ri_get_device_id(path));
+}
+
+TEST(ut_rm_api, ri_get_device_info_for_fastboot)
+{
+       char* node = NULL;
+       ri_rsc_category_e cat = RI_CATEGORY_DEMUX;
+       EXPECT_EQ(RI_OK, ri_get_device_info_for_fastboot(cat, &node));
+}
+
+TEST(ut_rm_api, ri_get_video_category_id_by_codec)
+{
+       ri_category_option_request_s request_opt;
+       ri_category_option_return_s return_opt;
+       memset(&request_opt,0,sizeof(ri_category_option_request_s));
+       request_opt.codec_name = "HEVC";
+       request_opt.preferred_mode = RI_VDEC_MODE_SPECIFIC;
+       EXPECT_EQ(RI_OK,ri_get_video_category_id_by_codec(&request_opt, &return_opt));
+}
+
+TEST(ut_rm_api, ri_get_capable_video_category_id)
+{
+       ri_video_category_option_request_s* opt = (ri_video_category_option_request_s*) malloc(sizeof(ri_video_category_option_request_s));
+       opt->codec_name = "HEVC";
+       opt->color_depth = 8;
+       opt->framerate = 30;
+       opt->h_size = 1920;
+       opt->v_size = 1080;
+       opt->sampling_format = RI_SAMPLING_FORMAT_420;
+
+       int id = ri_get_capable_video_category_id(opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_30P);
+
+       opt->h_size = 1920;
+       opt->v_size = 1090;
+       id = ri_get_capable_video_category_id(opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_30P);
+
+       opt->h_size = 2000;
+       opt->v_size = 1088;
+       id = ri_get_capable_video_category_id(opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_HEVC_UHD_8BIT_30P);
+
+       opt->codec_name = "AV1";
+       opt->color_depth = 8;
+       opt->framerate = 30;
+       opt->h_size = 1920;
+       opt->v_size = 1080;
+       opt->sampling_format = RI_SAMPLING_FORMAT_420;
+
+       EXPECT_EQ(RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_30P, ri_get_capable_video_category_id(opt));
+
+       opt->framerate = 60;
+       EXPECT_EQ(RI_CATEGORY_VIDEO_DECODER_AV1_FHD_8BIT_60P, ri_get_capable_video_category_id(opt));
+
+       opt->color_depth = 10;
+       EXPECT_EQ(RI_CATEGORY_VIDEO_DECODER_AV1_FHD_10BIT_60P, ri_get_capable_video_category_id(opt));
+
+       opt->color_depth = 8;
+       opt->h_size = 2000;
+       opt->v_size = 1088;
+       EXPECT_EQ(RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_60P, ri_get_capable_video_category_id(opt));
+
+       opt->framerate = 30;
+       EXPECT_EQ(RI_CATEGORY_VIDEO_DECODER_AV1_UHD_8BIT_30P, ri_get_capable_video_category_id(opt));
+
+       free(opt);
+}
+
+TEST(ut_rm_api, ri_get_capable_audio_category_id_p)
+{
+       int id = RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED;
+
+       ri_audio_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_audio_category_option_request_s));
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_MPEG;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_MPEG, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_MPEG_H;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_MPEG_H, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_AC3;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_AC3, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_E_AC3;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_E_AC3, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_AC4;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_AC4, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_TRUEHD;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_TRUEHD, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_VORBIS;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_VORBIS, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_G2COOK;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_G2COOK, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_AAC;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_AAC, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_HE_AAC;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_HE_AAC, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_WMA;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_WMA, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_ADPCM;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_ADPCM, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_OPUS;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_OPUS, id);
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_PCM;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_PCM, id);
+}
+
+TEST(ut_rm_api, ri_get_capable_audio_category_id_p2)
+{
+       int id = RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED;
+
+       ri_audio_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_audio_category_option_request_s));
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_MPEG;
+       opt.mixing_mode = RI_MIXING_MODE_DEFAULT;
+
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ((RI_CATEGORY_AUDIO_DECODER_MPEG | RI_MIXING_OPT_DEFAULT), id);
+
+       LwipcEventDone("/tmp/.rsc_policy_activated");
+       opt.mixing_mode = RI_MIXING_MODE_MULTIVIEW;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ((RI_CATEGORY_AUDIO_DECODER_MPEG | RI_MIXING_OPT_MULTIVIEW), id);
+       LwipcResetEvent("/tmp/.rsc_policy_activated");
+
+       opt.mixing_mode = RI_MIXING_MODE_MULTIVIEW;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER, id);
+
+       opt.mixing_mode = RI_MIXING_MODE_INTERACTION_SOUND;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ((RI_CATEGORY_AUDIO_DECODER_MPEG | RI_MIXING_OPT_INTERACTION_SOUND), id);
+
+       opt.mixing_mode = (ri_audio_mixing_mode) 0; // not set
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_MPEG, id);
+}
+
+
+TEST(ut_rm_api, ri_get_capable_audio_category_id_n)
+{
+       int id = RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED;
+
+       ri_audio_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_audio_category_option_request_s));
+
+       id = ri_get_capable_audio_category_id(NULL);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED, id);
+
+       opt.codec_name = NULL;
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED, id);
+
+       opt.codec_name = "Hello";
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED, id);
+}
+
+TEST(ut_rm_api, ri_get_capable_audio_category_id_n2)
+{
+       int id = RI_CATEGORY_AUDIO_DECODER_NOT_SUPPORTED;
+
+       ri_audio_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_audio_category_option_request_s));
+
+       opt.codec_name = RI_AUDIO_CODEC_NAME_MPEG;
+       opt.mixing_mode = (ri_audio_mixing_mode) -1;
+
+       id = ri_get_capable_audio_category_id(&opt);
+       EXPECT_EQ(RI_CATEGORY_AUDIO_DECODER_MPEG, id);
+}
+
+TEST(ut_rm_api, ri_get_ai_decoder_category_id_p1)
+{
+       ri_rsc_category_e id = RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_30P;
+       int ret = 0;
+       ret = ri_get_ai_decoder_category_id(id);
+
+       EXPECT_EQ(id, ret);
+}
+
+TEST(ut_rm_api, ri_get_ai_decoder_category_id_p2)
+{
+       ri_rsc_category_e id = RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_30P;
+       int ret = ri_get_ai_decoder_category_id(id);
+       EXPECT_EQ(RI_CATEGORY_VIDEO_DECODER_HEVC_FHD_8BIT_30P, ret);
+}
+
+TEST(ut_rm_api, ri_get_ai_decoder_category_id_p3)
+{
+       ri_rsc_category_e id = RI_CATEGORY_VIDEO_DECODER_VP9_FHD_8BIT_30P;
+       int ret = ri_get_ai_decoder_category_id(id);
+
+       EXPECT_EQ(id, ret);
+}
+
+TEST(ut_rm_api, ri_get_ai_decoder_category_id_p4)
+{
+       ri_rsc_category_e id = RI_CATEGORY_VIDEO_DECODER_MPEG1_FHD_8BIT_30P;
+       int ret = 0;
+       ret = ri_get_ai_decoder_category_id(id);
+
+       EXPECT_EQ(id, ret);
+}
+
+TEST(ut_rm_api, ri_get_video_category_id_av1_vr360_p1)
+{
+       ri_video_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_video_category_option_request_s));
+
+       opt.codec_name = "AV1_VR360";
+       opt.color_depth = 8;
+       opt.framerate = 30;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       int id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_8BIT_30P);
+
+       opt.codec_name = "AV1_VR360";
+       opt.color_depth = 8;
+       opt.framerate = 60;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_8BIT_60P);
+
+       opt.codec_name = "AV1_VR360";
+       opt.color_depth = 10;
+       opt.framerate = 30;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_30P);
+
+       opt.codec_name = "AV1_VR360";
+       opt.color_depth = 10;
+       opt.framerate = 60;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_AV1_VR360_FHD_10BIT_60P);
+}
+
+TEST(ut_rm_api, ri_get_video_category_id_av1_vr360_p2)
+{
+       ri_video_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_video_category_option_request_s));
+
+       opt.codec_name = "AV1_VR360";
+       opt.color_depth = 8;
+       opt.framerate = 30;
+       opt.h_size = 3840;
+       opt.v_size = 2160;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       int id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_8BIT_30P);
+
+       opt.codec_name = "AV1_VR360";
+       opt.color_depth = 8;
+       opt.framerate = 60;
+       opt.h_size = 3840;
+       opt.v_size = 2160;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_8BIT_60P);
+
+       opt.codec_name = "AV1_VR360";
+       opt.color_depth = 10;
+       opt.framerate = 30;
+       opt.h_size = 3840;
+       opt.v_size = 2160;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_30P);
+
+       opt.codec_name = "AV1_VR360";
+       opt.color_depth = 10;
+       opt.framerate = 60;
+       opt.h_size = 3840;
+       opt.v_size = 2160;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_AV1_VR360_UHD_10BIT_60P);
+}
+
+TEST(ut_rm_api, ri_get_video_category_id_av1_8k_p1)
+{
+       ri_video_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_video_category_option_request_s));
+
+       opt.codec_name = "AV1";
+       opt.color_depth = 8;
+       opt.framerate = 30;
+       opt.h_size = 7680;
+       opt.v_size = 4320;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       int id = ri_get_capable_video_category_id(&opt);
+       int expected_id = is_8k_model() ? RI_CATEGORY_VIDEO_DECODER_AV1_8K_8BIT_30P : RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+       EXPECT_EQ(id, expected_id);
+
+       opt.codec_name = "AV1";
+       opt.color_depth = 8;
+       opt.framerate = 60;
+       opt.h_size = 7680;
+       opt.v_size = 4320;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       expected_id = is_8k_model() ? RI_CATEGORY_VIDEO_DECODER_AV1_8K_8BIT_60P : RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+       EXPECT_EQ(id, expected_id);
+
+       opt.codec_name = "AV1";
+       opt.color_depth = 10;
+       opt.framerate = 30;
+       opt.h_size = 7680;
+       opt.v_size = 4320;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       expected_id = is_8k_model() ? RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_30P : RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+       EXPECT_EQ(id, expected_id);
+
+       opt.codec_name = "AV1";
+       opt.color_depth = 10;
+       opt.framerate = 60;
+       opt.h_size = 7680;
+       opt.v_size = 4320;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       expected_id = is_8k_model() ? RI_CATEGORY_VIDEO_DECODER_AV1_8K_10BIT_60P : RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED;
+       EXPECT_EQ(id, expected_id);
+}
+
+TEST(ut_rm_api, ri_get_video_category_id_h264_vr360_p1)
+{
+       ri_video_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_video_category_option_request_s));
+
+       opt.codec_name = "H264_VR360";
+       opt.color_depth = 8;
+       opt.framerate = 30;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       int id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_H264_VR360_FHD_8BIT_30P);
+
+       opt.codec_name = "H264_VR360";
+       opt.color_depth = 8;
+       opt.framerate = 60;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_H264_VR360_FHD_8BIT_60P);
+
+       opt.codec_name = "H264_VR360";
+       opt.color_depth = 10;
+       opt.framerate = 30;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED);
+
+       opt.codec_name = "H264_VR360";
+       opt.color_depth = 10;
+       opt.framerate = 60;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_NOT_SUPPORTED);
+}
+
+TEST(ut_rm_api, ri_get_video_category_id_portrait_resolution_p1)
+{
+       RI_TEST_MSG("ri_get_video_category_id_portrait_resolution_p1 start...");
+       ri_video_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_video_category_option_request_s));
+
+       opt.codec_name = "H264";
+       opt.color_depth = 8;
+       opt.framerate = 30;
+       opt.h_size = 1920;
+       opt.v_size = 1080;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       int id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P);
+
+       opt.h_size = 1080;
+       opt.v_size = 1920;
+
+       int expected_id = RI_CATEGORY_VIDEO_DECODER_H264_FHD_8BIT_30P;
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(expected_id, id);
+       RI_TEST_MSG("ri_get_video_category_id_portrait_resolution_p1 end...");
+}
+
+TEST(ut_rm_api, ri_get_video_category_id_portrait_resolution_p2)
+{
+       ri_video_category_option_request_s opt;
+       memset(&opt, 0, sizeof(ri_video_category_option_request_s));
+
+       opt.codec_name = "H264";
+       opt.color_depth = 8;
+       opt.framerate = 30;
+       opt.h_size = 3840;
+       opt.v_size = 2160;
+       opt.sampling_format = RI_SAMPLING_FORMAT_420;
+
+       int id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_30P);
+
+       opt.h_size = 2160;
+       opt.v_size = 3840;
+
+       int expected_id = RI_CATEGORY_VIDEO_DECODER_H264_UHD_8BIT_30P;
+       id = ri_get_capable_video_category_id(&opt);
+       EXPECT_EQ(id, expected_id);
+}
+
+TEST(ut_rm_api, ri_is_main_device_p1)
+{
+       EXPECT_EQ(true, ri_is_main_device(RI_DEVICE_AUDIO_DECODER));
+       EXPECT_EQ(false, ri_is_main_device(RI_DEVICE_AUDIO_DECODER_SUB));
+
+       EXPECT_EQ(true, ri_is_main_device(RI_DEVICE_VIDEO_DECODER_DVDE0));
+       EXPECT_EQ(false, ri_is_main_device(RI_DEVICE_VIDEO_DECODER_DVDE1));
+
+       EXPECT_EQ(true, ri_is_main_device(RI_DEVICE_VIDEO_DECODER_MAIN));
+       EXPECT_EQ(false, ri_is_main_device(RI_DEVICE_VIDEO_DECODER_SUB));
+
+       EXPECT_EQ(true, ri_is_main_device(RI_DEVICE_AUDIO_MAIN_OUT));
+       EXPECT_EQ(false, ri_is_main_device(RI_DEVICE_AUDIO_SUB_OUT));
+}