[libbluray-devel] Add profile 6 (UHD) registers

hpi1 git at videolan.org
Tue Sep 5 10:25:09 CEST 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Sep  5 09:49:30 2017 +0300| [41a954a0b53812d8d55cfc7787cb572e843c7899] | committer: hpi1

Add profile 6 (UHD) registers

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=41a954a0b53812d8d55cfc7787cb572e843c7899
---

 src/libbluray/bluray.c          |  6 +++++-
 src/libbluray/bluray.h          |  6 +++++-
 src/libbluray/hdmv/mobj_print.c | 10 +++++-----
 src/libbluray/player_settings.h |  4 +++-
 src/libbluray/register.c        | 15 +++++++--------
 src/libbluray/register.h        |  6 +++++-
 6 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 4fe0fde9..9d89feed 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -2,7 +2,7 @@
  * This file is part of libbluray
  * Copyright (C) 2009-2010  Obliter0n
  * Copyright (C) 2009-2010  John Stebbins
- * Copyright (C) 2010       hpi1
+ * Copyright (C) 2010-2017  Petri Hintukainen
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -2786,6 +2786,10 @@ int bd_set_player_setting(BLURAY *bd, uint32_t idx, uint32_t value)
         { BLURAY_PLAYER_SETTING_OUTPUT_PREFER,  PSR_OUTPUT_PREFER },
         { BLURAY_PLAYER_SETTING_DISPLAY_CAP,    PSR_DISPLAY_CAP },
         { BLURAY_PLAYER_SETTING_3D_CAP,         PSR_3D_CAP },
+        { BLURAY_PLAYER_SETTING_UHD_CAP,         PSR_UHD_CAP },
+        { BLURAY_PLAYER_SETTING_UHD_DISPLAY_CAP, PSR_UHD_DISPLAY_CAP },
+        { BLURAY_PLAYER_SETTING_HDR_PREFERENCE,  PSR_UHD_HDR_PREFER },
+        { BLURAY_PLAYER_SETTING_SDR_CONV_PREFER, PSR_UHD_SDR_CONV_PREFER },
         { BLURAY_PLAYER_SETTING_VIDEO_CAP,      PSR_VIDEO_CAP },
         { BLURAY_PLAYER_SETTING_TEXT_CAP,       PSR_TEXT_CAP },
         { BLURAY_PLAYER_SETTING_PLAYER_PROFILE, PSR_PROFILE_VERSION },
diff --git a/src/libbluray/bluray.h b/src/libbluray/bluray.h
index b2b359a6..70e6a843 100644
--- a/src/libbluray/bluray.h
+++ b/src/libbluray/bluray.h
@@ -2,7 +2,7 @@
  * This file is part of libbluray
  * Copyright (C) 2009-2010  Obliter0n
  * Copyright (C) 2009-2010  John Stebbins
- * Copyright (C) 2010-2014  Petri Hintukainen
+ * Copyright (C) 2010-2017  Petri Hintukainen
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -670,6 +670,10 @@ typedef enum {
     BLURAY_PLAYER_SETTING_VIDEO_CAP      = 29,    /* Video capability.            Bit mask. */
     BLURAY_PLAYER_SETTING_DISPLAY_CAP    = 23,    /* Display capability.          Bit mask. */
     BLURAY_PLAYER_SETTING_3D_CAP         = 24,    /* 3D capability.               Bit mask. */
+    BLURAY_PLAYER_SETTING_UHD_CAP         = 25,   /* UHD capability.              */
+    BLURAY_PLAYER_SETTING_UHD_DISPLAY_CAP = 26,   /* UHD display capability.      */
+    BLURAY_PLAYER_SETTING_HDR_PREFERENCE  = 27,   /* HDR preference.              */
+    BLURAY_PLAYER_SETTING_SDR_CONV_PREFER = 28,   /* SDR conversion preference.   */
     BLURAY_PLAYER_SETTING_TEXT_CAP       = 30,    /* Text Subtitle capability.    Bit mask. */
     BLURAY_PLAYER_SETTING_PLAYER_PROFILE = 31,    /* Player profile and version. */
 
diff --git a/src/libbluray/hdmv/mobj_print.c b/src/libbluray/hdmv/mobj_print.c
index 375ead5c..150bfdb3 100644
--- a/src/libbluray/hdmv/mobj_print.c
+++ b/src/libbluray/hdmv/mobj_print.c
@@ -1,6 +1,6 @@
 /*
  * This file is part of libbluray
- * Copyright (C) 2009-2012  Petri Hintukainen <phintuka at users.sourceforge.net>
+ * Copyright (C) 2009-2017  Petri Hintukainen <phintuka at users.sourceforge.net>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -54,10 +54,10 @@ static const char * const psr_info[128] = {
     "/*     PSR22: Stereoscopic status */ /* 2D / 3D */ ",
     "/* RO: PSR23: display capablity */",
     "/* RO: PSR24: 3D capability */",
-    "/*     PSR25 */",
-    "/*     PSR26 */",
-    "/*     PSR27 */",
-    "/*     PSR28 */",
+    "/* RO: PSR25: UHD capability */",
+    "/* RO: PSR26: UHD display capability */",
+    "/* RO: PSR27: HDR preference */",
+    "/* RO: PSR28: SDR conversion preference */",
     "/* RO: PSR29: player capability for video */",
     "/* RO: PSR30: player capability for text subtitle */",
     "/* RO: PSR31: Player profile and version */",
diff --git a/src/libbluray/player_settings.h b/src/libbluray/player_settings.h
index 3a5f2073..4431e123 100644
--- a/src/libbluray/player_settings.h
+++ b/src/libbluray/player_settings.h
@@ -1,6 +1,6 @@
 /*
  * This file is part of libbluray
- * Copyright (C) 2014  VideoLAN
+ * Copyright (C) 2014-2017  VideoLAN
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -144,6 +144,8 @@ enum {
     BLURAY_PLAYER_PROFILE_2_v2_0 = ((0x03 << 16) | (0x0200)),   /* Profile 2, version 2.0 (network access, BdLive) */
     BLURAY_PLAYER_PROFILE_3_v2_0 = ((0x08 << 16) | (0x0200)),   /* Profile 3, version 2.0 (audio only player) */
     BLURAY_PLAYER_PROFILE_5_v2_4 = ((0x13 << 16) | (0x0240)),   /* Profile 5, version 2.4 (3D) */
+    BLURAY_PLAYER_PROFILE_6_v3_0 = ((0x00 << 16) | (0x0300)),   /* Profile 6, version 3.0 (UHD) */
+    BLURAY_PLAYER_PROFILE_6_v3_1 = ((0x00 << 16) | (0x0310)),   /* Profile 6, version 3.1 (UHD) */
 };
 
 
diff --git a/src/libbluray/register.c b/src/libbluray/register.c
index 731a3927..23e52877 100644
--- a/src/libbluray/register.c
+++ b/src/libbluray/register.c
@@ -1,6 +1,6 @@
 /*
  * This file is part of libbluray
- * Copyright (C) 2010-2014  Petri Hintukainen <phintuka at users.sourceforge.net>
+ * Copyright (C) 2010-2017  Petri Hintukainen <phintuka at users.sourceforge.net>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -76,10 +76,10 @@ static const uint32_t bd_psr_init[BD_PSR_COUNT] = {
     0,           /*     PSR22: Stereoscopic status */
     0,           /* PS: PSR23: Display capability */
     0,           /* PS: PSR24: 3D capability */
-    0,           /*     PSR25 */
-    0,           /*     PSR26 */
-    0,           /*     PSR27 */
-    0,           /*     PSR28 */
+    0,           /* PS: PSR25: UHD capability */
+    0,           /* PS: PSR26: UHD display capability */
+    0,           /* PS: PSR27: HDR preference */
+    0,           /* PS: PSR28: SDR conversion preference */
                  /* PS: PSR29: player capability for video */
     BLURAY_VCAP_SECONDARY_HD |
     BLURAY_VCAP_25Hz_50Hz,
@@ -451,10 +451,9 @@ int bd_psr_write(BD_REGISTERS *p, unsigned int reg, uint32_t val)
 {
     if ((reg == 13) ||
         (reg >= 15 && reg <= 21) ||
-        (reg >= 23 && reg <= 24) ||
-        (reg >= 29 && reg <= 31) ||
+        (reg >= 23 && reg <= 31) ||
         (reg >= 48 && reg <= 61)) {
-      BD_DEBUG(DBG_BLURAY, "bd_psr_write(%d, %d): read-only register !\n", reg, val);
+      BD_DEBUG(DBG_BLURAY | DBG_CRIT, "bd_psr_write(%d, %d): read-only register !\n", reg, val);
       return -2;
   }
 
diff --git a/src/libbluray/register.h b/src/libbluray/register.h
index 757eeb4a..d688accb 100644
--- a/src/libbluray/register.h
+++ b/src/libbluray/register.h
@@ -1,6 +1,6 @@
 /*
  * This file is part of libbluray
- * Copyright (C) 2010-2014  Petri Hintukainen <phintuka at users.sourceforge.net>
+ * Copyright (C) 2010-2017  Petri Hintukainen <phintuka at users.sourceforge.net>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -58,6 +58,10 @@ typedef enum {
     PSR_3D_STATUS        = 22,
     PSR_DISPLAY_CAP      = 23,
     PSR_3D_CAP           = 24,
+    PSR_UHD_CAP          = 25,
+    PSR_UHD_DISPLAY_CAP  = 26,
+    PSR_UHD_HDR_PREFER   = 27,
+    PSR_UHD_SDR_CONV_PREFER = 28,
     PSR_VIDEO_CAP        = 29,
     PSR_TEXT_CAP         = 30, /* text subtitles */
     PSR_PROFILE_VERSION  = 31, /* player profile and version */



More information about the libbluray-devel mailing list