UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
pixfmt_conv.h
Go to the documentation of this file.
1
17/* Copyright (c) 2005-2023 CESNET z.s.p.o.
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, is permitted provided that the following conditions
21 * are met:
22 *
23 * 1. Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 *
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 *
30 * 3. All advertising materials mentioning features or use of this software
31 * must display the following acknowledgement:
32 *
33 * This product includes software developed by CESNET z.s.p.o.
34 *
35 * 4. Neither the name of the CESNET nor the names of its contributors may be
36 * used to endorse or promote products derived from this software without
37 * specific prior written permission.
38 *
39 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
40 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
41 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
42 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
43 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
44 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
45 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
46 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
48 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
49 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
50 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51 */
52
53#ifndef PIXFMT_CONV_H_8C5FFAF7_CE36_4885_943F_527153D90865
54#define PIXFMT_CONV_H_8C5FFAF7_CE36_4885_943F_527153D90865
55
56#include "types.h" // codec_t
57
58#ifndef __cplusplus
59#include <stdbool.h>
60#endif // !defined __cplusplus
61
62#ifdef _MSC_VER
63#define __attribute__(a)
64#endif
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70#define DEFAULT_R_SHIFT 0
71#define DEFAULT_G_SHIFT 8
72#define DEFAULT_B_SHIFT 16
73#define DEFAULT_RGB_SHIFT_INIT { DEFAULT_R_SHIFT, DEFAULT_G_SHIFT, DEFAULT_B_SHIFT }
74
95typedef void decoder_func_t(unsigned char * __restrict dst, const unsigned char * __restrict src, int dst_len, int rshift, int gshift, int bshift);
97
99decoder_t get_best_decoder_from(codec_t in, const codec_t *out_candidates, codec_t *out);
100
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif // defined PIXFMT_CONV_H_8C5FFAF7_CE36_4885_943F_527153D90865
118
decoder_func_t vc_copylineRGBA
decoder_func_t vc_copylineABGRtoRGB
decoder_func_t vc_copylineToRGBA_inplace
decoder_func_t vc_copylineRGBtoRGBA
decoder_func_t vc_copylineUYVYtoGrayscale
decoder_t get_decoder_from_to(codec_t in, codec_t out) __attribute__((const))
decoder_func_t vc_copylineRGBtoUYVY_SSE
decoder_func_t * decoder_t
Definition pixfmt_conv.h:96
decoder_func_t vc_memcpy
dummy conversion - ptr to it returned if no conversion needed
decoder_func_t vc_copylineBGRAtoRGB
decoder_t get_best_decoder_from(codec_t in, const codec_t *out_candidates, codec_t *out)
void decoder_func_t(unsigned char *__restrict dst, const unsigned char *__restrict src, int dst_len, int rshift, int gshift, int bshift)
Defines type for pixelformat conversions.
Definition pixfmt_conv.h:95
decoder_func_t vc_copylineRGBtoGrayscale_SSE
decoder_func_t vc_copylineUYVYtoRGB_SSE
struct __attribute__((packed))
Definition rtp.h:88
This file contains some common data types.
codec_t
Definition types.h:65