UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
y4m.h
Go to the documentation of this file.
1
7/*
8 * Copyright (c) 2022-2023, CESNET z.s.p.o.
9 *
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *
15 * * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * * Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
35#ifndef Y4M_H_DB8BEC68_AA48_4A63_81C3_DC3821F5555B
36#define Y4M_H_DB8BEC68_AA48_4A63_81C3_DC3821F5555B
37
38#ifdef __cplusplus
39#include <cstddef>
40#else
41#include <stdbool.h>
42#include <stddef.h>
43#endif
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
56
58 int width;
59 int height;
62 bool limited;
63};
64
69size_t y4m_read(const char *filename, struct y4m_metadata *info, unsigned char **data, void *(*allocator)(size_t));
70bool y4m_write(const char *filename, const struct y4m_metadata *info, const unsigned char *data);
71
72#ifdef __cplusplus
73} // extern "C"
74#endif
75
76#endif // defined Y4M_H_DB8BEC68_AA48_4A63_81C3_DC3821F5555B
int width
Definition y4m.h:58
bool limited
Definition y4m.h:62
int subsampling
Definition y4m.h:61
int bitdepth
Definition y4m.h:60
int height
Definition y4m.h:59
size_t y4m_read(const char *filename, struct y4m_metadata *info, unsigned char **data, void *(*allocator)(size_t))
Definition y4m.c:77
bool y4m_write(const char *filename, const struct y4m_metadata *info, const unsigned char *data)
Definition y4m.c:135
y4m_subsampling
Definition y4m.h:49
@ Y4M_SUBS_MONO
Definition y4m.h:50
@ Y4M_SUBS_444
Definition y4m.h:53
@ Y4M_SUBS_422
Definition y4m.h:52
@ Y4M_SUBS_420
Definition y4m.h:51
@ Y4M_SUBS_YUVA
Definition y4m.h:54