12b0e5d60 Snapshot 202403 a4c9b1981 loop parameters in remove_trailing_spaces e231b01a4 CR3-Qstep table: avoid wrong 64-bit code generation 21368133a 0.21.2 release a6f212a4a tag type => tag size mapping fixed 41506ef73 cubic_spline: better handling of non-integer data 17294b5fd extra metadata check in arq_load_raw 47d9dd8e2 Better incorrect data handling in cubic_spline 3baa51068 skip invalid pattern in xtrans_interpolate eaf63bf5f Check HL recovery coeffs before processing a14574080 limit wavelet denoise minimum size 4e597e4e9 Merge pull request #594 from pinotree/path_max 086dcb9a6 raw-identify: use fallback if PATH_MAX not available 0e105f9f8 additional check against corrupted ljpeg layout 0c8b68e9f Disable color conversion for Canon 16-bit thumbnails cd1abd695 docs/changelog: explained the case when no thumbnail is found in specific file 6fffd414b rename swapXX to libraw_swapXX to avoid name conflict af78ae48a Check against corrupted LJPEG header in Canon sRAW decoder ba780e600 Limit embedded color profile allocation/read size 122bf7c5b Wrong alloc result check for 16-bit bitmap thumbnail e6dd2709e check pana_data/buffer offset before use ae2dc5884 Check P1 quadrant linearization coeff[15] against zero f2998bacc avoid integer overflow in buffer space check 443b7fb51 prevent buffer overrun in buffer_datastream::scanf_one 35a6d3615 ensure correct T.tlength for 16b bitmap thumbnails(2) b69ea8be5 ensure correct T.tlength for 16b bitmap thumbnails 2b6eca897 Do not run sraw decoder on (crafted) bayer files 68808b57f better striped thumbnails handling 9ab70f6dc do not set shrink flag for 3/4 component images 32425dd96 allow more decoders for fuji-rotated RAWs REVERT: 1ef70158d 0.21.2 release REVERT: 62f042366 tag type => tag size mapping fixed REVERT: ee087e3fe cubic_spline: better handling of non-integer data REVERT: af755b991 extra metadata check in arq_load_raw REVERT: 0fadd8819 Better incorrect data handling in cubic_spline REVERT: d7fb66053 skip invalid pattern in xtrans_interpolate REVERT: d059ed280 Check HL recovery coeffs before processing REVERT: 104730519 limit wavelet denoise minimum size REVERT: cae09838e raw-identify: use fallback if PATH_MAX not available REVERT: d6c677608 additional check against corrupted ljpeg layout REVERT: 1001a6ac1 Disable color conversion for Canon 16-bit thumbnails REVERT: a5130b01b docs/changelog: explained the case when no thumbnail is found in specific file REVERT: 600c0c63d rename swapXX to libraw_swapXX to avoid name conflict REVERT: 299c8a11b Check against corrupted LJPEG header in Canon sRAW decoder REVERT: ec8671ad9 Limit embedded color profile allocation/read size REVERT: 5229d5942 Wrong alloc result check for 16-bit bitmap thumbnail REVERT: b278b775f check pana_data/buffer offset before use REVERT: 7f4b8d3af Check P1 quadrant linearization coeff[15] against zero REVERT: e942a7db6 avoid integer overflow in buffer space check REVERT: f6a57cfb8 prevent buffer overrun in buffer_datastream::scanf_one REVERT: 3e62ed304 ensure correct T.tlength for 16b bitmap thumbnails(2) REVERT: 8e52d81cd ensure correct T.tlength for 16b bitmap thumbnails REVERT: 8e1af15e2 Do not run sraw decoder on (crafted) bayer files REVERT: 0ace959c2 better striped thumbnails handling REVERT: 477e0719f do not set shrink flag for 3/4 component images REVERT: c8efae6c5 allow more decoders for fuji-rotated RAWs git-subtree-dir: rtengine/libraw git-subtree-split: 12b0e5d60c57bb795382fda8494fc45f683550b8
125 lines
4.7 KiB
Plaintext
125 lines
4.7 KiB
Plaintext
GoPro HERO/Fusion .GPR files are DNG files by nature, but with own wavelet-based codec.
|
|
|
|
GoPro provides GPR SDK for reading these files, available at https://github.com/gopro/gpr
|
|
|
|
LibRaw is able to use this GPR SDK to read GoPro HERO/Fusion files.
|
|
|
|
To enable this support:
|
|
|
|
1. Build GPR SDK (see NOTES section below)
|
|
2. Build LibRaw with -DUSE_DNGSDK and -DUSE_GPRSDK compiler flags
|
|
(you'll need to adjust INCLUDE path and linker flags to add GPR SDK files to compile/link).
|
|
|
|
|
|
NOTES:
|
|
I. GPR SDK comes with (patched) Adobe DNG SDK source (v1.4 but outdated).
|
|
This DNG SDK is *NOT* compatible with LibRaw since 0.20 due to
|
|
internals change .
|
|
|
|
II. So, you need to patch latest Adobe DNG SDK v1.4 (dated 2015), this version
|
|
is available from Adobe:
|
|
http://download.adobe.com/pub/adobe/dng/dng_sdk_1_4.zip
|
|
or use Adobe DNG SDK v1.6 or v1.7
|
|
|
|
(most likely, this apply for v1.5 too, but not tested/checked):
|
|
|
|
a) For Adobe DNG SDK v1.4 you'll need to enable dng_ifd.fCompression value == 9 in
|
|
dng_ifd::IsValidCFA() call
|
|
Use provided patch: LibRaw/GoPro/dng-sdk-1_4-allow-VC5-validate.diff
|
|
(it may not apply to any Adobe DNG SDK version, if so apply it by hands).
|
|
|
|
This compression type is already handled (passed via validation)
|
|
in Adobe DNG SDK v1.6/1.7
|
|
|
|
b) Adobe DNG SDK v1.6/1.7 defines the ccVc5 constant in dng_tag_values.h
|
|
so GPR SDK's gpr_read_image.cpp will not compile due to constant redefinition
|
|
so use provided patch:
|
|
|
|
For Adobe DNG SDK 1.6 (only): LibRaw/GoPro/dng-sdk-1_6-hide-ccVc5-definitiion.diff
|
|
For Adobe DNG SDK 1.6 or 1.7: LibRaw/GoPro/dng-sdk-1_6-1_7-hide-ccVc5-definitiion.diff
|
|
|
|
to use Adobe's definitiion
|
|
|
|
c) Newer (than supplied w/ GPR SDK) Adobe SDK versions changes
|
|
dng_read_image::ReadTile interface, please apply patches
|
|
* For all versions of Adobe DNG SDK:
|
|
|
|
LibRaw/GoPro/gpr_read_image.cpp-dng16.diff
|
|
and LibRaw/GoPro/gpr_read_image.h-dng16.diff to your GPR SDK code
|
|
|
|
* For Adone DNG SDK 1.7 (in addition to two -dng16.diff patches listed in previous section):
|
|
LibRaw/GoPro/gpr_read_image.h-dng16.diff
|
|
LibRaw/GoPro/gpr_read_image.h-dng17.diff
|
|
|
|
d) GPR SDK's gpr_sdk/private/gpr.cpp uses own (added) dng_host method
|
|
GetGPMFPayload so it will not compile with Adobes (not patched)
|
|
dng_host.h
|
|
LibRaw does not use high-level interface provided by gpr.cpp, so
|
|
possible problem solutions are:
|
|
- either compile GPR SDK without gpr_sdk/private/gpr.cpp file
|
|
- or provide GPR's dng_host.h while building GPR SDK.
|
|
(in our software we use 1st method).
|
|
|
|
|
|
|
|
See Note VII below for detailed GPR SDK build instructions w/ Cmake
|
|
|
|
III. LibRaw uses private gpr_read_image() interface
|
|
So you'll need to add PATH_TO/gpr_sdk/gpr_sdk/private to -I compiler flags.
|
|
|
|
IV. -DUSE_GPRSDK LibRaw build flag requires -DUSE_DNGSDK. LibRaw will not
|
|
compile if USE_GPRSDK is set, but USE_DNGSDK is not
|
|
|
|
V. LibRaw will use DNG SDK to unpack GoPro files even if imgdata.params.use_dng_sdk is set to 0.
|
|
|
|
VI. If LibRaw is built with -DUSE_GPRSDK, LibRaw::capabilities will return LIBRAW_CAPS_GPRSDK flag.
|
|
|
|
VII. GPR SDK build using cmake (contributed by our user, great thanks)
|
|
|
|
1. replace gopro's toplevel CMakeLists.txt with this one (this builds only a subset of the libraries):
|
|
------------------------------------
|
|
# minimum required cmake version
|
|
cmake_minimum_required( VERSION 3.5 FATAL_ERROR )
|
|
|
|
set(CMAKE_SUPPRESS_REGENERATION true)
|
|
set(CMAKE_C_FLAGS "-std=c99")
|
|
|
|
# project name
|
|
project( gpr )
|
|
|
|
option(DNGINCLUDEDIR "Adobe DNG toolkit include directory")
|
|
INCLUDE_DIRECTORIES( ${DNGINCLUDEDIR} )
|
|
|
|
# DNG toolkit requires C++11 minimum:
|
|
set_property(GLOBAL PROPERTY CXX_STANDARD 17)
|
|
|
|
# add needed subdirectories
|
|
add_subdirectory( "source/lib/common" )
|
|
add_subdirectory( "source/lib/vc5_common" )
|
|
add_subdirectory( "source/lib/vc5_decoder" )
|
|
add_subdirectory( "source/lib/gpr_sdk" )
|
|
|
|
set_property(TARGET gpr_sdk PROPERTY CXX_STANDARD 17)
|
|
|
|
IF (WIN32)
|
|
TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=1 -DqMacOS=0 -DqLinux=0)
|
|
ELSEIF (APPLE)
|
|
TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=0 -DqMacOS=1 -DqLinux=0)
|
|
ELSE()
|
|
TARGET_COMPILE_DEFINITIONS( gpr_sdk PUBLIC -DqWinOS=0 -DqMacOS=0 -DqLinux=1)
|
|
ENDIF()
|
|
----------------------------------------
|
|
|
|
2. apply the two patches of README.GoPro.txt section II b.
|
|
the patch of section IIa is not needed with libdng1.5.
|
|
|
|
3. delete these two files:
|
|
/source/lib/gpr_sdk/private/gpr.cpp
|
|
/source/lib/gpr_sdk/private/gpr_image_writer.cpp
|
|
|
|
4. run CMAKE with -DDNGINCLUDEDIR, pointing to the headers from Adobe dng 1.5.
|
|
|
|
5. build. You get 4 libraries "gpr_sdk", "vc5_common", "vc5_decoder", "common", the rest is ignored.
|
|
|
|
|