libklvanc
Loading...
Searching...
No Matches
src
libklvanc
vanc-smpte_2108_1.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Kernel Labs Inc. All Rights Reserved
3
*
4
* Address: Kernel Labs Inc., PO Box 745, St James, NY. 11780
5
* Contact: sales@kernellabs.com
6
*
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) any later version.
11
*
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
16
*
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
*/
21
28
29
#ifndef _VANC_SMPTE_2108_1_H
30
#define _VANC_SMPTE_2108_1_H
31
32
#include <
libklvanc/vanc-packets.h
>
33
34
#ifdef __cplusplus
35
extern
"C"
{
36
#endif
37
38
#define MAX_S2108_1_FRAMES 10
39
40
/* HDR Frame types (See Sec 5.3.1 Table 3) */
41
#define KLVANC_HDR_STATIC1 0x00
/* H.265 */
42
#define KLVANC_HDR_STATIC2 0x01
/* H.265 */
43
#define KLVANC_HDR_DYNAMIC2 0x02
/* ATSC A/341 */
44
/* Codes 3-5 are reserved */
45
#define KLVANC_HDR_DYNAMIC5 0x06
/* ETSI TS 103 433-1 SL-HDR */
46
47
struct
klvanc_packet_smpte_2108_1_static1
{
48
uint16_t display_primaries_x[3];
49
uint16_t display_primaries_y[3];
50
uint16_t white_point_x;
51
uint16_t white_point_y;
52
uint32_t max_display_mastering_luminance;
53
uint32_t min_display_mastering_luminance;
54
};
55
56
struct
klvanc_packet_smpte_2108_1_static2
{
57
uint16_t max_content_light_level;
58
uint16_t max_pic_average_light_level;
59
};
60
61
struct
klvanc_s2108_1_frame
{
62
uint8_t frame_type;
63
uint8_t frame_length;
64
union
{
65
struct
klvanc_packet_smpte_2108_1_static1
static1;
66
struct
klvanc_packet_smpte_2108_1_static2
static2;
67
};
68
};
69
73
struct
klvanc_packet_smpte_2108_1_s
74
{
75
struct
klvanc_packet_header_s
hdr;
76
77
uint8_t payload[256];
78
unsigned
int
payloadLengthBytes;
79
80
uint8_t num_frames;
81
struct
klvanc_s2108_1_frame
frames[MAX_S2108_1_FRAMES];
82
};
83
90
int
klvanc_alloc_SMPTE_2108_1
(
struct
klvanc_packet_smpte_2108_1_s
**pkt);
91
98
int
klvanc_dump_SMPTE_2108_1
(
struct
klvanc_context_s
*ctx,
void
*p);
99
104
void
klvanc_free_SMPTE_2108_1
(
void
*p);
105
106
#ifdef __cplusplus
107
};
108
#endif
109
110
#endif
/* _VANC_SMPTE_2108_1_H */
klvanc_context_s
Application specific context, the library allocates and stores user specific instance information.
Definition
vanc.h:125
klvanc_packet_header_s
TODO - Brief description goes here.
Definition
vanc-packets.h:59
klvanc_packet_smpte_2108_1_s
Describes an ST2108 packet.
Definition
vanc-smpte_2108_1.h:74
klvanc_packet_smpte_2108_1_static1
Definition
vanc-smpte_2108_1.h:47
klvanc_packet_smpte_2108_1_static2
Definition
vanc-smpte_2108_1.h:56
klvanc_s2108_1_frame
Definition
vanc-smpte_2108_1.h:61
vanc-packets.h
VANC Headers and packet structure.
klvanc_alloc_SMPTE_2108_1
int klvanc_alloc_SMPTE_2108_1(struct klvanc_packet_smpte_2108_1_s **pkt)
Create SMPTE ST 2108_1 HDR metadata.
klvanc_free_SMPTE_2108_1
void klvanc_free_SMPTE_2108_1(void *p)
TODO - Brief description goes here.
klvanc_dump_SMPTE_2108_1
int klvanc_dump_SMPTE_2108_1(struct klvanc_context_s *ctx, void *p)
TODO - Brief description goes here.
Generated by
1.14.0