[libbluray-devel] commit: Added bd_uo_mask_combine() (hpi1 )

git at videolan.org git at videolan.org
Thu Nov 11 23:45:23 CET 2010


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Aug 14 00:45:20 2010 +0300| [d3739a1b610393ad19f89c7278f8b516f8903565] | committer: hpi1 

Added bd_uo_mask_combine()

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

 src/libbluray/bdnav/uo_mask_table.h |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/libbluray/bdnav/uo_mask_table.h b/src/libbluray/bdnav/uo_mask_table.h
index c7adc7e..2b642ae 100644
--- a/src/libbluray/bdnav/uo_mask_table.h
+++ b/src/libbluray/bdnav/uo_mask_table.h
@@ -58,4 +58,19 @@ typedef struct bd_uo_mask_table_s
     uint8_t         pip_pg_change : 1;
 } BD_UO_MASK;
 
+static inline BD_UO_MASK bd_uo_mask_combine(BD_UO_MASK a, BD_UO_MASK b)
+{
+    BD_UO_MASK o;
+    uint8_t   *pa = (uint8_t*)&a;
+    uint8_t   *pb = (uint8_t*)&b;
+    uint8_t   *po = (uint8_t*)&o;
+    unsigned   i;
+
+    for (i = 0; i < sizeof(BD_UO_MASK); i++) {
+        po[i] = pa[i] & pb[i];
+    }
+
+    return o;
+}
+
 #endif // _BD_UO_MASK_TABLE_H_



More information about the libbluray-devel mailing list