3D Frame Packed (MVC) output with CoreELEC?

Feel free to fix it and send a PR.
CE developer stopped saving 3D from dead - it´s just a dead horse

Suggest getting a Zidoo Z9X Pro while you still can, maybe solely for 3D. No macroblocking issues, and plays every kind of 3D w/o any fuss, automatically, in the right mode (HSBS, HTAB, MVC, FSBS), and you get 3D picture depth control. Also subtitles in MKV and ISO display well, and you have sub depth control as well.

@Tim_Taylor, 3D is not dead. People have been saying it since the last 3D TV’s came out in 2017, but it’s alive and thriving in projectors, and there are still new 3D Blu-ray’s (Golden Age classics, Marvel/Disney titles from Japan, and Paramount/DreamWorks/Universal titles from Germany). Not to mention some well-made fan edits in MVC and SBS/FSBS.

It´s a dead horse if You don´t want to use any player like Panasonic DMP etc.
There is no more CE development, related to CE 3D is dead

Can’t disagree it’s dying, which is why I have a bunch of back-ups: Vero V, couple of Zidoo Z9X Pro’s, and a Dune HD. With 3D in so many projectors these days, hoping we’ll continue to get some h/w support… CE would’ve been nice, but anything, even PC-based.

Projectors and VR is where most people watch 3D these days. New 3D blu-ray releases of everything from old classics to modern blockbusters are still happening. Not forgetting the hundreds or maybe thousands of existing 3D discs. 3D is still alive, but like all physical media, it is struggling. The good news though is that streaming is so fragmented and expensive that more people are slowly returning to physical media. Especially when they learn that with streaming you own nothing.

3 Likes

Can someone confirm that 3d mvc decoding and output is working on the ODROID N2+?

If so, does it work with ce-no?

Yes, it works. Last I tried was CE-NG, but expect NO should work as well.

1 Like

Thanks for your reply! :slight_smile:

One more question about FSBS, how is the output to the display? As 3840x1080 is not a valid EDID mode, can FSBS be sent as frame packing/hardware based?

Depends on player and display. My NexiGo MKII projector can handle 4K 3D, even 60fps, so not a problem. A Zidoo Z9X / Z9X Pro should work for your display to see it as 3D framepacked. Ugoos AM6B+ or Homatics should work as well. Grab a sample here and give it a try.

Long time reader, first time poster. :waving_hand:
It annoyed me a little that with CoreELEC 22 the OSD and subtitles are only shown on the left view in 3D frame-packing mode. Sadly I’m not smart enough to fix this. But fortunately Claude is and comes up with this relatively small patch for CoreELEC 22 Kodi.

+++ b/xbmc/windowing/amlogic/AMLDisplay.cpp
@@ -501,7 +501,10 @@
   m_width = res.iWidth;
   m_height = res.iHeight;
   m_ScreenWidth = res.iScreenWidth;
-  m_ScreenHeight = res.iScreenHeight;
+  // For HARDWAREBASED frame-packing: set m_ScreenHeight to the full FP height
+  // (res.iHeight = 2205) so aml_set_drmDevice_active can detect that the found
+  // base mode (vdisplay=1080) doesn't match and synthesize a 2205-line FP mode.
+  m_ScreenHeight = (res.dwFlags & D3DPRESENTFLAG_MODE3DFP) ? res.iHeight : res.iScreenHeight;

   if (force_mode_switch)
   {
@@ -726,6 +729,7 @@
 {
   bool ret = false;
   drmModeModeInfoPtr drmDevicemode = NULL;
+  drmModeModeInfo syntheticMode = {};

   if (!StringUtils::EqualsNoCase(aml_get_drmDevice_mode(), mode))
   {
@@ -741,6 +745,29 @@
     }
   }

+  // For frame-packing modes the strId base is the normal mode (e.g. "1080p24hz")
+  // but the output must be 2205 active lines (1080+45+1080). No such mode exists
+  // in the connector list, so build a synthetic HDMI 1.4 frame-packing mode from
+  // the found base mode. The CRTC is then set to this 2205-line mode, which lets
+  // the DRM primary plane expose both eye regions of the GBM framebuffer to the
+  // AML display controller, enabling independent per-eye OSD.
+  if (drmDevicemode && m_ScreenHeight != drmDevicemode->vdisplay)
+  {
+    // m_ScreenHeight has already been set to res.iHeight (e.g. 2205) by
+    // aml_set_drmDevice_mode for frame-packing modes.
+    syntheticMode = *drmDevicemode;
+    uint16_t extraLines = m_ScreenHeight - drmDevicemode->vdisplay; // e.g. 2205-1080=1125
+    syntheticMode.vdisplay   = m_ScreenHeight;
+    syntheticMode.vsync_start = m_ScreenHeight + (drmDevicemode->vsync_start - drmDevicemode->vdisplay);
+    syntheticMode.vsync_end   = m_ScreenHeight + (drmDevicemode->vsync_end   - drmDevicemode->vdisplay);
+    syntheticMode.vtotal      = drmDevicemode->vtotal + extraLines;
+    syntheticMode.clock       = drmDevicemode->clock * 2; // doubled pixel clock for FP
+    snprintf(syntheticMode.name, DRM_DISPLAY_MODE_LEN, "%s_FP", drmDevicemode->name);
+    CLog::Log(LOGDEBUG, "CAMLDRMUtils::{} - synthesized FP mode: vdisplay={} vtotal={} clock={}",
+              __FUNCTION__, syntheticMode.vdisplay, syntheticMode.vtotal, syntheticMode.clock);
+    drmDevicemode = &syntheticMode;
+  }
+
   if (drmDevicemode != NULL)
   {
     uint32_t mode_blobid = 0;
@@ -796,7 +823,11 @@
   set_drmProp(m_plane->plane_id, "CRTC_X", DRM_MODE_OBJECT_PLANE , 0, req);
   set_drmProp(m_plane->plane_id, "CRTC_Y", DRM_MODE_OBJECT_PLANE , 0, req);
   set_drmProp(m_plane->plane_id, "CRTC_W", DRM_MODE_OBJECT_PLANE , m_ScreenWidth, req);
-  set_drmProp(m_plane->plane_id, "CRTC_H", DRM_MODE_OBJECT_PLANE , m_ScreenHeight, req);
+  // Use the actual CRTC mode vdisplay for CRTC_H so that if a synthetic
+  // frame-packing mode (vdisplay=2205) was set, CRTC_H matches it correctly.
+  // If the synthetic mode was rejected, m_crtc->mode.vdisplay stays 1080
+  // and CRTC_H=1080 is safe (avoids submitting CRTC_H=2205 for a 1080p CRTC).
+  set_drmProp(m_plane->plane_id, "CRTC_H", DRM_MODE_OBJECT_PLANE , m_crtc->mode.vdisplay, req);

   if (m_inFenceFd != -1)
   {

Save it e.g. as projects/Amlogic-ce/packages/mediacenter/kodi/patches/001-3dfp-osd-fix.patch, compile your own CoreELEC-NO and enjoy working OSD/subtitles on both sides in 3D frame-packing mode.
The fix looks quiet good to me, but what do I know? It works on my machine (Ugoos AM6B+) and I wanted to share this. I cannot support you in any way. Ask your own AI. :smile: