[bTSstream-devel] [Git][videolan/bitstream][master] 3 commits: mpeg/psi: Add J2K video descriptor

Christophe Massiot (@cmassiot) gitlab at videolan.org
Wed Jun 4 14:10:00 UTC 2025



Christophe Massiot pushed to branch master at VideoLAN / bitstream


Commits:
4967de92 by Peter Krefting at 2025-05-14T13:23:05+01:00
mpeg/psi: Add J2K video descriptor

As defined in ITU-T H.222.0

- - - - -
1f619f74 by Clément Vasseur at 2025-06-04T16:09:44+02:00
Fix invalid XML characters

Make sure characters which are not valid UTF-8 or XML characters are
properly replaced by the unicode replacement character.

- - - - -
8b2bf575 by Christophe Massiot at 2025-06-04T16:09:51+02:00
Merge branch 'nafmo-J2K_descriptor'

- - - - -


2 changed files:

- + mpeg/psi/desc_32.h
- mpeg/psi/descs_list.h


Changes:

=====================================
mpeg/psi/desc_32.h
=====================================
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * desc_32.h: ISO/IEC 13818-1 Descriptor 0x32 (J2K video descriptor)
+ *****************************************************************************
+ * Copyright Bridge Technologies Co AS
+ *
+ * Authors: Peter Krefting
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject
+ * to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __BITSTREAM_MPEG_DESC_32_H__
+#define __BITSTREAM_MPEG_DESC_32_H__
+
+#include <bitstream/common.h>
+#include <bitstream/mpeg/psi/descriptors.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*****************************************************************************
+ * Descriptor 0x32 (J2K video descriptor)
+ *****************************************************************************/
+#define DESC32_HEADER_SIZE      (DESC_HEADER_SIZE + 24)
+
+static inline void desc32_init(uint8_t *p_desc)
+{
+    desc_set_tag(p_desc, 0x32);
+    desc_set_length(p_desc, DESC32_HEADER_SIZE - DESC_HEADER_SIZE);
+}
+
+static inline bool desc32_validate(const uint8_t *p_desc)
+{
+    return desc_get_length(p_desc) >= DESC32_HEADER_SIZE - DESC_HEADER_SIZE;
+}
+
+static inline bool desc32_get_interlaced_video(const uint8_t *p_desc)
+{
+    return (p_desc[25] & 0x01) == 0x01;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif


=====================================
mpeg/psi/descs_list.h
=====================================
@@ -69,6 +69,7 @@
 #include <bitstream/mpeg/psi/desc_2a.h>
 #include <bitstream/mpeg/psi/desc_2b.h>
 #include <bitstream/mpeg/psi/desc_2c.h>
+#include <bitstream/mpeg/psi/desc_32.h>
 #include <bitstream/mpeg/psi/desc_38.h>
 #include <bitstream/mpeg/psi/desc_3f.h>
 #include <bitstream/mpeg/psi/desc_3f03.h>



View it on GitLab: https://code.videolan.org/videolan/bitstream/-/compare/70d6a2fe5d53f46d69578531c1ba63bdd986b189...8b2bf575d593887e8fe58205d80c3948bb91a5bb

-- 
View it on GitLab: https://code.videolan.org/videolan/bitstream/-/compare/70d6a2fe5d53f46d69578531c1ba63bdd986b189...8b2bf575d593887e8fe58205d80c3948bb91a5bb
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the biTStream-devel mailing list