[libbluray-devel] registers: add a function to init 3D registers
hpi1
git at videolan.org
Fri May 13 09:40:11 CEST 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Apr 25 17:36:34 2016 +0300| [c1b1050099e8cd0f7adb8d0615fee8e129d57c68] | committer: hpi1
registers: add a function to init 3D registers
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=c1b1050099e8cd0f7adb8d0615fee8e129d57c68
---
src/libbluray/register.c | 30 ++++++++++++++++++++++++++++++
src/libbluray/register.h | 2 ++
2 files changed, 32 insertions(+)
diff --git a/src/libbluray/register.c b/src/libbluray/register.c
index 6a2f13f..60bd06c 100644
--- a/src/libbluray/register.c
+++ b/src/libbluray/register.c
@@ -530,3 +530,33 @@ void registers_restore(BD_REGISTERS *p, const uint32_t *psr, const uint32_t *gpr
bd_psr_unlock(p);
}
+
+/*
+ *
+ */
+
+void psr_init_3D(BD_REGISTERS *p, int initial_mode)
+{
+ bd_psr_lock(p);
+
+ bd_psr_setting_write(p, PSR_OUTPUT_PREFER,
+ BLURAY_OUTPUT_PREFER_3D);
+
+ bd_psr_setting_write(p, PSR_DISPLAY_CAP,
+ BLURAY_DCAP_1080p_720p_3D |
+ BLURAY_DCAP_720p_50Hz_3D |
+ BLURAY_DCAP_NO_3D_CLASSES_REQUIRED |
+ BLURAY_DCAP_INTERLACED_3D |
+ 0);
+
+ bd_psr_setting_write(p, PSR_3D_CAP,
+ /* TODO */ 0xffffffff );
+
+ bd_psr_setting_write(p, PSR_PROFILE_VERSION,
+ BLURAY_PLAYER_PROFILE_5_v2_4);
+
+ bd_psr_write(p, PSR_3D_STATUS,
+ !!initial_mode);
+
+ bd_psr_unlock(p);
+}
diff --git a/src/libbluray/register.h b/src/libbluray/register.h
index c936aca..18e5bf5 100644
--- a/src/libbluray/register.h
+++ b/src/libbluray/register.h
@@ -263,6 +263,8 @@ void bd_psr_register_cb(BD_REGISTERS *, void (*callback)(void*,BD_PSR_EVENT*), v
*/
void bd_psr_unregister_cb(BD_REGISTERS *, void (*callback)(void*,BD_PSR_EVENT*), void *cb_handle);
+BD_PRIVATE void psr_init_3D(BD_REGISTERS *, int initial_mode);
+
/*
* save / restore registers between playback sessions
More information about the libbluray-devel
mailing list