1 /*****************************************************************************
2 * hxxx_sei.h: AVC/HEVC packetizers SEI handling
3 *****************************************************************************
4 * Copyright (C) 2001-2016 VLC authors and VideoLAN
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
23 /* Defined in H.264/H.265 annex D */
26 HXXX_SEI_PIC_TIMING
= 1,
27 HXXX_SEI_USER_DATA_REGISTERED_ITU_T_T35
= 4,
28 HXXX_SEI_RECOVERY_POINT
= 6,
29 HXXX_SEI_FRAME_PACKING_ARRANGEMENT
= 45,
30 HXXX_SEI_MASTERING_DISPLAY_COLOUR_VOLUME
= 137, /* SMPTE ST 2086 */
31 HXXX_SEI_CONTENT_LIGHT_LEVEL
= 144,
34 enum hxxx_sei_t35_type_e
44 bs_t
*p_bs
; /* for raw/unhandled in common code callbacks */
47 enum hxxx_sei_t35_type_e type
;
52 const uint8_t *p_data
;
61 FRAME_PACKING_CANCEL
= -1,
62 FRAME_PACKING_INTERLEAVED_CHECKERBOARD
= 0,
63 FRAME_PACKING_INTERLEAVED_COLUMN
,
64 FRAME_PACKING_INTERLEAVED_ROW
,
65 FRAME_PACKING_SIDE_BY_SIDE
,
66 FRAME_PACKING_TOP_BOTTOM
,
67 FRAME_PACKING_TEMPORAL
,
68 FRAME_PACKING_NONE_2D
,
82 uint16_t primaries
[3*2]; /* G,B,R / x,y */
83 uint16_t white_point
[2]; /* x,y */
84 uint32_t max_luminance
;
85 uint32_t min_luminance
;
86 } colour_volume
; /* SMPTE ST 2086 */
91 } content_light_lvl
; /* CTA-861.3 */
95 typedef bool (*pf_hxxx_sei_callback
)(const hxxx_sei_data_t
*, void *);
96 void HxxxParseSEI(const uint8_t *, size_t, uint8_t, pf_hxxx_sei_callback
, void *);
97 void HxxxParse_AnnexB_SEI(const uint8_t *, size_t, uint8_t, pf_hxxx_sei_callback
, void *);