UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
src
capture_filter
resize_utils.h
Go to the documentation of this file.
1
/*
2
* FILE: capture_filter/resize_utils.h
3
* AUTHORS: Gerard Castillo <gerard.castillo@i2cat.net>
4
* Marc Palau <marc.palau@i2cat.net>
5
* Martin Pulec <martin.pulec@cesnet.cz>
6
*
7
* Copyright (c) 2005-2010 Fundació i2CAT, Internet I Innovació Digital a Catalunya
8
* Copyright (c) 2015-2023 CESNET, z. s. p. o.
9
*
10
* Redistribution and use in source and binary forms, with or without
11
* modification, is permitted provided that the following conditions
12
* are met:
13
*
14
* 1. Redistributions of source code must retain the above copyright
15
* notice, this list of conditions and the following disclaimer.
16
*
17
* 2. Redistributions in binary form must reproduce the above copyright
18
* notice, this list of conditions and the following disclaimer in the
19
* documentation and/or other materials provided with the distribution.
20
*
21
* 3. All advertising materials mentioning features or use of this software
22
* must display the following acknowledgement:
23
*
24
* This product includes software developed by the Fundació i2CAT,
25
* Internet I Innovació Digital a Catalunya. This product also includes
26
* software developed by CESNET z.s.p.o.
27
*
28
* 4. Neither the name of the University nor of the Institute may be used
29
* to endorse or promote products derived from this software without
30
* specific prior written permission.
31
*
32
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
33
* "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
34
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
35
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
36
* EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
37
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
38
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
39
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
41
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
42
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
43
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44
*
45
*/
46
47
#ifndef RESIZE_UTILS_H_
48
#define RESIZE_UTILS_H_
49
50
#include "types.h"
51
52
#ifdef __cplusplus
53
extern
"C"
{
54
#endif
55
56
#define RESIZE_SUPPORTED_PIXFMT_INIT RGB, RGBA, I420, UYVY, YUYV, RG48
57
58
#define RESIZE_ALGO_DFL (-1)
59
#define RESIZE_ALGO_UNKN (-2)
60
#define RESIZE_ALGO_HELP_SHOWN (-3)
61
int
resize_algo_from_string
(
const
char
*str);
62
63
struct
resize_param
{
64
enum
resize_mode
{
65
NONE
,
66
USE_FRACTION
,
67
USE_DIMENSIONS
,
68
}
mode
;
69
union
{
70
double
factor
;
71
struct
{
72
int
target_width
;
73
int
target_height
;
74
};
75
};
76
int
algo
;
77
};
78
void
resize_frame
(
char
*indata,
codec_t
in_color,
char
*outdata,
int
width,
79
int
height,
struct
resize_param
*resize_spec);
80
81
#ifdef __cplusplus
82
}
83
#endif
84
85
#endif
// RESIZE_UTILS_H_
resize_algo_from_string
int resize_algo_from_string(const char *str)
Definition
resize_utils.cpp:224
resize_frame
void resize_frame(char *indata, codec_t in_color, char *outdata, int width, int height, struct resize_param *resize_spec)
Definition
resize_utils.cpp:184
resize_param
Definition
resize_utils.h:63
resize_param::target_height
int target_height
Definition
resize_utils.h:73
resize_param::resize_mode
resize_mode
Definition
resize_utils.h:64
resize_param::USE_FRACTION
@ USE_FRACTION
Definition
resize_utils.h:66
resize_param::NONE
@ NONE
Definition
resize_utils.h:65
resize_param::USE_DIMENSIONS
@ USE_DIMENSIONS
Definition
resize_utils.h:67
resize_param::factor
double factor
Definition
resize_utils.h:70
resize_param::target_width
int target_width
Definition
resize_utils.h:72
resize_param::algo
int algo
Definition
resize_utils.h:76
resize_param::mode
enum resize_param::resize_mode mode
codec_t
codec_t
Definition
types.h:65
Generated on Wed Sep 25 2024 14:27:15 for UltraGrid by
1.12.0