Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
sebastiankrzyszkowiak
megapixels
Commits
edd1de7a
Commit
edd1de7a
authored
Dec 22, 2020
by
Martijn Braam
Browse files
Add meson option for the tiff cfa pattern bug
parent
684a81e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
meson.build
View file @
edd1de7a
...
...
@@ -21,6 +21,11 @@ if get_option('buildtype') == 'debug'
add_global_arguments('-DDEBUG', language: 'c')
endif
# Workaround for libtiff having ABI changes but not changing the internal version number
if get_option('tiffcfapattern')
add_global_arguments('-DLIBTIFF_CFA_PATTERN', language: 'c')
endif
executable('megapixels', 'main.c', 'ini.c', 'quickpreview.c', 'camera.c', 'device.c', 'pipeline.c', 'camera_config.c', 'io_pipeline.c', 'process_pipeline.c', 'matrix.c', resources, dependencies : [gtkdep, libm, tiff, threads], install : true)
install_data(['data/org.postmarketos.Megapixels.desktop'],
...
...
meson_options.txt
0 → 100644
View file @
edd1de7a
option('tiffcfapattern', type: 'boolean', value: false)
process_pipeline.c
View file @
edd1de7a
...
...
@@ -236,11 +236,12 @@ process_image_for_capture(const MPImage *image, int count)
TIFFSetField
(
tif
,
TIFFTAG_PLANARCONFIG
,
PLANARCONFIG_CONTIG
);
static
const
short
cfapatterndim
[]
=
{
2
,
2
};
TIFFSetField
(
tif
,
TIFFTAG_CFAREPEATPATTERNDIM
,
cfapatterndim
);
#if (TIFFLIB_VERSION < 20201219)
#if (TIFFLIB_VERSION < 20201219)
&& !LIBTIFF_CFA_PATTERN
TIFFSetField
(
tif
,
TIFFTAG_CFAPATTERN
,
"
\002\001\001\000
"
);
// BGGR
#else
TIFFSetField
(
tif
,
TIFFTAG_CFAPATTERN
,
4
,
"
\002\001\001\000
"
);
// BGGR
#endif
printf
(
"TIFF version %d
\n
"
,
TIFFLIB_VERSION
);
if
(
camera
->
whitelevel
)
{
TIFFSetField
(
tif
,
TIFFTAG_WHITELEVEL
,
1
,
&
camera
->
whitelevel
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment