MLT  7.34.0
mlt_luma_map.h
Go to the documentation of this file.
1 /*
2  * \file mlt_luma_map.h
3  * \brief functions to generate and read luma-wipe transition maps
4  *
5  * Copyright (C) 2003-2019 Meltytech, LLC
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef MLT_LUMA_MAP_H
23 #define MLT_LUMA_MAP_H
24 
25 #include "mlt_export.h"
26 #include <stdint.h>
27 #include <stdio.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
34 {
35  int type;
36  int w;
37  int h;
38  int bands;
39  int rband;
40  int vmirror;
41  int hmirror;
42  int dmirror;
43  int invert;
44  int offset;
45  int flip;
46  int flop;
47  int pflip;
48  int pflop;
49  int quart;
50  int rotate;
51 };
52 
53 typedef struct mlt_luma_map_s *mlt_luma_map;
54 
55 MLT_EXPORT void mlt_luma_map_init(mlt_luma_map self);
56 MLT_EXPORT mlt_luma_map mlt_luma_map_new(const char *path);
57 MLT_EXPORT uint16_t *mlt_luma_map_render(mlt_luma_map self);
58 MLT_EXPORT int mlt_luma_map_from_pgm(const char *filename, uint16_t **map, int *width, int *height);
59 MLT_EXPORT void mlt_luma_map_from_yuv422(uint8_t *image, uint16_t **map, int width, int height);
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif
MLT_EXPORT int mlt_luma_map_from_pgm(const char *filename, uint16_t **map, int *width, int *height)
Load the luma map from PGM stream.
Definition: mlt_luma_map.c:302
MLT_EXPORT void mlt_luma_map_init(mlt_luma_map self)
Definition: mlt_luma_map.c:32
struct mlt_luma_map_s * mlt_luma_map
Definition: mlt_luma_map.h:53
MLT_EXPORT void mlt_luma_map_from_yuv422(uint8_t *image, uint16_t **map, int width, int height)
Generate a 16-bit luma map from an 8-bit image.
Definition: mlt_luma_map.c:500
MLT_EXPORT uint16_t * mlt_luma_map_render(mlt_luma_map self)
Definition: mlt_luma_map.c:75
MLT_EXPORT mlt_luma_map mlt_luma_map_new(const char *path)
Definition: mlt_luma_map.c:417
Definition: mlt_luma_map.h:34
int dmirror
Definition: mlt_luma_map.h:42
int flip
Definition: mlt_luma_map.h:45
int rotate
Definition: mlt_luma_map.h:50
int h
Definition: mlt_luma_map.h:37
int quart
Definition: mlt_luma_map.h:49
int type
Definition: mlt_luma_map.h:35
int bands
Definition: mlt_luma_map.h:38
int hmirror
Definition: mlt_luma_map.h:41
int invert
Definition: mlt_luma_map.h:43
int vmirror
Definition: mlt_luma_map.h:40
int rband
Definition: mlt_luma_map.h:39
int pflip
Definition: mlt_luma_map.h:47
int flop
Definition: mlt_luma_map.h:46
int pflop
Definition: mlt_luma_map.h:48
int offset
Definition: mlt_luma_map.h:44
int w
Definition: mlt_luma_map.h:36