UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
jpeg_writer.h
Go to the documentation of this file.
1
7/*
8 * Copyright (c) 2024 CESNET
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 UTILS_JPEG_WRITER_H_1FB9D4E0_CAED_4C8E_97BA_2ECDAF41F006
36#define UTILS_JPEG_WRITER_H_1FB9D4E0_CAED_4C8E_97BA_2ECDAF41F006
37
38#include <stdint.h> // for uint8_t
39
46 unsigned width;
47 unsigned height;
49
50 char *dqt_marker_start; // set by jpeg_writer_write_headers()
51};
52
53enum {
55};
56
57void jpeg_writer_write_headers(char **buffer, struct jpeg_writer_data *info);
58void jpeg_writer_fill_dqt(char *buffer,
59 uint8_t quant_table[2][JPEG_QUANT_SIZE]);
60void jpeg_writer_write_eoi(char **buffer);
61
62#endif // defined UTILS_JPEG_WRITER_H_1FB9D4E0_CAED_4C8E_97BA_2ECDAF41F006
void jpeg_writer_fill_dqt(char *buffer, uint8_t quant_table[2][JPEG_QUANT_SIZE])
void jpeg_writer_write_eoi(char **buffer)
void jpeg_writer_write_headers(char **buffer, struct jpeg_writer_data *info)
writes JPEG/JFIF headers up to the scan (including SOS header)
@ JPEG_QUANT_SIZE
items, bytes (for precision=0)
Definition jpeg_writer.h:54
gpujpeg_writer_subsasmpling
values map to RTP type
Definition jpeg_writer.h:42
char * dqt_marker_start
Definition jpeg_writer.h:50
enum jpeg_writer_data::gpujpeg_writer_subsasmpling subsampling
unsigned restart_interval
Definition jpeg_writer.h:48