[TTVD] Use custom structure for HDR settings 46/315346/1
authorJakub Gajownik <j.gajownik2@samsung.com>
Tue, 23 Jul 2024 21:02:13 +0000 (23:02 +0200)
committerj.gajownik2 <j.gajownik2@samsung.com>
Tue, 30 Jul 2024 11:46:26 +0000 (13:46 +0200)
Before this change OMX header was needed for setting HDR for
overlay output surface. It's not needed now, might be
replaced with structure, as layout is known.

Bug: https://jira-eu.sec.samsung.net/browse/VDGAME-540
Change-Id: I6350b98ed2e2a2263e546ebc6fbee17cdd2530fd
Signed-off-by: Jakub Gajownik <j.gajownik2@samsung.com>
tizen_src/chromium_impl/ui/ozone/platform/efl/BUILD.gn
tizen_src/chromium_impl/ui/ozone/platform/efl/output_surface_impl.cc
tizen_src/chromium_impl/ui/ozone/platform/efl/video_surface.cc

index 387cdb28f04dea38a7530dce18507044260e09e3..1cb3a3963c8101631ad10c1f74e74202473aee31 100644 (file)
@@ -130,9 +130,6 @@ source_set("efl") {
       ":decoder_logger_config",
 
       "//tizen_src/build:libavoc",
-
-      # Needed for HDR setting
-      "//tizen_src/build:omxil-e4x12-v4l2",
     ]
   }
 
index 422753ad7e63b26c866fc4383c062e18a8553d92..479a1c194c595be3fb6ce94f9bda14df77a653f5 100644 (file)
@@ -4,7 +4,6 @@
 
 #include "ui/ozone/platform/efl/output_surface_impl.h"
 
-#include <OMX_Video.h>
 #include <avoc/avoc.h>
 #include <ivideo-dp-control.hpp>
 
index 2886c527c9fefd5eaf3f91150e4d1b7f4ec24b84..5e89b5b78b367a633850a5be73161a6577b4b755 100644 (file)
@@ -4,7 +4,6 @@
 
 #include "ui/ozone/platform/efl/video_surface.h"
 
-#include <OMX_Video.h>
 #include <tbm_surface.h>
 #include <tbm_surface_internal.h>
 #include <tizen-extension-client-protocol.h>
@@ -64,6 +63,15 @@ VideoTransformation ConvertVideoTransformation(
   return {WL_OUTPUT_TRANSFORM_NORMAL, IVideoDpControl::VIDEO_FLIP_OFF};
 }
 
+struct VideoMetadata {
+  uint16_t display_primaries_x[3];
+  uint16_t display_primaries_y[3];
+  uint16_t white_point_x;
+  uint16_t white_point_y;
+  uint32_t max_display_mastering_luminance;
+  uint32_t min_display_mastering_luminance;
+};
+
 }  // namespace
 
 namespace ui {
@@ -523,7 +531,7 @@ bool VideoSurface::SetResolution(const avoc_tpt_resolution_s& data) {
 }
 
 bool VideoSurface::setHdrMetadata(gfx::HDRMetadata hdr_metadata) {
-  OMX_VIDEO_MASTERING_DISPLAY_COLOUR_VOLUME display_color{};
+  VideoMetadata display_color{};
   display_color.display_primaries_x[0] =
       hdr_metadata.color_volume_metadata.primary_r.x();
   display_color.display_primaries_x[1] =
@@ -547,8 +555,7 @@ bool VideoSurface::setHdrMetadata(gfx::HDRMetadata hdr_metadata) {
 
   return videoRenderCtrl_setMdcvMetadata(
              video_sink_.get(), &display_color,
-             sizeof(OMX_VIDEO_MASTERING_DISPLAY_COLOUR_VOLUME),
-             true /* sync */) == 0;
+             sizeof(VideoMetadata), true /* sync */) == 0;
 }
 
 void VideoSurface::SetSync(bool state) {