Merge branch 'dev' into favorites-gui
115
.github/workflows/appimage.yml
vendored
@ -1,8 +1,11 @@
|
||||
name: Build AppImage
|
||||
name: AppImage Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- releases
|
||||
tags:
|
||||
- '[0-9]+.*'
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
@ -10,30 +13,45 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_type: [release]
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "Running apt update."
|
||||
sudo apt update
|
||||
echo "Installing dependencies with apt."
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install -y cmake libgtk-3-dev libgtkmm-3.0-dev liblensfun-dev librsvg2-dev liblcms2-dev libfftw3-dev libiptcdata0-dev libtiff5-dev libcanberra-gtk3-dev liblensfun-bin
|
||||
|
||||
- name: Configure build
|
||||
run: |
|
||||
echo "Getting branch name."
|
||||
BRANCH="$(git branch --show-current)"
|
||||
echo "Branch name is '$BRANCH'."
|
||||
export REF_NAME_FILTERED="$(echo '${{github.ref_name}}' | sed 's/[^A-z0-9_.-]//g')"
|
||||
|
||||
echo "Setting cache suffix."
|
||||
if [ '${{github.ref_type}}' == 'tag' ]; then
|
||||
export CACHE_SUFFIX=""
|
||||
else
|
||||
export CACHE_SUFFIX="5-$REF_NAME_FILTERED"
|
||||
fi
|
||||
export CACHE_SUFFIX="$CACHE_SUFFIX-AppImage"
|
||||
echo "Cache suffix is '$CACHE_SUFFIX'."
|
||||
|
||||
echo "Making build directory."
|
||||
mkdir build
|
||||
echo "Changing working directory to the build directory."
|
||||
cd build
|
||||
|
||||
echo "Running CMake configure."
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE="release" \
|
||||
-DCACHE_NAME_SUFFIX="5-$BRANCH-AppImage" \
|
||||
-DCMAKE_BUILD_TYPE='${{matrix.build_type}}' \
|
||||
-DCACHE_NAME_SUFFIX="$CACHE_SUFFIX" \
|
||||
-DPROC_TARGET_NUMBER="1" \
|
||||
-DBUILD_BUNDLE="ON" \
|
||||
-DBUNDLE_BASE_INSTALL_DIR="/" \
|
||||
@ -45,6 +63,10 @@ jobs:
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DLENSFUNDBDIR="../share/lensfun/version_1" \
|
||||
..
|
||||
|
||||
echo "Recording filtered ref name."
|
||||
echo "REF_NAME_FILTERED=$REF_NAME_FILTERED" >> $GITHUB_ENV
|
||||
|
||||
- name: Build RawTherapee
|
||||
working-directory: ./build
|
||||
run: |
|
||||
@ -52,69 +74,96 @@ jobs:
|
||||
make -j$(nproc) install DESTDIR=AppDir/usr/bin
|
||||
echo "Moving usr/bin/share to usr/share."
|
||||
mv AppDir/usr/bin/share AppDir/usr/
|
||||
|
||||
- name: Include Lensfun
|
||||
run: |
|
||||
echo "Patching lensfun-update-data script."
|
||||
sudo sed -i 's/HTTPError\(, ValueError\)/URLError\1/' $(which lensfun-update-data)
|
||||
echo "Updating Lensfun database."
|
||||
lensfun-update-data
|
||||
echo "Creating Lensfun directory in the build directory."
|
||||
mkdir -p build/AppDir/usr/share/lensfun
|
||||
echo "Copying Lensfun database to the build directory."
|
||||
cp -R ~/.local/share/lensfun/updates/* build/AppDir/usr/share/lensfun/
|
||||
|
||||
- name: Restore AppImage tools from cache
|
||||
id: appimage-tools-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
key: appimage-tools-1
|
||||
path: |
|
||||
./build/linuxdeploy-x86_64.AppImage
|
||||
./build/linuxdeploy-plugin-gtk.sh
|
||||
|
||||
- name: Download AppImage tools
|
||||
if: ${{steps.appimage-tools-cache.outputs.cache-hit != 'true'}}
|
||||
working-directory: ./build
|
||||
run: |
|
||||
echo "Downloading linuxdeploy."
|
||||
curl --location 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' > linuxdeploy-x86_64.AppImage
|
||||
echo "Downloading GTK plugin for linuxdeploy."
|
||||
curl --location 'https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh' > linuxdeploy-plugin-gtk.sh
|
||||
curl --location 'https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh' \
|
||||
| sed 's/^\(export GTK_THEME\)/#\1/' \
|
||||
> linuxdeploy-plugin-gtk.sh
|
||||
echo "Setting execute bit on all AppImage tools."
|
||||
chmod u+x linuxdeploy-*
|
||||
|
||||
- name: Package AppImage
|
||||
working-directory: ./build
|
||||
run: |
|
||||
echo "Creating artifact name."
|
||||
if [ '${{github.ref_type}}' == 'tag' ]; then
|
||||
ARTIFACT_NAME="RawTherapee_${REF_NAME_FILTERED}_${{matrix.build_type}}"
|
||||
else
|
||||
echo "Getting RawTherapee version."
|
||||
export VERSION="$(grep -m 1 '^Version: .*$' AboutThisBuild.txt | sed 's/^Version: \(.\+\)$/\1/')"
|
||||
export VERSION="$(grep -m 1 '^Version: .*$' 'AboutThisBuild.txt' | sed 's/^Version: \(.\+\)$/\1/')"
|
||||
echo "Version is '$VERSION'."
|
||||
echo "Generating AppImage file name."
|
||||
FILTERED_VERSION="$(echo "$VERSION" | sed 's/[^A-z0-9_.-]//g')"
|
||||
export OUTPUT="RawTherapee-$FILTERED_VERSION-x86_64.AppImage"
|
||||
ARTIFACT_NAME="RawTherapee_${REF_NAME_FILTERED}_${FILTERED_VERSION}_${{matrix.build_type}}"
|
||||
fi
|
||||
echo "Artifact name is '$ARTIFACT_NAME'."
|
||||
|
||||
echo "Generating AppImage file name."
|
||||
export OUTPUT="$ARTIFACT_NAME.AppImage"
|
||||
echo "AppImage file name will be '$OUTPUT'."
|
||||
|
||||
echo "Packaging AppImage."
|
||||
./linuxdeploy-x86_64.AppImage \
|
||||
--appimage-extract-and-run \
|
||||
--appdir AppDir \
|
||||
--plugin gtk \
|
||||
--output appimage
|
||||
echo "Recording RawTherapee version."
|
||||
echo "RT_VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "Recording AppImage file name."
|
||||
echo "APPIMAGE_NAME=$OUTPUT" >> $GITHUB_ENV
|
||||
|
||||
echo "Recording artifact name."
|
||||
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{env.APPIMAGE_NAME}}
|
||||
path: ${{github.workspace}}/build/${{env.APPIMAGE_NAME}}
|
||||
name: ${{env.ARTIFACT_NAME}}.AppImage
|
||||
path: ${{github.workspace}}/build/${{env.ARTIFACT_NAME}}.AppImage
|
||||
|
||||
- name: Prepare for publishing
|
||||
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
|
||||
run: |
|
||||
echo "Setting dev AppImage file name."
|
||||
APPIMAGE_DEV_NAME="RawTherapee-dev-x86_64.AppImage"
|
||||
echo "dev AppImage file name is '$APPIMAGE_DEV_NAME'."
|
||||
echo "Renaming dev AppImage."
|
||||
cp "build/$APPIMAGE_NAME" "$APPIMAGE_DEV_NAME"
|
||||
echo "Recording dev AppImage file name."
|
||||
echo "APPIMAGE_DEV_NAME=$APPIMAGE_DEV_NAME" >> $GITHUB_ENV
|
||||
echo "Setting dev AppImage version file name."
|
||||
APPIMAGE_DEV_VERSION_NAME="RawTherapee-dev-x86_64-version.txt"
|
||||
echo "dev AppImage version file name is '$APPIMAGE_DEV_VERSION_NAME'."
|
||||
echo "Creating dev AppImage version file."
|
||||
echo "$RT_VERSION" > "$APPIMAGE_DEV_VERSION_NAME"
|
||||
echo "Recording dev AppImage version file name."
|
||||
echo "APPIMAGE_DEV_VERSION_NAME=$APPIMAGE_DEV_VERSION_NAME" >> $GITHUB_ENV
|
||||
echo "Setting publish name."
|
||||
PUBLISH_NAME="RawTherapee_${REF_NAME_FILTERED}_${{matrix.build_type}}"
|
||||
echo "Publish name is '$PUBLISH_NAME'."
|
||||
|
||||
echo "Renaming AppImage."
|
||||
cp "build/$ARTIFACT_NAME.AppImage" "$PUBLISH_NAME.AppImage"
|
||||
|
||||
echo "Creating version file."
|
||||
cp "build/AboutThisBuild.txt" "$PUBLISH_NAME-AboutThisBuild.txt"
|
||||
|
||||
echo "Recording publish name."
|
||||
echo "PUBLISH_NAME=$PUBLISH_NAME" >> $GITHUB_ENV
|
||||
|
||||
- name: Publish artifacts
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{github.ref == 'refs/heads/dev'}}
|
||||
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
|
||||
with:
|
||||
tag_name: nightly-github-actions
|
||||
files: |
|
||||
${{env.APPIMAGE_DEV_NAME}}
|
||||
${{env.APPIMAGE_DEV_VERSION_NAME}}
|
||||
${{env.PUBLISH_NAME}}.AppImage
|
||||
${{env.PUBLISH_NAME}}-AboutThisBuild.txt
|
||||
|
89
.github/workflows/codeql.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ 'dev' ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ 'dev' ]
|
||||
schedule:
|
||||
- cron: '56 5 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_type: [release]
|
||||
language: [ 'cpp', 'python' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "Running apt update."
|
||||
sudo apt update
|
||||
echo "Installing dependencies with apt."
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt install -y cmake libgtk-3-dev libgtkmm-3.0-dev liblensfun-dev librsvg2-dev liblcms2-dev libfftw3-dev libiptcdata0-dev libtiff5-dev libcanberra-gtk3-dev liblensfun-bin
|
||||
|
||||
- name: Configure build
|
||||
run: |
|
||||
export REF_NAME_FILTERED="$(echo '${{github.ref_name}}' | sed 's/[^A-z0-9_.-]//g')"
|
||||
echo "Setting cache suffix."
|
||||
if [ '${{github.ref_type}}' == 'tag' ]; then
|
||||
export CACHE_SUFFIX=""
|
||||
else
|
||||
export CACHE_SUFFIX="5-$REF_NAME_FILTERED"
|
||||
fi
|
||||
export CACHE_SUFFIX="$CACHE_SUFFIX-AppImage"
|
||||
echo "Cache suffix is '$CACHE_SUFFIX'."
|
||||
echo "Making build directory."
|
||||
mkdir build
|
||||
echo "Changing working directory to the build directory."
|
||||
cd build
|
||||
echo "Running CMake configure."
|
||||
cmake \
|
||||
-DCMAKE_BUILD_TYPE='${{matrix.build_type}}' \
|
||||
-DCACHE_NAME_SUFFIX="$CACHE_SUFFIX" \
|
||||
-DPROC_TARGET_NUMBER="1" \
|
||||
-DBUILD_BUNDLE="ON" \
|
||||
-DBUNDLE_BASE_INSTALL_DIR="/" \
|
||||
-DOPTION_OMP="ON" \
|
||||
-DWITH_LTO="OFF" \
|
||||
-DWITH_PROF="OFF" \
|
||||
-DWITH_SAN="OFF" \
|
||||
-DWITH_SYSTEM_KLT="OFF" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DLENSFUNDBDIR="../share/lensfun/version_1" \
|
||||
..
|
||||
echo "Recording filtered ref name."
|
||||
echo "REF_NAME_FILTERED=$REF_NAME_FILTERED" >> $GITHUB_ENV
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Build RawTherapee
|
||||
working-directory: ./build
|
||||
run: |
|
||||
echo "Running make install."
|
||||
make -j$(nproc) install DESTDIR=AppDir/usr/bin
|
||||
echo "Moving usr/bin/share to usr/share."
|
||||
mv AppDir/usr/bin/share AppDir/usr/
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
@ -1,20 +1,18 @@
|
||||
name: macOS build
|
||||
name: macOS Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- patch**
|
||||
- newlocallab
|
||||
- releases
|
||||
tags:
|
||||
- '[0-9]+.*'
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
- newlocallab
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
@ -23,7 +21,7 @@ jobs:
|
||||
mkdir build
|
||||
date +%s > build/stamp
|
||||
brew uninstall --ignore-dependencies libtiff
|
||||
brew install libtiff gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++@2 little-cms2 libiptcdata fftw lensfun expat pkgconfig libomp shared-mime-info | tee -a depslog
|
||||
brew install libtiff gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++@2 little-cms2 libiptcdata fftw lensfun expat pkgconfig llvm shared-mime-info | tee -a depslog
|
||||
date -u
|
||||
echo "----====Pourage====----"
|
||||
cat depslog | grep Pouring
|
||||
@ -52,8 +50,8 @@ jobs:
|
||||
-DPROC_LABEL="generic processor" \
|
||||
-DWITH_LTO="OFF" \
|
||||
-DLENSFUNDBDIR="/Applications/RawTherapee.app/Contents/Resources/share/lensfun" \
|
||||
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ \
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_C_FLAGS="-arch x86_64 -Wno-pass-failed -Wno-deprecated-register -Wno-unused-command-line-argument" \
|
||||
-DCMAKE_CXX_FLAGS="-arch x86_64 -Wno-pass-failed -Wno-deprecated-register -Wno-unused-command-line-argument" \
|
||||
-DOpenMP_C_FLAGS="${C_FLAGS}" \
|
||||
@ -65,6 +63,7 @@ jobs:
|
||||
-DCMAKE_RANLIB=/usr/bin/ranlib \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
|
||||
..
|
||||
curl -L https://github.com/Homebrew/homebrew-core/raw/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -o libomp.rb && brew install libomp.rb
|
||||
zsh -c 'echo "Configured in $(printf "%0.2f" $(($[$(date +%s)-$(cat configstamp)]/$((60.))))) minutes"'
|
||||
- name: Compile RawTherapee
|
||||
run: |
|
||||
@ -85,6 +84,12 @@ jobs:
|
||||
echo "ARTIFACT_PATH=${GITHUB_WORKSPACE}/build/${ARTIFACT}" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_FILE=${ARTIFACT}" >> $GITHUB_ENV
|
||||
zsh -c 'echo "Bundled in $(printf "%0.2f" $(($[$(date +%s)-$(cat bundlestamp)]/$((60.))))) minutes"'
|
||||
printf '%s\n' \
|
||||
"REF: ${REF}" \
|
||||
"ARTIFACT: ${ARTIFACT}" \
|
||||
"ARTIFACT_PATH: ${ARTIFACT_PATH}" \
|
||||
"ARTIFACT_FILE: ${ARTIFACT_FILE}" \
|
||||
"PUBLISH_NAME: ${PUBLISH_NAME}"
|
||||
exit
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
@ -94,3 +99,11 @@ jobs:
|
||||
run: |
|
||||
date -u
|
||||
zsh -c 'echo "Build completed in $(printf "%0.2f" $(($[$(date +%s)-$(cat build/stamp)]/$((60.))))) minutes"'
|
||||
|
||||
- name: Publish artifacts
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
|
||||
with:
|
||||
tag_name: nightly-github-actions
|
||||
files: |
|
||||
${{env.ARTIFACT_PATH}}
|
298
.github/workflows/windows.yml
vendored
Normal file
@ -0,0 +1,298 @@
|
||||
name: Windows Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- releases
|
||||
tags:
|
||||
- '[0-9]+.*'
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_type: [release, debug]
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
location: C:\msys2
|
||||
update: true
|
||||
install: |
|
||||
gzip
|
||||
git
|
||||
intltool
|
||||
mingw-w64-x86_64-gcc
|
||||
mingw-w64-x86_64-make
|
||||
mingw-w64-x86_64-pkg-config
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-ninja
|
||||
mingw-w64-x86_64-gtkmm3
|
||||
mingw-w64-x86_64-lcms2
|
||||
mingw-w64-x86_64-fftw
|
||||
mingw-w64-x86_64-lensfun
|
||||
mingw-w64-x86_64-libiptcdata
|
||||
|
||||
- name: Configure build
|
||||
run: |
|
||||
export REF_NAME_FILTERED="$(echo '${{github.ref_name}}' | sed 's/[^A-z0-9_.-]//g')"
|
||||
|
||||
if [ '${{github.ref_type}}' == 'tag' ]; then
|
||||
export CACHE_SUFFIX=""
|
||||
else
|
||||
echo "Setting cache suffix."
|
||||
export CACHE_SUFFIX="5-$REF_NAME_FILTERED"
|
||||
echo "Cache suffix is '$CACHE_SUFFIX'."
|
||||
fi
|
||||
|
||||
echo "Making build directory."
|
||||
mkdir build
|
||||
echo "Changing working directory to the build directory."
|
||||
cd build
|
||||
|
||||
echo "Running CMake configure."
|
||||
cmake \
|
||||
-G "Ninja" \
|
||||
-DCMAKE_BUILD_TYPE='${{matrix.build_type}}' \
|
||||
-DCACHE_NAME_SUFFIX="$CACHE_SUFFIX" \
|
||||
-DPROC_TARGET_NUMBER="1" \
|
||||
-DLENSFUNDBDIR="share/lensfun" \
|
||||
..
|
||||
|
||||
echo "Recording filtered ref name."
|
||||
echo "REF_NAME_FILTERED=$REF_NAME_FILTERED" >> "$(cygpath -u $GITHUB_ENV)"
|
||||
|
||||
- name: Build RawTherapee
|
||||
working-directory: ./build
|
||||
run: |
|
||||
echo "Running CMake install."
|
||||
cmake --build . --target install
|
||||
|
||||
- name: Include Lensfun
|
||||
run: |
|
||||
echo "Patching lensfun-update-data script."
|
||||
sed -i 's/HTTPError\(, ValueError\)/URLError\1/' $(which lensfun-update-data)
|
||||
echo "Updating Lensfun database."
|
||||
lensfun-update-data
|
||||
echo "Creating Lensfun directory in the build directory."
|
||||
mkdir -p 'build/${{matrix.build_type}}/share'
|
||||
echo "Copying Lensfun database to the build directory."
|
||||
cp -R "/C/msys2/msys64/mingw64/var/lib/lensfun-updates/version_1" 'build/${{matrix.build_type}}/share/lensfun'
|
||||
|
||||
- name: Bundle dependencies
|
||||
run: |
|
||||
echo "Getting workspace path."
|
||||
export BUILD_DIR="$(pwd)/build/${{matrix.build_type}}"
|
||||
echo "Build directory is '$BUILD_DIR'."
|
||||
echo "Changing working directory to MSYS2 MINGW64."
|
||||
cd "/C/msys2/msys64/mingw64"
|
||||
echo "Copying DLLs and EXEs."
|
||||
|
||||
cd ./bin
|
||||
cp \
|
||||
"gdbus.exe" \
|
||||
"gspawn-win64-helper.exe" \
|
||||
"gspawn-win64-helper-console.exe" \
|
||||
"libatk-1.0-0.dll" \
|
||||
"libatkmm-1.6-1.dll" \
|
||||
"libbrotlicommon.dll" \
|
||||
"libbrotlidec.dll" \
|
||||
"libbz2-1.dll" \
|
||||
"libcairo-2.dll" \
|
||||
"libcairo-gobject-2.dll" \
|
||||
"libcairomm-1.0-1.dll" \
|
||||
"libdatrie-1.dll" \
|
||||
"libdeflate.dll" \
|
||||
"libepoxy-0.dll" \
|
||||
"libexpat-1.dll" \
|
||||
libffi-*.dll \
|
||||
"libfftw3f-3.dll" \
|
||||
"libfontconfig-1.dll" \
|
||||
"libfreetype-6.dll" \
|
||||
"libfribidi-0.dll" \
|
||||
"libgcc_s_seh-1.dll" \
|
||||
"libgdk_pixbuf-2.0-0.dll" \
|
||||
"libgdk-3-0.dll" \
|
||||
"libgdkmm-3.0-1.dll" \
|
||||
"libgio-2.0-0.dll" \
|
||||
"libgiomm-2.4-1.dll" \
|
||||
"libglib-2.0-0.dll" \
|
||||
"libglibmm-2.4-1.dll" \
|
||||
"libgmodule-2.0-0.dll" \
|
||||
"libgobject-2.0-0.dll" \
|
||||
"libgomp-1.dll" \
|
||||
"libgraphite2.dll" \
|
||||
"libgtk-3-0.dll" \
|
||||
"libgtkmm-3.0-1.dll" \
|
||||
"libharfbuzz-0.dll" \
|
||||
"libiconv-2.dll" \
|
||||
"libintl-8.dll" \
|
||||
"libjbig-0.dll" \
|
||||
"libjpeg-8.dll" \
|
||||
"liblcms2-2.dll" \
|
||||
"liblensfun.dll" \
|
||||
"libLerc.dll" \
|
||||
"liblzma-5.dll" \
|
||||
"libpango-1.0-0.dll" \
|
||||
"libpangocairo-1.0-0.dll" \
|
||||
"libpangoft2-1.0-0.dll" \
|
||||
"libpangomm-1.4-1.dll" \
|
||||
"libpangowin32-1.0-0.dll" \
|
||||
"libpcre2-8-0.dll" \
|
||||
"libpixman-1-0.dll" \
|
||||
"libpng16-16.dll" \
|
||||
"librsvg-2-2.dll" \
|
||||
"libsigc-2.0-0.dll" \
|
||||
"libstdc++-6.dll" \
|
||||
"libsystre-0.dll" \
|
||||
"libthai-0.dll" \
|
||||
"libtiff-6.dll" \
|
||||
"libtre-5.dll" \
|
||||
"libwebp-7.dll" \
|
||||
"libwinpthread-1.dll" \
|
||||
"libxml2-2.dll" \
|
||||
"libzstd.dll" \
|
||||
"zlib1.dll" \
|
||||
"$BUILD_DIR"
|
||||
cd -
|
||||
|
||||
echo "Copying Adwaita theme."
|
||||
mkdir -p "$BUILD_DIR/share/icons/Adwaita"
|
||||
cd 'share/icons/Adwaita/'
|
||||
mkdir -p "$BUILD_DIR/share/icons/Adwaita/scalable"
|
||||
cp -r \
|
||||
"scalable/actions" \
|
||||
"scalable/devices" \
|
||||
"scalable/mimetypes" \
|
||||
"scalable/places" \
|
||||
"scalable/status" \
|
||||
"scalable/ui" \
|
||||
"$BUILD_DIR/share/icons/Adwaita/scalable"
|
||||
cp 'index.theme' "$BUILD_DIR/share/icons/Adwaita"
|
||||
mkdir -p "$BUILD_DIR/share/icons/Adwaita/cursors"
|
||||
cp -r \
|
||||
"cursors/plus.cur" \
|
||||
"cursors/sb_h_double_arrow.cur" \
|
||||
"cursors/sb_left_arrow.cur" \
|
||||
"cursors/sb_right_arrow.cur" \
|
||||
"cursors/sb_v_double_arrow.cur" \
|
||||
"$BUILD_DIR/share/icons/Adwaita/cursors"
|
||||
cd -
|
||||
|
||||
echo "Copying GDK pixbuf."
|
||||
mkdir -p "$BUILD_DIR/lib"
|
||||
cp -r 'lib/gdk-pixbuf-2.0' "$BUILD_DIR/lib/gdk-pixbuf-2.0"
|
||||
|
||||
echo "Copying GLib schemas."
|
||||
mkdir -p "$BUILD_DIR/share/glib-2.0/schemas"
|
||||
cp 'share/glib-2.0/schemas/gschemas.compiled' "$BUILD_DIR/share/glib-2.0/schemas"
|
||||
|
||||
echo "Creating GTK settings.ini."
|
||||
mkdir -p "$BUILD_DIR/share/gtk-3.0/"
|
||||
echo '[Settings] gtk-button-images=1' > "$BUILD_DIR/share/gtk-3.0/settings.ini"
|
||||
|
||||
- name: Create installer
|
||||
if: ${{matrix.build_type == 'release' && (github.ref_type == 'tag' || github.ref_name == 'dev')}}
|
||||
working-directory: build/${{matrix.build_type}}
|
||||
shell: pwsh
|
||||
run: |
|
||||
echo "Installing Inno Setup."
|
||||
choco install innosetup
|
||||
echo "Setup file:"
|
||||
type "WindowsInnoSetup.iss"
|
||||
echo "Creating installer from script."
|
||||
iscc /F"installer" "WindowsInnoSetup.iss"
|
||||
|
||||
- name: Prepare artifact name
|
||||
run: |
|
||||
if [ '${{github.ref_type}}' == 'tag' ]; then
|
||||
ARTIFACT_NAME="RawTherapee_${REF_NAME_FILTERED}_win64_${{matrix.build_type}}"
|
||||
else
|
||||
echo "Getting RawTherapee version."
|
||||
export VERSION="$(grep -m 1 '^Version: .*$' './build/${{matrix.build_type}}/AboutThisBuild.txt' | sed 's/^Version: \(.\+\)$/\1/')"
|
||||
echo "Version is '$VERSION'."
|
||||
FILTERED_VERSION="$(echo "$VERSION" | sed 's/[^A-z0-9_.-]//g')"
|
||||
ARTIFACT_NAME="RawTherapee_${REF_NAME_FILTERED}_${FILTERED_VERSION}_win64_${{matrix.build_type}}"
|
||||
fi
|
||||
echo "Artifact name is '$ARTIFACT_NAME'."
|
||||
|
||||
echo "Recording artifact name."
|
||||
echo "ARTIFACT_NAME=$ARTIFACT_NAME" >> "$(cygpath -u $GITHUB_ENV)"
|
||||
echo "Recording RawTherapee version."
|
||||
echo "RT_VERSION=$VERSION" >> "$(cygpath -u $GITHUB_ENV)"
|
||||
|
||||
echo "Renaming artifact."
|
||||
mv './build/${{matrix.build_type}}' "./build/$ARTIFACT_NAME"
|
||||
if [ -e './build/installer.exe' ]; then
|
||||
echo "Renaming installer."
|
||||
mv './build/installer.exe' "./build/$ARTIFACT_NAME.exe"
|
||||
fi
|
||||
|
||||
- name: Create ZIP archive
|
||||
shell: cmd
|
||||
working-directory: ./build
|
||||
run: |
|
||||
echo "Zipping artifact."
|
||||
7z a -tzip "%ARTIFACT_NAME%.zip" "./%ARTIFACT_NAME%"
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{env.ARTIFACT_NAME}}
|
||||
path: build\${{env.ARTIFACT_NAME}}
|
||||
|
||||
- name: Upload installer
|
||||
if: ${{matrix.build_type == 'release' && (github.ref_type == 'tag' || github.ref_name == 'dev')}}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{env.ARTIFACT_NAME}}.exe
|
||||
path: build\${{env.ARTIFACT_NAME}}.exe
|
||||
|
||||
- name: Prepare for publishing
|
||||
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
|
||||
run: |
|
||||
echo "Setting publish name."
|
||||
PUBLISH_NAME="RawTherapee_${REF_NAME_FILTERED}_win64_${{matrix.build_type}}"
|
||||
echo "Publish name is '$PUBLISH_NAME'."
|
||||
if [ "$ARTIFACT_NAME" != "$PUBLISH_NAME" ]; then
|
||||
echo "Renaming ZIP file."
|
||||
cp "build/$ARTIFACT_NAME.zip" "build/$PUBLISH_NAME.zip"
|
||||
if [ -e "./build/$ARTIFACT_NAME.exe" ]; then
|
||||
echo "Renaming installer."
|
||||
mv "./build/$ARTIFACT_NAME.exe" "./build/$PUBLISH_NAME.exe"
|
||||
fi
|
||||
fi
|
||||
echo "Creating version file."
|
||||
cp "build/$ARTIFACT_NAME/AboutThisBuild.txt" "build/$PUBLISH_NAME-AboutThisBuild.txt"
|
||||
|
||||
echo "Recording publish name."
|
||||
echo "PUBLISH_NAME=$PUBLISH_NAME" >> "$(cygpath -u $GITHUB_ENV)"
|
||||
|
||||
- name: Publish artifacts
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{github.ref_type == 'tag' || github.ref_name == 'dev'}}
|
||||
with:
|
||||
tag_name: nightly-github-actions
|
||||
files: |
|
||||
build/${{env.PUBLISH_NAME}}.zip
|
||||
build/${{env.PUBLISH_NAME}}-AboutThisBuild.txt
|
||||
|
||||
- name: Publish installer
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: ${{matrix.build_type == 'release' && (github.ref_type == 'tag' || github.ref_name == 'dev')}}
|
||||
with:
|
||||
tag_name: nightly-github-actions
|
||||
files: build/${{env.PUBLISH_NAME}}.exe
|
@ -6,6 +6,7 @@ Project initiator:
|
||||
Development contributors, in last name alphabetical order:
|
||||
|
||||
Roel Baars
|
||||
Richard E Barber
|
||||
Martin Burri
|
||||
Pierre Cabrera
|
||||
Javier Celaya
|
||||
@ -50,6 +51,7 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati
|
||||
Fernando Carello
|
||||
Rodrigo Nuno Bragança da Cunha
|
||||
Pat David
|
||||
Jacques Dekker
|
||||
Reine Edvardsson
|
||||
Andrea Ferrero
|
||||
André Gauthier
|
||||
@ -62,11 +64,13 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati
|
||||
Lebarhon
|
||||
Karl Loncarek
|
||||
Patrick Lopatto
|
||||
Francisco Lorés
|
||||
Jie Luo
|
||||
Paul Matthijsse
|
||||
Wim ter Meer
|
||||
Alberto Righetto
|
||||
Kostia (Kildor) Romanov
|
||||
Henning Sidow
|
||||
Kalle Söderman
|
||||
Wayne Sutton
|
||||
Johan Thor
|
||||
@ -74,3 +78,4 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati
|
||||
TooWaBoo
|
||||
Franz Trischberger
|
||||
Colin Walker
|
||||
Martin Werner
|
||||
|
@ -44,11 +44,15 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION
|
||||
"Building RawTherapee requires using GCC version 4.9 or higher!")
|
||||
endif()
|
||||
|
||||
# Warning for GCC 10, which causes problems #5749:
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "10.1")
|
||||
# Warning for GCC vectorization issues, which causes problems #5749 and #6384:
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "10.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.2")
|
||||
message(STATUS "WARNING: gcc ${CMAKE_CXX_COMPILER_VERSION} is known to miscompile RawTherapee when using -ftree-loop-vectorize, forcing the option to be off")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-tree-loop-vectorize")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-tree-loop-vectorize")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0")
|
||||
message(STATUS "WARNING: gcc ${CMAKE_CXX_COMPILER_VERSION} is known to miscompile RawTherapee when using --ffp-contract=fast, forcing the option to be off")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffp-contract=off")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-contract=off")
|
||||
endif()
|
||||
|
||||
# We might want to build using the old C++ ABI, even when using a new GCC
|
||||
@ -80,6 +84,24 @@ set(CACHE_NAME_SUFFIX
|
||||
# being bundled. However, file access can be restricted for some folder.
|
||||
option(OSX_DEV_BUILD "Generate macOS development builds" OFF)
|
||||
|
||||
# On macOS, optionally generate the final zip artifact file without version in the name for nightly upload purposes.
|
||||
option(OSX_NIGHTLY "Generate a generically-named zip" OFF)
|
||||
|
||||
# Generate a universal macOS build
|
||||
option(OSX_UNIVERSAL "Generate a universal app" OFF)
|
||||
|
||||
# On macOS: merge the app via a specific url to generate a universal bundle with both x86_64 and arm64
|
||||
if(OSX_UNIVERSAL)
|
||||
if(NOT "${OSX_UNIVERSAL_URL}")
|
||||
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
|
||||
set(OSX_UNIVERSAL_URL "https://kd6kxr.keybase.pub/RawTherapee_macOS_x86_64_latest.zip" CACHE STRING "URL of x86_64 app for lipo")
|
||||
else()
|
||||
set(OSX_UNIVERSAL_URL "https://kd6kxr.keybase.pub/RawTherapee_macOS_arm64_latest.zip" CACHE STRING "URL of arm64 app for lipo")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# By default we don't use a specific processor target, so PROC_TARGET_NUMBER is
|
||||
# set to 0. Specify other values to optimize for specific processor architecture
|
||||
# as listed in ProcessorTargets.cmake:
|
||||
@ -488,6 +510,12 @@ endif()
|
||||
pkg_check_modules(LCMS REQUIRED lcms2>=2.6)
|
||||
pkg_check_modules(EXPAT REQUIRED expat>=2.1)
|
||||
pkg_check_modules(FFTW3F REQUIRED fftw3f)
|
||||
|
||||
#Set the appropriate FFTW flags on macOS
|
||||
if(APPLE AND OPTION_OMP)
|
||||
set(EXTRA_LIB "-L${LOCAL_PREFIX}/lib -lfftw3f_omp -lfftw3f -lm")
|
||||
endif()
|
||||
|
||||
pkg_check_modules(IPTCDATA REQUIRED libiptcdata)
|
||||
find_package(TIFF 4.0.4 REQUIRED)
|
||||
find_package(JPEG REQUIRED)
|
||||
@ -719,7 +747,7 @@ add_custom_target(
|
||||
# End generating AboutThisBuild.txt
|
||||
|
||||
install(FILES AUTHORS.txt DESTINATION "${CREDITSDIR}")
|
||||
install(FILES LICENSE.txt DESTINATION "${LICENCEDIR}")
|
||||
install(FILES LICENSE DESTINATION "${LICENCEDIR}")
|
||||
install(FILES "${CMAKE_BINARY_DIR}/AboutThisBuild.txt"
|
||||
DESTINATION "${CREDITSDIR}")
|
||||
install(
|
||||
|
@ -1,20 +1,3 @@
|
||||
RawTherapee - A powerful, cross-platform raw image processing program.
|
||||
Copyright (C) 2004-2012 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
Copyright (C) 2010-2021 RawTherapee development team.
|
||||
|
||||
RawTherapee is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
RawTherapee is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
@ -38,5 +38,8 @@ set(PROC_TARGET_8_FLAGS "-march=athlon64" CACHE STRING "Processor-8 flags")
|
||||
set(PROC_TARGET_9_LABEL phenomX4 CACHE STRING "Processor-9 label - use it to provide a phenomX4 optimized build, if you have this processor")
|
||||
set(PROC_TARGET_9_FLAGS "-march=amdfam10" CACHE STRING "Processor-9 flags")
|
||||
|
||||
set(PROC_TARGET_10_LABEL sandybridge-ivybridge CACHE STRING "Processor set-10 label")
|
||||
set(PROC_TARGET_10_FLAGS "-march=sandybridge -mtune=ivybridge" CACHE STRING "Processors set-10 flags")
|
||||
|
||||
#set(PROC_TARGET__LABEL procLabel CACHE STRING "Processor- label")
|
||||
#set(PROC_TARGET__FLAGS "procFlags" CACHE STRING "Processor- flags")
|
||||
|
@ -1,4 +1,6 @@
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
RawTherapee is a powerful, cross-platform raw photo processing program, released as [libre software](https://en.wikipedia.org/wiki/Free_software) under the [GNU General Public License Version 3](https://opensource.org/licenses/gpl-3.0.html). It is written mostly in C++ using a [GTK+](https://www.gtk.org) front-end. It uses a patched version of [dcraw](https://www.dechifro.org/dcraw/) for reading raw files, with an in-house solution which adds the highest quality support for certain camera models unsupported by dcraw and enhances the accuracy of certain raw files already supported by dcraw. It is notable for the advanced control it gives the user over the demosaicing and development process.
|
||||
|
||||
|
@ -1,21 +1,14 @@
|
||||
RAWTHERAPEE 5.8-dev RELEASE NOTES
|
||||
RAWTHERAPEE 5.9-dev RELEASE NOTES
|
||||
|
||||
This is a development version of RawTherapee. We update the code almost daily. Every few months, once enough changes have accumulated and the code is stabilized, we make a new official release. Every code change between these releases is known as a "development" version, and this is one of them.
|
||||
|
||||
|
||||
|
||||
IN GENERAL
|
||||
|
||||
Start by reading the "Getting Started" article on RawPedia:
|
||||
https://rawpedia.rawtherapee.com/
|
||||
|
||||
While we only commit tested and relatively stable code and so the development versions should be fairly stable, you should be aware that:
|
||||
- Development versions only had limited testing, so there may be bugs unknown to us.
|
||||
- You should report these bugs so that they get fixed for the next stable release. See
|
||||
https://rawpedia.rawtherapee.com/How_to_write_useful_bug_reports
|
||||
- The way new tools work in the development versions is likely to change as we tweak and tune them, so your processing profiles may produce different results when used in a future stable version.
|
||||
- Bugs present in the stable versions get fixed in the development versions, and make it into the next stable version when we make a new official release. That means that in some ways the development versions can be "more stable" than the latest stable release. At the same time, new features may introduce new bugs. This is a trade-off you should be aware of.
|
||||
|
||||
|
||||
|
||||
NEWS RELEVANT TO PHOTOGRAPHERS
|
||||
|
||||
RawTherapee supports most raw formats, including Pentax and Sony Pixel Shift, Canon Dual-Pixel, and those from Foveon and X-Trans sensors.
|
||||
If you're wondering whether it supports your camera's raw format, first download RawTherapee and try for yourself. If a raw format is not supported it will either not open, or the preview in the Editor tab will appear black, white, or have a strong color cast - usually magenta. In that case, read the "Adding Support for New Raw Formats" RawPedia article.
|
||||
|
||||
@ -25,15 +18,21 @@ In order to use RawTherapee efficiently you should know that:
|
||||
- To change slider values or drop-down list items with the mouse scroll-wheel, hold the Shift key. This is so that you can safely scroll the panels without accidentally changing a slider or other tool setting.
|
||||
- All curves support the Shift and Ctrl keys while dragging a point. Shift+drag makes the point snap to a meaningful axis (top, bottom, diagonal, other), while Ctrl+drag makes your mouse movement super-fine for precise point positioning.
|
||||
- There are many keyboard shortcuts which make working with RawTherapee much faster and give you greater control. Make sure you familiarize yourself with them on RawPedia's "Keyboard Shortcuts" page!
|
||||
- All sliders support a fine-tuning mode which you can toggle by pressing the Shift key while dragging a slider.
|
||||
|
||||
|
||||
|
||||
NEW FEATURES SINCE 5.9
|
||||
|
||||
New features since 5.8:
|
||||
- TODO
|
||||
- Added or improved support for cameras, raw formats and color profiles:
|
||||
- TODO
|
||||
|
||||
|
||||
|
||||
NEWS RELEVANT TO PACKAGE MAINTAINERS
|
||||
|
||||
New since 5.8:
|
||||
New since 5.9:
|
||||
- TODO
|
||||
|
||||
In general:
|
||||
@ -74,18 +73,6 @@ https://discuss.pixls.us/c/software/rawtherapee
|
||||
|
||||
|
||||
|
||||
LIVE CHAT WITH USERS AND DEVELOPERS
|
||||
|
||||
Network: freenode
|
||||
Server: chat.freenode.net
|
||||
Channel: #rawtherapee
|
||||
|
||||
You can use freenode webchat to communicate without installing anything:
|
||||
https://webchat.freenode.net/?randomnick=1&channels=rawtherapee&prompt=1
|
||||
More information here: https://rawpedia.rawtherapee.com/IRC
|
||||
|
||||
|
||||
|
||||
REVISION HISTORY
|
||||
|
||||
The complete changelog is available at:
|
||||
|
@ -106,9 +106,9 @@ if(WIN32)
|
||||
elseif(BIT_DEPTH EQUAL 8)
|
||||
set(BUILD_BIT_DEPTH 64)
|
||||
# Restricting the 64 bits builds to 64 bits systems only
|
||||
set(ARCHITECTURE_ALLOWED "x64 ia64")
|
||||
set(ARCHITECTURE_ALLOWED "x64 ia64 arm64")
|
||||
# installing in 64 bits mode for all 64 bits processors, even for itanium architecture
|
||||
set(INSTALL_MODE "x64 ia64")
|
||||
set(INSTALL_MODE "x64 ia64 arm64")
|
||||
endif()
|
||||
# set part of the output archive name
|
||||
set(SYSTEM_NAME "WinVista")
|
||||
|
@ -22,6 +22,7 @@
|
||||
<url type="translate">https://rawpedia.rawtherapee.com/Main_Page#Localization</url>
|
||||
<launchable type="desktop-id">rawtherapee.desktop</launchable>
|
||||
<releases>
|
||||
<release version="5.9" date="2022-11-27" type="stable"></release>
|
||||
<release version="5.8" date="2020-02-04" type="stable"></release>
|
||||
<release version="5.7" date="2019-09-10" type="stable"></release>
|
||||
<release version="5.6" date="2019-04-20" type="stable"></release>
|
||||
|
@ -34,7 +34,7 @@ if(UNIX)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-64.png" DESTINATION "${ICONSDIR}/hicolor/64x64/apps" RENAME rawtherapee.png)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-128.png" DESTINATION "${ICONSDIR}/hicolor/128x128/apps" RENAME rawtherapee.png)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-256.png" DESTINATION "${ICONSDIR}/hicolor/256x256/apps" RENAME rawtherapee.png)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/svg/rt-logo.svg" DESTINATION "${ICONSDIR}/hicolor/scalable/apps" RENAME rawtherapee.svg)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/rt-logo.svg" DESTINATION "${ICONSDIR}/hicolor/scalable/apps" RENAME rawtherapee.svg)
|
||||
endif()
|
||||
|
||||
install(FILES ${LANGUAGEFILES} DESTINATION "${DATADIR}/languages")
|
||||
|
BIN
rtdata/dcpprofiles/Canon EOS 5D Mark II.dcp
Normal file
BIN
rtdata/dcpprofiles/Canon EOS-1D X Mark III.dcp
Normal file
BIN
rtdata/dcpprofiles/Canon EOS-1Ds Mark II.dcp
Normal file
BIN
rtdata/dcpprofiles/FUJIFILM DBP for GX680.dcp
Normal file
BIN
rtdata/dcpprofiles/FUJIFILM X-T4.dcp
Normal file
BIN
rtdata/dcpprofiles/SONY ILCE-7M4.dcp
Normal file
BIN
rtdata/dcpprofiles/samsung SM-G930V.dcp
Normal file
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 130 KiB |
1151
rtdata/images/rt-logo-text-black.svg
Normal file
After Width: | Height: | Size: 56 KiB |
1151
rtdata/images/rt-logo-text-white.svg
Normal file
After Width: | Height: | Size: 56 KiB |
655
rtdata/images/rt-logo.svg
Normal file
@ -0,0 +1,655 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="52.187881mm"
|
||||
height="52.187881mm"
|
||||
viewBox="0 0 197.24555 197.24552"
|
||||
version="1.1"
|
||||
id="svg783"
|
||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
||||
sodipodi:docname="rt-logo.svg"
|
||||
inkscape:export-filename="C:\msys64\home\Roel\RawTherapee\rtdata\images\png\rawtherapee-logo-256.png"
|
||||
inkscape:export-xdpi="124.59598"
|
||||
inkscape:export-ydpi="124.59598"
|
||||
style="enable-background:new"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<title
|
||||
id="title89">RawTherapee Logo</title>
|
||||
<defs
|
||||
id="defs777">
|
||||
<linearGradient
|
||||
id="linearGradient3962-8">
|
||||
<stop
|
||||
id="stop3964-8"
|
||||
offset="0"
|
||||
style="stop-color:#38c102;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3966-8"
|
||||
offset="1"
|
||||
style="stop-color:#bced02;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3954-7">
|
||||
<stop
|
||||
id="stop3956-7"
|
||||
offset="0"
|
||||
style="stop-color:#009a01;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3958-6"
|
||||
offset="1"
|
||||
style="stop-color:#01d901;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4002-3"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4004-0"
|
||||
offset="0"
|
||||
style="stop-color:#5a1898;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4006-3"
|
||||
offset="1"
|
||||
style="stop-color:#971ec6;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4024-9">
|
||||
<stop
|
||||
id="stop4026-2"
|
||||
offset="0"
|
||||
style="stop-color:#053980;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4028-5"
|
||||
offset="1"
|
||||
style="stop-color:#0293e4;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4018-0"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4020-5"
|
||||
offset="0"
|
||||
style="stop-color:#151b92;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4022-9"
|
||||
offset="1"
|
||||
style="stop-color:#1526c3;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3978-6">
|
||||
<stop
|
||||
style="stop-color:#f18e01;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4040-9" />
|
||||
<stop
|
||||
id="stop3982-2"
|
||||
offset="1"
|
||||
style="stop-color:#ffd02b;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3994-4"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop3996-7"
|
||||
offset="0"
|
||||
style="stop-color:#d91566;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3998-7"
|
||||
offset="1"
|
||||
style="stop-color:#fc12aa;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3970-4">
|
||||
<stop
|
||||
id="stop3972-8"
|
||||
offset="0"
|
||||
style="stop-color:#f8bc00;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3974-1"
|
||||
offset="1"
|
||||
style="stop-color:#ffe309;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3946-8">
|
||||
<stop
|
||||
id="stop3948-9"
|
||||
offset="0"
|
||||
style="stop-color:#0193be;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3950-3"
|
||||
offset="1"
|
||||
style="stop-color:#01d4ed;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3986-8">
|
||||
<stop
|
||||
id="stop3988-0"
|
||||
offset="0"
|
||||
style="stop-color:#fd4c0b;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3990-2"
|
||||
offset="1"
|
||||
style="stop-color:#feab27;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<filter
|
||||
id="filter4905-0"
|
||||
x="0"
|
||||
y="0"
|
||||
width="1"
|
||||
height="1"
|
||||
inkscape:label="ring inset lightness-contrast"
|
||||
inkscape:menu="Color"
|
||||
inkscape:menu-tooltip="Increase or decrease lightness and contrast"
|
||||
style="color-interpolation-filters:sRGB">
|
||||
<feFlood
|
||||
id="feFlood4907-7"
|
||||
result="result1"
|
||||
flood-opacity="0"
|
||||
flood-color="rgb(255,255,255)" />
|
||||
<feBlend
|
||||
id="feBlend4909-8"
|
||||
in2="SourceGraphic"
|
||||
mode="normal"
|
||||
result="result2" />
|
||||
<feComposite
|
||||
id="feComposite4911-6"
|
||||
in2="SourceGraphic"
|
||||
k2="1.2"
|
||||
operator="arithmetic"
|
||||
result="result3"
|
||||
k1="0"
|
||||
k4="0.2"
|
||||
k3="0" />
|
||||
<feComposite
|
||||
id="feComposite4913-88"
|
||||
in2="SourceGraphic"
|
||||
operator="in" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3986-8"
|
||||
id="linearGradient7477"
|
||||
x1="226.75093"
|
||||
y1="39.7075"
|
||||
x2="188.64473"
|
||||
y2="77.343597"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3978-6"
|
||||
id="linearGradient7759"
|
||||
x1="249.71877"
|
||||
y1="79.683319"
|
||||
x2="197.60223"
|
||||
y2="93.622879"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3970-4"
|
||||
id="linearGradient7767"
|
||||
x1="249.90581"
|
||||
y1="125.98007"
|
||||
x2="197.72298"
|
||||
y2="111.61357"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3962-8"
|
||||
id="linearGradient10819"
|
||||
x1="186.45189"
|
||||
y1="188.78058"
|
||||
x2="172.53987"
|
||||
y2="136.40414"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3954-7"
|
||||
id="linearGradient10827"
|
||||
x1="140.57898"
|
||||
y1="188.96413"
|
||||
x2="154.49196"
|
||||
y2="135.54562"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3946-8"
|
||||
id="linearGradient10835"
|
||||
x1="99.718773"
|
||||
y1="165.33376"
|
||||
x2="138.70259"
|
||||
y2="126.9732"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4024-9"
|
||||
id="linearGradient10843"
|
||||
x1="76.875038"
|
||||
y1="125.39568"
|
||||
x2="129.98044"
|
||||
y2="111.2607"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4018-0"
|
||||
id="linearGradient10851"
|
||||
x1="77.518173"
|
||||
y1="79.568878"
|
||||
x2="130.19432"
|
||||
y2="93.55809"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4002-3"
|
||||
id="linearGradient10859"
|
||||
x1="100.42588"
|
||||
y1="39.737522"
|
||||
x2="138.96776"
|
||||
y2="78.363228"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3994-4"
|
||||
id="linearGradient10867"
|
||||
x1="140.49059"
|
||||
y1="16.437004"
|
||||
x2="154.79814"
|
||||
y2="69.879189"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3986-8"
|
||||
id="linearGradient19153"
|
||||
x1="208.75566"
|
||||
y1="23.213453"
|
||||
x2="243.28401"
|
||||
y2="57.596519"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3978-6"
|
||||
id="linearGradient19161"
|
||||
x1="240.19098"
|
||||
y1="48.687042"
|
||||
x2="256.26306"
|
||||
y2="106.95491"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3970-4"
|
||||
id="linearGradient19169"
|
||||
x1="254.64981"
|
||||
y1="101.84784"
|
||||
x2="242.17578"
|
||||
y2="148.77542"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3962-8"
|
||||
id="linearGradient19177"
|
||||
x1="163.02301"
|
||||
y1="193.83618"
|
||||
x2="209.80595"
|
||||
y2="181.05989"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3954-7"
|
||||
id="linearGradient19185"
|
||||
x1="117.51535"
|
||||
y1="181.72815"
|
||||
x2="164.49129"
|
||||
y2="194.03969"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3946-8"
|
||||
id="linearGradient19193"
|
||||
x1="84.229202"
|
||||
y1="147.87372"
|
||||
x2="118.57832"
|
||||
y2="182.1684"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4024-9"
|
||||
id="linearGradient19201"
|
||||
x1="71.600014"
|
||||
y1="98.586967"
|
||||
x2="86.637268"
|
||||
y2="153.3033"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4018-0"
|
||||
id="linearGradient19209"
|
||||
x1="85.458618"
|
||||
y1="53.097939"
|
||||
x2="71.537453"
|
||||
y2="106.59224"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4002-3"
|
||||
id="linearGradient19217"
|
||||
x1="80.822929"
|
||||
y1="61.417603"
|
||||
x2="120.4325"
|
||||
y2="21.283628"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3994-4"
|
||||
id="linearGradient19225"
|
||||
x1="167.3401"
|
||||
y1="10.365549"
|
||||
x2="113.41623"
|
||||
y2="24.735945"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="rotate(-15,802.43241,-1.9489591)" />
|
||||
<filter
|
||||
width="1.0919776"
|
||||
height="1.3006796"
|
||||
y="-0.15033983"
|
||||
x="-0.04598882"
|
||||
inkscape:label="RawTherapee white"
|
||||
id="filter4749"
|
||||
style="color-interpolation-filters:sRGB">
|
||||
<feFlood
|
||||
result="flood"
|
||||
flood-color="rgb(255,255,255)"
|
||||
flood-opacity="0.40000000000000002"
|
||||
id="feFlood4751" />
|
||||
<feComposite
|
||||
result="composite1"
|
||||
operator="in"
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
id="feComposite4753" />
|
||||
<feGaussianBlur
|
||||
result="blur"
|
||||
stdDeviation="3.5"
|
||||
id="feGaussianBlur4755" />
|
||||
<feComposite
|
||||
result="composite2"
|
||||
operator="over"
|
||||
in="SourceGraphic"
|
||||
in2="blur"
|
||||
id="feComposite4757" />
|
||||
</filter>
|
||||
<filter
|
||||
width="1.4157329"
|
||||
height="1.5012363"
|
||||
y="-0.25061816"
|
||||
x="-0.20786646"
|
||||
inkscape:label="RawTherapee white"
|
||||
id="filter1105"
|
||||
style="color-interpolation-filters:sRGB">
|
||||
<feFlood
|
||||
result="flood"
|
||||
flood-color="rgb(255,255,255)"
|
||||
flood-opacity="0.40000000000000002"
|
||||
id="feFlood1097" />
|
||||
<feComposite
|
||||
result="composite1"
|
||||
operator="in"
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
id="feComposite1099" />
|
||||
<feGaussianBlur
|
||||
result="blur"
|
||||
stdDeviation="3.5"
|
||||
id="feGaussianBlur1101" />
|
||||
<feComposite
|
||||
result="composite2"
|
||||
operator="over"
|
||||
in="SourceGraphic"
|
||||
in2="blur"
|
||||
id="feComposite1103" />
|
||||
</filter>
|
||||
<filter
|
||||
inkscape:menu-tooltip="Increase or decrease lightness and contrast"
|
||||
inkscape:menu="Color"
|
||||
inkscape:label="ring inset lightness-contrast"
|
||||
height="1.0019884"
|
||||
width="1.0017145"
|
||||
y="-0.0011311892"
|
||||
x="-0.00085726596"
|
||||
id="filter4905-0-1"
|
||||
style="color-interpolation-filters:sRGB">
|
||||
<feFlood
|
||||
flood-color="rgb(255,255,255)"
|
||||
flood-opacity="0"
|
||||
result="result1"
|
||||
id="feFlood4907-6" />
|
||||
<feBlend
|
||||
result="result2"
|
||||
mode="normal"
|
||||
in2="SourceGraphic"
|
||||
id="feBlend4909-2" />
|
||||
<feComposite
|
||||
k3="0"
|
||||
k4="0.2"
|
||||
k1="0"
|
||||
result="result3"
|
||||
operator="arithmetic"
|
||||
k2="1.2"
|
||||
in2="SourceGraphic"
|
||||
id="feComposite4911-6-0" />
|
||||
<feComposite
|
||||
operator="in"
|
||||
in2="SourceGraphic"
|
||||
id="feComposite4913-1" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="4.0000001"
|
||||
inkscape:cx="128"
|
||||
inkscape:cy="77.124998"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="mm"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-page="false"
|
||||
inkscape:snap-text-baseline="false"
|
||||
inkscape:snap-center="false"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
inkscape:snap-midpoints="false"
|
||||
inkscape:snap-smooth-nodes="false"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false"
|
||||
inkscape:snap-bbox-midpoints="true"
|
||||
inkscape:snap-bbox-edge-midpoints="false"
|
||||
inkscape:bbox-paths="false"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-others="true"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-global="false"
|
||||
inkscape:window-width="3440"
|
||||
inkscape:window-height="1387"
|
||||
inkscape:window-x="3832"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:measure-start="416.334,192.525"
|
||||
inkscape:measure-end="422.317,192.368"
|
||||
fit-margin-top="1"
|
||||
fit-margin-left="1"
|
||||
fit-margin-right="1"
|
||||
fit-margin-bottom="1"
|
||||
scale-x="1"
|
||||
inkscape:pagecheckerboard="true"
|
||||
height="52.18788mm" />
|
||||
<metadata
|
||||
id="metadata780">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>RawTherapee Logo</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Maciej Dworak</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source>www.rawtherapee.com</dc:source>
|
||||
<dc:date>2019-03-11</dc:date>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-113.83346,-165.7737)">
|
||||
<g
|
||||
id="g1471">
|
||||
<path
|
||||
id="path1157"
|
||||
style="fill:url(#linearGradient19169);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 294.18353,286.29588 8.89675,2.38406 a 93.821518,93.821518 0 0 0 2.4e-4,-48.56705 l -8.71031,2.33392 a 84.803757,84.803757 0 0 1 2.29016,11.88245 84.803757,84.803757 0 0 1 0.57521,12.08518 84.803757,84.803757 0 0 1 -1.14997,12.04599 84.803757,84.803757 0 0 1 -1.90208,7.83545 z" />
|
||||
<path
|
||||
id="path4829"
|
||||
style="fill:url(#linearGradient7767);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 294.18353,286.29588 a 84.803757,84.803757 0 0 0 1.90208,-7.83545 84.803757,84.803757 0 0 0 1.14997,-12.04599 84.803757,84.803757 0 0 0 -0.57521,-12.08518 84.803757,84.803757 0 0 0 -2.29016,-11.88245 l -43.24405,11.5872 a 40.033501,40.033501 0 0 1 -0.0886,20.70095 z" />
|
||||
<path
|
||||
id="path1341"
|
||||
style="fill:#fffb00;fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 272.28532,324.2247 6.51303,6.51278 a 93.821518,93.821518 0 0 0 24.28193,-42.05754 l -8.89675,-2.38406 a 84.803757,84.803757 0 0 1 -0.95072,3.9227 84.803757,84.803757 0 0 1 -4.49616,11.23195 84.803757,84.803757 0 0 1 -6.05046,10.4797 84.803757,84.803757 0 0 1 -7.47908,9.50977 84.803757,84.803757 0 0 1 -2.92179,2.7847 z" />
|
||||
<path
|
||||
id="path4832"
|
||||
style="fill:#fffb00;fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 272.28532,324.2247 a 84.803757,84.803757 0 0 0 2.92179,-2.7847 84.803757,84.803757 0 0 0 7.47908,-9.50977 84.803757,84.803757 0 0 0 6.05046,-10.4797 84.803757,84.803757 0 0 0 4.49616,-11.23195 84.803757,84.803757 0 0 0 0.95072,-3.9227 l -43.14595,-11.56092 a 40.033501,40.033501 0 0 1 -10.33729,17.90471 z" />
|
||||
<path
|
||||
id="path1547"
|
||||
style="fill:url(#linearGradient19177);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 234.40424,346.3109 2.33393,8.71032 a 93.821518,93.821518 0 0 0 42.06018,-24.28374 l -6.51303,-6.51278 a 84.803757,84.803757 0 0 1 -5.83466,5.56497 84.803757,84.803757 0 0 1 -9.85715,7.0189 84.803757,84.803757 0 0 1 -10.75367,5.54444 84.803757,84.803757 0 0 1 -11.4356,3.95789 z" />
|
||||
<path
|
||||
id="path4835"
|
||||
style="fill:url(#linearGradient10819);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 234.40424,346.3109 a 84.803757,84.803757 0 0 0 11.4356,-3.95789 84.803757,84.803757 0 0 0 10.75367,-5.54444 84.803757,84.803757 0 0 0 9.85715,-7.0189 84.803757,84.803757 0 0 0 5.83466,-5.56497 l -31.58503,-31.58503 a 40.033501,40.033501 0 0 1 -17.88325,10.42719 z" />
|
||||
<path
|
||||
id="path1753"
|
||||
style="fill:url(#linearGradient19185);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 190.55705,346.12372 -2.38405,8.89675 a 93.821518,93.821518 0 0 0 48.56517,7.5e-4 l -2.33393,-8.71032 a 84.803757,84.803757 0 0 1 -11.88057,2.28966 84.803757,84.803757 0 0 1 -12.08519,0.57522 84.803757,84.803757 0 0 1 -12.04598,-1.14998 84.803757,84.803757 0 0 1 -7.83545,-1.90208 z" />
|
||||
<path
|
||||
id="path4838"
|
||||
style="fill:url(#linearGradient10827);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 190.55705,346.12372 a 84.803757,84.803757 0 0 0 7.83545,1.90208 84.803757,84.803757 0 0 0 12.04598,1.14998 84.803757,84.803757 0 0 0 12.08519,-0.57522 84.803757,84.803757 0 0 0 11.88057,-2.28966 l -11.5872,-43.24404 a 40.033501,40.033501 0 0 1 -20.69907,-0.0891 z" />
|
||||
<path
|
||||
id="path1857"
|
||||
style="fill:url(#linearGradient19193);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 152.62823,324.22551 -6.51278,6.51303 a 93.821518,93.821518 0 0 0 42.05755,24.28193 l 2.38405,-8.89675 a 84.803757,84.803757 0 0 1 -3.9227,-0.95072 84.803757,84.803757 0 0 1 -11.23196,-4.49616 84.803757,84.803757 0 0 1 -10.4797,-6.05046 84.803757,84.803757 0 0 1 -9.50976,-7.47907 84.803757,84.803757 0 0 1 -2.7847,-2.9218 z" />
|
||||
<path
|
||||
id="path4841"
|
||||
style="fill:url(#linearGradient10835);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 152.62823,324.22551 a 84.803757,84.803757 0 0 0 2.7847,2.9218 84.803757,84.803757 0 0 0 9.50976,7.47907 84.803757,84.803757 0 0 0 10.4797,6.05046 84.803757,84.803757 0 0 0 11.23196,4.49616 84.803757,84.803757 0 0 0 3.9227,0.95072 l 11.56092,-43.14594 a 40.033501,40.033501 0 0 1 -17.90472,-10.3373 z" />
|
||||
<path
|
||||
id="path1961"
|
||||
style="fill:url(#linearGradient19201);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 130.54202,286.34444 -8.71031,2.33392 a 93.821518,93.821518 0 0 0 24.28374,42.06018 l 6.51278,-6.51303 a 84.803757,84.803757 0 0 1 -5.56497,-5.83466 84.803757,84.803757 0 0 1 -7.0189,-9.85715 84.803757,84.803757 0 0 1 -5.54444,-10.75367 84.803757,84.803757 0 0 1 -3.9579,-11.43559 z" />
|
||||
<path
|
||||
id="path4844"
|
||||
style="fill:url(#linearGradient10843);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 130.54202,286.34444 a 84.803757,84.803757 0 0 0 3.9579,11.43559 84.803757,84.803757 0 0 0 5.54444,10.75367 84.803757,84.803757 0 0 0 7.0189,9.85715 84.803757,84.803757 0 0 0 5.56497,5.83466 l 31.58502,-31.58503 a 40.033501,40.033501 0 0 1 -10.42718,-17.88325 z" />
|
||||
<path
|
||||
id="path2065"
|
||||
style="fill:url(#linearGradient19209);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 130.72921,242.49724 -8.89675,-2.38405 a 93.821518,93.821518 0 0 0 -7.5e-4,48.56517 l 8.71031,-2.33392 a 84.803757,84.803757 0 0 1 -2.28965,-11.88058 84.803757,84.803757 0 0 1 -0.57521,-12.08518 84.803757,84.803757 0 0 1 1.14997,-12.04599 84.803757,84.803757 0 0 1 1.90208,-7.83545 z" />
|
||||
<path
|
||||
id="path4847"
|
||||
style="fill:url(#linearGradient10851);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 130.72921,242.49724 a 84.803757,84.803757 0 0 0 -1.90208,7.83545 84.803757,84.803757 0 0 0 -1.14997,12.04599 84.803757,84.803757 0 0 0 0.57521,12.08518 84.803757,84.803757 0 0 0 2.28965,11.88058 l 43.24405,-11.58721 a 40.033501,40.033501 0 0 1 0.0891,-20.69907 z" />
|
||||
<path
|
||||
id="path2169"
|
||||
style="fill:url(#linearGradient19217);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 152.62742,204.56842 -6.51302,-6.51278 a 93.821518,93.821518 0 0 0 -24.28194,42.05755 l 8.89675,2.38405 a 84.803757,84.803757 0 0 1 0.95072,-3.92269 84.803757,84.803757 0 0 1 4.49616,-11.23196 84.803757,84.803757 0 0 1 6.05045,-10.4797 84.803757,84.803757 0 0 1 7.47909,-9.50977 84.803757,84.803757 0 0 1 2.92179,-2.7847 z" />
|
||||
<path
|
||||
id="path4850"
|
||||
style="fill:url(#linearGradient10859);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 152.62742,204.56842 a 84.803757,84.803757 0 0 0 -2.92179,2.7847 84.803757,84.803757 0 0 0 -7.47909,9.50977 84.803757,84.803757 0 0 0 -6.05045,10.4797 84.803757,84.803757 0 0 0 -4.49616,11.23196 84.803757,84.803757 0 0 0 -0.95072,3.92269 l 43.14594,11.56092 a 40.033501,40.033501 0 0 1 10.33729,-17.90471 z" />
|
||||
<path
|
||||
id="path2377"
|
||||
style="fill:url(#linearGradient10867);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 190.50661,182.48272 a 84.803757,84.803757 0 0 0 -11.4337,3.95739 84.803757,84.803757 0 0 0 -10.75369,5.54444 84.803757,84.803757 0 0 0 -9.85714,7.0189 84.803757,84.803757 0 0 0 -5.83466,5.56497 l 31.58502,31.58503 a 40.033501,40.033501 0 0 1 17.88138,-10.42668 z" />
|
||||
<path
|
||||
id="path4853"
|
||||
style="fill:url(#linearGradient19225);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 188.17269,173.77241 a 93.821518,93.821518 0 0 0 -42.05829,24.28323 l 6.51302,6.51278 a 84.803757,84.803757 0 0 1 5.83466,-5.56497 84.803757,84.803757 0 0 1 9.85714,-7.0189 84.803757,84.803757 0 0 1 10.75369,-5.54444 84.803757,84.803757 0 0 1 11.4337,-3.95739 z" />
|
||||
<path
|
||||
id="path2481"
|
||||
style="fill:#ff0b0d;fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 234.40028,182.50378 a 84.803757,84.803757 0 0 0 -2.68754,-0.69529 84.803757,84.803757 0 0 0 -4.07443,-0.84536 84.803757,84.803757 0 0 0 -4.11369,-0.64477 84.803757,84.803757 0 0 0 -4.13823,-0.44206 84.803757,84.803757 0 0 0 -4.15611,-0.23708 84.803757,84.803757 0 0 0 -4.16076,-0.0357 84.803757,84.803757 0 0 0 -4.16015,0.17042 84.803757,84.803757 0 0 0 -4.1458,0.37485 84.803757,84.803757 0 0 0 -4.12205,0.57675 84.803757,84.803757 0 0 0 -4.08833,0.77801 84.803757,84.803757 0 0 0 -4.04658,0.97913 l 11.58721,43.24405 a 40.033501,40.033501 0 0 1 20.72361,-4e-4 z" />
|
||||
<path
|
||||
id="path4798"
|
||||
style="fill:#ff0b0d;fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 188.17269,173.77241 2.33392,8.71031 a 84.803757,84.803757 0 0 1 4.04658,-0.97913 84.803757,84.803757 0 0 1 4.08833,-0.77801 84.803757,84.803757 0 0 1 4.12205,-0.57675 84.803757,84.803757 0 0 1 4.1458,-0.37485 84.803757,84.803757 0 0 1 4.16015,-0.17042 84.803757,84.803757 0 0 1 4.16076,0.0357 84.803757,84.803757 0 0 1 4.15611,0.23708 84.803757,84.803757 0 0 1 4.13823,0.44206 84.803757,84.803757 0 0 1 4.11369,0.64477 84.803757,84.803757 0 0 1 4.07443,0.84536 84.803757,84.803757 0 0 1 2.68754,0.69529 l 2.33947,-8.73113 a 93.821518,93.821518 0 0 0 -48.56706,-2.4e-4 z" />
|
||||
<path
|
||||
id="path2585"
|
||||
style="fill:url(#linearGradient19153);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 272.40565,204.44619 6.39164,-6.3916 a 93.821518,93.821518 0 0 0 -42.05754,-24.28194 l -2.33947,8.73113 a 84.803757,84.803757 0 0 1 1.34283,0.3479 84.803757,84.803757 0 0 1 3.97211,1.24078 84.803757,84.803757 0 0 1 3.90717,1.43612 84.803757,84.803757 0 0 1 3.83217,1.62405 84.803757,84.803757 0 0 1 3.74859,1.81022 84.803757,84.803757 0 0 1 3.65546,1.99088 84.803757,84.803757 0 0 1 3.55187,2.17028 84.803757,84.803757 0 0 1 3.44149,2.33938 84.803757,84.803757 0 0 1 3.32256,2.50673 84.803757,84.803757 0 0 1 3.19592,2.66804 84.803757,84.803757 0 0 1 3.06249,2.81905 84.803757,84.803757 0 0 1 0.97271,0.98898 z" />
|
||||
<path
|
||||
id="path4823"
|
||||
style="fill:url(#linearGradient7477);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 272.40565,204.44619 a 84.803757,84.803757 0 0 0 -0.97271,-0.98898 84.803757,84.803757 0 0 0 -3.06249,-2.81905 84.803757,84.803757 0 0 0 -3.19592,-2.66804 84.803757,84.803757 0 0 0 -3.32256,-2.50673 84.803757,84.803757 0 0 0 -3.44149,-2.33938 84.803757,84.803757 0 0 0 -3.55187,-2.17028 84.803757,84.803757 0 0 0 -3.65546,-1.99088 84.803757,84.803757 0 0 0 -3.74859,-1.81022 84.803757,84.803757 0 0 0 -3.83217,-1.62405 84.803757,84.803757 0 0 0 -3.90717,-1.43612 84.803757,84.803757 0 0 0 -3.97211,-1.24078 84.803757,84.803757 0 0 0 -1.34283,-0.3479 l -11.58597,43.23354 a 40.033501,40.033501 0 0 1 17.94059,10.35801 z" />
|
||||
<path
|
||||
id="path2689"
|
||||
style="fill:url(#linearGradient19161);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round;filter:url(#filter4905-0)"
|
||||
d="m 294.37021,242.44681 8.71031,-2.33392 a 93.821518,93.821518 0 0 0 -24.28323,-42.0583 l -6.39164,6.3916 a 84.803757,84.803757 0 0 1 1.94591,1.97984 84.803757,84.803757 0 0 1 2.76932,3.10587 84.803757,84.803757 0 0 1 2.61472,3.23829 84.803757,84.803757 0 0 1 2.45245,3.36467 84.803757,84.803757 0 0 1 2.28287,3.47886 84.803757,84.803757 0 0 1 2.11177,3.58739 84.803757,84.803757 0 0 1 1.93249,3.688 84.803757,84.803757 0 0 1 1.74777,3.77592 84.803757,84.803757 0 0 1 1.56204,3.86005 84.803757,84.803757 0 0 1 1.37039,3.92961 84.803757,84.803757 0 0 1 1.17483,3.99212 z" />
|
||||
<path
|
||||
id="path4826"
|
||||
style="fill:url(#linearGradient7759);fill-opacity:1;stroke-width:0.682085;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 294.37021,242.44681 a 84.803757,84.803757 0 0 0 -1.17483,-3.99212 84.803757,84.803757 0 0 0 -1.37039,-3.92961 84.803757,84.803757 0 0 0 -1.56204,-3.86005 84.803757,84.803757 0 0 0 -1.74777,-3.77592 84.803757,84.803757 0 0 0 -1.93249,-3.688 84.803757,84.803757 0 0 0 -2.11177,-3.58739 84.803757,84.803757 0 0 0 -2.28287,-3.47886 84.803757,84.803757 0 0 0 -2.45245,-3.36467 84.803757,84.803757 0 0 0 -2.61472,-3.23829 84.803757,84.803757 0 0 0 -2.76932,-3.10587 84.803757,84.803757 0 0 0 -1.94591,-1.97984 l -31.64233,31.64284 a 40.033501,40.033501 0 0 1 10.36284,17.94498 z" />
|
||||
<circle
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.33333;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="circle4294"
|
||||
cx="136.78612"
|
||||
cy="310.37509"
|
||||
r="40.033501"
|
||||
transform="rotate(-15)" />
|
||||
<circle
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:2.66667;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path4028"
|
||||
cx="136.78612"
|
||||
cy="310.37509"
|
||||
r="93.821518"
|
||||
transform="rotate(-15)" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 29 KiB |
@ -1,609 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64.46769"
|
||||
height="64.467697"
|
||||
viewBox="0 0 64.46769 64.467696"
|
||||
version="1.1"
|
||||
id="svg783"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"
|
||||
sodipodi:docname="rt-logo.svg"
|
||||
inkscape:export-filename="/tmp/rawtherapee-logo-256.png"
|
||||
inkscape:export-xdpi="381.21423"
|
||||
inkscape:export-ydpi="381.21423"
|
||||
style="enable-background:new">
|
||||
<title
|
||||
id="title89">RawTherapee logo</title>
|
||||
<defs
|
||||
id="defs777">
|
||||
<linearGradient
|
||||
id="linearGradient3962-8">
|
||||
<stop
|
||||
id="stop3964-8"
|
||||
offset="0"
|
||||
style="stop-color:#38c102;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3966-8"
|
||||
offset="1"
|
||||
style="stop-color:#bced02;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3954-7">
|
||||
<stop
|
||||
id="stop3956-7"
|
||||
offset="0"
|
||||
style="stop-color:#009a01;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3958-6"
|
||||
offset="1"
|
||||
style="stop-color:#01d901;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4002-3"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4004-0"
|
||||
offset="0"
|
||||
style="stop-color:#5a1898;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4006-3"
|
||||
offset="1"
|
||||
style="stop-color:#971ec6;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4024-9">
|
||||
<stop
|
||||
id="stop4026-2"
|
||||
offset="0"
|
||||
style="stop-color:#053980;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4028-5"
|
||||
offset="1"
|
||||
style="stop-color:#0293e4;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4018-0"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop4020-5"
|
||||
offset="0"
|
||||
style="stop-color:#151b92;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop4022-9"
|
||||
offset="1"
|
||||
style="stop-color:#1526c3;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3978-6">
|
||||
<stop
|
||||
style="stop-color:#f18e01;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4040-9" />
|
||||
<stop
|
||||
id="stop3982-2"
|
||||
offset="1"
|
||||
style="stop-color:#ffd02b;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3994-4"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop3996-7"
|
||||
offset="0"
|
||||
style="stop-color:#d91566;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3998-7"
|
||||
offset="1"
|
||||
style="stop-color:#fc12aa;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3970-4">
|
||||
<stop
|
||||
id="stop3972-8"
|
||||
offset="0"
|
||||
style="stop-color:#f8bc00;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3974-1"
|
||||
offset="1"
|
||||
style="stop-color:#ffe309;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3946-8">
|
||||
<stop
|
||||
id="stop3948-9"
|
||||
offset="0"
|
||||
style="stop-color:#0193be;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3950-3"
|
||||
offset="1"
|
||||
style="stop-color:#01d4ed;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3986-8">
|
||||
<stop
|
||||
id="stop3988-0"
|
||||
offset="0"
|
||||
style="stop-color:#fd4c0b;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop3990-2"
|
||||
offset="1"
|
||||
style="stop-color:#feab27;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3978-6"
|
||||
id="linearGradient6584"
|
||||
x1="311.50415"
|
||||
y1="170.17421"
|
||||
x2="239.55922"
|
||||
y2="172.53203"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3970-4"
|
||||
id="linearGradient6592"
|
||||
x1="309.89517"
|
||||
y1="205.34961"
|
||||
x2="250.14594"
|
||||
y2="206.56822"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3962-8"
|
||||
id="linearGradient6600"
|
||||
x1="255.66684"
|
||||
y1="289.47989"
|
||||
x2="228.84343"
|
||||
y2="242.79517"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3954-7"
|
||||
id="linearGradient6536"
|
||||
x1="226.94818"
|
||||
y1="311.5441"
|
||||
x2="203.56046"
|
||||
y2="247.99712"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3946-8"
|
||||
id="linearGradient6544"
|
||||
x1="155.04362"
|
||||
y1="291.98077"
|
||||
x2="196.8688"
|
||||
y2="242.92572"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4024-9"
|
||||
id="linearGradient6552"
|
||||
x1="121.99204"
|
||||
y1="254.89784"
|
||||
x2="172.34001"
|
||||
y2="224.42828"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4018-0"
|
||||
id="linearGradient6560"
|
||||
x1="28.951002"
|
||||
y1="87.129852"
|
||||
x2="42.548061"
|
||||
y2="86.547829"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(77.746712,77.956383)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4002-3"
|
||||
id="linearGradient6568"
|
||||
x1="127.4337"
|
||||
y1="150.63391"
|
||||
x2="164.38599"
|
||||
y2="186.60429"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3994-4"
|
||||
id="linearGradient6576"
|
||||
x1="156.03696"
|
||||
y1="121.53358"
|
||||
x2="182.59938"
|
||||
y2="166.47519"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3986-8"
|
||||
id="linearGradient6506"
|
||||
x1="254.73129"
|
||||
y1="120.67714"
|
||||
x2="221.8271"
|
||||
y2="167.72273"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3978-6"
|
||||
id="linearGradient6720"
|
||||
x1="273.82266"
|
||||
y1="127.06858"
|
||||
x2="304.14511"
|
||||
y2="182.71349"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<filter
|
||||
id="filter4905-0"
|
||||
x="-0.5"
|
||||
y="-0.5"
|
||||
width="2"
|
||||
height="2"
|
||||
inkscape:label="ring inset lightness-contrast"
|
||||
inkscape:menu="Color"
|
||||
inkscape:menu-tooltip="Increase or decrease lightness and contrast"
|
||||
style="color-interpolation-filters:sRGB">
|
||||
<feFlood
|
||||
id="feFlood4907-7"
|
||||
result="result1"
|
||||
flood-opacity="0"
|
||||
flood-color="rgb(255,255,255)" />
|
||||
<feBlend
|
||||
id="feBlend4909-8"
|
||||
in2="SourceGraphic"
|
||||
mode="normal"
|
||||
result="result2" />
|
||||
<feComposite
|
||||
id="feComposite4911-6"
|
||||
in2="SourceGraphic"
|
||||
k2="1.2"
|
||||
operator="arithmetic"
|
||||
result="result3"
|
||||
k1="0"
|
||||
k4="0.2"
|
||||
k3="0" />
|
||||
<feComposite
|
||||
id="feComposite4913-88"
|
||||
in2="SourceGraphic"
|
||||
operator="in" />
|
||||
</filter>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3970-4"
|
||||
id="linearGradient6718"
|
||||
x1="304.40735"
|
||||
y1="169.7298"
|
||||
x2="305.57675"
|
||||
y2="235.63695"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3962-8"
|
||||
id="linearGradient6714"
|
||||
x1="223.82266"
|
||||
y1="301.22165"
|
||||
x2="281.22165"
|
||||
y2="272.06857"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3954-7"
|
||||
id="linearGradient6712"
|
||||
x1="170.31453"
|
||||
y1="306.74612"
|
||||
x2="244.40735"
|
||||
y2="307.33081"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3946-8"
|
||||
id="linearGradient6710"
|
||||
x1="128.56046"
|
||||
y1="269.99203"
|
||||
x2="189.40738"
|
||||
y2="308.23798"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4024-9"
|
||||
id="linearGradient6708"
|
||||
x1="108.82266"
|
||||
y1="218.56042"
|
||||
x2="142.97575"
|
||||
y2="285.31448"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4018-0"
|
||||
id="linearGradient6706"
|
||||
x1="113.82269"
|
||||
y1="240.89919"
|
||||
x2="110.89922"
|
||||
y2="173.23796"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4002-3"
|
||||
id="linearGradient6704"
|
||||
x1="108.23797"
|
||||
y1="187.97572"
|
||||
x2="140.31453"
|
||||
y2="128.82266"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3994-4"
|
||||
id="linearGradient6702"
|
||||
x1="187.39107"
|
||||
y1="105.89919"
|
||||
x2="126.80637"
|
||||
y2="140.89919"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3986-8"
|
||||
id="linearGradient6698"
|
||||
x1="222.65326"
|
||||
y1="102.97572"
|
||||
x2="287.33084"
|
||||
y2="139.7298"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(293.84585,294.63829)" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="12.781595"
|
||||
inkscape:cx="19.833202"
|
||||
inkscape:cy="32.233849"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-page="false"
|
||||
inkscape:snap-text-baseline="false"
|
||||
inkscape:snap-center="false"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
inkscape:snap-midpoints="false"
|
||||
inkscape:snap-smooth-nodes="false"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="false"
|
||||
inkscape:snap-bbox-midpoints="true"
|
||||
inkscape:snap-bbox-edge-midpoints="false"
|
||||
inkscape:bbox-paths="false"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:snap-others="true"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-global="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1021"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:measure-start="416.334,192.525"
|
||||
inkscape:measure-end="422.317,192.368"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
scale-x="1"
|
||||
inkscape:pagecheckerboard="true" />
|
||||
<metadata
|
||||
id="metadata780">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>RawTherapee logo</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Maciej Dworak</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source>www.rawtherapee.com</dc:source>
|
||||
<dc:date>2019-03-11</dc:date>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-40.854412,-228.47746)">
|
||||
<g
|
||||
id="g171">
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.945282,124.70558)"
|
||||
id="path6498"
|
||||
d="m 543.25,487.63477 48.31055,-12.94532 a 94.999997,94.999997 0 0 0 -0.0234,-0.10156 94.999997,94.999997 0 0 0 -2.99414,-9.01172 94.999997,94.999997 0 0 0 -3.87891,-8.66797 94.999997,94.999997 0 0 0 -4.72461,-8.23632 94.999997,94.999997 0 0 0 -5.52343,-7.72461 94.999997,94.999997 0 0 0 -6.26758,-7.13477 94.999997,94.999997 0 0 0 -1.69727,-1.58203 l -35.33398,35.33398 a 44.999999,44.999999 0 0 1 1.16406,1.08399 44.999999,44.999999 0 0 1 2.96875,3.3789 44.999999,44.999999 0 0 1 2.61719,3.65821 44.999999,44.999999 0 0 1 2.23633,3.90234 44.999999,44.999999 0 0 1 1.83789,4.10547 44.999999,44.999999 0 0 1 1.30859,3.94141 z"
|
||||
style="fill:url(#linearGradient6584);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6496"
|
||||
d="m 543.53906,511.14844 48.24024,12.92578 a 94.999997,94.999997 0 0 0 1.32617,-5.20117 94.999997,94.999997 0 0 0 1.41992,-9.38867 A 94.999997,94.999997 0 0 0 595,500 a 94.999997,94.999997 0 0 0 -0.23828,-6.7207 94.999997,94.999997 0 0 0 -1.14453,-9.42578 94.999997,94.999997 0 0 0 -2.05664,-9.16407 L 543.25,487.63477 a 44.999999,44.999999 0 0 1 0.10938,0.32812 44.999999,44.999999 0 0 1 0.98632,4.38867 44.999999,44.999999 0 0 1 0.54102,4.46485 A 44.999999,44.999999 0 0 1 545,500 a 44.999999,44.999999 0 0 1 -0.22461,4.49219 44.999999,44.999999 0 0 1 -0.67187,4.44726 44.999999,44.999999 0 0 1 -0.56446,2.20899 z"
|
||||
style="fill:url(#linearGradient6592);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6494"
|
||||
d="m 531.9707,531.61719 35.33399,35.33398 a 94.999997,94.999997 0 0 0 5.35547,-5.75 94.999997,94.999997 0 0 0 5.74609,-7.56055 94.999997,94.999997 0 0 0 4.96484,-8.0957 94.999997,94.999997 0 0 0 4.12891,-8.55078 94.999997,94.999997 0 0 0 3.25781,-8.91992 94.999997,94.999997 0 0 0 1.02149,-4 l -48.24024,-12.92578 a 44.999999,44.999999 0 0 1 -0.54883,2.15039 44.999999,44.999999 0 0 1 -1.54296,4.22461 44.999999,44.999999 0 0 1 -1.95508,4.05078 44.999999,44.999999 0 0 1 -2.35157,3.83398 44.999999,44.999999 0 0 1 -2.72265,3.58203 44.999999,44.999999 0 0 1 -2.44727,2.62696 z"
|
||||
style="fill:#fffb00;fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6492"
|
||||
d="m 511.70703,543.43359 12.93555,48.27539 a 94.999997,94.999997 0 0 0 0.76953,-0.17187 94.999997,94.999997 0 0 0 9.01172,-2.99414 94.999997,94.999997 0 0 0 8.66797,-3.87891 94.999997,94.999997 0 0 0 8.23632,-4.72461 94.999997,94.999997 0 0 0 7.72461,-5.52343 94.999997,94.999997 0 0 0 7.13477,-6.26758 94.999997,94.999997 0 0 0 1.11719,-1.19727 L 531.9707,531.61719 a 44.999999,44.999999 0 0 1 -0.61914,0.66406 44.999999,44.999999 0 0 1 -3.3789,2.96875 44.999999,44.999999 0 0 1 -3.65821,2.61523 44.999999,44.999999 0 0 1 -3.90234,2.23829 44.999999,44.999999 0 0 1 -4.10547,1.83789 44.999999,44.999999 0 0 1 -4.26953,1.41797 44.999999,44.999999 0 0 1 -0.33008,0.0742 z"
|
||||
style="fill:url(#linearGradient6600);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6490"
|
||||
d="m 488.36719,543.41602 -12.92578,48.23828 a 94.999997,94.999997 0 0 0 5.68554,1.45117 94.999997,94.999997 0 0 0 9.38867,1.41992 A 94.999997,94.999997 0 0 0 500,595 a 94.999997,94.999997 0 0 0 6.7207,-0.23828 94.999997,94.999997 0 0 0 9.42578,-1.14453 94.999997,94.999997 0 0 0 8.4961,-1.90821 l -12.93555,-48.27539 a 44.999999,44.999999 0 0 1 -4.05859,0.91211 44.999999,44.999999 0 0 1 -4.46485,0.54102 A 44.999999,44.999999 0 0 1 500,545 a 44.999999,44.999999 0 0 1 -4.49219,-0.22461 44.999999,44.999999 0 0 1 -4.44726,-0.67187 44.999999,44.999999 0 0 1 -2.69336,-0.6875 z"
|
||||
style="fill:url(#linearGradient6536);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6488"
|
||||
d="m 468.25,531.8457 -35.33398,35.33399 a 94.999997,94.999997 0 0 0 5.88281,5.48047 94.999997,94.999997 0 0 0 7.56055,5.74609 94.999997,94.999997 0 0 0 8.0957,4.96484 94.999997,94.999997 0 0 0 8.55078,4.12891 94.999997,94.999997 0 0 0 8.91992,3.25781 94.999997,94.999997 0 0 0 3.51563,0.89649 l 12.92578,-48.23828 a 44.999999,44.999999 0 0 1 -1.66602,-0.42579 44.999999,44.999999 0 0 1 -4.22461,-1.54296 44.999999,44.999999 0 0 1 -4.05078,-1.95704 44.999999,44.999999 0 0 1 -3.83398,-2.34961 44.999999,44.999999 0 0 1 -3.58203,-2.72265 44.999999,44.999999 0 0 1 -2.75977,-2.57227 z"
|
||||
style="fill:url(#linearGradient6544);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6486"
|
||||
d="m 456.60742,511.88672 -48.27734,12.93555 a 94.999997,94.999997 0 0 0 0.13281,0.58984 94.999997,94.999997 0 0 0 2.99414,9.01172 94.999997,94.999997 0 0 0 3.87891,8.66797 94.999997,94.999997 0 0 0 4.72461,8.23632 94.999997,94.999997 0 0 0 5.52343,7.72461 94.999997,94.999997 0 0 0 6.26758,7.13477 94.999997,94.999997 0 0 0 1.06446,0.99219 L 468.25,531.8457 a 44.999999,44.999999 0 0 1 -0.53125,-0.49414 44.999999,44.999999 0 0 1 -2.96875,-3.3789 44.999999,44.999999 0 0 1 -2.61523,-3.65821 44.999999,44.999999 0 0 1 -2.23829,-3.90234 44.999999,44.999999 0 0 1 -1.83789,-4.10547 44.999999,44.999999 0 0 1 -1.41797,-4.26953 44.999999,44.999999 0 0 1 -0.0332,-0.15039 z"
|
||||
style="fill:url(#linearGradient6552);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(1.0281074,0,0,1.0281074,-62.765085,91.449911)"
|
||||
sodipodi:nodetypes="cccccccccccccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6484"
|
||||
d="m 120.55163,161.65957 -12.76356,-3.41994 c -0.1299,0.45532 -0.2469,0.91421 -0.35088,1.37614 -0.16656,0.82125 -0.29195,1.65032 -0.37569,2.48409 -0.0837,0.83385 -0.12557,1.67137 -0.12557,2.50941 1e-5,0.59328 0.021,1.18638 0.063,1.77818 0.0593,0.83583 0.16037,1.66817 0.30282,2.4939 0.13582,0.77278 0.32632,1.57591 0.53379,2.33261 l 12.79722,-3.42869 c -0.10207,-0.36951 -0.22863,-0.77472 -0.29459,-1.15235 -0.0674,-0.39114 -0.11515,-0.78541 -0.14315,-1.18133 -0.0199,-0.28033 -0.0299,-0.56128 -0.03,-0.84232 -2e-5,-0.39693 0.0198,-0.79361 0.0594,-1.18856 0.0396,-0.39494 0.0989,-0.78766 0.17777,-1.17667 0.0448,-0.19605 0.0946,-0.39094 0.14934,-0.58447 z"
|
||||
style="fill:url(#linearGradient6560);fill-opacity:1;stroke:none;stroke-width:0.12867495;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6482"
|
||||
d="m 467.68945,468.75 -35.33398,-35.33398 a 94.999997,94.999997 0 0 0 -5.01563,5.38281 94.999997,94.999997 0 0 0 -5.74609,7.56055 94.999997,94.999997 0 0 0 -4.96484,8.0957 94.999997,94.999997 0 0 0 -4.12891,8.55078 94.999997,94.999997 0 0 0 -3.25781,8.91992 94.999997,94.999997 0 0 0 -1.02149,4 l 48.24024,12.92578 a 44.999999,44.999999 0 0 1 0.54883,-2.15039 44.999999,44.999999 0 0 1 1.54296,-4.22461 44.999999,44.999999 0 0 1 1.95704,-4.05078 44.999999,44.999999 0 0 1 2.34961,-3.83398 44.999999,44.999999 0 0 1 2.72265,-3.58203 44.999999,44.999999 0 0 1 2.10742,-2.25977 z"
|
||||
style="fill:url(#linearGradient6568);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6480"
|
||||
d="m 487.45898,456.80859 -12.94531,-48.32031 a 94.999997,94.999997 0 0 0 -8.9375,2.96875 94.999997,94.999997 0 0 0 -8.66797,3.87891 94.999997,94.999997 0 0 0 -8.23632,4.72461 94.999997,94.999997 0 0 0 -7.72461,5.52343 94.999997,94.999997 0 0 0 -7.13477,6.26758 94.999997,94.999997 0 0 0 -1.45703,1.56446 L 467.68945,468.75 a 44.999999,44.999999 0 0 1 0.95899,-1.03125 44.999999,44.999999 0 0 1 3.3789,-2.96875 44.999999,44.999999 0 0 1 3.65821,-2.61523 44.999999,44.999999 0 0 1 3.90234,-2.23829 44.999999,44.999999 0 0 1 4.10547,-1.83789 44.999999,44.999999 0 0 1 3.76562,-1.25 z"
|
||||
style="fill:url(#linearGradient6576);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6478"
|
||||
d="m 523.58984,408.09766 a 94.999997,94.999997 0 0 0 -4.71679,-1.20313 94.999997,94.999997 0 0 0 -9.38867,-1.41992 A 94.999997,94.999997 0 0 0 500,405 a 94.999997,94.999997 0 0 0 -6.7207,0.23828 94.999997,94.999997 0 0 0 -9.42578,1.14453 94.999997,94.999997 0 0 0 -9.26563,2.08008 94.999997,94.999997 0 0 0 -0.0742,0.0254 L 487.459,456.8086 a 44.999999,44.999999 0 0 1 0.50391,-0.16797 44.999999,44.999999 0 0 1 4.38867,-0.98632 44.999999,44.999999 0 0 1 4.46485,-0.54102 A 44.999999,44.999999 0 0 1 500,455 a 44.999999,44.999999 0 0 1 4.49219,0.22461 44.999999,44.999999 0 0 1 4.44726,0.67187 44.999999,44.999999 0 0 1 1.72461,0.44141 z"
|
||||
style="fill:#ff0b0d;fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6427"
|
||||
d="m 523.58984,408.09766 -12.92578,48.24023 a 44.999999,44.999999 0 0 1 2.63477,0.67188 44.999999,44.999999 0 0 1 4.22461,1.54296 44.999999,44.999999 0 0 1 4.05078,1.95508 44.999999,44.999999 0 0 1 3.83398,2.35157 44.999999,44.999999 0 0 1 3.58203,2.72265 44.999999,44.999999 0 0 1 2.12696,1.98242 l 35.33398,-35.33398 a 94.999997,94.999997 0 0 0 -5.25,-4.89063 94.999997,94.999997 0 0 0 -7.56055,-5.74609 94.999997,94.999997 0 0 0 -8.0957,-4.96484 94.999997,94.999997 0 0 0 -8.55078,-4.12891 94.999997,94.999997 0 0 0 -8.91992,-3.25781 94.999997,94.999997 0 0 0 -4.48438,-1.14453 z"
|
||||
style="fill:url(#linearGradient6506);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6475"
|
||||
d="m 591.56055,474.68945 9.55664,-2.56054 a 105,105 0 0 0 -27.55274,-47.01172 l -7.11328,7.11328 a 94.999997,94.999997 0 0 1 1.69727,1.58203 94.999997,94.999997 0 0 1 6.26758,7.13477 94.999997,94.999997 0 0 1 5.52343,7.72461 94.999997,94.999997 0 0 1 4.72461,8.23632 94.999997,94.999997 0 0 1 3.87891,8.66797 94.999997,94.999997 0 0 1 2.99414,9.01172 94.999997,94.999997 0 0 1 0.0234,0.10156 z"
|
||||
style="fill:url(#linearGradient6720);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6473"
|
||||
d="m 591.7793,524.07422 9.71093,2.60156 A 105,105 0 0 0 605,500 105,105 0 0 0 601.11719,472.12891 l -9.55664,2.56054 a 94.999997,94.999997 0 0 1 2.05664,9.16407 94.999997,94.999997 0 0 1 1.14453,9.42578 A 94.999997,94.999997 0 0 1 595,500 a 94.999997,94.999997 0 0 1 -0.47461,9.48438 94.999997,94.999997 0 0 1 -1.41992,9.38867 94.999997,94.999997 0 0 1 -1.32617,5.20117 z"
|
||||
style="fill:url(#linearGradient6718);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6471"
|
||||
d="m 567.30469,566.95117 7.07812,7.07813 a 105,105 0 0 0 27.10742,-47.35352 l -9.71093,-2.60156 a 94.999997,94.999997 0 0 1 -1.02149,4 94.999997,94.999997 0 0 1 -3.25781,8.91992 94.999997,94.999997 0 0 1 -4.12891,8.55078 94.999997,94.999997 0 0 1 -4.96484,8.0957 94.999997,94.999997 0 0 1 -5.74609,7.56055 94.999997,94.999997 0 0 1 -5.35547,5.75 z"
|
||||
style="fill:#fffb00;fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6469"
|
||||
d="m 524.64258,591.70898 2.5664,9.57618 a 105,105 0 0 0 47.17383,-27.25586 l -7.07812,-7.07813 a 94.999997,94.999997 0 0 1 -1.11719,1.19727 94.999997,94.999997 0 0 1 -7.13477,6.26758 94.999997,94.999997 0 0 1 -7.72461,5.52343 94.999997,94.999997 0 0 1 -8.23632,4.72461 94.999997,94.999997 0 0 1 -8.66797,3.87891 94.999997,94.999997 0 0 1 -9.01172,2.99414 94.999997,94.999997 0 0 1 -0.76953,0.17187 z"
|
||||
style="fill:url(#linearGradient6714);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6467"
|
||||
d="m 475.44141,591.6543 -2.60547,9.72656 A 105,105 0 0 0 500,605 a 105,105 0 0 0 27.20898,-3.71484 l -2.5664,-9.57618 a 94.999997,94.999997 0 0 1 -8.4961,1.90821 94.999997,94.999997 0 0 1 -9.42578,1.14453 A 94.999997,94.999997 0 0 1 500,595 a 94.999997,94.999997 0 0 1 -9.48438,-0.47461 94.999997,94.999997 0 0 1 -9.38867,-1.41992 94.999997,94.999997 0 0 1 -5.68554,-1.45117 z"
|
||||
style="fill:url(#linearGradient6712);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6465"
|
||||
d="M 432.91602,567.17969 425.8457,574.25 a 105,105 0 0 0 46.99024,27.13086 l 2.60547,-9.72656 a 94.999997,94.999997 0 0 1 -3.51563,-0.89649 94.999997,94.999997 0 0 1 -8.91992,-3.25781 94.999997,94.999997 0 0 1 -8.55078,-4.12891 94.999997,94.999997 0 0 1 -8.0957,-4.96484 94.999997,94.999997 0 0 1 -7.56055,-5.74609 94.999997,94.999997 0 0 1 -5.88281,-5.48047 z"
|
||||
style="fill:url(#linearGradient6710);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6463"
|
||||
d="m 408.33008,524.82227 -9.57031,2.56445 A 105,105 0 0 0 425.8457,574.25 l 7.07032,-7.07031 a 94.999997,94.999997 0 0 1 -1.06446,-0.99219 94.999997,94.999997 0 0 1 -6.26758,-7.13477 94.999997,94.999997 0 0 1 -5.52343,-7.72461 94.999997,94.999997 0 0 1 -4.72461,-8.23632 94.999997,94.999997 0 0 1 -3.87891,-8.66797 94.999997,94.999997 0 0 1 -2.99414,-9.01172 94.999997,94.999997 0 0 1 -0.13281,-0.58984 z"
|
||||
style="fill:url(#linearGradient6708);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6461"
|
||||
d="m 408.2207,475.92578 -9.71093,-2.60156 A 105,105 0 0 0 395,500 a 105,105 0 0 0 3.75977,27.38672 l 9.57031,-2.56445 a 94.999997,94.999997 0 0 1 -1.94727,-8.67579 94.999997,94.999997 0 0 1 -1.14453,-9.42578 A 94.999997,94.999997 0 0 1 405,500 a 94.999997,94.999997 0 0 1 0.47461,-9.48438 94.999997,94.999997 0 0 1 1.41992,-9.38867 94.999997,94.999997 0 0 1 1.32617,-5.20117 z"
|
||||
style="fill:url(#linearGradient6706);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6459"
|
||||
d="m 432.35547,433.41602 -7.10352,-7.10352 a 105,105 0 0 0 -26.74218,47.01172 l 9.71093,2.60156 a 94.999997,94.999997 0 0 1 1.02149,-4 94.999997,94.999997 0 0 1 3.25781,-8.91992 94.999997,94.999997 0 0 1 4.12891,-8.55078 94.999997,94.999997 0 0 1 4.96484,-8.0957 94.999997,94.999997 0 0 1 5.74609,-7.56055 94.999997,94.999997 0 0 1 5.01563,-5.38281 z"
|
||||
style="fill:url(#linearGradient6704);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6457"
|
||||
d="m 474.51367,408.48828 -2.5625,-9.56055 a 105,105 0 0 0 -46.69922,27.38477 l 7.10352,7.10352 a 94.999997,94.999997 0 0 1 1.45703,-1.56446 94.999997,94.999997 0 0 1 7.13477,-6.26758 94.999997,94.999997 0 0 1 7.72461,-5.52343 94.999997,94.999997 0 0 1 8.23632,-4.72461 94.999997,94.999997 0 0 1 8.66797,-3.87891 94.999997,94.999997 0 0 1 8.9375,-2.96875 z"
|
||||
style="fill:url(#linearGradient6702);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6455"
|
||||
d="M 526.1875,398.40039 A 105,105 0 0 0 500,395 a 105,105 0 0 0 -28.04883,3.92773 l 2.5625,9.56055 a 94.999997,94.999997 0 0 1 0.0742,-0.0254 94.999997,94.999997 0 0 1 9.26563,-2.08008 94.999997,94.999997 0 0 1 9.42578,-1.14453 A 94.999997,94.999997 0 0 1 500,405 a 94.999997,94.999997 0 0 1 9.48438,0.47461 94.999997,94.999997 0 0 1 9.38867,1.41992 94.999997,94.999997 0 0 1 4.71679,1.20313 z"
|
||||
style="fill:#ff0b0d;fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27202007,0,0,0.27202007,-62.944889,124.70579)"
|
||||
id="path6388"
|
||||
d="m 526.1875,398.40039 -2.59766,9.69727 a 94.999997,94.999997 0 0 1 4.48438,1.14453 94.999997,94.999997 0 0 1 8.91992,3.25781 94.999997,94.999997 0 0 1 8.55078,4.12891 94.999997,94.999997 0 0 1 8.0957,4.96484 94.999997,94.999997 0 0 1 7.56055,5.74609 94.999997,94.999997 0 0 1 5.25,4.89063 l 7.11328,-7.11328 a 105,105 0 0 0 -47.37695,-26.7168 z"
|
||||
style="fill:url(#linearGradient6698);fill-opacity:1;stroke:none;stroke-width:0.48633054;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4905-0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="matrix(0.27181121,0,0,0.27181121,36.997416,216.05244)"
|
||||
sodipodi:nodetypes="sssss"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8371"
|
||||
d="m 132.29165,59.401511 c -58.159346,0 -105.306798,47.147459 -105.306782,105.306819 4e-6,58.15933 47.147452,105.30679 105.306782,105.30679 58.15933,0 105.30677,-47.14746 105.30678,-105.30679 1e-5,-58.15936 -47.14744,-105.306819 -105.30678,-105.306819 z"
|
||||
style="opacity:0.7;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.97340846;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
transform="matrix(0.27181121,0,0,0.27181121,36.997416,216.05244)"
|
||||
style="opacity:0.7;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.97340846;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.93150689"
|
||||
d="m 132.51082,119.61863 c -24.71711,0 -44.754267,20.03716 -44.75426,44.75428 2e-6,24.71711 20.03715,44.75427 44.75426,44.75427 24.71711,0 44.75428,-20.03716 44.75429,-44.75427 0,-24.71712 -20.03717,-44.75428 -44.75429,-44.75428 z"
|
||||
id="path8773"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="sssss" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 54 KiB |
4073
rtdata/languages/Dansk
Normal file
4068
rtdata/languages/Espanol (Castellano)
Normal file
@ -176,6 +176,19 @@ if(LENSFUN_HAS_LOAD_DIRECTORY)
|
||||
set_source_files_properties(rtlensfun.cc PROPERTIES COMPILE_DEFINITIONS RT_LENSFUN_HAS_LOAD_DIRECTORY)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12.0")
|
||||
# procparams.cc takes a long time to compile with optimizations starting
|
||||
# with GCC 12.1 due to PTA (see issue #6548)
|
||||
get_source_file_property(PROCPARAMS_COMPILE_OPTIONS procparams.cc COMPILE_OPTIONS)
|
||||
if(PROCPARAMS_COMPILE_OPTIONS STREQUAL "NOTFOUND")
|
||||
set(PROCPARAMS_COMPILE_OPTIONS "")
|
||||
else()
|
||||
set(PROCPARAMS_COMPILE_OPTIONS "${PROCPARAMS_COMPILE_OPTIONS};")
|
||||
endif()
|
||||
set(PROCPARAMS_COMPILE_OPTIONS "${PROCPARAMS_COMPILE_OPTIONS}-fno-tree-pta")
|
||||
set_source_files_properties(procparams.cc PROPERTIES COMPILE_OPTIONS ${PROCPARAMS_COMPILE_OPTIONS})
|
||||
endif()
|
||||
|
||||
if(WITH_BENCHMARK)
|
||||
add_definitions(-DBENCHMARK)
|
||||
endif()
|
||||
|
@ -248,6 +248,14 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
// import from flat data
|
||||
void operator()(std::size_t w, std::size_t h, const T* const copy)
|
||||
{
|
||||
ar_realloc(w, h);
|
||||
for (std::size_t y = 0; y < h; ++y) {
|
||||
std::copy(copy + y * w, copy + y * w + w, rows.data()[y]);
|
||||
}
|
||||
}
|
||||
|
||||
int getWidth() const
|
||||
{
|
||||
|
@ -28,8 +28,6 @@ namespace rtengine
|
||||
CameraConst::CameraConst() : pdafOffset(0)
|
||||
{
|
||||
memset(dcraw_matrix, 0, sizeof(dcraw_matrix));
|
||||
memset(raw_crop, 0, sizeof(raw_crop));
|
||||
memset(raw_mask, 0, sizeof(raw_mask));
|
||||
white_max = 0;
|
||||
globalGreenEquilibration = -1;
|
||||
}
|
||||
@ -192,6 +190,68 @@ CameraConst* CameraConst::parseEntry(const void *cJSON_, const char *make_model)
|
||||
std::unique_ptr<CameraConst> cc(new CameraConst);
|
||||
cc->make_model = make_model;
|
||||
|
||||
const auto get_raw_crop =
|
||||
[](int w, int h, const cJSON *ji, CameraConst *cc) -> bool
|
||||
{
|
||||
std::array<int, 4> rc;
|
||||
|
||||
if (ji->type != cJSON_Array) {
|
||||
//fprintf(stderr, "\"raw_crop\" must be an array\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0, ji = ji->child; i < 4 && ji != nullptr; i++, ji = ji->next) {
|
||||
if (ji->type != cJSON_Number) {
|
||||
//fprintf(stderr, "\"raw_crop\" array must contain numbers\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
//cc->raw_crop[i] = ji->valueint;
|
||||
rc[i] = ji->valueint;
|
||||
}
|
||||
|
||||
if (i != 4 || ji != nullptr) {
|
||||
//fprintf(stderr, "\"raw_crop\" must contain 4 numbers\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
cc->raw_crop[std::make_pair(w, h)] = rc;
|
||||
return true;
|
||||
};
|
||||
|
||||
const auto get_masked_areas =
|
||||
[](int w, int h, const cJSON *ji, CameraConst *cc) -> bool
|
||||
{
|
||||
std::array<std::array<int, 4>, 2> rm;
|
||||
|
||||
if (ji->type != cJSON_Array) {
|
||||
//fprintf(stderr, "\"masked_areas\" must be an array\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0, ji = ji->child; i < 2 * 4 && ji != nullptr; i++, ji = ji->next) {
|
||||
if (ji->type != cJSON_Number) {
|
||||
//fprintf(stderr, "\"masked_areas\" array must contain numbers\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
//cc->raw_mask[i / 4][i % 4] = ji->valueint;
|
||||
rm[i / 4][i % 4] = ji->valueint;
|
||||
}
|
||||
|
||||
if (i % 4 != 0) {
|
||||
//fprintf(stderr, "\"masked_areas\" array length must be divisable by 4\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
cc->raw_mask[std::make_pair(w, h)] = rm;
|
||||
return true;
|
||||
};
|
||||
|
||||
const cJSON *ji = cJSON_GetObjectItem(js, "dcraw_matrix");
|
||||
|
||||
if (ji) {
|
||||
@ -216,24 +276,32 @@ CameraConst* CameraConst::parseEntry(const void *cJSON_, const char *make_model)
|
||||
|
||||
if (ji) {
|
||||
if (ji->type != cJSON_Array) {
|
||||
fprintf(stderr, "\"raw_crop\" must be an array\n");
|
||||
fprintf(stderr, "invalid entry for raw_crop.\n");
|
||||
return nullptr;
|
||||
} else if (!get_raw_crop(0, 0, ji, cc.get())) {
|
||||
cJSON *je;
|
||||
cJSON_ArrayForEach(je, ji) {
|
||||
if (!cJSON_IsObject(je)) {
|
||||
fprintf(stderr, "invalid entry for raw_crop.\n");
|
||||
return nullptr;
|
||||
} else {
|
||||
auto js = cJSON_GetObjectItem(je, "frame");
|
||||
if (!js || js->type != cJSON_Array ||
|
||||
cJSON_GetArraySize(js) != 2 ||
|
||||
!cJSON_IsNumber(cJSON_GetArrayItem(js, 0)) ||
|
||||
!cJSON_IsNumber(cJSON_GetArrayItem(js, 1))) {
|
||||
fprintf(stderr, "invalid entry for raw_crop.\n");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0, ji = ji->child; i < 4 && ji; i++, ji = ji->next) {
|
||||
if (ji->type != cJSON_Number) {
|
||||
fprintf(stderr, "\"raw_crop\" array must contain numbers\n");
|
||||
int w = cJSON_GetArrayItem(js, 0)->valueint;
|
||||
int h = cJSON_GetArrayItem(js, 1)->valueint;
|
||||
js = cJSON_GetObjectItem(je, "crop");
|
||||
if (!js || !get_raw_crop(w, h, js, cc.get())) {
|
||||
fprintf(stderr, "invalid entry for raw_crop.\n");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
cc->raw_crop[i] = ji->valueint;
|
||||
}
|
||||
|
||||
if (i != 4 || ji) {
|
||||
fprintf(stderr, "\"raw_crop\" must contain 4 numbers\n");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -241,24 +309,32 @@ CameraConst* CameraConst::parseEntry(const void *cJSON_, const char *make_model)
|
||||
|
||||
if (ji) {
|
||||
if (ji->type != cJSON_Array) {
|
||||
fprintf(stderr, "\"masked_areas\" must be an array\n");
|
||||
fprintf(stderr, "invalid entry for masked_areas.\n");
|
||||
return nullptr;
|
||||
} else if (!get_masked_areas(0, 0, ji, cc.get())) {
|
||||
cJSON *je;
|
||||
cJSON_ArrayForEach(je, ji) {
|
||||
if (!cJSON_IsObject(je)) {
|
||||
fprintf(stderr, "invalid entry for masked_areas.\n");
|
||||
return nullptr;
|
||||
} else {
|
||||
auto js = cJSON_GetObjectItem(je, "frame");
|
||||
if (!js || js->type != cJSON_Array ||
|
||||
cJSON_GetArraySize(js) != 2 ||
|
||||
!cJSON_IsNumber(cJSON_GetArrayItem(js, 0)) ||
|
||||
!cJSON_IsNumber(cJSON_GetArrayItem(js, 1))) {
|
||||
fprintf(stderr, "invalid entry for masked_areas.\n");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0, ji = ji->child; i < 2 * 4 && ji; i++, ji = ji->next) {
|
||||
if (ji->type != cJSON_Number) {
|
||||
fprintf(stderr, "\"masked_areas\" array must contain numbers\n");
|
||||
int w = cJSON_GetArrayItem(js, 0)->valueint;
|
||||
int h = cJSON_GetArrayItem(js, 1)->valueint;
|
||||
js = cJSON_GetObjectItem(je, "areas");
|
||||
if (!js || !get_masked_areas(w, h, js, cc.get())) {
|
||||
fprintf(stderr, "invalid entry for masked_areas.\n");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
cc->raw_mask[i / 4][i % 4] = ji->valueint;
|
||||
}
|
||||
|
||||
if (i % 4 != 0) {
|
||||
fprintf(stderr, "\"masked_areas\" array length must be divisible by 4\n");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -399,29 +475,41 @@ void CameraConst::update_pdafOffset(int other)
|
||||
pdafOffset = other;
|
||||
}
|
||||
|
||||
bool CameraConst::has_rawCrop() const
|
||||
|
||||
bool CameraConst::has_rawCrop(int raw_width, int raw_height) const
|
||||
{
|
||||
return raw_crop[0] != 0 || raw_crop[1] != 0 || raw_crop[2] != 0 || raw_crop[3] != 0;
|
||||
return raw_crop.find(std::make_pair(raw_width, raw_height)) != raw_crop.end() || raw_crop.find(std::make_pair(0, 0)) != raw_crop.end();
|
||||
}
|
||||
|
||||
void CameraConst::get_rawCrop(int& left_margin, int& top_margin, int& width, int& height) const
|
||||
|
||||
void CameraConst::get_rawCrop(int raw_width, int raw_height, int &left_margin, int &top_margin, int &width, int &height) const
|
||||
{
|
||||
left_margin = raw_crop[0];
|
||||
top_margin = raw_crop[1];
|
||||
width = raw_crop[2];
|
||||
height = raw_crop[3];
|
||||
auto it = raw_crop.find(std::make_pair(raw_width, raw_height));
|
||||
if (it == raw_crop.end()) {
|
||||
it = raw_crop.find(std::make_pair(0, 0));
|
||||
}
|
||||
if (it != raw_crop.end()) {
|
||||
left_margin = it->second[0];
|
||||
top_margin = it->second[1];
|
||||
width = it->second[2];
|
||||
height = it->second[3];
|
||||
} else {
|
||||
left_margin = top_margin = width = height = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool CameraConst::has_rawMask(int idx) const
|
||||
|
||||
bool CameraConst::has_rawMask(int raw_width, int raw_height, int idx) const
|
||||
{
|
||||
if (idx < 0 || idx > 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (raw_mask[idx][0] | raw_mask[idx][1] | raw_mask[idx][2] | raw_mask[idx][3]) != 0;
|
||||
return raw_mask.find(std::make_pair(raw_width, raw_height)) != raw_mask.end() || raw_mask.find(std::make_pair(0, 0)) != raw_mask.end();
|
||||
}
|
||||
|
||||
void CameraConst::get_rawMask(int idx, int& top, int& left, int& bottom, int& right) const
|
||||
|
||||
void CameraConst::get_rawMask(int raw_width, int raw_height, int idx, int &top, int &left, int &bottom, int &right) const
|
||||
{
|
||||
top = left = bottom = right = 0;
|
||||
|
||||
@ -429,10 +517,17 @@ void CameraConst::get_rawMask(int idx, int& top, int& left, int& bottom, int& ri
|
||||
return;
|
||||
}
|
||||
|
||||
top = raw_mask[idx][0];
|
||||
left = raw_mask[idx][1];
|
||||
bottom = raw_mask[idx][2];
|
||||
right = raw_mask[idx][3];
|
||||
auto it = raw_mask.find(std::make_pair(raw_width, raw_height));
|
||||
if (it == raw_mask.end()) {
|
||||
it = raw_mask.find(std::make_pair(0, 0));
|
||||
}
|
||||
|
||||
if (it != raw_mask.end()) {
|
||||
top = it->second[idx][0];
|
||||
left = it->second[idx][1];
|
||||
bottom = it->second[idx][2];
|
||||
right = it->second[idx][3];
|
||||
}
|
||||
}
|
||||
|
||||
void CameraConst::update_Levels(const CameraConst *other)
|
||||
@ -464,9 +559,7 @@ void CameraConst::update_Crop(CameraConst *other)
|
||||
return;
|
||||
}
|
||||
|
||||
if (other->has_rawCrop()) {
|
||||
other->get_rawCrop(raw_crop[0], raw_crop[1], raw_crop[2], raw_crop[3]);
|
||||
}
|
||||
raw_crop.insert(other->raw_crop.begin(), other->raw_crop.end());
|
||||
}
|
||||
|
||||
bool CameraConst::get_Levels(camera_const_levels & lvl, int bw, int iso, float fnumber) const
|
||||
|
@ -1,9 +1,11 @@
|
||||
/*
|
||||
/* -*- C++ -*-
|
||||
*
|
||||
* This file is part of RawTherapee.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -17,17 +19,17 @@ class ustring;
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
struct camera_const_levels {
|
||||
int levels[4];
|
||||
};
|
||||
|
||||
class CameraConst final
|
||||
{
|
||||
private:
|
||||
struct camera_const_levels {
|
||||
int levels[4];
|
||||
};
|
||||
|
||||
std::string make_model;
|
||||
short dcraw_matrix[12];
|
||||
int raw_crop[4];
|
||||
int raw_mask[2][4];
|
||||
std::map<std::pair<int, int>, std::array<int, 4>> raw_crop;
|
||||
std::map<std::pair<int, int>, std::array<std::array<int, 4>, 2>> raw_mask;
|
||||
int white_max;
|
||||
std::map<int, camera_const_levels> mLevels[2];
|
||||
std::map<float, float> mApertureScaling;
|
||||
@ -47,10 +49,10 @@ public:
|
||||
const short *get_dcrawMatrix(void) const;
|
||||
const std::vector<int>& get_pdafPattern() const;
|
||||
int get_pdafOffset() const {return pdafOffset;};
|
||||
bool has_rawCrop(void) const;
|
||||
void get_rawCrop(int& left_margin, int& top_margin, int& width, int& height) const;
|
||||
bool has_rawMask(int idx) const;
|
||||
void get_rawMask(int idx, int& top, int& left, int& bottom, int& right) const;
|
||||
bool has_rawCrop(int raw_width, int raw_height) const;
|
||||
void get_rawCrop(int raw_width, int raw_height, int& left_margin, int& top_margin, int& width, int& height) const;
|
||||
bool has_rawMask(int raw_width, int raw_height, int idx) const;
|
||||
void get_rawMask(int raw_width, int raw_height, int idx, int& top, int& left, int& bottom, int& right) const;
|
||||
int get_BlackLevel(int idx, int iso_speed) const;
|
||||
int get_WhiteLevel(int idx, int iso_speed, float fnumber) const;
|
||||
bool has_globalGreenEquilibration() const;
|
||||
@ -77,4 +79,5 @@ public:
|
||||
const CameraConst *get(const char make[], const char model[]) const;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace rtengine
|
||||
|
||||
|
@ -70,6 +70,14 @@ Examples:
|
||||
// cropped so the "negative number" way is not totally safe.
|
||||
"raw_crop": [ 10, 20, 4000, 3000 ],
|
||||
|
||||
// multi-aspect support (added 2020-12-03)
|
||||
// "frame" defines the full dimensions the crop applies to
|
||||
// (with [0, 0] being the fallback crop if none of the other applies)
|
||||
"raw_crop" : [
|
||||
{ "frame" : [4100, 3050], "crop": [10, 20, 4050, 3020] },
|
||||
{ "frame" : [0, 0], "crop": [10, 20, 4000, 3000] }
|
||||
]
|
||||
|
||||
// Almost same as MaskedAreas DNG tag, used for black level measuring. Here up to two areas can be defined
|
||||
// by tetrads of numbers:
|
||||
"masked_areas": [ 51, 2, 3804, 156, 51, 5794, 3804, 5792 ],
|
||||
@ -84,6 +92,14 @@ Examples:
|
||||
// instead, to take care of possible light leaks from the light sensing area to the optically black (masked)
|
||||
// area or sensor imperfections at the outer borders.
|
||||
|
||||
// multi-aspect support (added 2020-12-03)
|
||||
// "frame" defines the full dimensions the masked areas apply to
|
||||
// (with [0, 0] being the fallback crop if none of the other applies)
|
||||
"masked_areas" : [
|
||||
{ "frame" : [4100, 3050], "areas": [10, 20, 4050, 3020] },
|
||||
{ "frame" : [0, 0], "areas": [10, 20, 4000, 3000] }
|
||||
]
|
||||
|
||||
// list of indices of the rows with on-sensor PDAF pixels, for cameras that have such features. The indices here form a pattern that is repeated for the whole height of the sensor. The values are relative to the "pdaf_offset" value (see below)
|
||||
"pdaf_pattern" : [ 0,12,36,54,72,90,114,126,144,162,180,204,216,240,252,270,294,306,324,342,366,384,396,414,432,450,474,492,504,522,540,564,576,594,606,630 ],
|
||||
// index of the first row of the PDAF pattern in the sensor (0 is the topmost row). Allowed to be negative for convenience (this means that the first repetition of the pattern doesn't start from the first row)
|
||||
@ -1208,23 +1224,54 @@ Camera constants:
|
||||
"ranges" : { "white" : 16367 } // Typically 16383 without LENR, with LENR safest value is 15800 for ISO 25600
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "Canon EOS R3",
|
||||
"dcraw_matrix" : [ 9423, -2839, -1195, -4532, 12377, 2415, -483, 1374, 5276 ],
|
||||
"raw_crop": [ 160, 120, 6024, 4024 ]
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "Canon EOS R5",
|
||||
"dcraw_matrix" : [9766, -2953, -1254, -4276, 12116, 2433, -437, 1336, 5131],
|
||||
"raw_crop" : [ 128, 96, 8224, 5490 ],
|
||||
"masked_areas" : [ 94, 20, 5578, 122 ],
|
||||
"raw_crop" : [
|
||||
{ "frame" : [ 8352, 5586 ], "crop" : [ 128, 96, 8224, 5490 ] },
|
||||
{ "frame" : [ 5248, 3510 ], "crop" : [ 128, 96, 5120, 3382 ] }
|
||||
],
|
||||
"masked_areas" : [
|
||||
{ "frame" : [ 8352, 5586 ], "areas": [ 94, 20, 5578, 122 ] },
|
||||
{ "frame" : [ 5248, 3510 ], "areas": [ 94, 20, 3510, 122 ] }
|
||||
],
|
||||
"ranges" : { "white" : 16382 }
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "Canon EOS R6",
|
||||
"dcraw_matrix" : [8293, -1611, -1132, -4759, 12710, 2275, -1013, 2415, 5508],
|
||||
"raw_crop": [ 72, 38, 5496, 3670 ],
|
||||
"masked_areas" : [ 40, 10, 5534, 70 ],
|
||||
"raw_crop": [
|
||||
{ "frame": [5568, 3708], "crop" : [ 72, 38, 5496, 3670 ] },
|
||||
{ "frame": [3584, 2386], "crop" : [ 156, 108, 3404, 2270 ] }
|
||||
],
|
||||
"masked_areas" : [
|
||||
{ "frame": [5568, 3708], "areas": [ 40, 10, 5534, 70 ] },
|
||||
{ "frame": [3584, 2386], "areas": [ 40, 10, 2374, 110 ] }
|
||||
],
|
||||
"ranges" : { "white" : 16382 }
|
||||
},
|
||||
|
||||
// Canon Powershot
|
||||
{ // Quality C
|
||||
"make_model": "Canon EOS R7",
|
||||
"dcraw_matrix" : [10424, -3138, -1300, -4221, 11938, 2584, -547, 1658, 6183],
|
||||
"raw_crop": [ 144, 72, 6984, 4660 ],
|
||||
"masked_areas" : [ 70, 20, 4724, 138 ]
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "Canon EOS R10",
|
||||
"dcraw_matrix" : [9269, -2012, -1107, -3990, 11762, 2527, -569, 2093, 4913],
|
||||
"raw_crop": [ 144, 40, 6048, 4020 ],
|
||||
"masked_areas" : [ 38, 20, 4052, 138 ]
|
||||
},
|
||||
|
||||
{ // Quality C, CHDK DNGs, raw frame correction
|
||||
"make_model": "Canon PowerShot A3100 IS",
|
||||
"raw_crop": [ 24, 12, 4032, 3024 ] // full size 4036X3026
|
||||
@ -1363,7 +1410,11 @@ Camera constants:
|
||||
{ // Quality C
|
||||
"make_model": [ "FUJIFILM GFX 100", "FUJIFILM GFX100S" ],
|
||||
"dcraw_matrix" : [ 16212, -8423, -1583, -4336, 12583, 1937, -195, 726, 6199 ], // taken from ART
|
||||
"raw_crop": [ 0, 2, 11664, 8734 ]
|
||||
"raw_crop": [
|
||||
// multi-aspect crop to account for 16-shot pixel shift images
|
||||
{ "frame" : [11808, 8754], "crop" : [ 0, 2, 11664, 8734 ] },
|
||||
{ "frame" : [23616, 17508], "crop" : [ 0, 4, 23328, 17468 ] }
|
||||
]
|
||||
},
|
||||
|
||||
{ // Quality B
|
||||
@ -1512,7 +1563,7 @@ Camera constants:
|
||||
},
|
||||
|
||||
{ // Quality B
|
||||
"make_model": [ "FUJIFILM X-T30", "FUJIFILM X100V", "FUJIFILM X-T4", "FUJIFILM X-S10" ],
|
||||
"make_model": [ "FUJIFILM X-T30", "FUJIFILM X-T30 II", "FUJIFILM X100V", "FUJIFILM X-T4", "FUJIFILM X-S10" ],
|
||||
"dcraw_matrix": [ 13426,-6334,-1177,-4244,12136,2371,-580,1303,5980 ], // DNG_v11, standard_v2 d65
|
||||
"raw_crop": [ 0, 5, 6252, 4176]
|
||||
},
|
||||
@ -1529,6 +1580,18 @@ Camera constants:
|
||||
"ranges": { "white": 4040 }
|
||||
},
|
||||
|
||||
{ // Quality B
|
||||
"make_model": [ "FUJIFILM X-T5", "FUJIFILM X-H2" ],
|
||||
"dcraw_matrix": [ 11809, -5358, -1141, -4248, 12164, 2343, -514, 1097, 5848 ], // RawSpeed / DNG
|
||||
"raw_crop": [ 0, 5, 7752, 5184 ]
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "FUJIFILM DBP for GX680",
|
||||
"dcraw_matrix": [ 12741, -4916, -1420, -8510, 16791, 1715, -1767, 2302, 7771 ], // same as S2Pro as per LibRaw
|
||||
"ranges": { "white": 4096, "black": 132 }
|
||||
},
|
||||
|
||||
{ // Quality C, Leica C-Lux names can differ?
|
||||
"make_model" : [ "LEICA C-LUX", "LEICA CAM-DC25" ],
|
||||
"dcraw_matrix" : [7790, -2736, -755, -3452, 11870, 1769, -628, 1647, 4898]
|
||||
@ -1546,11 +1609,12 @@ Camera constants:
|
||||
"raw_crop": [ 4, 4, -4, -4 ] // full raw 6016x4016, Official 6000x4000
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "LEICA M8",
|
||||
"dcraw_matrix": [ 7675, -2196, -305, -5860, 14119, 1855, -2425, 4006, 6578 ] // DNG
|
||||
// Do not set white level, probably special handling by dcraw (see #6237)
|
||||
},
|
||||
// TODO: Temporary workaround for issues #6237 and #6498.
|
||||
//{ // Quality C
|
||||
// "make_model": "LEICA M8",
|
||||
// "dcraw_matrix": [ 7675, -2196, -305, -5860, 14119, 1855, -2425, 4006, 6578 ], // DNG
|
||||
// "ranges": { "white": 16383 }
|
||||
//},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "LEICA Q2",
|
||||
@ -1570,7 +1634,7 @@ Camera constants:
|
||||
|
||||
{ // Quality C, only raw crop
|
||||
"make_model": "Leica SL2-S",
|
||||
"raw_crop": [ 0, 2, 6024, 4042 ] // 2 rows at top and 4 rows at bottom are black
|
||||
"raw_crop": [ 0, 2, 0, -4 ] // 2 rows at top and 4 rows at bottom are garbage
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
@ -1634,8 +1698,8 @@ Camera constants:
|
||||
"dcraw_matrix": [ 10230, -2768, -1255, -8302, 15900, 2551, -797, 680, 7148 ] // DNG
|
||||
},
|
||||
|
||||
// For all Nikon DSLRs which have multiple bitdepth options (14- and 12-bit) we define the 14-bit value and RT adapts it to 12-bit
|
||||
// when a 12-bit bitdepth is detected (WL12 = WL14*4095/16383)
|
||||
// For all Nikon DSLRs which have multiple bitdepth options (14- and 12-bit) we define the 14-bit value and RT adapts it to 12-bit
|
||||
// when a 12-bit bitdepth is detected (WL12 = WL14*4095/16383)
|
||||
|
||||
{ // Quality B, samples by Johan Thor at RT.Issues, measures at long exposures with LENR are missing
|
||||
// but a safety margin is included - aperture scaling makes no significant difference
|
||||
@ -2129,7 +2193,8 @@ Camera constants:
|
||||
|
||||
{ // Quality C
|
||||
"make_model": [ "Panasonic DC-G90", "Panasonic DC-G95", "Panasonic DC-G99" ],
|
||||
"dcraw_matrix": [ 9657, -3963, -748, -3361, 11378, 2258, -568, 1414, 5158 ] // DNG
|
||||
"dcraw_matrix": [ 9657, -3963, -748, -3361, 11378, 2258, -568, 1414, 5158 ], // DNG
|
||||
"ranges": { "black": 15 } // see above: RT already reads a value from exif
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
@ -2253,8 +2318,7 @@ Camera constants:
|
||||
"dcraw_matrix": [ 12194, -5340, -1329, -3035, 11394, 1858, -50, 1418, 5219 ] // DNG
|
||||
},
|
||||
|
||||
|
||||
// Panasonic DMC-FZ150,G10,G1,G2,G3,G5,GF1,GF2,GF3 are included as overwrites of the same items of rawimage.cc to test the dcraw9.21 patch
|
||||
// Panasonic DMC-FZ150,G10,G1,G2,G3,G5,GF1,GF2,GF3 are included as overwrites of the same items of rawimage.cc to test the dcraw9.21 patch
|
||||
|
||||
{ // Quality A, Replicated from rawimage.cc
|
||||
"make_model": [ "Panasonic DMC-G10", "Panasonic DMC-G2" ],
|
||||
@ -2932,6 +2996,11 @@ Camera constants:
|
||||
"pdaf_offset" : 9
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "Sony ILCE-7M4",
|
||||
"dcraw_matrix": [ 7460, -2365, -588, -5687, 13442, 2474, -624, 1156, 6584 ] // ColorMatrix2 using illuminant D65 from Adobe DNG Converter 14.2
|
||||
},
|
||||
|
||||
{ // Quality C,
|
||||
"make_model": "Sony ILCE-7RM3",
|
||||
"dcraw_matrix": [ 6640,-1847,-503,-5238,13010,2474,-993,1673,6526 ], // DNG v13.2
|
||||
@ -2962,7 +3031,10 @@ Camera constants:
|
||||
{ // Quality B, correction for frame width
|
||||
"make_model": [ "Sony ILCE-7S", "Sony ILCE-7SM2" ],
|
||||
"dcraw_matrix": [ 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 ], // DNG_v9.2 D65
|
||||
"raw_crop": [ 0, 0, 4254, 2848 ],
|
||||
"raw_crop" : [
|
||||
{ "frame" : [ 2816, 1872 ], "crop" : [ 0, 0, 2792, 1872 ] },
|
||||
{ "frame" : [ 4254, 2848 ], "crop" : [ 0, 0, 4254, 2848 ] }
|
||||
],
|
||||
"ranges": { "black": 512, "white": 16300 }
|
||||
},
|
||||
|
||||
|
@ -25,6 +25,19 @@
|
||||
#undef CLIPD
|
||||
#define CLIPD(a) ((a)>0.f?((a)<1.f?(a):1.f):0.f)
|
||||
#define MAXR(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define Jzazbz_b 1.15
|
||||
#define Jzazbz_g 0.66
|
||||
#define Jzazbz_c1 (3424/4096.0)
|
||||
#define Jzazbz_c2 (2413/128.0)
|
||||
#define Jzazbz_c3 (2392/128.0)
|
||||
#define Jzazbz_n (2610/16384.0)
|
||||
#define Jzazbz_p (1.7*2523/32.0)
|
||||
#define Jzazbz_d (-0.56)
|
||||
#define Jzazbz_d0 (1.6295499532821566e-11)
|
||||
#define Jzazbz_ni (16384.0/2610.0)
|
||||
#define Jzazbz_pi (32.0/4289.1) //4289.1 = 2523 * 1.7
|
||||
|
||||
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
@ -67,10 +80,12 @@ void Ciecam02::curveJfloat (float br, float contr, float thr, const LUTu & histo
|
||||
brightcurvePoints[5] = 0.7f; // shoulder point
|
||||
brightcurvePoints[6] = min (1.0f, 0.7f + br / 300.0f); //value at shoulder point
|
||||
} else {
|
||||
brightcurvePoints[3] = 0.1f - br / 150.0f; // toe point
|
||||
brightcurvePoints[3] = max(0.0, 0.1 - (double) br / 150.0); // toe point
|
||||
// brightcurvePoints[3] = 0.1f - br / 150.0f; // toe point
|
||||
brightcurvePoints[4] = 0.1f; // value at toe point
|
||||
|
||||
brightcurvePoints[5] = min (1.0f, 0.7f - br / 300.0f); // shoulder point
|
||||
// brightcurvePoints[5] = min (1.0f, 0.7f - br / 300.0f); // shoulder point
|
||||
brightcurvePoints[5] = 0.7f - br / 300.0f; // shoulder point
|
||||
brightcurvePoints[6] = 0.7f; // value at shoulder point
|
||||
}
|
||||
|
||||
@ -109,6 +124,7 @@ void Ciecam02::curveJfloat (float br, float contr, float thr, const LUTu & histo
|
||||
}
|
||||
|
||||
avg /= sum;
|
||||
// printf("avg=%f \n", (double) avg);
|
||||
float thrmin = (thr - contr / 250.0f);
|
||||
float thrmax = (thr + contr / 250.0f);
|
||||
|
||||
@ -184,14 +200,14 @@ float Ciecam02::calculate_fl_from_la_ciecam02float ( float la )
|
||||
return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt (la5));
|
||||
}
|
||||
|
||||
float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int c16)
|
||||
float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int c16, float plum)
|
||||
{
|
||||
float r, g, b;
|
||||
float rc, gc, bc;
|
||||
float rp, gp, bp;
|
||||
float rpa, gpa, bpa;
|
||||
// gamu = 1;
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16);
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16, plum);
|
||||
|
||||
rc = r * (((y * d) / r) + (1.0f - d));
|
||||
gc = g * (((y * d) / g) + (1.0f - d));
|
||||
@ -216,71 +232,253 @@ float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, f
|
||||
return ((2.0f * rpa) + gpa + ((1.0f / 20.0f) * bpa) - 0.305f) * nbb;
|
||||
}
|
||||
|
||||
void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16)
|
||||
{
|
||||
void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16, float plum)
|
||||
{ //I use isnan() because I have tested others solutions with std::max(xxx,0) and in some cases crash
|
||||
//original cat02
|
||||
//r = ( 0.7328 * x) + (0.4296 * y) - (0.1624 * z);
|
||||
//g = (-0.7036 * x) + (1.6975 * y) + (0.0061 * z);
|
||||
//b = ( 0.0000 * x) + (0.0000 * y) + (1.0000 * z);
|
||||
float peakLum = 1.f/ plum;
|
||||
if(c16 == 1) {//cat02
|
||||
r = ( 1.007245f * x) + (0.011136f * y) - (0.018381f * z); //Changjun Li
|
||||
g = (-0.318061f * x) + (1.314589f * y) + (0.003471f * z);
|
||||
b = ( 0.0000f * x) + (0.0000f * y) + (1.0000f * z);
|
||||
} else {//cat16
|
||||
} else if (c16 == 16) {//cat16
|
||||
r = ( 0.401288f * x) + (0.650173f * y) - (0.051461f * z); //cat16
|
||||
g = (-0.250268f * x) + (1.204414f * y) + (0.045854f * z);
|
||||
b = ( -0.002079f * x) + (0.048952f * y) + (0.953127f * z);
|
||||
} else if (c16 == 21) {//cam16 PQ
|
||||
float rp = ( 0.401288f * x) + (0.650173f * y) - (0.051461f * z); //cat16
|
||||
float gp = (-0.250268f * x) + (1.204414f * y) + (0.045854f * z);
|
||||
float bp = ( -0.002079f * x) + (0.048952f * y) + (0.953127f * z);
|
||||
rp *= 0.01f;
|
||||
gp *= 0.01f;
|
||||
bp *= 0.01f;
|
||||
float tmp = pow_F(rp * peakLum, Jzazbz_n);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.f;
|
||||
}
|
||||
r = 100.f * pow((Jzazbz_c1 + Jzazbz_c2 * tmp) / (1. + Jzazbz_c3 * tmp), Jzazbz_p);
|
||||
if(std::isnan(r) || r < 0.f) {
|
||||
r = 0.f;
|
||||
}
|
||||
|
||||
tmp = pow_F(gp * peakLum, Jzazbz_n);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.f;
|
||||
}
|
||||
g = 100.f * pow((Jzazbz_c1 + Jzazbz_c2 * tmp) / (1. + Jzazbz_c3 * tmp), Jzazbz_p);
|
||||
if(std::isnan(g) || g < 0.f) {
|
||||
g = 0.f;
|
||||
}
|
||||
tmp = pow_F(bp * peakLum, Jzazbz_n);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.f;
|
||||
}
|
||||
|
||||
b = 100.f * pow((Jzazbz_c1 + Jzazbz_c2 * tmp) / (1. + Jzazbz_c3 * tmp), Jzazbz_p);
|
||||
if(std::isnan(b) || b < 0.f) {
|
||||
b = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z, int c16)
|
||||
{
|
||||
void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z, int c16, vfloat plum)
|
||||
{ //I use isnan() because I have tested others solutions with std::max(xxx,0) and in some cases crash
|
||||
//gamut correction M.H.Brill S.Susstrunk
|
||||
if(c16 == 1) {
|
||||
r = ( F2V (1.007245f) * x) + (F2V (0.011136f) * y) - (F2V (0.018381f) * z); //Changjun Li
|
||||
g = (F2V (-0.318061f) * x) + (F2V (1.314589f) * y) + (F2V (0.003471f) * z);
|
||||
b = z;
|
||||
} else {
|
||||
} else if (c16 == 16) {
|
||||
//cat16
|
||||
r = ( F2V (0.401288f) * x) + (F2V (0.650173f) * y) - (F2V (0.051461f) * z); //Changjun Li
|
||||
r = ( F2V (0.401288f) * x) + (F2V (0.650173f) * y) - (F2V (0.051461f) * z);
|
||||
g = -(F2V (0.250268f) * x) + (F2V (1.204414f) * y) + (F2V (0.045854f) * z);
|
||||
b = -(F2V(0.002079f) * x) + (F2V(0.048952f) * y) + (F2V(0.953127f) * z);
|
||||
} else if (c16 == 21) {
|
||||
vfloat rp = ( F2V (0.401288f) * x) + (F2V (0.650173f) * y) - (F2V (0.051461f) * z);
|
||||
vfloat gp = -(F2V (0.250268f) * x) + (F2V (1.204414f) * y) + (F2V (0.045854f) * z);
|
||||
vfloat bp = -(F2V(0.002079f) * x) + (F2V(0.048952f) * y) + (F2V(0.953127f) * z);
|
||||
vfloat Jzazbz_c1v = F2V(Jzazbz_c1);
|
||||
vfloat Jzazbz_c2v = F2V(Jzazbz_c2);
|
||||
vfloat Jzazbz_nv = F2V(Jzazbz_n);
|
||||
vfloat Jzazbz_c3v = F2V(Jzazbz_c3);
|
||||
vfloat Jzazbz_pv = F2V(Jzazbz_p);
|
||||
vfloat mulone = F2V(0.01f);
|
||||
vfloat mulhund = F2V(100.f);
|
||||
float RR, GG, BB;
|
||||
vfloat one = F2V(1.);
|
||||
vfloat peakLumv = one / plum;
|
||||
rp *= mulone;
|
||||
gp *= mulone;
|
||||
bp *= mulone;
|
||||
vfloat tmp = pow_F(rp * peakLumv, Jzazbz_nv );
|
||||
STVF(RR, tmp);
|
||||
if(std::isnan(RR)) {//to avoid crash
|
||||
tmp = F2V(0.f);;
|
||||
}
|
||||
r = mulhund * pow_F((Jzazbz_c1v + Jzazbz_c2v * tmp) / (one + Jzazbz_c3v * tmp), Jzazbz_pv);
|
||||
STVF(RR, r);
|
||||
if(std::isnan(RR) || RR < 0.f) {//to avoid crash
|
||||
r = F2V(0.f);;
|
||||
}
|
||||
tmp = pow_F(gp * peakLumv, Jzazbz_nv );
|
||||
STVF(RR, tmp);
|
||||
if(std::isnan(RR)) {//to avoid crash
|
||||
tmp = F2V(0.f);;
|
||||
}
|
||||
|
||||
g = mulhund * pow_F((Jzazbz_c1v + Jzazbz_c2v * tmp) / (one + Jzazbz_c3v * tmp), Jzazbz_pv);
|
||||
STVF(GG, g);
|
||||
if(std::isnan(GG) || GG < 0.f) {//to avoid crash
|
||||
g = F2V(0.f);;
|
||||
}
|
||||
|
||||
tmp = pow_F(bp * peakLumv, Jzazbz_nv );
|
||||
STVF(RR, tmp);
|
||||
if(std::isnan(RR)) {//to avoid crash
|
||||
tmp = F2V(0.f);;
|
||||
}
|
||||
|
||||
b = mulhund * pow_F((Jzazbz_c1v + Jzazbz_c2v * tmp) / (one + Jzazbz_c3v * tmp), Jzazbz_pv);
|
||||
STVF(BB, b);
|
||||
if(std::isnan(BB) || BB < 0.f) {//to avoid crash
|
||||
b = F2V(0.f);;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16)
|
||||
{
|
||||
void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16, float plum)
|
||||
{ //I use isnan() because I have tested others solutions with std::max(xxx,0) and in some cases crash
|
||||
//original cat02
|
||||
//x = ( 1.0978566 * r) - (0.277843 * g) + (0.179987 * b);
|
||||
//y = ( 0.455053 * r) + (0.473938 * g) + (0.0710096* b);
|
||||
//z = ( 0.000000 * r) - (0.000000 * g) + (1.000000 * b);
|
||||
float pl = plum;
|
||||
if(c16 == 1) {
|
||||
x = ( 0.99015849f * r) - (0.00838772f * g) + (0.018229217f * b); //Changjun Li
|
||||
y = ( 0.239565979f * r) + (0.758664642f * g) + (0.001770137f * b);
|
||||
z = ( 0.000000f * r) - (0.000000f * g) + (1.000000f * b);
|
||||
} else {//cat16
|
||||
} else if(c16 == 16){//cat16
|
||||
x = ( 1.86206786f * r) - (1.01125463f * g) + (0.14918677f * b); //Cat16
|
||||
y = ( 0.38752654f * r) + (0.62144744f * g) + (-0.00897398f * b);
|
||||
z = ( -0.0158415f * r) - (0.03412294f * g) + (1.04996444f * b);
|
||||
}else if(c16 == 21){//cam16 PQ
|
||||
float lp = ( 1.86206786f * r) - (1.01125463f * g) + (0.14918677f * b); //Cat16
|
||||
float mp = ( 0.38752654f * r) + (0.62144744f * g) + (-0.00897398f * b);
|
||||
float sp = ( -0.0158415f * r) - (0.03412294f * g) + (1.04996444f * b);
|
||||
lp *= 0.01f;
|
||||
float tmp = pow_F(lp, Jzazbz_pi);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.f;
|
||||
}
|
||||
|
||||
float prov = (Jzazbz_c1 - tmp) / ((Jzazbz_c3 * tmp) - Jzazbz_c2);
|
||||
x = pl * pow_F(prov, Jzazbz_ni);
|
||||
if(std::isnan(x)) {//to avoid crash
|
||||
x = 0.f;
|
||||
}
|
||||
x *= 100.f;
|
||||
mp *= 0.01f;
|
||||
tmp = pow_F(mp, Jzazbz_pi);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.f;
|
||||
}
|
||||
prov = (Jzazbz_c1 - tmp) / ((Jzazbz_c3 * tmp) - Jzazbz_c2);
|
||||
y = pl * pow_F(prov, Jzazbz_ni);
|
||||
if(std::isnan(y)) {
|
||||
y = 0.f;
|
||||
}
|
||||
y *= 100.f;
|
||||
sp *= 0.01f;
|
||||
tmp = pow_F(sp, Jzazbz_pi);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.f;
|
||||
}
|
||||
prov = (Jzazbz_c1 - tmp) / ((Jzazbz_c3 * tmp) - Jzazbz_c2);
|
||||
z = pl * pow_F(prov, Jzazbz_ni);
|
||||
if(std::isnan(z)) {
|
||||
z = 0.;
|
||||
}
|
||||
z *= 100.f;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16 )
|
||||
{
|
||||
void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16, vfloat plum )
|
||||
{ //I use isnan() because I have tested others solutions with std::max(xxx,0) and in some cases crash
|
||||
vfloat plv = plum;
|
||||
//gamut correction M.H.Brill S.Susstrunk
|
||||
if(c16 == 1) {//cat02
|
||||
x = ( F2V (0.99015849f) * r) - (F2V (0.00838772f) * g) + (F2V (0.018229217f) * b); //Changjun Li
|
||||
y = ( F2V (0.239565979f) * r) + (F2V (0.758664642f) * g) + (F2V (0.001770137f) * b);
|
||||
z = b;
|
||||
} else {
|
||||
} else if(c16 == 16) {
|
||||
//cat16
|
||||
x = ( F2V (1.86206786f) * r) - (F2V (1.01125463f) * g) + (F2V (0.14918677f) * b);
|
||||
y = ( F2V (0.38752654f) * r) + (F2V (0.621447744f) * g) - (F2V (0.00897398f) * b);
|
||||
z = -(F2V(0.0158415f) * r) - (F2V(0.03412294f) * g) + (F2V(1.04996444f) * b);
|
||||
}else if(c16 == 21){//cam16 PQ
|
||||
vfloat lp = ( F2V (1.86206786f) * r) - (F2V (1.01125463f) * g) + (F2V (0.14918677f) * b);
|
||||
vfloat mp = ( F2V (0.38752654f) * r) + (F2V (0.621447744f) * g) - (F2V (0.00897398f) * b);
|
||||
vfloat sp = -(F2V(0.0158415f) * r) - (F2V(0.03412294f) * g) + (F2V(1.04996444f) * b);
|
||||
float XX,YY,ZZ;
|
||||
vfloat Jzazbz_c1v = F2V(Jzazbz_c1);
|
||||
vfloat Jzazbz_c2v = F2V(Jzazbz_c2);
|
||||
vfloat Jzazbz_c3v = F2V(Jzazbz_c3);
|
||||
vfloat Jzazbz_piv = F2V(Jzazbz_pi);
|
||||
vfloat Jzazbz_niv = F2V(Jzazbz_ni);
|
||||
vfloat mulone = F2V(0.01f);
|
||||
vfloat mulhund = F2V(100.f);
|
||||
lp *= mulone;
|
||||
float pro;
|
||||
vfloat tmp = pow_F(lp, Jzazbz_piv);
|
||||
STVF(XX, tmp);
|
||||
if(std::isnan(XX)) {//to avoid crash
|
||||
tmp = F2V(0.f);;
|
||||
}
|
||||
vfloat prov = (Jzazbz_c1v - tmp) / ((Jzazbz_c3v * tmp) - Jzazbz_c2v);
|
||||
x = plv * pow_F(prov, Jzazbz_niv);
|
||||
STVF(XX, x);
|
||||
if(std::isnan(XX)) {//to avoid crash
|
||||
x = F2V(0.f);;
|
||||
}
|
||||
x *= mulhund;
|
||||
mp *= mulone;
|
||||
tmp = pow_F(mp, Jzazbz_piv);
|
||||
STVF(YY, tmp);
|
||||
if(std::isnan(YY)) {//to avoid crash
|
||||
tmp = F2V(0.f);;
|
||||
}
|
||||
prov = (Jzazbz_c1v - tmp) / ((Jzazbz_c3v * tmp) - Jzazbz_c2v);
|
||||
y = plv * pow_F(prov, Jzazbz_niv);
|
||||
STVF(YY, y);
|
||||
if(std::isnan(YY)) {//to avoid crash
|
||||
y = F2V(0.f);;
|
||||
}
|
||||
y *= mulhund;
|
||||
sp *= mulone;
|
||||
tmp = pow_F(sp, Jzazbz_piv);
|
||||
STVF(ZZ, tmp);
|
||||
if(std::isnan(ZZ)) {//to avoid crash
|
||||
tmp = F2V(0.f);;
|
||||
}
|
||||
prov = (Jzazbz_c1v - tmp) / ((Jzazbz_c3v * tmp) - Jzazbz_c2v);
|
||||
STVF(pro, prov);
|
||||
z = plv * pow_F(prov, Jzazbz_niv);
|
||||
STVF(ZZ, z);
|
||||
if(std::isnan(ZZ)) {//to avoid crash
|
||||
z = F2V(0.f);;
|
||||
}
|
||||
z *= mulhund;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -429,7 +627,7 @@ void Ciecam02::calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, v
|
||||
#endif
|
||||
|
||||
void Ciecam02::initcam1float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb,
|
||||
float &cz, float &aw, float &wh, float &pfl, float &fl, float c, int c16)
|
||||
float &cz, float &aw, float &wh, float &pfl, float &fl, float c, int c16, float plum)
|
||||
{
|
||||
n = yb / yw;
|
||||
|
||||
@ -442,13 +640,13 @@ void Ciecam02::initcam1float (float yb, float pilotd, float f, float la, float x
|
||||
fl = calculate_fl_from_la_ciecam02float ( la );
|
||||
nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f );
|
||||
cz = 1.48f + sqrt ( n );
|
||||
aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, c16);
|
||||
aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, c16, plum);
|
||||
wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F ( fl, 0.25f );
|
||||
pfl = pow_F ( fl, 0.25f );
|
||||
}
|
||||
|
||||
void Ciecam02::initcam2float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb,
|
||||
float &cz, float &aw, float &fl, int c16)
|
||||
float &cz, float &aw, float &fl, int c16, float plum)
|
||||
{
|
||||
n = yb / yw;
|
||||
|
||||
@ -462,12 +660,135 @@ void Ciecam02::initcam2float (float yb, float pilotd, float f, float la, float x
|
||||
fl = calculate_fl_from_la_ciecam02float ( la );
|
||||
nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f );
|
||||
cz = 1.48f + sqrt ( n );
|
||||
aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, c16);
|
||||
aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, c16, plum);
|
||||
}
|
||||
|
||||
|
||||
void Ciecam02::xyz2jzczhz ( double &Jz, double &az, double &bz, double x, double y, double z, double pl, double &Lp, double &Mp, double &Sp, bool zcam)
|
||||
{ //from various web
|
||||
double Xp, Yp, Zp, L, M, S, Iz;
|
||||
double peakLum = 1. / pl;
|
||||
//I change 10000 for peaklum function of la (absolute luminance)- default 10000
|
||||
Xp = Jzazbz_b * x - ((Jzazbz_b - 1.) * z);
|
||||
Yp = Jzazbz_g * y - ((Jzazbz_g - 1.) * x);
|
||||
Zp = z;
|
||||
|
||||
L = 0.41478972 * Xp + 0.579999 * Yp + 0.0146480 * Zp;
|
||||
M = -0.2015100 * Xp + 1.120649 * Yp + 0.0531008 * Zp;
|
||||
S = -0.0166008 * Xp + 0.264800 * Yp + 0.6684799 * Zp;
|
||||
|
||||
//I use isnan() because I have tested others solutions with std::max(xxx,0) and in some cases crash
|
||||
// Lp = pow((Jzazbz_c1 + Jzazbz_c2 * pow(std::max((L * peakLum), 0.), Jzazbz_n)) / (1. + Jzazbz_c3 * pow((L * peakLum), Jzazbz_n)), Jzazbz_p);
|
||||
// Mp = pow((Jzazbz_c1 + Jzazbz_c2 * pow(std::max((M * peakLum),0.), Jzazbz_n)) / (1. + Jzazbz_c3 * pow((M * peakLum), Jzazbz_n)), Jzazbz_p);
|
||||
// Sp = pow((Jzazbz_c1 + Jzazbz_c2 * pow(std::max((S * peakLum), 0.), Jzazbz_n)) / (1. + Jzazbz_c3 * pow((S * peakLum), Jzazbz_n)), Jzazbz_p);
|
||||
double temp = pow(L * peakLum, Jzazbz_n);
|
||||
if(std::isnan(temp)) {//to avoid crash
|
||||
temp = 0.;
|
||||
}
|
||||
Lp = pow((Jzazbz_c1 + Jzazbz_c2 * temp) / (1. + Jzazbz_c3 * temp), Jzazbz_p);
|
||||
if(std::isnan(Lp)) {//to avoid crash
|
||||
Lp = 0.;
|
||||
}
|
||||
|
||||
temp = pow(M * peakLum, Jzazbz_n);
|
||||
if(std::isnan(temp)) {//to avoid crash
|
||||
temp = 0.;
|
||||
}
|
||||
Mp = pow((Jzazbz_c1 + Jzazbz_c2 * temp) / (1. + Jzazbz_c3 * temp), Jzazbz_p);
|
||||
if(std::isnan(Mp)) {//to avoid crash
|
||||
Mp = 0.;
|
||||
}
|
||||
|
||||
temp = pow(S * peakLum, Jzazbz_n);
|
||||
if(std::isnan(temp)) {//to avoid crash
|
||||
temp = 0.;
|
||||
}
|
||||
Sp = pow((Jzazbz_c1 + Jzazbz_c2 * temp) / (1. + Jzazbz_c3 * temp), Jzazbz_p);
|
||||
if(std::isnan(Sp)) {//to avoid crash
|
||||
Sp = 0.;
|
||||
}
|
||||
|
||||
Iz = 0.5 * Lp + 0.5 * Mp;
|
||||
az = 3.524000 * Lp - 4.066708 * Mp + 0.542708 * Sp;
|
||||
bz = 0.199076 * Lp + 1.096799 * Mp - 1.295875 * Sp;
|
||||
if(!zcam) {
|
||||
Jz = (((1. + Jzazbz_d) * Iz) / (1. + Jzazbz_d * Iz)) - Jzazbz_d0;
|
||||
// Jz = std::max((((1. + Jzazbz_d) * Iz) / (1. + Jzazbz_d * Iz)) - Jzazbz_d0, 0.);
|
||||
} else {
|
||||
//or if we use ZCAM Jz = Mp - Jzazbz_d0
|
||||
Jz = Mp - Jzazbz_d0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Ciecam02::jzczhzxyz (double &x, double &y, double &z, double jz, double az, double bz, double pl, double &L, double &M, double &S, bool zcam)
|
||||
{ //from various web
|
||||
//I use isnan() because I have tested others solutions with std::max(xxx,0) and in some cases crash
|
||||
|
||||
double Xp, Yp, Zp, Lp, Mp, Sp, Iz, tmp;
|
||||
|
||||
if(!zcam) {
|
||||
// Iz = std::max((jz + Jzazbz_d0) / (1. + Jzazbz_d - Jzazbz_d * (jz + Jzazbz_d0)), 0.);
|
||||
Iz = (jz + Jzazbz_d0) / (1. + Jzazbz_d - Jzazbz_d * (jz + Jzazbz_d0));
|
||||
} else {
|
||||
//or if we use ZCAM Iz = Jz + Jzazbz_d0
|
||||
Iz = jz + Jzazbz_d0;
|
||||
}
|
||||
|
||||
Lp = Iz + 0.138605043271539 * az + 0.0580473161561189 * bz;
|
||||
Mp = Iz - 0.138605043271539 * az - 0.0580473161561189 * bz;
|
||||
Sp = Iz - 0.0960192420263189 * az - 0.811891896056039 * bz;
|
||||
//I change optionally 10000 for pl function of la(absolute luminance) default 10000
|
||||
|
||||
tmp = pow(Lp, Jzazbz_pi);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.;
|
||||
}
|
||||
L = pl * pow((Jzazbz_c1 - tmp) / ((Jzazbz_c3 * tmp) - Jzazbz_c2), Jzazbz_ni);
|
||||
if(std::isnan(L)) {//to avoid crash
|
||||
L = 0.;
|
||||
}
|
||||
|
||||
tmp = pow(Mp, Jzazbz_pi);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.;
|
||||
}
|
||||
M = pl * pow((Jzazbz_c1 - tmp) / ((Jzazbz_c3 * tmp) - Jzazbz_c2), Jzazbz_ni);
|
||||
if(std::isnan(M)) {//to avoid crash
|
||||
M = 0.;
|
||||
}
|
||||
|
||||
tmp = pow(Sp, Jzazbz_pi);
|
||||
if(std::isnan(tmp)) {//to avoid crash
|
||||
tmp = 0.;
|
||||
}
|
||||
S = pl * pow((Jzazbz_c1 - tmp) / ((Jzazbz_c3 * tmp) - Jzazbz_c2), Jzazbz_ni);
|
||||
if(std::isnan(S)) {//to avoid crash
|
||||
S = 0.;
|
||||
}
|
||||
|
||||
Xp = 1.9242264357876067 * L - 1.0047923125953657 * M + 0.0376514040306180 * S;
|
||||
Yp = 0.3503167620949991 * L + 0.7264811939316552 * M - 0.0653844229480850 * S;
|
||||
Zp = -0.0909828109828475 * L - 0.3127282905230739 * M + 1.5227665613052603 * S;
|
||||
|
||||
x = (Xp + (Jzazbz_b - 1.) * Zp) / Jzazbz_b;
|
||||
|
||||
if(std::isnan(x)) {//to avoid crash
|
||||
x = 0.;
|
||||
}
|
||||
y = (Yp + (Jzazbz_g - 1.) * x) / Jzazbz_g;
|
||||
if(std::isnan(y)) {
|
||||
y = 0.;
|
||||
}
|
||||
z = Zp;
|
||||
if(std::isnan(z)) {
|
||||
z = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh,
|
||||
float x, float y, float z, float xw, float yw, float zw,
|
||||
float c, float nc, float pow1, float nbb, float ncb, float pfl, float cz, float d, int c16)
|
||||
float c, float nc, float pow1, float nbb, float ncb, float pfl, float cz, float d, int c16, float plum)
|
||||
|
||||
{
|
||||
float r, g, b;
|
||||
@ -478,8 +799,8 @@ void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q
|
||||
float a, ca, cb;
|
||||
float e, t;
|
||||
float myh;
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16);
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16, plum);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16, plum);
|
||||
rc = r * (((yw * d) / rw) + (1.f - d));
|
||||
gc = g * (((yw * d) / gw) + (1.f - d));
|
||||
bc = b * (((yw * d) / bw) + (1.f - d));
|
||||
@ -530,7 +851,7 @@ void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh,
|
||||
vfloat x, vfloat y, vfloat z, vfloat xw, vfloat yw, vfloat zw,
|
||||
vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d, int c16)
|
||||
vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d, int c16, vfloat plum)
|
||||
|
||||
{
|
||||
vfloat r, g, b;
|
||||
@ -541,8 +862,8 @@ void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloa
|
||||
vfloat a, ca, cb;
|
||||
vfloat e, t;
|
||||
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16);
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16, plum);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16, plum);
|
||||
vfloat onev = F2V (1.f);
|
||||
rc = r * (((yw * d) / rw) + (onev - d));
|
||||
gc = g * (((yw * d) / gw) + (onev - d));
|
||||
@ -595,7 +916,7 @@ void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloa
|
||||
|
||||
void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, float fl,
|
||||
float x, float y, float z, float xw, float yw, float zw,
|
||||
float c, float nc, float pow1, float nbb, float ncb, float cz, float d, int c16)
|
||||
float c, float nc, float pow1, float nbb, float ncb, float cz, float d, int c16, float plum)
|
||||
|
||||
{
|
||||
float r, g, b;
|
||||
@ -606,8 +927,8 @@ void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, f
|
||||
float a, ca, cb;
|
||||
float e, t;
|
||||
float myh;
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16);
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16, plum);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16, plum);
|
||||
rc = r * (((yw * d) / rw) + (1.f - d));
|
||||
gc = g * (((yw * d) / gw) + (1.f - d));
|
||||
bc = b * (((yw * d) / bw) + (1.f - d));
|
||||
@ -664,7 +985,7 @@ void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, f
|
||||
|
||||
void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, float C, float h,
|
||||
float xw, float yw, float zw,
|
||||
float c, float nc, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw, int c16)
|
||||
float c, float nc, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw, int c16, float plum)
|
||||
{
|
||||
float r, g, b;
|
||||
float rc, gc, bc;
|
||||
@ -673,7 +994,7 @@ void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, fl
|
||||
float rw, gw, bw;
|
||||
float a, ca, cb;
|
||||
float e, t;
|
||||
xyz_to_cat02float(rw, gw, bw, xw, yw, zw, c16);
|
||||
xyz_to_cat02float(rw, gw, bw, xw, yw, zw, c16, plum);
|
||||
e = ((961.53846f) * nc * ncb) * (xcosf(h * rtengine::RT_PI_F_180 + 2.0f) + 3.8f);
|
||||
|
||||
#ifdef __SSE2__
|
||||
@ -705,7 +1026,7 @@ void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, fl
|
||||
|
||||
if(c16 == 1) {//cat02
|
||||
hpe_to_xyzfloat(x, y, z, rp, gp, bp, c16);
|
||||
xyz_to_cat02float(rc, gc, bc, x, y, z, c16);
|
||||
xyz_to_cat02float(rc, gc, bc, x, y, z, c16, plum);
|
||||
|
||||
r = rc / (((yw * d) / rw) + (1.0f - d));
|
||||
g = gc / (((yw * d) / gw) + (1.0f - d));
|
||||
@ -716,13 +1037,13 @@ void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, fl
|
||||
b = bp / (((yw * d) / bw) + (1.0f - d));
|
||||
}
|
||||
|
||||
cat02_to_xyzfloat(x, y, z, r, g, b, c16);
|
||||
cat02_to_xyzfloat(x, y, z, r, g, b, c16, plum);
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h,
|
||||
vfloat xw, vfloat yw, vfloat zw,
|
||||
vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz, int c16)
|
||||
vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz, int c16, vfloat plum)
|
||||
{
|
||||
vfloat r, g, b;
|
||||
vfloat rc, gc, bc;
|
||||
@ -731,7 +1052,7 @@ void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J
|
||||
vfloat rw, gw, bw;
|
||||
vfloat a, ca, cb;
|
||||
vfloat e, t;
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16, plum);
|
||||
e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)) + F2V (2.0f) ) + F2V (3.8f));
|
||||
a = pow_F ( J / F2V (100.0f), reccmcz ) * aw;
|
||||
t = pow_F ( F2V (10.f) * C / (vsqrtf ( J ) * pow1), F2V (1.1111111f) );
|
||||
@ -745,7 +1066,7 @@ void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J
|
||||
|
||||
if(c16 == 1) {//cat02
|
||||
hpe_to_xyzfloat ( x, y, z, rp, gp, bp, c16);
|
||||
xyz_to_cat02float ( rc, gc, bc, x, y, z, c16 );
|
||||
xyz_to_cat02float ( rc, gc, bc, x, y, z, c16, plum );
|
||||
|
||||
r = rc / (((yw * d) / rw) + (F2V (1.0f) - d));
|
||||
g = gc / (((yw * d) / gw) + (F2V (1.0f) - d));
|
||||
@ -756,7 +1077,7 @@ void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J
|
||||
b = bp / (((yw * d) / bw) + (F2V (1.0f) - d));
|
||||
}
|
||||
|
||||
cat02_to_xyzfloat ( x, y, z, r, g, b, c16 );
|
||||
cat02_to_xyzfloat ( x, y, z, r, g, b, c16, plum );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -37,12 +37,12 @@ class Ciecam02
|
||||
private:
|
||||
static float d_factorfloat ( float f, float la );
|
||||
static float calculate_fl_from_la_ciecam02float ( float la );
|
||||
static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int c16);
|
||||
static void xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16);
|
||||
static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int c16, float plum);
|
||||
static void xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16, float plum);
|
||||
static void cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b, int c16);
|
||||
|
||||
#ifdef __SSE2__
|
||||
static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z, int c16);
|
||||
static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z, int c16, vfloat plum);
|
||||
static void cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b, int c16);
|
||||
static vfloat nonlinear_adaptationfloat ( vfloat c, vfloat fl );
|
||||
#endif
|
||||
@ -53,13 +53,13 @@ private:
|
||||
static void calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a );
|
||||
static void Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb );
|
||||
static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16);
|
||||
static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16);
|
||||
static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16, float plum);
|
||||
#ifdef __SSE2__
|
||||
static vfloat inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl );
|
||||
static void calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a );
|
||||
static void Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb );
|
||||
static void hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16);
|
||||
static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16);
|
||||
static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16, vfloat plum);
|
||||
#endif
|
||||
|
||||
public:
|
||||
@ -67,46 +67,52 @@ public:
|
||||
static void curvecolorfloat (float satind, float satval, float &sres, float parsat);
|
||||
static void curveJfloat (float br, float contr, float thr, const LUTu & histogram, LUTf & outCurve ) ;
|
||||
|
||||
static void xyz2jzczhz (double &Jz, double &az, double &bz, double x, double y, double z, double pl, double &Lp, double &Mp, double &Sp, bool zcam);
|
||||
|
||||
static void jzczhzxyz (double &x, double &y, double &z, double Jz, double az, double bz, double pl, double &L, double &M, double &S, bool zcam);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Inverse transform from CIECAM02 JCh to XYZ.
|
||||
*/
|
||||
static void jch2xyz_ciecam02float ( float &x, float &y, float &z,
|
||||
float J, float C, float h,
|
||||
float xw, float yw, float zw,
|
||||
float c, float nc, float n, float nbb, float ncb, float fl, float cz, float d, float aw, int c16);
|
||||
float c, float nc, float n, float nbb, float ncb, float fl, float cz, float d, float aw, int c16, float plum);
|
||||
#ifdef __SSE2__
|
||||
static void jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z,
|
||||
vfloat J, vfloat C, vfloat h,
|
||||
vfloat xw, vfloat yw, vfloat zw,
|
||||
vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz, int c16 );
|
||||
vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz, int c16, vfloat plum );
|
||||
#endif
|
||||
/**
|
||||
* Forward transform from XYZ to CIECAM02 JCh.
|
||||
*/
|
||||
static void initcam1float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb,
|
||||
float &cz, float &aw, float &wh, float &pfl, float &fl, float c, int c16);
|
||||
float &cz, float &aw, float &wh, float &pfl, float &fl, float c, int c16, float plum);
|
||||
|
||||
static void initcam2float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb,
|
||||
float &cz, float &aw, float &fl, int c16);
|
||||
float &cz, float &aw, float &fl, int c16, float plum);
|
||||
|
||||
static void xyz2jch_ciecam02float ( float &J, float &C, float &h,
|
||||
float aw, float fl,
|
||||
float x, float y, float z,
|
||||
float xw, float yw, float zw,
|
||||
float c, float nc, float n, float nbb, float ncb, float cz, float d, int c16);
|
||||
float c, float nc, float n, float nbb, float ncb, float cz, float d, int c16, float plum);
|
||||
|
||||
static void xyz2jchqms_ciecam02float ( float &J, float &C, float &h,
|
||||
float &Q, float &M, float &s, float aw, float fl, float wh,
|
||||
float x, float y, float z,
|
||||
float xw, float yw, float zw,
|
||||
float c, float nc, float n, float nbb, float ncb, float pfl, float cz, float d, int c16);
|
||||
float c, float nc, float n, float nbb, float ncb, float pfl, float cz, float d, int c16, float plum);
|
||||
|
||||
#ifdef __SSE2__
|
||||
static void xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h,
|
||||
vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh,
|
||||
vfloat x, vfloat y, vfloat z,
|
||||
vfloat xw, vfloat yw, vfloat zw,
|
||||
vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d, int c16);
|
||||
vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d, int c16, vfloat plum);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1889,6 +1889,59 @@ static inline void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, v
|
||||
return (hr);
|
||||
}
|
||||
|
||||
static inline double huejz_to_huehsv2 (float HH)
|
||||
{
|
||||
//hr=translate Hue Jz value (-Pi +Pi) in approximative hr (hsv values) (0 1)
|
||||
// with multi linear correspondences (I expect another time with Jz there is no error !!)
|
||||
double hr = 0.0;
|
||||
//always put h between 0 and 1
|
||||
// make with my chart 468 colors...
|
||||
// HH ==> Hz value ; hr HSv value
|
||||
if (HH >= 0.2f && HH < 0.75f) {
|
||||
hr = 0.12727273 * double(HH) + 0.90454551;//hr 0.93 1.00 full red
|
||||
} else if (HH >= 0.75f && HH < 1.35f) {
|
||||
hr = 0.15 * double(HH) - 0.1125;//hr 0.00 0.09 red yellow orange
|
||||
} else if (HH >= 1.35f && HH < 1.85f) {
|
||||
hr = 0.32 * double(HH) - 0.342; //hr 0.09 0.25 orange yellow
|
||||
} else if (HH >= 1.85f && HH < 2.46f) {
|
||||
hr = 0.23442623 * double(HH) -0.18368853;//hr 0.25 0.393 yellow green green
|
||||
} else if (HH >= 2.46f && HH < 3.14159f) {
|
||||
hr = 0.177526 * double(HH) -0.043714;//hr 0.393 0.51315 green ==> 0.42 Lab
|
||||
} else if (HH >= -3.14159f && HH < -2.89f) {
|
||||
hr = 0.3009078 * double(HH) + 1.459329;//hr 0.51315 0.5897 green cyan ==> -2.30 Lab
|
||||
} else if (HH >= -2.89f && HH < -2.7f) {
|
||||
hr = 0.204542 * double(HH) + 1.1808264;//hr 0.5897 0.628563 cyan
|
||||
} else if (HH >= -2.7f && HH < -2.17f) {
|
||||
hr = 0.121547 * double(HH) + 0.956399;//hr 0.628563 0.692642 blue blue-sky
|
||||
} else if (HH >= -2.17f && HH < -0.9f) {
|
||||
hr = 0.044882 * double(HH) + 0.789901;//hr 0.692642 0.749563 blue blue-sky
|
||||
} else if (HH >= -0.9f && HH < -0.1f) {
|
||||
hr = 0.2125 * double(HH) + 0.940813;//hr 0.749563 0.919563 purple magenta
|
||||
} else if (HH >= -0.1f && HH < 0.2f) {
|
||||
hr = 0.03479 * double(HH) + 0.923042;//hr 0.919563 0.93 red
|
||||
}
|
||||
// in case of !
|
||||
if (hr < 0.0) {
|
||||
hr += 1.0;
|
||||
} else if(hr > 1.0) {
|
||||
hr -= 1.0;
|
||||
}
|
||||
|
||||
return (hr);
|
||||
}
|
||||
|
||||
// HSV 0.93 1.0 red - Lab 0.0 0.6 Jz 0.20 0.75
|
||||
// HSV 0.00 0.9 red orange - Lab 0.6 1.4 Jz 0.50 1.35
|
||||
// HSV 0.09 0.25 oran - yellow - Lab 1.4 2.0 Jz 1.35 1.85
|
||||
// HSV 0.25 0.39 yellow - gree - Lab 2.0 3.0 Jz 1.85 2.40
|
||||
// HSV 0.39 0.50 green - cyan Lab 3.0 -2.8 Jz 2.40 3.10
|
||||
// HSV 0.50 0.58 cyan Lab-2.8 -2.3 Jz 3.10 -2.90
|
||||
// HSV 0.58 0.69 blue - sky Lab-2.3 -1.3 Jz -2.90 -2.17
|
||||
// HSV 0.69 0.75 blue - Lab-1.3 -0.9 Jz -2.17 -0.90
|
||||
// HSV 0.75 0.92 purple - Lab-0.9 -0.1 Jz -0.9 -0.10
|
||||
// HSV 0.92 0.93 magenta Lab-0.1 0.0 Jz -0.1 0.20
|
||||
|
||||
|
||||
static inline void RGB2Y(const float* R, const float* G, const float* B, float* Y1, float * Y2, int W) {
|
||||
int i = 0;
|
||||
#ifdef __SSE2__
|
||||
|
@ -33,7 +33,7 @@
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
static const double cie_colour_match_jd2[97][3] = {//350nm to 830nm 5 nm J.Desmis 2° Standard Observer.
|
||||
static double cie_colour_match_jd2[97][3] = {//350nm to 830nm 5 nm J.Desmis 2° Standard Observer.
|
||||
{0.0000000, 0.000000, 0.000000}, {0.0000000, 0.000000, 0.000000}, {0.0001299, 0.0003917, 0.0006061},
|
||||
{0.0002321, 0.000006965, 0.001086}, {0.0004149, 0.00001239, 0.001946}, {0.0007416, 0.00002202, 0.003846},
|
||||
{0.001368, 0.000039, 0.006450001}, {0.002236, 0.000064, 0.01054999}, {0.004243, 0.000120, 0.02005001},
|
||||
@ -70,7 +70,7 @@ static const double cie_colour_match_jd2[97][3] = {//350nm to 830nm 5 nm J.Des
|
||||
};
|
||||
|
||||
|
||||
static double cie_colour_match_jd[97][3] = {//350nm to 830nm 5 nm J.Desmis 10° Standard Observer.
|
||||
static const double cie_colour_match_jd[97][3] = {//350nm to 830nm 5 nm J.Desmis 10° Standard Observer.
|
||||
{0.000000000000, 0.000000000000, 0.000000000000},
|
||||
{0.000000000000, 0.000000000000, 0.000000000000},
|
||||
{0.000000122200, 0.000000013398, 0.000000535027},
|
||||
@ -3388,7 +3388,7 @@ The next 3 methods are inspired from:
|
||||
|
||||
this values are often called xBar yBar zBar and are characteristics of a color / illuminant
|
||||
|
||||
values cie_colour_match[][3] = 2° Standard Observer x2, y2, z2
|
||||
values cie_colour_match2[][3] = 2° Standard Observer x2, y2, z2
|
||||
E.g. for 380nm: x2=0.001368 y2=0.000039 z2=0.006451 round in J.Walker to 0.0014 0.0000 0.0065 above
|
||||
I have increase precision used by J.Walker and pass to 350nm to 830nm
|
||||
And also add 10° standard observer
|
||||
@ -3401,9 +3401,9 @@ void ColorTemp::spectrum_to_xyz_daylight(double _m1, double _m2, double &x, doub
|
||||
|
||||
for (i = 0, lambda = 350.; lambda < 830.1; i++, lambda += 5.) {
|
||||
double Me = daylight_spect(lambda, _m1, _m2);
|
||||
X += Me * cie_colour_match_jd[i][0];
|
||||
Y += Me * cie_colour_match_jd[i][1];
|
||||
Z += Me * cie_colour_match_jd[i][2];
|
||||
X += Me * cie_colour_match_jd2[i][0];
|
||||
Y += Me * cie_colour_match_jd2[i][1];
|
||||
Z += Me * cie_colour_match_jd2[i][2];
|
||||
}
|
||||
|
||||
XYZ = (X + Y + Z);
|
||||
@ -3419,9 +3419,9 @@ void ColorTemp::spectrum_to_xyz_blackbody(double _temp, double &x, double &y, do
|
||||
|
||||
for (i = 0, lambda = 350.; lambda < 830.1; i++, lambda += 5.) {
|
||||
double Me = blackbody_spect(lambda, _temp);
|
||||
X += Me * cie_colour_match_jd[i][0];
|
||||
Y += Me * cie_colour_match_jd[i][1];
|
||||
Z += Me * cie_colour_match_jd[i][2];
|
||||
X += Me * cie_colour_match_jd2[i][0];
|
||||
Y += Me * cie_colour_match_jd2[i][1];
|
||||
Z += Me * cie_colour_match_jd2[i][2];
|
||||
}
|
||||
|
||||
XYZ = (X + Y + Z);
|
||||
@ -3447,16 +3447,16 @@ void ColorTemp::spectrum_to_xyz_preset(const double* spec_intens, double &x, dou
|
||||
|
||||
this values are often called xBar yBar zBar and are characteristics of a color / illuminant
|
||||
|
||||
values cie_colour_match[][3] = 2° Standard Observer x2, y2, z2
|
||||
values cie_colour_match_jd2[][3] = 2° Standard Observer x2, y2, z2
|
||||
E.g. for 380nm: x2=0.001368 y2=0.000039 z2=0.006451 round in J.Walker to 0.0014 0.0000 0.0065 above
|
||||
I have increased the precision used by J.Walker and pass from 350nm to 830nm
|
||||
And also add standard observer 10°
|
||||
*/
|
||||
for (i = 0, lambda = 350.; lambda < 830.1; i++, lambda += 5.) {
|
||||
double Me = get_spectral_color(lambda, spec_intens);
|
||||
X += Me * cie_colour_match_jd[i][0];
|
||||
Y += Me * cie_colour_match_jd[i][1];
|
||||
Z += Me * cie_colour_match_jd[i][2];
|
||||
X += Me * cie_colour_match_jd2[i][0];
|
||||
Y += Me * cie_colour_match_jd2[i][1];
|
||||
Z += Me * cie_colour_match_jd2[i][2];
|
||||
}
|
||||
|
||||
XYZ = (X + Y + Z);
|
||||
@ -3478,9 +3478,9 @@ void ColorTemp::spectrum_to_color_xyz_preset(const double* spec_color, const dou
|
||||
|
||||
Me = get_spectral_color(lambda, spec_color);
|
||||
Mc = get_spectral_color(lambda, spec_intens);
|
||||
X += Mc * cie_colour_match_jd[i][0] * Me;
|
||||
Y += Mc * cie_colour_match_jd[i][1] * Me;
|
||||
Z += Mc * cie_colour_match_jd[i][2] * Me;
|
||||
X += Mc * cie_colour_match_jd2[i][0] * Me;
|
||||
Y += Mc * cie_colour_match_jd2[i][1] * Me;
|
||||
Z += Mc * cie_colour_match_jd2[i][2] * Me;
|
||||
}
|
||||
|
||||
for (i = 0, lambda = 350; lambda < 830.1; i++, lambda += 5) {
|
||||
@ -3488,7 +3488,7 @@ void ColorTemp::spectrum_to_color_xyz_preset(const double* spec_color, const dou
|
||||
double Ms;
|
||||
|
||||
Ms = get_spectral_color(lambda, spec_intens);
|
||||
Yo += cie_colour_match_jd[i][1] * Ms;
|
||||
Yo += cie_colour_match_jd2[i][1] * Ms;
|
||||
}
|
||||
|
||||
xx = X / Yo;
|
||||
@ -3505,9 +3505,9 @@ void ColorTemp::spectrum_to_color_xyz_daylight(const double* spec_color, double
|
||||
for (i = 0, lambda = 350; lambda < 830.1; i++, lambda += 5) {
|
||||
const double Me = spec_color[i];
|
||||
const double Mc = daylight_spect(lambda, _m1, _m2);
|
||||
X += Mc * cie_colour_match_jd[i][0] * Me;
|
||||
Y += Mc * cie_colour_match_jd[i][1] * Me;
|
||||
Z += Mc * cie_colour_match_jd[i][2] * Me;
|
||||
X += Mc * cie_colour_match_jd2[i][0] * Me;
|
||||
Y += Mc * cie_colour_match_jd2[i][1] * Me;
|
||||
Z += Mc * cie_colour_match_jd2[i][2] * Me;
|
||||
}
|
||||
|
||||
xx = X / Y;
|
||||
@ -3524,9 +3524,9 @@ void ColorTemp::spectrum_to_color_xyz_blackbody(const double* spec_color, double
|
||||
for (i = 0, lambda = 350; lambda < 830.1; i++, lambda += 5) {
|
||||
const double Me = spec_color[i];
|
||||
const double Mc = blackbody_spect(lambda, _temp);
|
||||
X += Mc * cie_colour_match_jd[i][0] * Me;
|
||||
Y += Mc * cie_colour_match_jd[i][1] * Me;
|
||||
Z += Mc * cie_colour_match_jd[i][2] * Me;
|
||||
X += Mc * cie_colour_match_jd2[i][0] * Me;
|
||||
Y += Mc * cie_colour_match_jd2[i][1] * Me;
|
||||
Z += Mc * cie_colour_match_jd2[i][2] * Me;
|
||||
}
|
||||
|
||||
xx = X / Y;
|
||||
@ -3544,14 +3544,14 @@ double ColorTemp::daylight_spect(double wavelength, double m1, double m2)
|
||||
53.30, 56.10, 58.90, 60.40, 61.90
|
||||
};
|
||||
//s1
|
||||
static const double s1[97] = {41.60, 39.80, 38.00, 40.70, 43.40, 40.95, 38.50, 36.75, 35.00, 39.20, 43.40, 44.85, 46.30, 45.10, 43.90, 40.50, 37.10, 36.90, 36.70, 36.30, 35.90, 34.25, 32.60, 30.25, 27.90, 26.10, 24.30, 22.20, 20.10, 18.15, 16.20, 14.70,
|
||||
static const double s1[97] = {41.60, 39.80, 38.00, 40.20, 42.40, 40.45, 38.50, 36.75, 35.00, 39.20, 43.40, 44.85, 46.30, 45.10, 43.90, 40.50, 37.10, 36.90, 36.70, 36.30, 35.90, 34.25, 32.60, 30.25, 27.90, 26.10, 24.30, 22.20, 20.10, 18.15, 16.20, 14.70,
|
||||
13.20, 10.90, 8.60, 7.35, 6.10, 5.15, 4.20, 3.05, 1.90, 0.95, 0.00, -0.80, -1.60, -2.55, -3.50, -3.50, -3.50, -4.65, -5.80, -6.50, -7.20, -7.90, -8.60, -9.05, -9.50, -10.20, -10.90, -10.80, -10.70, -11.35, -12.00, -13.00, -14.00,
|
||||
-13.80, -13.60, -12.80, -12.00, -12.65, -13.30, -13.10, -12.90, -11.75, -10.60, -11.10, -11.60, -11.90, -12.20, -11.20, -10.20, -9.00, -7.80, -9.50, -11.20, -10.80, -10.50, -10.60, -10.15, -9.70, -9.00, -8.30,
|
||||
-13.80, -13.60, -12.80, -12.00, -12.65, -13.30, -13.10, -12.90, -11.75, -10.60, -11.10, -11.60, -11.90, -12.20, -11.20, -10.20, -9.00, -7.80, -9.50, -11.20, -10.80, -10.40, -10.50, -10.60, -10.15, -9.70, -9.00, -8.30,
|
||||
-8.80, -9.30, -9.55, -9.80
|
||||
};
|
||||
//s2
|
||||
static const double s2[97] = {6.70, 6.00, 5.30, 5.70, 6.10, 4.55, 3.00, 2.10, 1.20, 0.05, -1.10, -0.80, -0.50, -0.60, -0.70, -0.95, -1.20, -1.90, -2.60, -2.75, -2.90, -2.85, -2.80, -2.70, -2.60, -2.60, -2.60, -2.20, -1.80, -1.65, -1.50, -1.40, -1.30,
|
||||
-1.25, -1.20, -1.10, -1.00, -0.75, -0.50, -0.40, -0.30, -0.15, 0.00, 0.10, 0.20, 0.35, 0.50, 1.30, 2.10, 2.65, 3.65, 4.10, 4.40, 4.70, 4.90, 5.10, 5.90, 6.70, 7.00, 7.30, 7.95, 8.60, 9.20, 9.80, 10.00, 10.20, 9.25, 8.30, 8.95,
|
||||
-1.25, -1.20, -1.10, -1.00, -0.75, -0.50, -0.40, -0.30, -0.15, 0.00, 0.10, 0.20, 0.35, 0.50, 1.30, 2.10, 2.65, 3.20, 3.65, 4.10, 4.40, 4.70, 4.90, 5.10, 5.90, 6.70, 7.00, 7.30, 7.95, 8.60, 9.20, 9.80, 10.00, 10.20, 9.25, 8.30, 8.95,
|
||||
9.60, 9.05, 8.50, 7.75, 7.00, 7.30, 7.60, 7.80, 8.00, 7.35, 6.70, 5.95, 5.20, 6.30, 7.40, 7.10, 6.80, 6.90, 7.00, 6.70, 6.40, 5.95, 5.50, 5.80, 6.10, 6.30, 6.50
|
||||
};
|
||||
|
||||
@ -3769,11 +3769,11 @@ void ColorTemp::tempxy(bool separated, int repref, float **Tx, float **Ty, float
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->itcwb_stdobserver10 == false) {
|
||||
if (settings->itcwb_stdobserver10 == true) {
|
||||
for (int i = 0; i < 97; i++) {
|
||||
cie_colour_match_jd[i][0] = cie_colour_match_jd2[i][0];
|
||||
cie_colour_match_jd[i][1] = cie_colour_match_jd2[i][1];;
|
||||
cie_colour_match_jd[i][2] = cie_colour_match_jd2[i][2];
|
||||
cie_colour_match_jd2[i][0] = cie_colour_match_jd[i][0];
|
||||
cie_colour_match_jd2[i][1] = cie_colour_match_jd[i][1];;
|
||||
cie_colour_match_jd2[i][2] = cie_colour_match_jd[i][2];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3460,12 +3460,13 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
Color::Prophotoxyz(r, g, b, x, y, z);
|
||||
|
||||
float J, C, h;
|
||||
int c16 = 1;
|
||||
int c16 = 1;//always Cat02....to reserve compatibility
|
||||
float plum = 100.f;
|
||||
Ciecam02::xyz2jch_ciecam02float(J, C, h,
|
||||
aw, fl,
|
||||
x * 0.0015259022f, y * 0.0015259022f, z * 0.0015259022f,
|
||||
xw, yw, zw,
|
||||
c, nc, pow1, nbb, ncb, cz, d, c16);
|
||||
c, nc, pow1, nbb, ncb, cz, d, c16, plum);
|
||||
|
||||
|
||||
if (!isfinite(J) || !isfinite(C) || !isfinite(h)) {
|
||||
@ -3583,7 +3584,7 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
Ciecam02::jch2xyz_ciecam02float(x, y, z,
|
||||
J, C, h,
|
||||
xw, yw, zw,
|
||||
c, nc, pow1, nbb, ncb, fl, cz, d, aw, c16);
|
||||
c, nc, pow1, nbb, ncb, fl, cz, d, aw, c16, plum);
|
||||
|
||||
if (!isfinite(x) || !isfinite(y) || !isfinite(z)) {
|
||||
// can happen for colours on the rim of being outside gamut, that worked without chroma scaling but not with. Then we return only the curve's result.
|
||||
@ -3699,8 +3700,9 @@ void PerceptualToneCurve::init()
|
||||
c = 0.69f;
|
||||
nc = 1.00f;
|
||||
int c16 = 1;//with cat02 for compatibility
|
||||
float plum = 100.f;
|
||||
Ciecam02::initcam1float(yb, 1.f, f, la, xw, yw, zw, n, d, nbb, ncb,
|
||||
cz, aw, wh, pfl, fl, c, c16);
|
||||
cz, aw, wh, pfl, fl, c, c16, plum);
|
||||
pow1 = pow_F(1.64f - pow_F(0.29f, n), 0.73f);
|
||||
|
||||
{
|
||||
|
@ -2464,6 +2464,30 @@ void CLASS unpacked_load_raw()
|
||||
}
|
||||
}
|
||||
|
||||
// RT - from LibRaw
|
||||
void CLASS unpacked_load_raw_FujiDBP()
|
||||
/*
|
||||
for Fuji DBP for GX680, aka DX-2000
|
||||
DBP_tile_width = 688;
|
||||
DBP_tile_height = 3856;
|
||||
DBP_n_tiles = 8;
|
||||
*/
|
||||
{
|
||||
int scan_line, tile_n;
|
||||
int nTiles = 8;
|
||||
tile_width = raw_width / nTiles;
|
||||
ushort *tile;
|
||||
tile = (ushort *) calloc(raw_height, tile_width * 2);
|
||||
for (tile_n = 0; tile_n < nTiles; tile_n++) {
|
||||
read_shorts(tile, tile_width * raw_height);
|
||||
for (scan_line = 0; scan_line < raw_height; scan_line++) {
|
||||
memcpy(&raw_image[scan_line * raw_width + tile_n * tile_width],
|
||||
&tile[scan_line * tile_width], tile_width * 2);
|
||||
}
|
||||
}
|
||||
free(tile);
|
||||
fseek(ifp, -2, SEEK_CUR); // avoid EOF error
|
||||
}
|
||||
|
||||
// RT
|
||||
void CLASS sony_arq_load_raw()
|
||||
@ -6061,13 +6085,56 @@ get2_256:
|
||||
offsetChannelBlackLevel2 = save1 + (0x0149 << 1);
|
||||
offsetWhiteLevels = save1 + (0x031c << 1);
|
||||
break;
|
||||
case 2024: // 1D X Mark III, ColorDataSubVer 32
|
||||
// imCanon.ColorDataVer = 10;
|
||||
imCanon.ColorDataSubVer = get2();
|
||||
fseek(ifp, save1 + (0x0055 << 1), SEEK_SET);
|
||||
FORC4 cam_mul[c ^ (c >> 1)/*RGGB_2_RGBG(c)*/] = (float)get2();
|
||||
// get2();
|
||||
// FORC4 icWBC[LIBRAW_WBI_Auto][RGGB_2_RGBG(c)] = get2();
|
||||
// get2();
|
||||
// FORC4 icWBC[LIBRAW_WBI_Measured][RGGB_2_RGBG(c)] = get2();
|
||||
// fseek(ifp, save1 + (0x0096 << 1), SEEK_SET);
|
||||
// Canon_WBpresets(2, 12);
|
||||
// fseek(ifp, save1 + (0x0118 << 1), SEEK_SET);
|
||||
// Canon_WBCTpresets(0);
|
||||
offsetChannelBlackLevel = save1 + (0x0326 << 1);
|
||||
offsetChannelBlackLevel2 = save1 + (0x0157 << 1);
|
||||
offsetWhiteLevels = save1 + (0x032a << 1);
|
||||
break;
|
||||
case 3656: // EOS R6, ColorDataSubVer 33
|
||||
// imCanon.ColorDataVer = 10;
|
||||
imCanon.ColorDataSubVer = get2();
|
||||
|
||||
// The constant 0x0055 was found in LibRaw; more specifically by
|
||||
// spelunking in LibRaw:src/metadata/canon.cpp.
|
||||
fseek(ifp, save1 + (0x0055 << 1), SEEK_SET);
|
||||
FORC4 cam_mul[c ^ (c >> 1)] = (float)get2();
|
||||
|
||||
offsetChannelBlackLevel = save1 + (0x326 << 1);
|
||||
offsetChannelBlackLevel2 = save1 + (0x157 << 1);
|
||||
offsetWhiteLevels = save1 + (0x32a << 1);
|
||||
break;
|
||||
case 3973: // R3; ColorDataSubVer: 34
|
||||
case 3778: // R7, R10; ColorDataSubVer: 48
|
||||
// imCanon.ColorDataVer = 11;
|
||||
imCanon.ColorDataSubVer = get2();
|
||||
|
||||
fseek(ifp, save1 + ((0x0069+0x0064) << 1), SEEK_SET);
|
||||
FORC4 cam_mul[c ^ (c >> 1)] = (float)get2();
|
||||
|
||||
offsetChannelBlackLevel2 = save1 + ((0x0069+0x0102) << 1);
|
||||
offsetChannelBlackLevel = save1 + ((0x0069+0x0213) << 1);
|
||||
offsetWhiteLevels = save1 + ((0x0069+0x0217) << 1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (offsetChannelBlackLevel)
|
||||
{
|
||||
fseek(ifp, offsetChannelBlackLevel, SEEK_SET);
|
||||
FORC4
|
||||
bls += (cblack/*imCanon.ChannelBlackLevel*/[c ^ (c >> 1)] = get2());
|
||||
bls += (RT_canon_levels_data.cblack/*imCanon.ChannelBlackLevel*/[c ^ (c >> 1)] = get2());
|
||||
RT_canon_levels_data.black_ok = true;
|
||||
imCanon.AverageBlackLevel = bls / 4;
|
||||
// RT_blacklevel_from_constant = ThreeValBool::F;
|
||||
}
|
||||
@ -6079,7 +6146,8 @@ get2_256:
|
||||
imCanon.SpecularWhiteLevel = get2();
|
||||
// FORC4
|
||||
// imgdata.color.linear_max[c] = imCanon.SpecularWhiteLevel;
|
||||
maximum = imCanon.SpecularWhiteLevel;
|
||||
RT_canon_levels_data.white = imCanon.SpecularWhiteLevel;
|
||||
RT_canon_levels_data.white_ok = true;
|
||||
// RT_whitelevel_from_constant = ThreeValBool::F;
|
||||
}
|
||||
|
||||
@ -6087,7 +6155,8 @@ get2_256:
|
||||
{
|
||||
fseek(ifp, offsetChannelBlackLevel2, SEEK_SET);
|
||||
FORC4
|
||||
bls += (cblack/*imCanon.ChannelBlackLevel*/[c ^ (c >> 1)] = get2());
|
||||
bls += (RT_canon_levels_data.cblack/*imCanon.ChannelBlackLevel*/[c ^ (c >> 1)] = get2());
|
||||
RT_canon_levels_data.black_ok = true;
|
||||
imCanon.AverageBlackLevel = bls / 4;
|
||||
// RT_blacklevel_from_constant = ThreeValBool::F;
|
||||
}
|
||||
@ -6274,12 +6343,13 @@ void CLASS parse_mos (int offset)
|
||||
|
||||
void CLASS linear_table (unsigned len)
|
||||
{
|
||||
int i;
|
||||
if (len > 0x1000) len = 0x1000;
|
||||
read_shorts (curve, len);
|
||||
for (i=len; i < 0x1000; i++)
|
||||
curve[i] = curve[i-1];
|
||||
maximum = curve[0xfff];
|
||||
const unsigned maxLen = std::min(0x10000ull, 1ull << tiff_bps);
|
||||
len = std::min(len, maxLen);
|
||||
read_shorts(curve, len);
|
||||
maximum = curve[len - 1];
|
||||
for (std::size_t i = len; i < maxLen; ++i) {
|
||||
curve[i] = maximum;
|
||||
}
|
||||
}
|
||||
|
||||
void CLASS parse_kodak_ifd (int base)
|
||||
@ -6404,6 +6474,9 @@ int CLASS parse_tiff_ifd (int base)
|
||||
case 3: case 257: case 61442: /* ImageHeight */
|
||||
tiff_ifd[ifd].height = getint(type);
|
||||
break;
|
||||
case 254:
|
||||
tiff_ifd[ifd].new_sub_file_type = getint(type);
|
||||
break;
|
||||
case 258: /* BitsPerSample */
|
||||
case 61443:
|
||||
tiff_ifd[ifd].samples = len & 7;
|
||||
@ -6737,14 +6810,17 @@ guess_cfa_pc:
|
||||
linear_table (len);
|
||||
break;
|
||||
case 50713: /* BlackLevelRepeatDim */
|
||||
if (tiff_ifd[ifd].new_sub_file_type != 0) continue;
|
||||
cblack[4] = get2();
|
||||
cblack[5] = get2();
|
||||
if (cblack[4] * cblack[5] > sizeof cblack / sizeof *cblack - 6)
|
||||
cblack[4] = cblack[5] = 1;
|
||||
break;
|
||||
case 61450:
|
||||
if (tiff_ifd[ifd].new_sub_file_type != 0) continue;
|
||||
cblack[4] = cblack[5] = MIN(sqrt(len),64);
|
||||
case 50714: /* BlackLevel */
|
||||
if (tiff_ifd[ifd].new_sub_file_type != 0) continue;
|
||||
RT_blacklevel_from_constant = ThreeValBool::F;
|
||||
//-----------------------------------------------------------------------------
|
||||
// taken from LibRaw.
|
||||
@ -6862,7 +6938,6 @@ it under the terms of the one of two licenses as you choose:
|
||||
unsigned oldOrder = order;
|
||||
order = 0x4d4d; // always big endian per definition in https://www.adobe.com/content/dam/acom/en/products/photoshop/pdfs/dng_spec_1.4.0.0.pdf chapter 7
|
||||
unsigned ntags = get4(); // read the number of opcodes
|
||||
|
||||
if (ntags < ifp->size / 12) { // rough check for wrong value (happens for example with DNG files from DJI FC6310)
|
||||
while (ntags-- && !ifp->eof) {
|
||||
unsigned opcode = get4();
|
||||
@ -6881,8 +6956,48 @@ it under the terms of the one of two licenses as you choose:
|
||||
break;
|
||||
}
|
||||
case 51009: /* OpcodeList2 */
|
||||
{
|
||||
meta_offset = ftell(ifp);
|
||||
const unsigned oldOrder = order;
|
||||
order = 0x4d4d; // always big endian per definition in https://www.adobe.com/content/dam/acom/en/products/photoshop/pdfs/dng_spec_1.4.0.0.pdf chapter 7
|
||||
unsigned ntags = get4(); // read the number of opcodes
|
||||
if (ntags < ifp->size / 12) { // rough check for wrong value (happens for example with DNG files from DJI FC6310)
|
||||
while (ntags-- && !ifp->eof) {
|
||||
unsigned opcode = get4();
|
||||
if (opcode == 9 && gainMaps.size() < 4) {
|
||||
fseek(ifp, 4, SEEK_CUR); // skip 4 bytes as we know that the opcode 4 takes 4 byte
|
||||
fseek(ifp, 8, SEEK_CUR); // skip 8 bytes as they don't interest us currently
|
||||
GainMap gainMap;
|
||||
gainMap.Top = get4();
|
||||
gainMap.Left = get4();
|
||||
gainMap.Bottom = get4();
|
||||
gainMap.Right = get4();
|
||||
gainMap.Plane = get4();
|
||||
gainMap.Planes = get4();
|
||||
gainMap.RowPitch = get4();
|
||||
gainMap.ColPitch = get4();
|
||||
gainMap.MapPointsV = get4();
|
||||
gainMap.MapPointsH = get4();
|
||||
gainMap.MapSpacingV = getreal(12);
|
||||
gainMap.MapSpacingH = getreal(12);
|
||||
gainMap.MapOriginV = getreal(12);
|
||||
gainMap.MapOriginH = getreal(12);
|
||||
gainMap.MapPlanes = get4();
|
||||
const std::size_t n = static_cast<std::size_t>(gainMap.MapPointsV) * static_cast<std::size_t>(gainMap.MapPointsH) * static_cast<std::size_t>(gainMap.MapPlanes);
|
||||
gainMap.MapGain.reserve(n);
|
||||
for (std::size_t i = 0; i < n; ++i) {
|
||||
gainMap.MapGain.push_back(getreal(11));
|
||||
}
|
||||
gainMaps.push_back(std::move(gainMap));
|
||||
} else {
|
||||
fseek(ifp, 8, SEEK_CUR); // skip 8 bytes as they don't interest us currently
|
||||
fseek(ifp, get4(), SEEK_CUR);
|
||||
}
|
||||
}
|
||||
}
|
||||
order = oldOrder;
|
||||
break;
|
||||
}
|
||||
case 64772: /* Kodak P-series */
|
||||
if (len < 13) break;
|
||||
fseek (ifp, 16, SEEK_CUR);
|
||||
@ -9031,8 +9146,21 @@ void CLASS adobe_coeff (const char *make, const char *model)
|
||||
|
||||
for (i=0; i < sizeof table / sizeof *table; i++)
|
||||
if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) {
|
||||
if (RT_blacklevel_from_constant == ThreeValBool::T && table[i].black) black = (ushort) table[i].black;
|
||||
if (RT_whitelevel_from_constant == ThreeValBool::T && table[i].maximum) maximum = (ushort) table[i].maximum;
|
||||
if (RT_blacklevel_from_constant == ThreeValBool::T && table[i].black) {
|
||||
if (RT_canon_levels_data.black_ok) {
|
||||
unsigned c;
|
||||
FORC4 RT_canon_levels_data.cblack[c] = (ushort) table[i].black;
|
||||
} else {
|
||||
black = (ushort) table[i].black;
|
||||
}
|
||||
}
|
||||
if (RT_whitelevel_from_constant == ThreeValBool::T && table[i].maximum) {
|
||||
if (RT_canon_levels_data.white_ok) {
|
||||
RT_canon_levels_data.white = (ushort) table[i].maximum;
|
||||
} else {
|
||||
maximum = (ushort) table[i].maximum;
|
||||
}
|
||||
}
|
||||
if (RT_matrix_from_constant == ThreeValBool::T && table[i].trans[0]) {
|
||||
for (raw_color = j=0; j < 12; j++)
|
||||
((double *)cam_xyz)[j] = table[i].trans[j] / 10000.0;
|
||||
@ -9712,6 +9840,8 @@ void CLASS identify()
|
||||
if(!dng_version) {top_margin = 18; height -= top_margin; }
|
||||
if (height == 3014 && width == 4096) /* Ricoh GX200 */
|
||||
width = 4014;
|
||||
if (height == 3280 && width == 4992 && !strncmp(model, "D5100", 5))
|
||||
{ --height; } // Last row contains corrupt data. See issue #5654.
|
||||
if (dng_version) {
|
||||
if (filters == UINT_MAX) filters = 0;
|
||||
if (filters) is_raw *= tiff_samples;
|
||||
@ -9816,7 +9946,8 @@ void CLASS identify()
|
||||
filters = 0;
|
||||
tiff_samples = colors = 3;
|
||||
load_raw = &CLASS canon_sraw_load_raw;
|
||||
FORC4 cblack[c] = 0; // ALB
|
||||
//FORC4 cblack[c] = 0; // ALB
|
||||
RT_canon_levels_data.black_ok = RT_canon_levels_data.white_ok = false;
|
||||
} else if (!strcmp(model,"PowerShot 600")) {
|
||||
height = 613;
|
||||
width = 854;
|
||||
@ -9999,6 +10130,9 @@ canon_a5:
|
||||
} else if (!strcmp(model, "X-Pro3") || !strcmp(model, "X-T3") || !strcmp(model, "X-T30") || !strcmp(model, "X-T4") || !strcmp(model, "X100V") || !strcmp(model, "X-S10")) {
|
||||
width = raw_width = 6384;
|
||||
height = raw_height = 4182;
|
||||
} else if (!strcmp(model, "DBP for GX680")) { // Special case for #4204
|
||||
width = raw_width = 5504;
|
||||
height = raw_height = 3856;
|
||||
}
|
||||
top_margin = (raw_height - height) >> 2 << 1;
|
||||
left_margin = (raw_width - width ) >> 2 << 1;
|
||||
@ -10006,6 +10140,16 @@ canon_a5:
|
||||
if (width == 4032 || width == 4952 || width == 6032 || width == 8280) left_margin = 0;
|
||||
if (width == 3328 && (width -= 66)) left_margin = 34;
|
||||
if (width == 4936) left_margin = 4;
|
||||
if (width == 5504) { // #4204, taken from LibRaw
|
||||
left_margin = 32;
|
||||
top_margin = 8;
|
||||
width = raw_width - 2*left_margin;
|
||||
height = raw_height - 2*top_margin;
|
||||
load_raw = &CLASS unpacked_load_raw_FujiDBP;
|
||||
filters = 0x16161616;
|
||||
load_flags = 0;
|
||||
flip = 6;
|
||||
}
|
||||
if (!strcmp(model,"HS50EXR") ||
|
||||
!strcmp(model,"F900EXR")) {
|
||||
width += 2;
|
||||
@ -10482,6 +10626,14 @@ bw: colors = 1;
|
||||
}
|
||||
}
|
||||
dng_skip:
|
||||
if (!dng_version && is_raw) {
|
||||
if (RT_canon_levels_data.black_ok) {
|
||||
FORC4 cblack[c] = RT_canon_levels_data.cblack[c];
|
||||
}
|
||||
if (RT_canon_levels_data.white_ok) {
|
||||
maximum = RT_canon_levels_data.white;
|
||||
}
|
||||
}
|
||||
if ((use_camera_matrix & (use_camera_wb || dng_version))
|
||||
&& cmatrix[0][0] > 0.125
|
||||
&& strncmp(RT_software.c_str(), "Adobe DNG Converter", 19) != 0
|
||||
@ -10966,6 +11118,70 @@ void CLASS nikon_14bit_load_raw()
|
||||
free(buf);
|
||||
}
|
||||
|
||||
bool CLASS isGainMapSupported() const {
|
||||
if (!(dng_version && isBayer())) {
|
||||
return false;
|
||||
}
|
||||
const auto n = gainMaps.size();
|
||||
if (n != 4) { // we need 4 gainmaps for bayer files
|
||||
if (rtengine::settings->verbose) {
|
||||
std::cout << "GainMap has " << n << " maps, but 4 are needed" << std::endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
unsigned int check = 0;
|
||||
bool noOp = true;
|
||||
for (const auto &m : gainMaps) {
|
||||
if (m.MapGain.size() < 1) {
|
||||
if (rtengine::settings->verbose) {
|
||||
std::cout << "GainMap has invalid size of " << m.MapGain.size() << std::endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (m.MapGain.size() != static_cast<std::size_t>(m.MapPointsV) * static_cast<std::size_t>(m.MapPointsH) * static_cast<std::size_t>(m.MapPlanes)) {
|
||||
if (rtengine::settings->verbose) {
|
||||
std::cout << "GainMap has size of " << m.MapGain.size() << ", but needs " << m.MapPointsV * m.MapPointsH * m.MapPlanes << std::endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (m.RowPitch != 2 || m.ColPitch != 2) {
|
||||
if (rtengine::settings->verbose) {
|
||||
std::cout << "GainMap needs Row/ColPitch of 2/2, but has " << m.RowPitch << "/" << m.ColPitch << std::endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (m.Top == 0){
|
||||
if (m.Left == 0) {
|
||||
check += 1;
|
||||
} else if (m.Left == 1) {
|
||||
check += 2;
|
||||
}
|
||||
} else if (m.Top == 1) {
|
||||
if (m.Left == 0) {
|
||||
check += 4;
|
||||
} else if (m.Left == 1) {
|
||||
check += 8;
|
||||
}
|
||||
}
|
||||
for (size_t i = 0; noOp && i < m.MapGain.size(); ++i) {
|
||||
if (m.MapGain[i] != 1.f) { // we have at least one value != 1.f => map is not a nop
|
||||
noOp = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (noOp || check != 15) { // all maps are nops or the structure of the combination of 4 maps is not correct
|
||||
if (rtengine::settings->verbose) {
|
||||
if (noOp) {
|
||||
std::cout << "GainMap is a nop" << std::endl;
|
||||
} else {
|
||||
std::cout << "GainMap has unsupported type : " << check << std::endl;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* RT: Delete from here */
|
||||
/*RT*/#undef SQR
|
||||
/*RT*/#undef MAX
|
||||
|
@ -19,9 +19,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "myfile.h"
|
||||
#include <csetjmp>
|
||||
|
||||
#include "dnggainmap.h"
|
||||
#include "settings.h"
|
||||
|
||||
class DCraw
|
||||
{
|
||||
@ -165,6 +168,8 @@ protected:
|
||||
PanasonicRW2Info(): bpp(0), encoding(0) {}
|
||||
};
|
||||
PanasonicRW2Info RT_pana_info;
|
||||
std::vector<GainMap> gainMaps;
|
||||
|
||||
public:
|
||||
struct CanonCR3Data {
|
||||
// contents of tag CMP1 for relevant track in CR3 file
|
||||
@ -182,19 +187,42 @@ public:
|
||||
int32_t hasTileCols;
|
||||
int32_t hasTileRows;
|
||||
int32_t mdatHdrSize;
|
||||
int32_t medianBits;
|
||||
// Not from header, but from datastream
|
||||
uint32_t MediaSize;
|
||||
int64_t MediaOffset;
|
||||
uint32_t MediaType; /* 1 -> /C/RAW, 2-> JPEG */
|
||||
};
|
||||
static constexpr size_t CRXTRACKS_MAXCOUNT = 16;
|
||||
static constexpr int CRXTRACKS_MAXCOUNT = 16;
|
||||
crx_data_header_t crx_header[CRXTRACKS_MAXCOUNT];
|
||||
unsigned int crx_track_selected;
|
||||
int crx_track_selected;
|
||||
short CR3_CTMDtag;
|
||||
};
|
||||
|
||||
bool isBayer() const
|
||||
{
|
||||
return (filters != 0 && filters != 9);
|
||||
}
|
||||
|
||||
const std::vector<GainMap>& getGainMaps() const {
|
||||
return gainMaps;
|
||||
}
|
||||
|
||||
bool isGainMapSupported() const;
|
||||
|
||||
struct CanonLevelsData {
|
||||
unsigned cblack[4];
|
||||
unsigned white;
|
||||
bool black_ok;
|
||||
bool white_ok;
|
||||
CanonLevelsData(): cblack{0}, white{0}, black_ok(false), white_ok(false) {}
|
||||
};
|
||||
|
||||
protected:
|
||||
CanonCR3Data RT_canon_CR3_data;
|
||||
|
||||
CanonLevelsData RT_canon_levels_data;
|
||||
|
||||
float cam_mul[4], pre_mul[4], cmatrix[3][4], rgb_cam[3][4];
|
||||
|
||||
void (DCraw::*write_thumb)();
|
||||
@ -209,7 +237,7 @@ protected:
|
||||
} first_decode[2048], *second_decode, *free_decode;
|
||||
|
||||
struct tiff_ifd {
|
||||
int width, height, bps, comp, phint, offset, flip, samples, bytes;
|
||||
int new_sub_file_type, width, height, bps, comp, phint, offset, flip, samples, bytes;
|
||||
int tile_width, tile_length, sample_format, predictor;
|
||||
float shutter;
|
||||
} tiff_ifd[10];
|
||||
@ -422,6 +450,7 @@ void parse_hasselblad_gain();
|
||||
void hasselblad_load_raw();
|
||||
void leaf_hdr_load_raw();
|
||||
void unpacked_load_raw();
|
||||
void unpacked_load_raw_FujiDBP();
|
||||
void sinar_4shot_load_raw();
|
||||
void imacon_full_load_raw();
|
||||
void packed_load_raw();
|
||||
@ -565,13 +594,13 @@ void parse_canon_cr3();
|
||||
void selectCRXTrack(unsigned short maxTrack);
|
||||
int parseCR3(unsigned long long oAtomList,
|
||||
unsigned long long szAtomList, short &nesting,
|
||||
char *AtomNameStack, unsigned short &nTrack, short &TrackType);
|
||||
char *AtomNameStack, short &nTrack, short &TrackType);
|
||||
bool crxDecodePlane(void *p, uint32_t planeNumber);
|
||||
void crxLoadDecodeLoop(void *img, int nPlanes);
|
||||
void crxConvertPlaneLineDf(void *p, int imageRow);
|
||||
void crxLoadFinalizeLoopE3(void *p, int planeHeight);
|
||||
void crxLoadRaw();
|
||||
bool crxParseImageHeader(uchar *cmp1TagData, unsigned int nTrack);
|
||||
bool crxParseImageHeader(uchar *cmp1TagData, int nTrack, int size);
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
};
|
||||
|
@ -872,6 +872,12 @@ void Crop::update(int todo)
|
||||
auto& lmaskbllocalcurve2 = parent->lmaskbllocalcurve;
|
||||
auto& lmasklclocalcurve2 = parent->lmasklclocalcurve;
|
||||
auto& lmaskloglocalcurve2 = parent->lmaskloglocalcurve;
|
||||
auto& lmaskcielocalcurve2 = parent->lmaskcielocalcurve;
|
||||
auto& cielocalcurve2 = parent->cielocalcurve;
|
||||
auto& cielocalcurve22 = parent->cielocalcurve2;
|
||||
auto& jzlocalcurve2 = parent->jzlocalcurve;
|
||||
auto& czlocalcurve2 = parent->czlocalcurve;
|
||||
auto& czjzlocalcurve2 = parent->czjzlocalcurve;
|
||||
auto& hltonecurveloc2 = parent->hltonecurveloc;
|
||||
auto& shtonecurveloc2 = parent->shtonecurveloc;
|
||||
auto& tonecurveloc2 = parent->tonecurveloc;
|
||||
@ -881,6 +887,9 @@ void Crop::update(int todo)
|
||||
auto& loclhCurve = parent->loclhCurve;
|
||||
auto& lochhCurve = parent->lochhCurve;
|
||||
auto& locchCurve = parent->locchCurve;
|
||||
auto& lochhCurvejz = parent->lochhCurvejz;
|
||||
auto& locchCurvejz = parent->locchCurvejz;
|
||||
auto& loclhCurvejz = parent->loclhCurvejz;
|
||||
auto& locccmasCurve = parent->locccmasCurve;
|
||||
auto& locllmasCurve = parent->locllmasCurve;
|
||||
auto& lochhmasCurve = parent->lochhmasCurve;
|
||||
@ -912,12 +921,16 @@ void Crop::update(int todo)
|
||||
auto& locccmaslogCurve = parent->locccmaslogCurve;
|
||||
auto& locllmaslogCurve = parent->locllmaslogCurve;
|
||||
auto& lochhmaslogCurve = parent->lochhmaslogCurve;
|
||||
auto& locccmascieCurve = parent->locccmascieCurve;
|
||||
auto& locllmascieCurve = parent->locllmascieCurve;
|
||||
auto& lochhmascieCurve = parent->lochhmascieCurve;
|
||||
|
||||
auto& locccmas_Curve = parent->locccmas_Curve;
|
||||
auto& locllmas_Curve = parent->locllmas_Curve;
|
||||
auto& lochhmas_Curve = parent->lochhmas_Curve;
|
||||
auto& lochhhmas_Curve = parent->lochhhmas_Curve;
|
||||
auto& locwavCurve = parent->locwavCurve;
|
||||
auto& locwavCurvejz = parent->locwavCurvejz;
|
||||
auto& loclmasCurveblwav = parent->loclmasCurveblwav;
|
||||
auto& loclmasCurvecolwav = parent->loclmasCurvecolwav;
|
||||
auto& loclevwavCurve = parent->loclevwavCurve;
|
||||
@ -929,13 +942,25 @@ void Crop::update(int todo)
|
||||
auto& locwavCurveden = parent->locwavCurveden;
|
||||
auto& lmasklocal_curve2 = parent->lmasklocal_curve;
|
||||
auto& loclmasCurve_wav = parent->loclmasCurve_wav;
|
||||
|
||||
// const int sizespot = (int)params.locallab.spots.size();
|
||||
/* float *huerefp = nullptr;
|
||||
huerefp = new float[sizespot];
|
||||
float *chromarefp = nullptr;
|
||||
chromarefp = new float[sizespot];
|
||||
float *lumarefp = nullptr;
|
||||
lumarefp = new float[sizespot];
|
||||
float *fabrefp = nullptr;
|
||||
fabrefp = new float[sizespot];
|
||||
*/
|
||||
for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) {
|
||||
locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve);
|
||||
locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve);
|
||||
const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve);
|
||||
const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve);
|
||||
const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve);
|
||||
const bool HHutilijz = lochhCurvejz.Set(params.locallab.spots.at(sp).HHcurvejz);
|
||||
const bool CHutilijz = locchCurvejz.Set(params.locallab.spots.at(sp).CHcurvejz);
|
||||
const bool LHutilijz = loclhCurvejz.Set(params.locallab.spots.at(sp).LHcurvejz);
|
||||
const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve);
|
||||
const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve);
|
||||
const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve);
|
||||
@ -964,6 +989,9 @@ void Crop::update(int todo)
|
||||
const bool lcmaslogutili = locccmaslogCurve.Set(params.locallab.spots.at(sp).CCmaskcurveL);
|
||||
const bool llmaslogutili = locllmaslogCurve.Set(params.locallab.spots.at(sp).LLmaskcurveL);
|
||||
const bool lhmaslogutili = lochhmaslogCurve.Set(params.locallab.spots.at(sp).HHmaskcurveL);
|
||||
const bool lcmascieutili = locccmascieCurve.Set(params.locallab.spots.at(sp).CCmaskciecurve);
|
||||
const bool llmascieutili = locllmascieCurve.Set(params.locallab.spots.at(sp).LLmaskciecurve);
|
||||
const bool lhmascieutili = lochhmascieCurve.Set(params.locallab.spots.at(sp).HHmaskciecurve);
|
||||
|
||||
const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve);
|
||||
const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve);
|
||||
@ -976,6 +1004,7 @@ void Crop::update(int todo)
|
||||
const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve);
|
||||
const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve);
|
||||
const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve);
|
||||
const bool locwavutilijz = locwavCurvejz.Set(params.locallab.spots.at(sp).locwavcurvejz);
|
||||
const bool locwavhueutili = locwavCurvehue.Set(params.locallab.spots.at(sp).locwavcurvehue);
|
||||
const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden);
|
||||
const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve);
|
||||
@ -1000,6 +1029,12 @@ void Crop::update(int todo)
|
||||
const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve2, skip);
|
||||
const bool localmasklogutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskcurveL, lmaskloglocalcurve2, skip);
|
||||
const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve2, skip);
|
||||
const bool localmaskcieutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskciecurve, lmaskcielocalcurve2, skip);
|
||||
const bool localcieutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).ciecurve, cielocalcurve2, skip);
|
||||
const bool localcieutili2 = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).ciecurve2, cielocalcurve22, skip);
|
||||
const bool localjzutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).jzcurve, jzlocalcurve2, skip);
|
||||
const bool localczutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).czcurve, czlocalcurve2, skip);
|
||||
const bool localczjzutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).czjzcurve, czjzlocalcurve2, skip);
|
||||
|
||||
double ecomp = params.locallab.spots.at(sp).expcomp;
|
||||
double black = params.locallab.spots.at(sp).black;
|
||||
@ -1025,7 +1060,7 @@ void Crop::update(int todo)
|
||||
float stdtme = parent->stdtms[sp];
|
||||
float meanretie = parent->meanretis[sp];
|
||||
float stdretie = parent->stdretis[sp];
|
||||
|
||||
float fab = 1.f;
|
||||
float minCD;
|
||||
float maxCD;
|
||||
float mini;
|
||||
@ -1035,6 +1070,11 @@ void Crop::update(int todo)
|
||||
float Tmin;
|
||||
float Tmax;
|
||||
int lastsav;
|
||||
|
||||
/* huerefp[sp] = huere;
|
||||
chromarefp[sp] = chromare;
|
||||
lumarefp[sp] = lumare;
|
||||
*/
|
||||
CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumare,
|
||||
hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, avge,
|
||||
skip);
|
||||
@ -1049,6 +1089,8 @@ void Crop::update(int todo)
|
||||
cllocalcurve2, localclutili,
|
||||
lclocalcurve2, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lochhCurvejz, locchCurvejz, loclhCurvejz,
|
||||
|
||||
lmasklocalcurve2, localmaskutili,
|
||||
lmaskexplocalcurve2, localmaskexputili,
|
||||
lmaskSHlocalcurve2, localmaskSHutili,
|
||||
@ -1060,6 +1102,12 @@ void Crop::update(int todo)
|
||||
lmasklclocalcurve2, localmasklcutili,
|
||||
lmaskloglocalcurve2, localmasklogutili,
|
||||
lmasklocal_curve2, localmask_utili,
|
||||
lmaskcielocalcurve2, localmaskcieutili,
|
||||
cielocalcurve2,localcieutili,
|
||||
cielocalcurve22,localcieutili2,
|
||||
jzlocalcurve2,localjzutili,
|
||||
czlocalcurve2,localczutili,
|
||||
czjzlocalcurve2,localczjzutili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
@ -1072,10 +1120,13 @@ void Crop::update(int todo)
|
||||
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
|
||||
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
locccmascieCurve, lcmascieutili, locllmascieCurve, llmasSHutili, lochhmascieCurve, lhmascieutili,
|
||||
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
loclmasCurveblwav,lmasutiliblwav,
|
||||
loclmasCurvecolwav,lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
locwavCurvejz, locwavutilijz,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
@ -1084,12 +1135,14 @@ void Crop::update(int todo)
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
|
||||
LHutili, HHutili, CHutili, HHutilijz, CHutilijz, LHutilijz, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav,
|
||||
parent->previewDeltaE, parent->locallColorMask, parent->locallColorMaskinv, parent->locallExpMask, parent->locallExpMaskinv, parent->locallSHMask, parent->locallSHMaskinv, parent->locallvibMask, parent->localllcMask, parent->locallsharMask, parent->locallcbMask, parent->locallretiMask, parent->locallsoftMask, parent->localltmMask, parent->locallblMask,
|
||||
parent->localllogMask, parent->locall_Mask, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie);
|
||||
if (parent->previewDeltaE || parent->locallColorMask == 5 || parent->locallvibMask == 4 || parent->locallExpMask == 5 || parent->locallSHMask == 4 || parent->localllcMask == 4 || parent->localltmMask == 4 || parent->localllogMask == 4 || parent->locallsoftMask == 6 || parent->localllcMask == 4) {
|
||||
parent->localllogMask, parent->locall_Mask, parent->locallcieMask, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie, fab);
|
||||
// fabrefp[sp] = fab;
|
||||
|
||||
if (parent->previewDeltaE || parent->locallColorMask == 5 || parent->locallvibMask == 4 || parent->locallExpMask == 5 || parent->locallSHMask == 4 || parent->localllcMask == 4 || parent->localltmMask == 4 || parent->localllogMask == 4 || parent->locallsoftMask == 6 || parent->localllcMask == 4 || parent->locallcieMask == 4) {
|
||||
params.blackwhite.enabled = false;
|
||||
params.colorToning.enabled = false;
|
||||
params.rgbCurves.enabled = false;
|
||||
@ -1112,12 +1165,20 @@ void Crop::update(int todo)
|
||||
params.epd.enabled = false;
|
||||
params.softlight.enabled = false;
|
||||
}
|
||||
/*
|
||||
if (parent->locallListener) {
|
||||
parent->locallListener->refChanged2(huerefp, chromarefp, lumarefp, fabrefp, params.locallab.selspot);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
} else {
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), fw, fh, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve2,locallutili,
|
||||
cllocalcurve2, localclutili,
|
||||
lclocalcurve2, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lochhCurvejz, locchCurvejz, loclhCurvejz,
|
||||
lmasklocalcurve2, localmaskutili,
|
||||
lmaskexplocalcurve2, localmaskexputili,
|
||||
lmaskSHlocalcurve2, localmaskSHutili,
|
||||
@ -1129,6 +1190,12 @@ void Crop::update(int todo)
|
||||
lmasklclocalcurve2, localmasklcutili,
|
||||
lmaskloglocalcurve2, localmasklogutili,
|
||||
lmasklocal_curve2, localmask_utili,
|
||||
lmaskcielocalcurve2, localmaskcieutili,
|
||||
cielocalcurve2,localcieutili,
|
||||
cielocalcurve22,localcieutili2,
|
||||
jzlocalcurve2,localjzutili,
|
||||
czlocalcurve2,localczutili,
|
||||
czjzlocalcurve2,localczjzutili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili,lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
@ -1141,11 +1208,13 @@ void Crop::update(int todo)
|
||||
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
|
||||
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
locccmascieCurve, lcmascieutili, locllmascieCurve, llmascieutili, lochhmascieCurve, lhmascieutili,
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
|
||||
loclmasCurveblwav,lmasutiliblwav,
|
||||
loclmasCurvecolwav,lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
locwavCurvejz, locwavutilijz,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
@ -1154,10 +1223,10 @@ void Crop::update(int todo)
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
LHutili, HHutili, CHutili, HHutilijz, CHutilijz, LHutilijz, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie);
|
||||
meantme, stdtme, meanretie, stdretie, fab);
|
||||
}
|
||||
if (sp + 1u < params.locallab.spots.size()) {
|
||||
// do not copy for last spot as it is not needed anymore
|
||||
@ -1168,6 +1237,13 @@ void Crop::update(int todo)
|
||||
Glib::usleep(settings->cropsleep); //wait to avoid crash when crop 100% and move window
|
||||
}
|
||||
}
|
||||
/*
|
||||
delete [] huerefp;
|
||||
delete [] chromarefp;
|
||||
delete [] lumarefp;
|
||||
delete [] fabrefp;
|
||||
*/
|
||||
|
||||
parent->ipf.lab2rgb(*labnCrop, *baseCrop, params.icm.workingProfile);
|
||||
}
|
||||
|
||||
@ -1548,8 +1624,9 @@ void Crop::update(int todo)
|
||||
adap = 2000.;
|
||||
} else {
|
||||
double E_V = fcomp + log2(double ((fnum * fnum) / fspeed / (fiso / 100.f)));
|
||||
E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV
|
||||
E_V += log2(params.raw.expos); // exposure raw white point ; log2 ==> linear to EV
|
||||
double kexp = 0.;
|
||||
E_V += kexp * params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV
|
||||
E_V += 0.5 * log2(params.raw.expos); // exposure raw white point ; log2 ==> linear to EV
|
||||
adap = pow(2., E_V - 3.); // cd / m2
|
||||
// end calculation adaptation scene luminosity
|
||||
}
|
||||
|
@ -878,7 +878,7 @@ void RawImageSource::nodemosaic(bool bw)
|
||||
for (int j = 0; j < W; j++) {
|
||||
if (bw) {
|
||||
red[i][j] = green[i][j] = blue[i][j] = rawData[i][j];
|
||||
} else if(ri->getSensorType() != ST_FUJI_XTRANS) {
|
||||
} else if(ri->getSensorType() == ST_BAYER) {
|
||||
switch( FC(i, j)) {
|
||||
case 0:
|
||||
red[i][j] = rawData[i][j];
|
||||
@ -895,7 +895,7 @@ void RawImageSource::nodemosaic(bool bw)
|
||||
red[i][j] = green[i][j] = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
} else if(ri->getSensorType() == ST_FUJI_XTRANS) {
|
||||
switch( ri->XTRANSFC(i, j)) {
|
||||
case 0:
|
||||
red[i][j] = rawData[i][j];
|
||||
@ -912,6 +912,10 @@ void RawImageSource::nodemosaic(bool bw)
|
||||
red[i][j] = green[i][j] = 0;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
red[i][j] = rawData[i][j * 3 + 0];
|
||||
green[i][j] = rawData[i][j * 3 + 1];
|
||||
blue[i][j] = rawData[i][j * 3 + 2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,28 +17,82 @@
|
||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
|
||||
#include <giomm.h>
|
||||
#include <glibmm/ustring.h>
|
||||
|
||||
#include "dfmanager.h"
|
||||
#include "../rtgui/options.h"
|
||||
#include "rawimage.h"
|
||||
|
||||
#include "imagedata.h"
|
||||
#include "jaggedarray.h"
|
||||
#include "noncopyable.h"
|
||||
#include "pixelsmap.h"
|
||||
#include "rawimage.h"
|
||||
#include "utils.h"
|
||||
|
||||
namespace rtengine
|
||||
#include "../rtgui/options.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
// *********************** class dfInfo **************************************
|
||||
std::string toUppercase(const std::string& string)
|
||||
{
|
||||
return Glib::ustring(string).uppercase();
|
||||
}
|
||||
|
||||
class dfInfo final
|
||||
{
|
||||
public:
|
||||
Glib::ustring pathname; // filename of dark frame
|
||||
std::list<Glib::ustring> pathNames; // other similar dark frames, used for average
|
||||
std::string maker; // manufacturer
|
||||
std::string model; // model
|
||||
int iso; // ISO (gain)
|
||||
double shutter; // shutter or exposure time in sec
|
||||
time_t timestamp; // seconds since 1 Jan 1970
|
||||
|
||||
|
||||
dfInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, int iso, double shut, time_t t)
|
||||
: pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(nullptr) {}
|
||||
|
||||
dfInfo(const dfInfo &o)
|
||||
: pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(nullptr) {}
|
||||
~dfInfo();
|
||||
|
||||
dfInfo &operator =(const dfInfo &o);
|
||||
|
||||
// Calculate virtual distance between two shots; different model return infinite
|
||||
double distance(const std::string &mak, const std::string &mod, int iso, double shutter) const;
|
||||
|
||||
static std::string key(const std::string &mak, const std::string &mod, int iso, double shut);
|
||||
std::string key() const
|
||||
{
|
||||
return key(maker, model, iso, shutter);
|
||||
}
|
||||
|
||||
const rtengine::RawImage* getRawImage();
|
||||
const std::vector<rtengine::badPix>& getHotPixels();
|
||||
|
||||
private:
|
||||
rtengine::RawImage* ri; // Dark Frame raw data
|
||||
std::vector<rtengine::badPix> badPixels; // Extracted hot pixels
|
||||
|
||||
void updateBadPixelList(const rtengine::RawImage* df);
|
||||
void updateRawImage();
|
||||
};
|
||||
|
||||
dfInfo::~dfInfo()
|
||||
{
|
||||
delete ri;
|
||||
}
|
||||
|
||||
inline dfInfo& dfInfo::operator =(const dfInfo &o)
|
||||
inline dfInfo& dfInfo::operator = (const dfInfo &o)
|
||||
{
|
||||
if (this != &o) {
|
||||
pathname = o.pathname;
|
||||
@ -48,7 +102,7 @@ inline dfInfo& dfInfo::operator =(const dfInfo &o)
|
||||
shutter = o.shutter;
|
||||
timestamp = o.timestamp;
|
||||
|
||||
if( ri ) {
|
||||
if (ri) {
|
||||
delete ri;
|
||||
ri = nullptr;
|
||||
}
|
||||
@ -57,38 +111,13 @@ inline dfInfo& dfInfo::operator =(const dfInfo &o)
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool dfInfo::operator <(const dfInfo &e2) const
|
||||
{
|
||||
if( this->maker.compare( e2.maker) >= 0 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( this->model.compare( e2.model) >= 0 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( this->iso >= e2.iso ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( this->shutter >= e2.shutter ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( this->timestamp >= e2.timestamp ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string dfInfo::key(const std::string &mak, const std::string &mod, int iso, double shut )
|
||||
std::string dfInfo::key(const std::string &mak, const std::string &mod, int iso, double shut)
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << mak << " " << mod << " ";
|
||||
s.width(5);
|
||||
s << iso << "ISO ";
|
||||
s.precision( 2 );
|
||||
s.precision(2);
|
||||
s.width(4);
|
||||
s << shut << "s";
|
||||
return s.str();
|
||||
@ -96,115 +125,106 @@ std::string dfInfo::key(const std::string &mak, const std::string &mod, int iso,
|
||||
|
||||
double dfInfo::distance(const std::string &mak, const std::string &mod, int iso, double shutter) const
|
||||
{
|
||||
if( this->maker.compare( mak) != 0 ) {
|
||||
if (this->maker.compare(mak) != 0) {
|
||||
return INFINITY;
|
||||
}
|
||||
|
||||
if( this->model.compare( mod) != 0 ) {
|
||||
if (this->model.compare(mod) != 0) {
|
||||
return INFINITY;
|
||||
}
|
||||
|
||||
double dISO = (log(this->iso / 100.) - log(iso / 100.)) / log(2);
|
||||
double dShutter = (log(this->shutter) - log(shutter)) / log(2);
|
||||
return sqrt( dISO * dISO + dShutter * dShutter);
|
||||
const double dISO = (log(this->iso / 100.) - log(iso / 100.)) / log(2);
|
||||
const double dShutter = (log(this->shutter) - log(shutter)) / log(2);
|
||||
return std::sqrt(dISO * dISO + dShutter * dShutter);
|
||||
}
|
||||
|
||||
RawImage* dfInfo::getRawImage()
|
||||
const rtengine::RawImage* dfInfo::getRawImage()
|
||||
{
|
||||
if(ri) {
|
||||
if (ri) {
|
||||
return ri;
|
||||
}
|
||||
|
||||
updateRawImage();
|
||||
updateBadPixelList( ri );
|
||||
updateBadPixelList(ri);
|
||||
|
||||
return ri;
|
||||
}
|
||||
|
||||
std::vector<badPix>& dfInfo::getHotPixels()
|
||||
const std::vector<rtengine::badPix>& dfInfo::getHotPixels()
|
||||
{
|
||||
if( !ri ) {
|
||||
if (!ri) {
|
||||
updateRawImage();
|
||||
updateBadPixelList( ri );
|
||||
updateBadPixelList(ri);
|
||||
}
|
||||
|
||||
return badPixels;
|
||||
}
|
||||
|
||||
/* updateRawImage() load into ri the actual pixel data from pathname if there is a single shot
|
||||
* otherwise load each file from the pathNames list and extract a template from the media;
|
||||
* the first file is used also for reading all information other than pixels
|
||||
*/
|
||||
void dfInfo::updateRawImage()
|
||||
{
|
||||
typedef unsigned int acc_t;
|
||||
|
||||
if( !pathNames.empty() ) {
|
||||
std::list<Glib::ustring>::iterator iName = pathNames.begin();
|
||||
ri = new RawImage(*iName); // First file used also for extra pixels information (width,height, shutter, filters etc.. )
|
||||
if (!pathNames.empty()) {
|
||||
std::list<Glib::ustring>::const_iterator iName = pathNames.begin();
|
||||
ri = new rtengine::RawImage(*iName); // First file used also for extra pixels information (width,height, shutter, filters etc.. )
|
||||
|
||||
if( ri->loadRaw(true)) {
|
||||
if (ri->loadRaw(true)) {
|
||||
delete ri;
|
||||
ri = nullptr;
|
||||
} else {
|
||||
int H = ri->get_height();
|
||||
int W = ri->get_width();
|
||||
const int H = ri->get_height();
|
||||
const int W = ri->get_width();
|
||||
ri->compress_image(0);
|
||||
int rSize = W * ((ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) ? 1 : 3);
|
||||
acc_t **acc = new acc_t*[H];
|
||||
|
||||
for( int row = 0; row < H; row++) {
|
||||
acc[row] = new acc_t[rSize ];
|
||||
}
|
||||
const int rSize = W * ((ri->getSensorType() == rtengine::ST_BAYER || ri->getSensorType() == rtengine::ST_FUJI_XTRANS) ? 1 : 3);
|
||||
rtengine::JaggedArray<float> acc(W, H);
|
||||
|
||||
// copy first image into accumulators
|
||||
for (int row = 0; row < H; row++)
|
||||
for (int row = 0; row < H; row++) {
|
||||
for (int col = 0; col < rSize; col++) {
|
||||
acc[row][col] = ri->data[row][col];
|
||||
}
|
||||
}
|
||||
|
||||
int nFiles = 1; // First file data already loaded
|
||||
|
||||
for( ++iName; iName != pathNames.end(); ++iName) {
|
||||
RawImage* temp = new RawImage(*iName);
|
||||
for (++iName; iName != pathNames.end(); ++iName) {
|
||||
rtengine::RawImage temp(*iName);
|
||||
|
||||
if( !temp->loadRaw(true)) {
|
||||
temp->compress_image(0); //\ TODO would be better working on original, because is temporary
|
||||
if (!temp.loadRaw(true)) {
|
||||
temp.compress_image(0); //\ TODO would be better working on original, because is temporary
|
||||
nFiles++;
|
||||
|
||||
if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS ) {
|
||||
for( int row = 0; row < H; row++) {
|
||||
for( int col = 0; col < W; col++) {
|
||||
acc[row][col] += temp->data[row][col];
|
||||
if (ri->getSensorType() == rtengine::ST_BAYER || ri->getSensorType() == rtengine::ST_FUJI_XTRANS) {
|
||||
for (int row = 0; row < H; row++) {
|
||||
for (int col = 0; col < W; col++) {
|
||||
acc[row][col] += temp.data[row][col];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for( int row = 0; row < H; row++) {
|
||||
for( int col = 0; col < W; col++) {
|
||||
acc[row][3 * col + 0] += temp->data[row][3 * col + 0];
|
||||
acc[row][3 * col + 1] += temp->data[row][3 * col + 1];
|
||||
acc[row][3 * col + 2] += temp->data[row][3 * col + 2];
|
||||
for (int row = 0; row < H; row++) {
|
||||
for (int col = 0; col < W; col++) {
|
||||
acc[row][3 * col + 0] += temp.data[row][3 * col + 0];
|
||||
acc[row][3 * col + 1] += temp.data[row][3 * col + 1];
|
||||
acc[row][3 * col + 2] += temp.data[row][3 * col + 2];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete temp;
|
||||
}
|
||||
|
||||
const float factor = 1.f / nFiles;
|
||||
for (int row = 0; row < H; row++) {
|
||||
for (int col = 0; col < rSize; col++) {
|
||||
ri->data[row][col] = acc[row][col] / nFiles;
|
||||
ri->data[row][col] = acc[row][col] * factor;
|
||||
}
|
||||
|
||||
delete [] acc[row];
|
||||
}
|
||||
|
||||
delete [] acc;
|
||||
}
|
||||
} else {
|
||||
ri = new RawImage(pathname);
|
||||
ri = new rtengine::RawImage(pathname);
|
||||
|
||||
if( ri->loadRaw(true)) {
|
||||
if (ri->loadRaw(true)) {
|
||||
delete ri;
|
||||
ri = nullptr;
|
||||
} else {
|
||||
@ -213,35 +233,36 @@ void dfInfo::updateRawImage()
|
||||
}
|
||||
}
|
||||
|
||||
void dfInfo::updateBadPixelList( RawImage *df )
|
||||
void dfInfo::updateBadPixelList(const rtengine::RawImage *df)
|
||||
{
|
||||
if(!df) {
|
||||
if (!df) {
|
||||
return;
|
||||
}
|
||||
const float threshold = 10.f / 8.f;
|
||||
constexpr float threshold = 10.f / 8.f;
|
||||
|
||||
if( df->getSensorType() == ST_BAYER || df->getSensorType() == ST_FUJI_XTRANS ) {
|
||||
std::vector<badPix> badPixelsTemp;
|
||||
if (df->getSensorType() == rtengine::ST_BAYER || df->getSensorType() == rtengine::ST_FUJI_XTRANS) {
|
||||
std::vector<rtengine::badPix> badPixelsTemp;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
{
|
||||
std::vector<badPix> badPixelsThread;
|
||||
std::vector<rtengine::badPix> badPixelsThread;
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for nowait
|
||||
#endif
|
||||
|
||||
for( int row = 2; row < df->get_height() - 2; row++)
|
||||
for( int col = 2; col < df->get_width() - 2; col++) {
|
||||
float m = (df->data[row - 2][col - 2] + df->data[row - 2][col] + df->data[row - 2][col + 2] +
|
||||
for (int row = 2; row < df->get_height() - 2; ++row) {
|
||||
for (int col = 2; col < df->get_width() - 2; ++col) {
|
||||
const float m = df->data[row - 2][col - 2] + df->data[row - 2][col] + df->data[row - 2][col + 2] +
|
||||
df->data[row][col - 2] + df->data[row][col + 2] +
|
||||
df->data[row + 2][col - 2] + df->data[row + 2][col] + df->data[row + 2][col + 2]);
|
||||
df->data[row + 2][col - 2] + df->data[row + 2][col] + df->data[row + 2][col + 2];
|
||||
|
||||
if( df->data[row][col] > m * threshold ) {
|
||||
if (df->data[row][col] > m * threshold) {
|
||||
badPixelsThread.emplace_back(col, row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp critical
|
||||
@ -250,48 +271,78 @@ void dfInfo::updateBadPixelList( RawImage *df )
|
||||
}
|
||||
badPixels.insert(badPixels.end(), badPixelsTemp.begin(), badPixelsTemp.end());
|
||||
} else {
|
||||
for( int row = 1; row < df->get_height() - 1; row++)
|
||||
for( int col = 1; col < df->get_width() - 1; col++) {
|
||||
for (int row = 1; row < df->get_height() - 1; ++row) {
|
||||
for (int col = 1; col < df->get_width() - 1; ++col) {
|
||||
float m[3];
|
||||
|
||||
for( int c = 0; c < 3; c++) {
|
||||
m[c] = (df->data[row - 1][3 * (col - 1) + c] + df->data[row - 1][3 * col + c] + df->data[row - 1][3 * (col + 1) + c] +
|
||||
for (int c = 0; c < 3; c++) {
|
||||
m[c] = df->data[row - 1][3 * (col - 1) + c] + df->data[row - 1][3 * col + c] + df->data[row - 1][3 * (col + 1) + c] +
|
||||
df->data[row] [3 * (col - 1) + c] + df->data[row] [3 * col + c] +
|
||||
df->data[row + 1][3 * (col - 1) + c] + df->data[row + 1][3 * col + c] + df->data[row + 1][3 * (col + 1) + c]);
|
||||
df->data[row + 1][3 * (col - 1) + c] + df->data[row + 1][3 * col + c] + df->data[row + 1][3 * (col + 1) + c];
|
||||
}
|
||||
|
||||
if( df->data[row][3 * col] > m[0]*threshold || df->data[row][3 * col + 1] > m[1]*threshold || df->data[row][3 * col + 2] > m[2]*threshold) {
|
||||
if (df->data[row][3 * col] > m[0]*threshold || df->data[row][3 * col + 1] > m[1]*threshold || df->data[row][3 * col + 2] > m[2]*threshold) {
|
||||
badPixels.emplace_back(col, row);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( settings->verbose ) {
|
||||
if (rtengine::settings->verbose) {
|
||||
std::cout << "Extracted " << badPixels.size() << " pixels from darkframe:" << df->get_filename().c_str() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************* class DFManager *********************************
|
||||
}
|
||||
|
||||
void DFManager::init(const Glib::ustring& pathname)
|
||||
class rtengine::DFManager::Implementation final :
|
||||
public NonCopyable
|
||||
{
|
||||
public:
|
||||
void init(const Glib::ustring& pathname);
|
||||
Glib::ustring getPathname() const
|
||||
{
|
||||
return currentPath;
|
||||
};
|
||||
void getStat(int& totFiles, int& totTemplates) const;
|
||||
const RawImage* searchDarkFrame(const std::string& mak, const std::string& mod, int iso, double shut, time_t t);
|
||||
const RawImage* searchDarkFrame(const Glib::ustring& filename);
|
||||
const std::vector<badPix>* getHotPixels(const std::string& mak, const std::string& mod, int iso, double shut, time_t t);
|
||||
const std::vector<badPix>* getHotPixels(const Glib::ustring& filename);
|
||||
const std::vector<badPix>* getBadPixels(const std::string& mak, const std::string& mod, const std::string& serial) const;
|
||||
|
||||
private:
|
||||
typedef std::multimap<std::string, dfInfo> dfList_t;
|
||||
typedef std::map<std::string, std::vector<badPix> > bpList_t;
|
||||
dfList_t dfList;
|
||||
bpList_t bpList;
|
||||
bool initialized;
|
||||
Glib::ustring currentPath;
|
||||
dfInfo* addFileInfo(const Glib::ustring &filename, bool pool = true);
|
||||
dfInfo* find(const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t);
|
||||
int scanBadPixelsFile(const Glib::ustring &filename);
|
||||
};
|
||||
|
||||
|
||||
void rtengine::DFManager::Implementation::init(const Glib::ustring& pathname)
|
||||
{
|
||||
if (pathname.empty()) {
|
||||
return;
|
||||
}
|
||||
std::vector<Glib::ustring> names;
|
||||
|
||||
auto dir = Gio::File::create_for_path (pathname);
|
||||
const auto dir = Gio::File::create_for_path(pathname);
|
||||
if (!dir || !dir->query_exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
auto enumerator = dir->enumerate_children ("standard::name");
|
||||
const auto enumerator = dir->enumerate_children("standard::name");
|
||||
|
||||
while (auto file = enumerator->next_file ()) {
|
||||
names.emplace_back (Glib::build_filename (pathname, file->get_name ()));
|
||||
while (const auto file = enumerator->next_file()) {
|
||||
names.emplace_back(Glib::build_filename(pathname, file->get_name()));
|
||||
}
|
||||
|
||||
} catch (Glib::Exception&) {}
|
||||
@ -299,40 +350,40 @@ void DFManager::init(const Glib::ustring& pathname)
|
||||
dfList.clear();
|
||||
bpList.clear();
|
||||
|
||||
for (size_t i = 0; i < names.size(); i++) {
|
||||
size_t lastdot = names[i].find_last_of ('.');
|
||||
for (const auto &name : names) {
|
||||
const auto lastdot = name.find_last_of('.');
|
||||
|
||||
if (lastdot != Glib::ustring::npos && names[i].substr(lastdot) == ".badpixels" ) {
|
||||
int n = scanBadPixelsFile( names[i] );
|
||||
if (lastdot != Glib::ustring::npos && name.substr(lastdot) == ".badpixels") {
|
||||
const int n = scanBadPixelsFile(name);
|
||||
|
||||
if( n > 0 && settings->verbose) {
|
||||
printf("Loaded %s: %d pixels\n", names[i].c_str(), n);
|
||||
if (n > 0 && settings->verbose) {
|
||||
printf("Loaded %s: %d pixels\n", name.c_str(), n);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
addFileInfo(names[i]);
|
||||
} catch( std::exception& e ) {}
|
||||
addFileInfo(name);
|
||||
} catch(std::exception& e) {}
|
||||
}
|
||||
|
||||
// Where multiple shots exist for same group, move filename to list
|
||||
for( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); ++iter ) {
|
||||
dfInfo &i = iter->second;
|
||||
for (auto &df : dfList) {
|
||||
dfInfo &i = df.second;
|
||||
|
||||
if( !i.pathNames.empty() && !i.pathname.empty() ) {
|
||||
i.pathNames.push_back( i.pathname );
|
||||
if (!i.pathNames.empty() && !i.pathname.empty()) {
|
||||
i.pathNames.push_back(i.pathname);
|
||||
i.pathname.clear();
|
||||
}
|
||||
|
||||
if( settings->verbose ) {
|
||||
if( !i.pathname.empty() ) {
|
||||
printf( "%s: %s\n", i.key().c_str(), i.pathname.c_str());
|
||||
if (settings->verbose) {
|
||||
if (!i.pathname.empty()) {
|
||||
printf("%s: %s\n", i.key().c_str(), i.pathname.c_str());
|
||||
} else {
|
||||
printf( "%s: MEAN of \n ", i.key().c_str());
|
||||
printf("%s: MEAN of \n ", i.key().c_str());
|
||||
|
||||
for(std::list<Glib::ustring>::iterator path = i.pathNames.begin(); path != i.pathNames.end(); ++path) {
|
||||
for (std::list<Glib::ustring>::iterator path = i.pathNames.begin(); path != i.pathNames.end(); ++path) {
|
||||
printf("%s, ", path->c_str());
|
||||
}
|
||||
|
||||
@ -345,9 +396,140 @@ void DFManager::init(const Glib::ustring& pathname)
|
||||
return;
|
||||
}
|
||||
|
||||
dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool)
|
||||
void rtengine::DFManager::Implementation::getStat(int& totFiles, int& totTemplates) const
|
||||
{
|
||||
auto ext = getFileExtension(filename);
|
||||
totFiles = 0;
|
||||
totTemplates = 0;
|
||||
|
||||
for (const auto &df : dfList) {
|
||||
const dfInfo &i = df.second;
|
||||
|
||||
if (i.pathname.empty()) {
|
||||
totTemplates++;
|
||||
totFiles += i.pathNames.size();
|
||||
} else {
|
||||
totFiles++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* The search for the best match is twofold:
|
||||
* if perfect matches for iso and shutter are found, then the list is scanned for lesser distance in time
|
||||
* otherwise if no match is found, the whole list is searched for lesser distance in iso and shutter
|
||||
*/
|
||||
const rtengine::RawImage* rtengine::DFManager::Implementation::searchDarkFrame(const std::string& mak, const std::string& mod, int iso, double shut, time_t t)
|
||||
{
|
||||
dfInfo* df = find(toUppercase(mak), toUppercase(mod), iso, shut, t);
|
||||
|
||||
if (df) {
|
||||
return df->getRawImage();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
const rtengine::RawImage* rtengine::DFManager::Implementation::searchDarkFrame(const Glib::ustring& filename)
|
||||
{
|
||||
for (auto& df : dfList) {
|
||||
if (df.second.pathname.compare(filename) == 0) {
|
||||
return df.second.getRawImage();
|
||||
}
|
||||
}
|
||||
|
||||
dfInfo *df = addFileInfo(filename, false);
|
||||
|
||||
if (df) {
|
||||
return df->getRawImage();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::vector<rtengine::badPix>* rtengine::DFManager::Implementation::getHotPixels(const Glib::ustring& filename)
|
||||
{
|
||||
for (auto& df : dfList) {
|
||||
if (df.second.pathname.compare(filename) == 0) {
|
||||
return &df.second.getHotPixels();
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::vector<rtengine::badPix>* rtengine::DFManager::Implementation::getHotPixels(const std::string& mak, const std::string& mod, int iso, double shut, time_t t)
|
||||
{
|
||||
dfInfo* df = find(toUppercase(mak), toUppercase(mod), iso, shut, t);
|
||||
|
||||
if (df) {
|
||||
if (settings->verbose) {
|
||||
if (!df->pathname.empty()) {
|
||||
printf("Searched hotpixels from %s\n", df->pathname.c_str());
|
||||
} else {
|
||||
if (!df->pathNames.empty()) {
|
||||
printf("Searched hotpixels from template (first %s)\n", df->pathNames.begin()->c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return &df->getHotPixels();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<rtengine::badPix>* rtengine::DFManager::Implementation::getBadPixels(const std::string& mak, const std::string& mod, const std::string& serial) const
|
||||
{
|
||||
bpList_t::const_iterator iter;
|
||||
bool found = false;
|
||||
|
||||
if (!serial.empty()) {
|
||||
// search with serial number first
|
||||
std::ostringstream s;
|
||||
s << mak << " " << mod << " " << serial;
|
||||
iter = bpList.find(s.str());
|
||||
|
||||
if (iter != bpList.end()) {
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (settings->verbose) {
|
||||
if (found) {
|
||||
printf("%s.badpixels found\n", s.str().c_str());
|
||||
} else {
|
||||
printf("%s.badpixels not found\n", s.str().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
// search without serial number
|
||||
std::ostringstream s;
|
||||
s << mak << " " << mod;
|
||||
iter = bpList.find(s.str());
|
||||
|
||||
if (iter != bpList.end()) {
|
||||
found = true;
|
||||
}
|
||||
|
||||
if (settings->verbose) {
|
||||
if (found) {
|
||||
printf("%s.badpixels found\n", s.str().c_str());
|
||||
} else {
|
||||
printf("%s.badpixels not found\n", s.str().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return &(iter->second);
|
||||
}
|
||||
}
|
||||
|
||||
dfInfo* rtengine::DFManager::Implementation::addFileInfo(const Glib::ustring& filename, bool pool)
|
||||
{
|
||||
const auto ext = getFileExtension(filename);
|
||||
|
||||
if (ext.empty() || !options.is_extention_enabled(ext)) {
|
||||
return nullptr;
|
||||
@ -376,37 +558,34 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool)
|
||||
}
|
||||
|
||||
RawImage ri(filename);
|
||||
int res = ri.loadRaw(false); // Read information about shot
|
||||
|
||||
if (res != 0) {
|
||||
if (ri.loadRaw(false) != 0) { // Read information about shot
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
dfList_t::iterator iter;
|
||||
|
||||
if(!pool) {
|
||||
dfInfo n(filename, "", "", 0, 0, 0);
|
||||
iter = dfList.emplace("", n);
|
||||
if (!pool) {
|
||||
const dfInfo n(filename, "", "", 0, 0, 0);
|
||||
auto iter = dfList.emplace("", n);
|
||||
return &(iter->second);
|
||||
}
|
||||
|
||||
FramesData idata(filename, std::unique_ptr<RawMetaDataLocation>(new RawMetaDataLocation(ri.get_exifBase(), ri.get_ciffBase(), ri.get_ciffLen())), true);
|
||||
/* Files are added in the map, divided by same maker/model,ISO and shutter*/
|
||||
std::string key(dfInfo::key(((Glib::ustring)idata.getMake()).uppercase(), ((Glib::ustring)idata.getModel()).uppercase(), idata.getISOSpeed(), idata.getShutterSpeed()));
|
||||
iter = dfList.find(key);
|
||||
std::string key(dfInfo::key(toUppercase(idata.getMake()), toUppercase(idata.getModel()), idata.getISOSpeed(), idata.getShutterSpeed()));
|
||||
auto iter = dfList.find(key);
|
||||
|
||||
if(iter == dfList.end()) {
|
||||
dfInfo n(filename, ((Glib::ustring)idata.getMake()).uppercase(), ((Glib::ustring)idata.getModel()).uppercase(), idata.getISOSpeed(), idata.getShutterSpeed(), idata.getDateTimeAsTS());
|
||||
if (iter == dfList.end()) {
|
||||
dfInfo n(filename, toUppercase(idata.getMake()), toUppercase(idata.getModel()), idata.getISOSpeed(), idata.getShutterSpeed(), idata.getDateTimeAsTS());
|
||||
iter = dfList.emplace(key, n);
|
||||
} else {
|
||||
while(iter != dfList.end() && iter->second.key() == key && ABS(iter->second.timestamp - idata.getDateTimeAsTS()) > 60 * 60 * 6) { // 6 hour difference
|
||||
++iter;
|
||||
}
|
||||
|
||||
if(iter != dfList.end()) {
|
||||
if (iter != dfList.end()) {
|
||||
iter->second.pathNames.push_back(filename);
|
||||
} else {
|
||||
dfInfo n(filename, ((Glib::ustring)idata.getMake()).uppercase(), ((Glib::ustring)idata.getModel()).uppercase(), idata.getISOSpeed(), idata.getShutterSpeed(), idata.getDateTimeAsTS());
|
||||
dfInfo n(filename, toUppercase(idata.getMake()), toUppercase(idata.getModel()), idata.getISOSpeed(), idata.getShutterSpeed(), idata.getDateTimeAsTS());
|
||||
iter = dfList.emplace(key, n);
|
||||
}
|
||||
}
|
||||
@ -418,44 +597,23 @@ dfInfo* DFManager::addFileInfo (const Glib::ustring& filename, bool pool)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void DFManager::getStat( int &totFiles, int &totTemplates)
|
||||
dfInfo* rtengine::DFManager::Implementation::find(const std::string& mak, const std::string& mod, int isospeed, double shut, time_t t)
|
||||
{
|
||||
totFiles = 0;
|
||||
totTemplates = 0;
|
||||
|
||||
for( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); ++iter ) {
|
||||
dfInfo &i = iter->second;
|
||||
|
||||
if( i.pathname.empty() ) {
|
||||
totTemplates++;
|
||||
totFiles += i.pathNames.size();
|
||||
} else {
|
||||
totFiles++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* The search for the best match is twofold:
|
||||
* if perfect matches for iso and shutter are found, then the list is scanned for lesser distance in time
|
||||
* otherwise if no match is found, the whole list is searched for lesser distance in iso and shutter
|
||||
*/
|
||||
dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t )
|
||||
{
|
||||
if( dfList.empty() ) {
|
||||
if (dfList.empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string key( dfInfo::key(mak, mod, isospeed, shut) );
|
||||
dfList_t::iterator iter = dfList.find( key );
|
||||
const std::string key(dfInfo::key(mak, mod, isospeed, shut));
|
||||
dfList_t::iterator iter = dfList.find(key);
|
||||
|
||||
if( iter != dfList.end() ) {
|
||||
if (iter != dfList.end()) {
|
||||
dfList_t::iterator bestMatch = iter;
|
||||
time_t bestDeltaTime = ABS(iter->second.timestamp - t);
|
||||
|
||||
for(++iter; iter != dfList.end() && !key.compare( iter->second.key() ); ++iter ) {
|
||||
time_t d = ABS(iter->second.timestamp - t );
|
||||
for (++iter; iter != dfList.end() && !key.compare(iter->second.key()); ++iter) {
|
||||
const time_t d = ABS(iter->second.timestamp - t);
|
||||
|
||||
if( d < bestDeltaTime ) {
|
||||
if (d < bestDeltaTime) {
|
||||
bestMatch = iter;
|
||||
bestDeltaTime = d;
|
||||
}
|
||||
@ -465,12 +623,12 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso
|
||||
} else {
|
||||
iter = dfList.begin();
|
||||
dfList_t::iterator bestMatch = iter;
|
||||
double bestD = iter->second.distance( mak, mod, isospeed, shut );
|
||||
double bestD = iter->second.distance(mak, mod, isospeed, shut);
|
||||
|
||||
for( ++iter; iter != dfList.end(); ++iter ) {
|
||||
double d = iter->second.distance( mak, mod, isospeed, shut );
|
||||
for (++iter; iter != dfList.end(); ++iter) {
|
||||
const double d = iter->second.distance(mak, mod, isospeed, shut);
|
||||
|
||||
if( d < bestD ) {
|
||||
if (d < bestD) {
|
||||
bestD = d;
|
||||
bestMatch = iter;
|
||||
}
|
||||
@ -480,170 +638,107 @@ dfInfo* DFManager::find( const std::string &mak, const std::string &mod, int iso
|
||||
}
|
||||
}
|
||||
|
||||
RawImage* DFManager::searchDarkFrame( const std::string &mak, const std::string &mod, int iso, double shut, time_t t )
|
||||
{
|
||||
dfInfo *df = find( ((Glib::ustring)mak).uppercase(), ((Glib::ustring)mod).uppercase(), iso, shut, t );
|
||||
|
||||
if( df ) {
|
||||
return df->getRawImage();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
RawImage* DFManager::searchDarkFrame( const Glib::ustring filename )
|
||||
{
|
||||
for ( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); ++iter ) {
|
||||
if( iter->second.pathname.compare( filename ) == 0 ) {
|
||||
return iter->second.getRawImage();
|
||||
}
|
||||
}
|
||||
|
||||
dfInfo *df = addFileInfo( filename, false );
|
||||
|
||||
if(df) {
|
||||
return df->getRawImage();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
std::vector<badPix> *DFManager::getHotPixels ( const Glib::ustring filename )
|
||||
{
|
||||
for ( dfList_t::iterator iter = dfList.begin(); iter != dfList.end(); ++iter ) {
|
||||
if( iter->second.pathname.compare( filename ) == 0 ) {
|
||||
return &iter->second.getHotPixels();
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
std::vector<badPix> *DFManager::getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t )
|
||||
{
|
||||
dfInfo *df = find( ((Glib::ustring)mak).uppercase(), ((Glib::ustring)mod).uppercase(), iso, shut, t );
|
||||
|
||||
if( df ) {
|
||||
if( settings->verbose ) {
|
||||
if( !df->pathname.empty() ) {
|
||||
printf( "Searched hotpixels from %s\n", df->pathname.c_str());
|
||||
} else {
|
||||
if( !df->pathNames.empty() ) {
|
||||
printf( "Searched hotpixels from template (first %s)\n", df->pathNames.begin()->c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return &df->getHotPixels();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
int DFManager::scanBadPixelsFile( Glib::ustring filename )
|
||||
int rtengine::DFManager::Implementation::scanBadPixelsFile(const Glib::ustring& filename)
|
||||
{
|
||||
FILE *file = ::fopen( filename.c_str(), "r" );
|
||||
|
||||
if( !file ) {
|
||||
return false;
|
||||
if (!file) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t lastdot = filename.find_last_of ('.');
|
||||
size_t dirpos1 = filename.find_last_of ('/');
|
||||
size_t dirpos2 = filename.find_last_of ('\\');
|
||||
const auto lastdot = filename.find_last_of('.');
|
||||
auto dirpos1 = filename.find_last_of('/');
|
||||
auto dirpos2 = filename.find_last_of('\\');
|
||||
|
||||
if( dirpos1 == Glib::ustring::npos && dirpos2 == Glib::ustring::npos ) {
|
||||
if (dirpos1 == Glib::ustring::npos && dirpos2 == Glib::ustring::npos) {
|
||||
dirpos1 = 0;
|
||||
} else if( dirpos1 != Glib::ustring::npos && dirpos2 != Glib::ustring::npos ) {
|
||||
} else if (dirpos1 != Glib::ustring::npos && dirpos2 != Glib::ustring::npos) {
|
||||
dirpos1 = (dirpos1 > dirpos2 ? dirpos1 : dirpos2);
|
||||
} else if( dirpos1 == Glib::ustring::npos ) {
|
||||
} else if (dirpos1 == Glib::ustring::npos) {
|
||||
dirpos1 = dirpos2;
|
||||
}
|
||||
|
||||
std::string makmodel(filename, dirpos1 + 1, lastdot - (dirpos1 + 1) );
|
||||
const std::string makmodel(filename, dirpos1 + 1, lastdot - (dirpos1 + 1));
|
||||
std::vector<badPix> bp;
|
||||
char line[256];
|
||||
|
||||
if(fgets(line, sizeof(line), file )) {
|
||||
if (fgets(line, sizeof(line), file)) {
|
||||
int x, y;
|
||||
int offset = 0;
|
||||
int numparms = sscanf(line, "%d %d", &x, &y);
|
||||
|
||||
if( numparms == 1 ) { // only one number in first line means, that this is the offset.
|
||||
if (numparms == 1) { // only one number in first line means, that this is the offset.
|
||||
offset = x;
|
||||
} else if(numparms == 2) {
|
||||
} else if (numparms == 2) {
|
||||
bp.emplace_back(x + offset, y + offset);
|
||||
}
|
||||
|
||||
while( fgets(line, sizeof(line), file ) ) {
|
||||
if( sscanf(line, "%d %d", &x, &y) == 2 ) {
|
||||
while(fgets(line, sizeof(line), file)) {
|
||||
if (sscanf(line, "%d %d", &x, &y) == 2) {
|
||||
bp.emplace_back(x + offset, y + offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int numPixels = bp.size();
|
||||
const int numPixels = bp.size();
|
||||
|
||||
if( numPixels > 0 ) {
|
||||
bpList[ makmodel ] = bp;
|
||||
if (numPixels > 0) {
|
||||
bpList[makmodel] = bp;
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
return numPixels;
|
||||
}
|
||||
|
||||
std::vector<badPix> *DFManager::getBadPixels ( const std::string &mak, const std::string &mod, const std::string &serial)
|
||||
rtengine::DFManager& rtengine::DFManager::getInstance()
|
||||
{
|
||||
bpList_t::iterator iter;
|
||||
bool found = false;
|
||||
|
||||
if( !serial.empty() ) {
|
||||
// search with serial number first
|
||||
std::ostringstream s;
|
||||
s << mak << " " << mod << " " << serial;
|
||||
iter = bpList.find( s.str() );
|
||||
|
||||
if( iter != bpList.end() ) {
|
||||
found = true;
|
||||
}
|
||||
|
||||
if( settings->verbose ) {
|
||||
if(found) {
|
||||
printf("%s.badpixels found\n", s.str().c_str());
|
||||
} else {
|
||||
printf("%s.badpixels not found\n", s.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(!found) {
|
||||
// search without serial number
|
||||
std::ostringstream s;
|
||||
s << mak << " " << mod;
|
||||
iter = bpList.find( s.str() );
|
||||
|
||||
if( iter != bpList.end() ) {
|
||||
found = true;
|
||||
}
|
||||
|
||||
if( settings->verbose ) {
|
||||
if(found) {
|
||||
printf("%s.badpixels found\n", s.str().c_str());
|
||||
} else {
|
||||
printf("%s.badpixels not found\n", s.str().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!found) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return &(iter->second);
|
||||
}
|
||||
static DFManager instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
// Global variable
|
||||
DFManager dfm;
|
||||
|
||||
|
||||
void rtengine::DFManager::init(const Glib::ustring& pathname)
|
||||
{
|
||||
implementation->init(pathname);
|
||||
}
|
||||
|
||||
Glib::ustring rtengine::DFManager::getPathname() const
|
||||
{
|
||||
return implementation->getPathname();
|
||||
}
|
||||
|
||||
void rtengine::DFManager::getStat(int& totFiles, int& totTemplates) const
|
||||
{
|
||||
implementation->getStat(totFiles, totTemplates);
|
||||
}
|
||||
|
||||
const rtengine::RawImage* rtengine::DFManager::searchDarkFrame(const std::string& mak, const std::string& mod, int iso, double shut, time_t t)
|
||||
{
|
||||
return implementation->searchDarkFrame(mak, mod, iso, shut, t);
|
||||
}
|
||||
|
||||
const rtengine::RawImage* rtengine::DFManager::searchDarkFrame(const Glib::ustring& filename)
|
||||
{
|
||||
return implementation->searchDarkFrame(filename);
|
||||
}
|
||||
|
||||
const std::vector<rtengine::badPix>* rtengine::DFManager::getHotPixels(const std::string& mak, const std::string& mod, int iso, double shut, time_t t)
|
||||
{
|
||||
return implementation->getHotPixels(mak, mod, iso, shut, t);
|
||||
}
|
||||
|
||||
const std::vector<rtengine::badPix>* rtengine::DFManager::getHotPixels(const Glib::ustring& filename)
|
||||
{
|
||||
return implementation->getHotPixels(filename);
|
||||
}
|
||||
|
||||
const std::vector<rtengine::badPix>* rtengine::DFManager::getBadPixels(const std::string& mak, const std::string& mod, const std::string& serial) const
|
||||
{
|
||||
return implementation->getBadPixels(mak, mod, serial);
|
||||
}
|
||||
|
||||
rtengine::DFManager::DFManager() :
|
||||
implementation(new Implementation)
|
||||
{
|
||||
}
|
||||
|
||||
rtengine::DFManager::~DFManager() = default;
|
||||
|
@ -18,89 +18,40 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <glibmm/ustring.h>
|
||||
|
||||
#include "pixelsmap.h"
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
struct badPix;
|
||||
|
||||
class RawImage;
|
||||
class dfInfo final
|
||||
{
|
||||
public:
|
||||
|
||||
Glib::ustring pathname; // filename of dark frame
|
||||
std::list<Glib::ustring> pathNames; // other similar dark frames, used for average
|
||||
std::string maker; ///< manufacturer
|
||||
std::string model; ///< model
|
||||
int iso; ///< ISO (gain)
|
||||
double shutter; ///< shutter or exposure time in sec
|
||||
time_t timestamp; ///< seconds since 1 Jan 1970
|
||||
|
||||
|
||||
dfInfo(const Glib::ustring &name, const std::string &mak, const std::string &mod, int iso, double shut, time_t t)
|
||||
: pathname(name), maker(mak), model(mod), iso(iso), shutter(shut), timestamp(t), ri(nullptr) {}
|
||||
|
||||
dfInfo( const dfInfo &o)
|
||||
: pathname(o.pathname), maker(o.maker), model(o.model), iso(o.iso), shutter(o.shutter), timestamp(o.timestamp), ri(nullptr) {}
|
||||
~dfInfo();
|
||||
|
||||
dfInfo &operator =(const dfInfo &o);
|
||||
bool operator <(const dfInfo &e2) const;
|
||||
|
||||
// Calculate virtual distance between two shots; different model return infinite
|
||||
double distance(const std::string &mak, const std::string &mod, int iso, double shutter) const;
|
||||
|
||||
static std::string key(const std::string &mak, const std::string &mod, int iso, double shut );
|
||||
std::string key()
|
||||
{
|
||||
return key( maker, model, iso, shutter);
|
||||
}
|
||||
|
||||
RawImage *getRawImage();
|
||||
std::vector<badPix> &getHotPixels();
|
||||
|
||||
protected:
|
||||
RawImage *ri; ///< Dark Frame raw data
|
||||
std::vector<badPix> badPixels; ///< Extracted hot pixels
|
||||
|
||||
void updateBadPixelList( RawImage *df );
|
||||
void updateRawImage();
|
||||
};
|
||||
|
||||
class DFManager final
|
||||
{
|
||||
public:
|
||||
void init(const Glib::ustring &pathname);
|
||||
Glib::ustring getPathname()
|
||||
{
|
||||
return currentPath;
|
||||
};
|
||||
void getStat( int &totFiles, int &totTemplate);
|
||||
RawImage *searchDarkFrame( const std::string &mak, const std::string &mod, int iso, double shut, time_t t );
|
||||
RawImage *searchDarkFrame( const Glib::ustring filename );
|
||||
std::vector<badPix> *getHotPixels ( const std::string &mak, const std::string &mod, int iso, double shut, time_t t );
|
||||
std::vector<badPix> *getHotPixels ( const Glib::ustring filename );
|
||||
std::vector<badPix> *getBadPixels ( const std::string &mak, const std::string &mod, const std::string &serial);
|
||||
static DFManager& getInstance();
|
||||
|
||||
protected:
|
||||
typedef std::multimap<std::string, dfInfo> dfList_t;
|
||||
typedef std::map<std::string, std::vector<badPix> > bpList_t;
|
||||
dfList_t dfList;
|
||||
bpList_t bpList;
|
||||
bool initialized;
|
||||
Glib::ustring currentPath;
|
||||
dfInfo *addFileInfo(const Glib::ustring &filename, bool pool = true );
|
||||
dfInfo *find( const std::string &mak, const std::string &mod, int isospeed, double shut, time_t t );
|
||||
int scanBadPixelsFile( Glib::ustring filename );
|
||||
void init(const Glib::ustring& pathname);
|
||||
Glib::ustring getPathname() const;
|
||||
void getStat(int& totFiles, int& totTemplates) const;
|
||||
const RawImage* searchDarkFrame(const std::string& mak, const std::string& mod, int iso, double shut, time_t t);
|
||||
const RawImage* searchDarkFrame(const Glib::ustring& filename);
|
||||
const std::vector<badPix>* getHotPixels(const std::string& mak, const std::string& mod, int iso, double shut, time_t t);
|
||||
const std::vector<badPix>* getHotPixels(const Glib::ustring& filename);
|
||||
const std::vector<badPix>* getBadPixels(const std::string& mak, const std::string& mod, const std::string& serial) const;
|
||||
|
||||
private:
|
||||
DFManager();
|
||||
~DFManager();
|
||||
|
||||
class Implementation;
|
||||
|
||||
const std::unique_ptr<Implementation> implementation;
|
||||
};
|
||||
|
||||
extern DFManager dfm;
|
||||
|
||||
}
|
||||
|
43
rtengine/dnggainmap.h
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2021 Ingo Weyrich <heckflosse67@gmx.de>
|
||||
*
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* RawTherapee is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
struct GainMap
|
||||
{
|
||||
std::uint32_t Top;
|
||||
std::uint32_t Left;
|
||||
std::uint32_t Bottom;
|
||||
std::uint32_t Right;
|
||||
std::uint32_t Plane;
|
||||
std::uint32_t Planes;
|
||||
std::uint32_t RowPitch;
|
||||
std::uint32_t ColPitch;
|
||||
std::uint32_t MapPointsV;
|
||||
std::uint32_t MapPointsH;
|
||||
double MapSpacingV;
|
||||
double MapSpacingH;
|
||||
double MapOriginV;
|
||||
double MapOriginH;
|
||||
std::uint32_t MapPlanes;
|
||||
std::vector<float> MapGain;
|
||||
};
|
@ -77,7 +77,7 @@ bool DynamicProfileRule::operator< (const DynamicProfileRule &other) const
|
||||
}
|
||||
|
||||
|
||||
bool DynamicProfileRule::matches (const rtengine::FramesMetaData *im) const
|
||||
bool DynamicProfileRule::matches (const rtengine::FramesMetaData *im, const Glib::ustring& filename) const
|
||||
{
|
||||
return (iso (im->getISOSpeed())
|
||||
&& fnumber (im->getFNumber())
|
||||
@ -86,6 +86,7 @@ bool DynamicProfileRule::matches (const rtengine::FramesMetaData *im) const
|
||||
&& expcomp (im->getExpComp())
|
||||
&& camera (im->getCamera())
|
||||
&& lens (im->getLens())
|
||||
&& path (filename)
|
||||
&& imagetype(im->getImageType(0)));
|
||||
}
|
||||
|
||||
@ -214,6 +215,7 @@ bool DynamicProfileRules::loadRules()
|
||||
get_double_range (rule.expcomp, kf, group, "expcomp");
|
||||
get_optional (rule.camera, kf, group, "camera");
|
||||
get_optional (rule.lens, kf, group, "lens");
|
||||
get_optional (rule.path, kf, group, "path");
|
||||
get_optional (rule.imagetype, kf, group, "imagetype");
|
||||
|
||||
try {
|
||||
@ -247,6 +249,7 @@ bool DynamicProfileRules::storeRules()
|
||||
set_double_range (kf, group, "expcomp", rule.expcomp);
|
||||
set_optional (kf, group, "camera", rule.camera);
|
||||
set_optional (kf, group, "lens", rule.lens);
|
||||
set_optional (kf, group, "path", rule.path);
|
||||
set_optional (kf, group, "imagetype", rule.imagetype);
|
||||
kf.set_string (group, "profilepath", rule.profilepath);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
};
|
||||
|
||||
DynamicProfileRule();
|
||||
bool matches (const rtengine::FramesMetaData *im) const;
|
||||
bool matches (const rtengine::FramesMetaData *im, const Glib::ustring& filename) const;
|
||||
bool operator< (const DynamicProfileRule &other) const;
|
||||
|
||||
int serial_number;
|
||||
@ -62,6 +62,7 @@ public:
|
||||
Range<double> expcomp;
|
||||
Optional camera;
|
||||
Optional lens;
|
||||
Optional path;
|
||||
Optional imagetype;
|
||||
Glib::ustring profilepath;
|
||||
};
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <functional>
|
||||
|
||||
#include <strings.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <tiff.h>
|
||||
|
||||
@ -57,7 +58,8 @@ template<typename T>
|
||||
T getFromFrame(
|
||||
const std::vector<std::unique_ptr<FrameData>>& frames,
|
||||
std::size_t frame,
|
||||
const std::function<T (const FrameData&)>& function
|
||||
const std::function<T (const FrameData&)>& function,
|
||||
T defval = {}
|
||||
)
|
||||
{
|
||||
if (frame < frames.size()) {
|
||||
@ -66,7 +68,7 @@ T getFromFrame(
|
||||
if (!frames.empty()) {
|
||||
return function(*frames[0]);
|
||||
}
|
||||
return {};
|
||||
return defval;
|
||||
}
|
||||
|
||||
const std::string& validateUft8(const std::string& str, const std::string& on_error = "???")
|
||||
@ -85,11 +87,21 @@ FramesMetaData* FramesMetaData::fromFile(const Glib::ustring& fname, std::unique
|
||||
return new FramesData(fname, std::move(rml), firstFrameOnly);
|
||||
}
|
||||
|
||||
FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory* rootDir, rtexif::TagDirectory* firstRootDir) :
|
||||
static struct tm timeFromTS(const time_t ts)
|
||||
{
|
||||
#if !defined(WIN32)
|
||||
struct tm tm;
|
||||
return *gmtime_r(&ts, &tm);
|
||||
#else
|
||||
return *gmtime(&ts);
|
||||
#endif
|
||||
}
|
||||
|
||||
FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory* rootDir, rtexif::TagDirectory* firstRootDir, time_t ts) :
|
||||
frameRootDir(frameRootDir_),
|
||||
iptc(nullptr),
|
||||
time{},
|
||||
timeStamp{},
|
||||
time(timeFromTS(ts)),
|
||||
timeStamp(ts),
|
||||
iso_speed(0),
|
||||
aperture(0.),
|
||||
focal_len(0.),
|
||||
@ -557,7 +569,7 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
|
||||
} else if (!make.compare (0, 4, "SONY") || !make.compare (0, 6, "KONICA")) {
|
||||
if (mnote->getTag ("LensID")) {
|
||||
lens = validateUft8(mnote->getTag("LensID")->valueToString());
|
||||
if (lens == "Unknown") {
|
||||
if (!lens.compare (0, 7, "Unknown")) {
|
||||
lens_from_make_and_model();
|
||||
}
|
||||
}
|
||||
@ -1068,7 +1080,8 @@ tm FramesData::getDateTime(unsigned int frame) const
|
||||
[](const FrameData& frame_data)
|
||||
{
|
||||
return frame_data.getDateTime();
|
||||
}
|
||||
},
|
||||
modTime
|
||||
);
|
||||
}
|
||||
|
||||
@ -1080,7 +1093,8 @@ time_t FramesData::getDateTimeAsTS(unsigned int frame) const
|
||||
[](const FrameData& frame_data)
|
||||
{
|
||||
return frame_data.getDateTimeAsTS();
|
||||
}
|
||||
},
|
||||
modTimeStamp
|
||||
);
|
||||
}
|
||||
|
||||
@ -1366,6 +1380,11 @@ failure:
|
||||
FramesData::FramesData(const Glib::ustring& fname, std::unique_ptr<RawMetaDataLocation> rml, bool firstFrameOnly) :
|
||||
iptc(nullptr), dcrawFrameCount(0)
|
||||
{
|
||||
GStatBuf statbuf = {};
|
||||
g_stat(fname.c_str(), &statbuf);
|
||||
modTimeStamp = statbuf.st_mtime;
|
||||
modTime = timeFromTS(modTimeStamp);
|
||||
|
||||
if (rml && (rml->exifBase >= 0 || rml->ciffBase >= 0)) {
|
||||
FILE* f = g_fopen(fname.c_str(), "rb");
|
||||
|
||||
@ -1384,7 +1403,7 @@ FramesData::FramesData(const Glib::ustring& fname, std::unique_ptr<RawMetaDataLo
|
||||
|
||||
// creating FrameData
|
||||
for (auto currFrame : exifManager.frames) {
|
||||
frames.push_back(std::unique_ptr<FrameData>(new FrameData(currFrame, currFrame->getRoot(), roots.at(0))));
|
||||
frames.push_back(std::unique_ptr<FrameData>(new FrameData(currFrame, currFrame->getRoot(), roots.at(0), modTimeStamp)));
|
||||
}
|
||||
|
||||
for (auto currRoot : roots) {
|
||||
@ -1410,7 +1429,7 @@ FramesData::FramesData(const Glib::ustring& fname, std::unique_ptr<RawMetaDataLo
|
||||
roots = exifManager.roots;
|
||||
|
||||
for (auto currFrame : exifManager.frames) {
|
||||
frames.push_back(std::unique_ptr<FrameData>(new FrameData(currFrame, currFrame->getRoot(), roots.at(0))));
|
||||
frames.push_back(std::unique_ptr<FrameData>(new FrameData(currFrame, currFrame->getRoot(), roots.at(0), modTimeStamp)));
|
||||
}
|
||||
|
||||
rewind(exifManager.f); // Not sure this is necessary
|
||||
@ -1430,7 +1449,7 @@ FramesData::FramesData(const Glib::ustring& fname, std::unique_ptr<RawMetaDataLo
|
||||
|
||||
// creating FrameData
|
||||
for (auto currFrame : exifManager.frames) {
|
||||
frames.push_back(std::unique_ptr<FrameData>(new FrameData(currFrame, currFrame->getRoot(), roots.at(0))));
|
||||
frames.push_back(std::unique_ptr<FrameData>(new FrameData(currFrame, currFrame->getRoot(), roots.at(0), modTimeStamp)));
|
||||
}
|
||||
|
||||
for (auto currRoot : roots) {
|
||||
|
@ -72,7 +72,7 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
FrameData (rtexif::TagDirectory* frameRootDir, rtexif::TagDirectory* rootDir, rtexif::TagDirectory* firstRootDir);
|
||||
FrameData (rtexif::TagDirectory* frameRootDir, rtexif::TagDirectory* rootDir, rtexif::TagDirectory* firstRootDir, time_t ts = 0);
|
||||
virtual ~FrameData ();
|
||||
|
||||
bool getPixelShift () const;
|
||||
@ -109,6 +109,8 @@ private:
|
||||
std::vector<rtexif::TagDirectory*> roots;
|
||||
IptcData* iptc;
|
||||
unsigned int dcrawFrameCount;
|
||||
struct tm modTime;
|
||||
time_t modTimeStamp;
|
||||
|
||||
public:
|
||||
explicit FramesData (const Glib::ustring& fname, std::unique_ptr<RawMetaDataLocation> rml = nullptr, bool firstFrameOnly = false);
|
||||
|
@ -137,6 +137,7 @@ public:
|
||||
|
||||
virtual ImageMatrices* getImageMatrices () = 0;
|
||||
virtual bool isRAW () const = 0;
|
||||
virtual bool isGainMapSupported () const = 0;
|
||||
virtual DCPProfile* getDCP (const procparams::ColorManagementParams &cmp, DCPProfileApplyState &as)
|
||||
{
|
||||
return nullptr;
|
||||
|
@ -216,6 +216,12 @@ ImProcCoordinator::ImProcCoordinator() :
|
||||
lmasklclocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmaskloglocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmasklocal_curve(65536, LUT_CLIP_OFF),
|
||||
lmaskcielocalcurve(65536, LUT_CLIP_OFF),
|
||||
cielocalcurve(65536, LUT_CLIP_OFF),
|
||||
cielocalcurve2(65536, LUT_CLIP_OFF),
|
||||
jzlocalcurve(65536, LUT_CLIP_OFF),
|
||||
czlocalcurve(65536, LUT_CLIP_OFF),
|
||||
czjzlocalcurve(65536, LUT_CLIP_OFF),
|
||||
lastspotdup(false),
|
||||
previewDeltaE(false),
|
||||
locallColorMask(0),
|
||||
@ -234,6 +240,7 @@ ImProcCoordinator::ImProcCoordinator() :
|
||||
locallsharMask(0),
|
||||
localllogMask(0),
|
||||
locall_Mask(0),
|
||||
locallcieMask(0),
|
||||
retistrsav(nullptr)
|
||||
{
|
||||
}
|
||||
@ -400,7 +407,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
// If high detail (=100%) is newly selected, do a demosaic update, since the last was just with FAST
|
||||
|
||||
if (imageTypeListener) {
|
||||
imageTypeListener->imageTypeChanged(imgsrc->isRAW(), imgsrc->getSensorType() == ST_BAYER, imgsrc->getSensorType() == ST_FUJI_XTRANS, imgsrc->isMono());
|
||||
imageTypeListener->imageTypeChanged(imgsrc->isRAW(), imgsrc->getSensorType() == ST_BAYER, imgsrc->getSensorType() == ST_FUJI_XTRANS, imgsrc->isMono(), imgsrc->isGainMapSupported());
|
||||
}
|
||||
|
||||
if ((todo & M_RAW)
|
||||
@ -724,6 +731,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
// Remove transformation if unneeded
|
||||
bool needstransform = ipf.needsTransform(fw, fh, imgsrc->getRotateDegree(), imgsrc->getMetaData());
|
||||
|
||||
|
||||
if ((needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params->dirpyrequalizer.cbdlMethod == "bef" && params->dirpyrequalizer.enabled && !params->colorappearance.enabled))) {
|
||||
// Forking the image
|
||||
assert(oprevi);
|
||||
@ -738,6 +746,14 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
}
|
||||
}
|
||||
|
||||
for (int sp = 0; sp < (int)params->locallab.spots.size(); sp++) {
|
||||
if(params->locallab.spots.at(sp).expsharp && params->dirpyrequalizer.cbdlMethod == "bef") {
|
||||
if(params->locallab.spots.at(sp).shardamping < 1) {
|
||||
params->locallab.spots.at(sp).shardamping = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params->dirpyrequalizer.cbdlMethod == "bef" && params->dirpyrequalizer.enabled && !params->colorappearance.enabled) {
|
||||
const int W = oprevi->getWidth();
|
||||
const int H = oprevi->getHeight();
|
||||
@ -785,6 +801,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
// Encoding log with locallab
|
||||
if (params->locallab.enabled && !params->locallab.spots.empty()) {
|
||||
const int sizespot = (int)params->locallab.spots.size();
|
||||
const LocallabParams::LocallabSpot defSpot;
|
||||
|
||||
float *sourceg = nullptr;
|
||||
sourceg = new float[sizespot];
|
||||
@ -794,6 +811,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
targetg = new float[sizespot];
|
||||
bool *log = nullptr;
|
||||
log = new bool[sizespot];
|
||||
bool *cie = nullptr;
|
||||
cie = new bool[sizespot];
|
||||
bool *autocomput = nullptr;
|
||||
autocomput = new bool[sizespot];
|
||||
float *blackev = nullptr;
|
||||
@ -802,6 +821,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
whiteev = new float[sizespot];
|
||||
bool *Autogr = nullptr;
|
||||
Autogr = new bool[sizespot];
|
||||
bool *autocie = nullptr;
|
||||
autocie = new bool[sizespot];
|
||||
|
||||
|
||||
float *locx = nullptr;
|
||||
locx = new float[sizespot];
|
||||
@ -818,7 +840,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
|
||||
for (int sp = 0; sp < sizespot; sp++) {
|
||||
log[sp] = params->locallab.spots.at(sp).explog;
|
||||
cie[sp] = params->locallab.spots.at(sp).expcie;
|
||||
autocomput[sp] = params->locallab.spots.at(sp).autocompute;
|
||||
autocie[sp] = params->locallab.spots.at(sp).Autograycie;
|
||||
blackev[sp] = params->locallab.spots.at(sp).blackEv;
|
||||
whiteev[sp] = params->locallab.spots.at(sp).whiteEv;
|
||||
sourceg[sp] = params->locallab.spots.at(sp).sourceGray;
|
||||
@ -832,9 +856,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
centx[sp] = params->locallab.spots.at(sp).centerX / 2000.0 + 0.5;
|
||||
centy[sp] = params->locallab.spots.at(sp).centerY / 2000.0 + 0.5;
|
||||
|
||||
const bool fullim = params->locallab.spots.at(sp).fullimage;
|
||||
const bool fullimstd = params->locallab.spots.at(sp).fullimage;//for log encoding standard
|
||||
const bool fullimjz = true;//always force fullimage in log encoding Jz - always possible to put a checkbox if need
|
||||
|
||||
if (log[sp] && autocomput[sp]) {
|
||||
if ((log[sp] && autocomput[sp]) || (cie[sp] && autocie[sp])) {
|
||||
constexpr int SCALE = 10;
|
||||
int fw, fh, tr = TR_NONE;
|
||||
imgsrc->getFullSize(fw, fh, tr);
|
||||
@ -845,7 +870,14 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
float xsta = std::max(static_cast<float>(centx[sp] - locxL[sp]), 0.f);
|
||||
float xend = std::min(static_cast<float>(centx[sp] + locx[sp]), 1.f);
|
||||
|
||||
if (fullim) {
|
||||
if (fullimstd && (log[sp] && autocomput[sp])) {
|
||||
ysta = 0.f;
|
||||
yend = 1.f;
|
||||
xsta = 0.f;
|
||||
xend = 1.f;
|
||||
}
|
||||
|
||||
if (fullimjz && (cie[sp] && autocie[sp])) {
|
||||
ysta = 0.f;
|
||||
yend = 1.f;
|
||||
xsta = 0.f;
|
||||
@ -853,14 +885,18 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
}
|
||||
|
||||
ipf.getAutoLogloc(sp, imgsrc, sourceg, blackev, whiteev, Autogr, sourceab, fw, fh, xsta, xend, ysta, yend, SCALE);
|
||||
//printf("sg=%f sab=%f\n", sourceg[sp], sourceab[sp]);
|
||||
// printf("sp=%i sg=%f sab=%f\n", sp, sourceg[sp], sourceab[sp]);
|
||||
params->locallab.spots.at(sp).blackEv = blackev[sp];
|
||||
params->locallab.spots.at(sp).whiteEv = whiteev[sp];
|
||||
params->locallab.spots.at(sp).blackEvjz = blackev[sp];
|
||||
params->locallab.spots.at(sp).whiteEvjz = whiteev[sp];
|
||||
params->locallab.spots.at(sp).sourceGray = sourceg[sp];
|
||||
params->locallab.spots.at(sp).sourceabs = sourceab[sp];
|
||||
|
||||
params->locallab.spots.at(sp).sourceGraycie = sourceg[sp];
|
||||
params->locallab.spots.at(sp).sourceabscie = sourceab[sp];
|
||||
float jz1 = defSpot.jz100;
|
||||
if (locallListener) {
|
||||
locallListener->logencodChanged(blackev[sp], whiteev[sp], sourceg[sp], sourceab[sp], targetg[sp]);
|
||||
locallListener->logencodChanged(blackev[sp], whiteev[sp], sourceg[sp], sourceab[sp], targetg[sp], autocomput[sp], autocie[sp], jz1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -872,12 +908,14 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
delete [] centx;
|
||||
delete [] centy;
|
||||
|
||||
delete [] autocie;
|
||||
delete [] Autogr;
|
||||
delete [] whiteev;
|
||||
delete [] blackev;
|
||||
delete [] targetg;
|
||||
delete [] sourceab;
|
||||
delete [] sourceg;
|
||||
delete [] cie;
|
||||
delete [] log;
|
||||
delete [] autocomput;
|
||||
}
|
||||
@ -923,7 +961,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
int sca = 1;
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
float avge, meantme, stdtme, meanretie, stdretie;
|
||||
std::vector<LocallabListener::locallabRef> locallref;
|
||||
//std::vector<LocallabListener::locallabRef> locallref;
|
||||
std::vector<LocallabListener::locallabRetiMinMax> locallretiminmax;
|
||||
huerefs.resize(params->locallab.spots.size());
|
||||
huerefblurs.resize(params->locallab.spots.size());
|
||||
@ -937,6 +975,16 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
stdtms.resize(params->locallab.spots.size());
|
||||
meanretis.resize(params->locallab.spots.size());
|
||||
stdretis.resize(params->locallab.spots.size());
|
||||
const int sizespot = (int)params->locallab.spots.size();
|
||||
|
||||
float *huerefp = nullptr;
|
||||
huerefp = new float[sizespot];
|
||||
float *chromarefp = nullptr;
|
||||
chromarefp = new float[sizespot];
|
||||
float *lumarefp = nullptr;
|
||||
lumarefp = new float[sizespot];
|
||||
float *fabrefp = nullptr;
|
||||
fabrefp = new float[sizespot];
|
||||
|
||||
for (int sp = 0; sp < (int)params->locallab.spots.size(); sp++) {
|
||||
|
||||
@ -953,6 +1001,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool LHutili = loclhCurve.Set(params->locallab.spots.at(sp).LHcurve);
|
||||
const bool HHutili = lochhCurve.Set(params->locallab.spots.at(sp).HHcurve);
|
||||
const bool CHutili = locchCurve.Set(params->locallab.spots.at(sp).CHcurve);
|
||||
const bool HHutilijz = lochhCurvejz.Set(params->locallab.spots.at(sp).HHcurvejz);
|
||||
const bool CHutilijz = locchCurvejz.Set(params->locallab.spots.at(sp).CHcurvejz);
|
||||
const bool LHutilijz = loclhCurvejz.Set(params->locallab.spots.at(sp).LHcurvejz);
|
||||
const bool lcmasutili = locccmasCurve.Set(params->locallab.spots.at(sp).CCmaskcurve);
|
||||
const bool llmasutili = locllmasCurve.Set(params->locallab.spots.at(sp).LLmaskcurve);
|
||||
const bool lhmasutili = lochhmasCurve.Set(params->locallab.spots.at(sp).HHmaskcurve);
|
||||
@ -984,6 +1035,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool llmaslogutili = locllmaslogCurve.Set(params->locallab.spots.at(sp).LLmaskcurveL);
|
||||
const bool lcmaslogutili = locccmaslogCurve.Set(params->locallab.spots.at(sp).CCmaskcurveL);
|
||||
const bool lhmaslogutili = lochhmaslogCurve.Set(params->locallab.spots.at(sp).HHmaskcurveL);
|
||||
const bool llmascieutili = locllmascieCurve.Set(params->locallab.spots.at(sp).LLmaskciecurve);
|
||||
const bool lcmascieutili = locccmascieCurve.Set(params->locallab.spots.at(sp).CCmaskciecurve);
|
||||
const bool lhmascieutili = lochhmascieCurve.Set(params->locallab.spots.at(sp).HHmaskciecurve);
|
||||
|
||||
const bool lcmas_utili = locccmas_Curve.Set(params->locallab.spots.at(sp).CCmask_curve);
|
||||
const bool llmas_utili = locllmas_Curve.Set(params->locallab.spots.at(sp).LLmask_curve);
|
||||
@ -992,6 +1046,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool lmasutiliblwav = loclmasCurveblwav.Set(params->locallab.spots.at(sp).LLmaskblcurvewav);
|
||||
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params->locallab.spots.at(sp).LLmaskcolcurvewav);
|
||||
const bool locwavutili = locwavCurve.Set(params->locallab.spots.at(sp).locwavcurve);
|
||||
const bool locwavutilijz = locwavCurvejz.Set(params->locallab.spots.at(sp).locwavcurvejz);
|
||||
const bool loclevwavutili = loclevwavCurve.Set(params->locallab.spots.at(sp).loclevwavcurve);
|
||||
const bool locconwavutili = locconwavCurve.Set(params->locallab.spots.at(sp).locconwavcurve);
|
||||
const bool loccompwavutili = loccompwavCurve.Set(params->locallab.spots.at(sp).loccompwavcurve);
|
||||
@ -1017,6 +1072,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve, sca);
|
||||
const bool localmasklogutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).LmaskcurveL, lmaskloglocalcurve, sca);
|
||||
const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmask_curve, lmasklocal_curve, sca);
|
||||
const bool localmaskcieutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskciecurve, lmaskcielocalcurve, sca);
|
||||
const bool localcieutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).ciecurve, cielocalcurve, sca);
|
||||
const bool localcieutili2 = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).ciecurve2, cielocalcurve2, sca);
|
||||
const bool localjzutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).jzcurve, jzlocalcurve, sca);
|
||||
const bool localczutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).czcurve, czlocalcurve, sca);
|
||||
const bool localczjzutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).czjzcurve, czjzlocalcurve, sca);
|
||||
double ecomp = params->locallab.spots.at(sp).expcomp;
|
||||
double black = params->locallab.spots.at(sp).black;
|
||||
double hlcompr = params->locallab.spots.at(sp).hlcompr;
|
||||
@ -1040,7 +1101,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
stdtme = 0.f;
|
||||
meanretie = 0.f;
|
||||
stdretie = 0.f;
|
||||
|
||||
float fab = 1.f;
|
||||
bool istm = params->locallab.spots.at(sp).equiltm && params->locallab.spots.at(sp).exptonemap;
|
||||
bool isreti = params->locallab.spots.at(sp).equilret && params->locallab.spots.at(sp).expreti;
|
||||
//preparation for mean and sigma on current RT-spot
|
||||
@ -1094,16 +1155,23 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
float meanreti = meanretis[sp] = meanretie;
|
||||
float stdreti = stdretis[sp] = stdretie;
|
||||
|
||||
huerefp[sp] = huer;
|
||||
chromarefp[sp] = chromar;
|
||||
lumarefp[sp] = lumar;
|
||||
|
||||
CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumar,
|
||||
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avg,
|
||||
sca);
|
||||
|
||||
// Save Locallab mask curve references for current spot
|
||||
/*
|
||||
LocallabListener::locallabRef spotref;
|
||||
spotref.huer = huer;
|
||||
spotref.lumar = lumar;
|
||||
spotref.chromar = chromar;
|
||||
spotref.fab = 1.f;
|
||||
locallref.push_back(spotref);
|
||||
*/
|
||||
// Locallab tools computation
|
||||
/* Notes:
|
||||
* - shbuffer is used as nullptr
|
||||
@ -1125,6 +1193,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
cllocalcurve, localclutili,
|
||||
lclocalcurve, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lochhCurvejz, locchCurvejz, loclhCurvejz,
|
||||
lmasklocalcurve, localmaskutili,
|
||||
lmaskexplocalcurve, localmaskexputili,
|
||||
lmaskSHlocalcurve, localmaskSHutili,
|
||||
@ -1136,6 +1205,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
lmasklclocalcurve, localmasklcutili,
|
||||
lmaskloglocalcurve, localmasklogutili,
|
||||
lmasklocal_curve, localmask_utili,
|
||||
lmaskcielocalcurve, localmaskcieutili,
|
||||
cielocalcurve, localcieutili,
|
||||
cielocalcurve2, localcieutili2,
|
||||
jzlocalcurve, localjzutili,
|
||||
czlocalcurve, localczutili,
|
||||
czjzlocalcurve, localczjzutili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
@ -1148,10 +1223,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
|
||||
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
locccmascieCurve, lcmascieutili, locllmascieCurve, llmascieutili, lochhmascieCurve, lhmascieutili,
|
||||
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
loclmasCurveblwav, lmasutiliblwav,
|
||||
loclmasCurvecolwav, lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
locwavCurvejz, locwavutilijz,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
@ -1160,13 +1238,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav, lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
|
||||
huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
LHutili, HHutili, CHutili, HHutilijz, CHutilijz, LHutilijz, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
|
||||
huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantm, stdtm, meanreti, stdreti);
|
||||
|
||||
meantm, stdtm, meanreti, stdreti, fab);
|
||||
|
||||
|
||||
fabrefp[sp] = fab;
|
||||
if (istm) { //calculate mean and sigma on full image for use by normalize_mean_dt
|
||||
float meanf = 0.f;
|
||||
float stdf = 0.f;
|
||||
@ -1212,17 +1290,44 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
}
|
||||
// Update Locallab reference values according to recurs parameter
|
||||
if (params->locallab.spots.at(sp).recurs) {
|
||||
/*
|
||||
spotref.huer = huer;
|
||||
spotref.lumar = lumar;
|
||||
spotref.chromar = chromar;
|
||||
spotref.fab = fab;
|
||||
locallref.at(sp).chromar = chromar;
|
||||
locallref.at(sp).lumar = lumar;
|
||||
locallref.at(sp).huer = huer;
|
||||
locallref.at(sp).fab = fab;
|
||||
*/
|
||||
huerefp[sp] = huer;
|
||||
chromarefp[sp] = chromar;
|
||||
lumarefp[sp] = lumar;
|
||||
fabrefp[sp] = fab;
|
||||
|
||||
}
|
||||
// spotref.fab = fab;
|
||||
// locallref.at(sp).fab = fab;
|
||||
|
||||
// locallref.push_back(spotref);
|
||||
if (locallListener) {
|
||||
// locallListener->refChanged(locallref, params->locallab.selspot);
|
||||
locallListener->refChanged2(huerefp, chromarefp, lumarefp, fabrefp, params->locallab.selspot);
|
||||
locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot);
|
||||
}
|
||||
|
||||
}
|
||||
delete [] huerefp;
|
||||
delete [] chromarefp;
|
||||
delete [] lumarefp;
|
||||
delete [] fabrefp;
|
||||
// Transmit Locallab reference values and Locallab Retinex min/max to LocallabListener
|
||||
/*
|
||||
if (locallListener) {
|
||||
locallListener->refChanged(locallref, params->locallab.selspot);
|
||||
locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot);
|
||||
}
|
||||
*/
|
||||
ipf.lab2rgb(*nprevl, *oprevi, params->icm.workingProfile);
|
||||
//*************************************************************
|
||||
// end locallab
|
||||
@ -1802,8 +1907,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
adap = 2000.;
|
||||
} else {
|
||||
double E_V = fcomp + log2(double ((fnum * fnum) / fspeed / (fiso / 100.f)));
|
||||
E_V += params->toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV
|
||||
E_V += log2(params->raw.expos); // exposure raw white point ; log2 ==> linear to EV
|
||||
double kexp = 0.;
|
||||
E_V += kexp * params->toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV
|
||||
E_V += 0.5 * log2(params->raw.expos); // exposure raw white point ; log2 ==> linear to EV
|
||||
adap = pow(2.0, E_V - 3.0); // cd / m2
|
||||
// end calculation adaptation scene luminosity
|
||||
}
|
||||
@ -2311,7 +2417,7 @@ bool ImProcCoordinator::getAutoWB(double& temp, double& green, double equal, dou
|
||||
if (lastAwbEqual != equal || lastAwbTempBias != tempBias || lastAwbauto != params->wb.method) {
|
||||
// Issue 2500 MyMutex::MyLock lock(minit); // Also used in crop window
|
||||
double rm, gm, bm;
|
||||
params->wb.method = "autold";//same result as before muliple Auto WB
|
||||
params->wb.method = "autold";//same result as before multiple Auto WB
|
||||
|
||||
// imgsrc->getAutoWBMultipliers(rm, gm, bm);
|
||||
double tempitc = 5000.;
|
||||
|
@ -284,6 +284,12 @@ protected:
|
||||
LUTf lmasklclocalcurve;
|
||||
LUTf lmaskloglocalcurve;
|
||||
LUTf lmasklocal_curve;
|
||||
LUTf lmaskcielocalcurve;
|
||||
LUTf cielocalcurve;
|
||||
LUTf cielocalcurve2;
|
||||
LUTf jzlocalcurve;
|
||||
LUTf czlocalcurve;
|
||||
LUTf czjzlocalcurve;
|
||||
|
||||
LocretigainCurve locRETgainCurve;
|
||||
LocretitransCurve locRETtransCurve;
|
||||
@ -291,6 +297,9 @@ protected:
|
||||
LocLHCurve loclhCurve;
|
||||
LocHHCurve lochhCurve;
|
||||
LocCHCurve locchCurve;
|
||||
LocHHCurve lochhCurvejz;
|
||||
LocCHCurve locchCurvejz;
|
||||
LocLHCurve loclhCurvejz;
|
||||
LocCCmaskCurve locccmasCurve;
|
||||
LocLLmaskCurve locllmasCurve;
|
||||
LocHHmaskCurve lochhmasCurve;
|
||||
@ -326,6 +335,9 @@ protected:
|
||||
LocCCmaskCurve locccmaslogCurve;
|
||||
LocLLmaskCurve locllmaslogCurve;
|
||||
LocHHmaskCurve lochhmaslogCurve;
|
||||
LocCCmaskCurve locccmascieCurve;
|
||||
LocLLmaskCurve locllmascieCurve;
|
||||
LocHHmaskCurve lochhmascieCurve;
|
||||
|
||||
LocwavCurve locwavCurve;
|
||||
LocwavCurve loclmasCurveblwav;
|
||||
@ -338,6 +350,7 @@ protected:
|
||||
LocwavCurve locedgwavCurve;
|
||||
LocwavCurve loclmasCurve_wav;
|
||||
LocwavCurve locwavCurvehue;
|
||||
LocwavCurve locwavCurvejz;
|
||||
|
||||
std::vector<float> huerefs;
|
||||
std::vector<float> huerefblurs;
|
||||
@ -369,6 +382,7 @@ protected:
|
||||
int locallsharMask;
|
||||
int localllogMask;
|
||||
int locall_Mask;
|
||||
int locallcieMask;
|
||||
|
||||
public:
|
||||
|
||||
@ -440,7 +454,7 @@ public:
|
||||
updaterThreadStart.unlock();
|
||||
}
|
||||
|
||||
void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int localllogMask, int locall_Mask) override
|
||||
void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int localllogMask, int locall_Mask, int locallcieMask) override
|
||||
{
|
||||
this->previewDeltaE = previewDeltaE;
|
||||
this->locallColorMask = locallColorMask;
|
||||
@ -459,6 +473,7 @@ public:
|
||||
this->locallcbMask = locallcbMask;
|
||||
this->localllogMask = localllogMask;
|
||||
this->locall_Mask = locall_Mask;
|
||||
this->locallcieMask = locallcieMask;
|
||||
}
|
||||
|
||||
void setProgressListener (ProgressListener* pl) override
|
||||
|
@ -960,14 +960,14 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
c16 = 1;
|
||||
}else if (params->colorappearance.modelmethod == "16") {
|
||||
c16 = 16;
|
||||
}
|
||||
|
||||
Ciecam02::initcam1float (yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c, c16);
|
||||
} //I don't use PQ here...hence no 21
|
||||
float plum = 100.f;
|
||||
Ciecam02::initcam1float (yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c, c16, plum);
|
||||
//printf ("wh=%f \n", wh);
|
||||
|
||||
const float pow1 = pow_F(1.64f - pow_F(0.29f, n), 0.73f);
|
||||
float nj, nbbj, ncbj, czj, awj, flj;
|
||||
Ciecam02::initcam2float (yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj, c16);
|
||||
Ciecam02::initcam2float (yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj, c16, plum);
|
||||
#ifdef __SSE2__
|
||||
const float reccmcz = 1.f / (c2 * czj);
|
||||
#endif
|
||||
@ -1054,11 +1054,13 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
x = x / c655d35;
|
||||
y = y / c655d35;
|
||||
z = z / c655d35;
|
||||
float plum = 100.f;
|
||||
vfloat plumv = F2V(plum);
|
||||
Ciecam02::xyz2jchqms_ciecam02float(J, C, h,
|
||||
Q, M, s, F2V(aw), F2V(fl), F2V(wh),
|
||||
x, y, z,
|
||||
F2V(xw1), F2V(yw1), F2V(zw1),
|
||||
F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d), c16);
|
||||
F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d), c16, plumv);
|
||||
STVF(Jbuffer[k], J);
|
||||
STVF(Cbuffer[k], C);
|
||||
STVF(hbuffer[k], h);
|
||||
@ -1082,7 +1084,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Q, M, s, aw, fl, wh,
|
||||
x, y, z,
|
||||
xw1, yw1, zw1,
|
||||
c, nc, pow1, nbb, ncb, pfl, cz, d, c16);
|
||||
c, nc, pow1, nbb, ncb, pfl, cz, d, c16, plum);
|
||||
Jbuffer[k] = J;
|
||||
Cbuffer[k] = C;
|
||||
hbuffer[k] = h;
|
||||
@ -1120,7 +1122,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Q, M, s, aw, fl, wh,
|
||||
x, y, z,
|
||||
xw1, yw1, zw1,
|
||||
c, nc, pow1, nbb, ncb, pfl, cz, d, c16);
|
||||
c, nc, pow1, nbb, ncb, pfl, cz, d, c16, plum);
|
||||
#endif
|
||||
float Jpro, Cpro, hpro, Qpro, Mpro, spro;
|
||||
Jpro = J;
|
||||
@ -1458,7 +1460,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Ciecam02::jch2xyz_ciecam02float(xx, yy, zz,
|
||||
J, C, h,
|
||||
xw2, yw2, zw2,
|
||||
c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16);
|
||||
c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16, plum);
|
||||
float x, y, z;
|
||||
x = xx * 655.35f;
|
||||
y = yy * 655.35f;
|
||||
@ -1510,7 +1512,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Ciecam02::jch2xyz_ciecam02float(x, y, z,
|
||||
LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]),
|
||||
F2V(xw2), F2V(yw2), F2V(zw2),
|
||||
F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16);
|
||||
F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16, F2V(plum));
|
||||
STVF(xbuffer[k], x * c655d35);
|
||||
STVF(ybuffer[k], y * c655d35);
|
||||
STVF(zbuffer[k], z * c655d35);
|
||||
@ -1767,7 +1769,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Ciecam02::jch2xyz_ciecam02float(xx, yy, zz,
|
||||
ncie->J_p[i][j], ncie_C_p, ncie->h_p[i][j],
|
||||
xw2, yw2, zw2,
|
||||
c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16);
|
||||
c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16, plum);
|
||||
float x = (float)xx * 655.35f;
|
||||
float y = (float)yy * 655.35f;
|
||||
float z = (float)zz * 655.35f;
|
||||
@ -1815,7 +1817,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Ciecam02::jch2xyz_ciecam02float(x, y, z,
|
||||
LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]),
|
||||
F2V(xw2), F2V(yw2), F2V(zw2),
|
||||
F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16);
|
||||
F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16, F2V(plum));
|
||||
x *= c655d35;
|
||||
y *= c655d35;
|
||||
z *= c655d35;
|
||||
|
@ -191,12 +191,14 @@ enum class BlurType {
|
||||
void moyeqt(Imagefloat* working, float &moyS, float &eqty);
|
||||
|
||||
void luminanceCurve(LabImage* lold, LabImage* lnew, const LUTf &curve);
|
||||
void ciecamloc_02float(int sp, LabImage* lab, int call);
|
||||
void ciecamloc_02float(const struct local_params& lp, int sp, LabImage* lab, int bfw, int bfh, int call, int sk, const LUTf& cielocalcurve, bool localcieutili, const LUTf& cielocalcurve2, bool localcieutili2, const LUTf& jzlocalcurve, bool localjzutili, const LUTf& czlocalcurve, bool localczutili, const LUTf& czjzlocalcurve, bool localczjzutili, const LocCHCurve& locchCurvejz, const LocHHCurve& lochhCurve, const LocLHCurve& loclhCurve, bool HHcurvejz, bool CHcurvejz, bool LHcurvejz, const LocwavCurve& locwavCurvejz, bool locwavutilijz);
|
||||
|
||||
void ciecam_02float(CieImage* ncie, float adap, int pW, int pwb, LabImage* lab, const procparams::ProcParams* params,
|
||||
const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3,
|
||||
LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt,
|
||||
bool showSharpMask = false);
|
||||
void clarimerge(const struct local_params& lp, float &mL, float &mC, bool &exec, LabImage *tmpresid, int wavelet_level, int sk, int numThreads);
|
||||
|
||||
void chromiLuminanceCurve(PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, const LUTf& acurve, const LUTf& bcurve, const LUTf& satcurve, const LUTf& satclcurve, const LUTf& clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve);
|
||||
void vibrance(LabImage* lab, const procparams::VibranceParams &vibranceParams, bool highlight, const Glib::ustring &workingProfile); //Jacques' vibrance
|
||||
void softprocess(const LabImage* bufcolorig, array2D<float> &buflight, /* float ** bufchro, float ** buf_a, float ** buf_b, */ float rad, int bfh, int bfw, double epsilmax, double epsilmin, float thres, int sk, bool multiThread);
|
||||
@ -253,7 +255,7 @@ enum class BlurType {
|
||||
const LUTf& lmasklocalcurve, bool localmaskutili,
|
||||
const LocwavCurve & loclmasCurvecolwav, bool lmasutilicolwav, int level_bl, int level_hl, int level_br, int level_hr,
|
||||
int shortcu, bool delt, const float hueref, const float chromaref, const float lumaref,
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, bool fftt, float blu_ma, float cont_ma, int indic);
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, bool fftt, float blu_ma, float cont_ma, int indic, float &fab);
|
||||
|
||||
void avoidcolshi(const struct local_params& lp, int sp, LabImage * original, LabImage *transformed, int cy, int cx, int sk);
|
||||
|
||||
@ -263,6 +265,7 @@ enum class BlurType {
|
||||
void laplacian(const array2D<float> &src, array2D<float> &dst, int bfw, int bfh, float threshold, float ceiling, float factor, bool multiThread);
|
||||
void detail_mask(const array2D<float> &src, array2D<float> &mask, int bfw, int bfh, float scaling, float threshold, float ceiling, float factor, BlurType blur_type, float blur, bool multithread);
|
||||
void NLMeans(float **img, int strength, int detail_thresh, int patch, int radius, float gam, int bfw, int bfh, float scale, bool multithread);
|
||||
void loccont(int bfw, int bfh, LabImage* tmp1, float rad, float stren, int sk);
|
||||
|
||||
void rex_poisson_dct(float * data, size_t nx, size_t ny, double m);
|
||||
void mean_dt(const float * data, size_t size, double& mean_p, double& dt_p);
|
||||
@ -307,6 +310,7 @@ enum class BlurType {
|
||||
const LUTf& cllocalcurve, bool localclutili,
|
||||
const LUTf& lclocalcurve, bool locallcutili,
|
||||
const LocLHCurve& loclhCurve, const LocHHCurve& lochhCurve, const LocCHCurve& locchCurve,
|
||||
const LocHHCurve& lochhCurvejz, const LocCHCurve& locchCurvejz, const LocLHCurve& loclhCurvejz,
|
||||
const LUTf& lmasklocalcurve, bool localmaskutili,
|
||||
const LUTf& lmaskexplocalcurve, bool localmaskexputili,
|
||||
const LUTf& lmaskSHlocalcurve, bool localmaskSHutili,
|
||||
@ -318,6 +322,12 @@ enum class BlurType {
|
||||
const LUTf& lmasklclocalcurve, bool localmasklcutili,
|
||||
const LUTf& lmaskloglocalcurve, bool localmasklogutili,
|
||||
const LUTf& lmasklocal_curve, bool localmask_utili,
|
||||
const LUTf& lmaskcielocalcurve, bool localmaskcieutili,
|
||||
const LUTf& cielocalcurve, bool localcieutili,
|
||||
const LUTf& cielocalcurve2, bool localcieutili2,
|
||||
const LUTf& jzlocalcurve, bool localjzutili,
|
||||
const LUTf& czlocalcurve, bool localczutili,
|
||||
const LUTf& czjzlocalcurve, bool localczjzutili,
|
||||
|
||||
const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& llochhhmasCurve, bool lhhmasutili,
|
||||
const LocCCmaskCurve& locccmasexpCurve, bool lcmasexputili, const LocLLmaskCurve& locllmasexpCurve, bool llmasexputili, const LocHHmaskCurve& lochhmasexpCurve, bool lhmasexputili,
|
||||
@ -330,11 +340,14 @@ enum class BlurType {
|
||||
const LocCCmaskCurve& locccmaslcCurve, bool lcmaslcutili, const LocLLmaskCurve& locllmaslcCurve, bool llmaslcutili, const LocHHmaskCurve& lochhmaslcCurve, bool lhmaslcutili,
|
||||
const LocCCmaskCurve& locccmaslogCurve, bool lcmaslogutili, const LocLLmaskCurve& locllmaslogCurve, bool llmaslogutili, const LocHHmaskCurve& lochhmaslogCurve, bool lhmaslogutili,
|
||||
const LocCCmaskCurve& locccmas_Curve, bool lcmas_utili, const LocLLmaskCurve& locllmas_Curve, bool llmas_utili, const LocHHmaskCurve& lochhmas_Curve, bool lhmas_utili,
|
||||
const LocCCmaskCurve& locccmascieCurve, bool lcmascieutili, const LocLLmaskCurve& locllmascieCurve, bool llmascieutili, const LocHHmaskCurve& lochhmascieCurve, bool lhmascieutili,
|
||||
|
||||
const LocHHmaskCurve& lochhhmas_Curve, bool lhhmas_utili,
|
||||
|
||||
const LocwavCurve& loclmasCurveblwav, bool lmasutiliblwav,
|
||||
const LocwavCurve& loclmasCurvecolwav, bool lmasutilicolwav,
|
||||
const LocwavCurve& locwavCurve, bool locwavutili,
|
||||
const LocwavCurve& locwavCurvejz, bool locwavutilijz,
|
||||
const LocwavCurve& loclevwavCurve, bool loclevwavutili,
|
||||
const LocwavCurve& locconwavCurve, bool locconwavutili,
|
||||
const LocwavCurve& loccompwavCurve, bool loccompwavutili,
|
||||
@ -343,11 +356,11 @@ enum class BlurType {
|
||||
const LocwavCurve& locwavCurveden, bool locwavdenutili,
|
||||
const LocwavCurve& locedgwavCurve, bool locedgwavutili,
|
||||
const LocwavCurve& loclmasCurve_wav, bool lmasutili_wav,
|
||||
bool LHutili, bool HHutili, bool CHutili, const LUTf& cclocalcurve, bool localcutili, const LUTf& rgblocalcurve, bool localrgbutili, bool localexutili, const LUTf& exlocalcurve, const LUTf& hltonecurveloc, const LUTf& shtonecurveloc, const LUTf& tonecurveloc, const LUTf& lightCurveloc,
|
||||
bool LHutili, bool HHutili, bool CHutili, bool HHutilijz, bool CHutilijz, bool LHutilijz, const LUTf& cclocalcurve, bool localcutili, const LUTf& rgblocalcurve, bool localrgbutili, bool localexutili, const LUTf& exlocalcurve, const LUTf& hltonecurveloc, const LUTf& shtonecurveloc, const LUTf& tonecurveloc, const LUTf& lightCurveloc,
|
||||
double& huerefblur, double &chromarefblur, double& lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int &lastsav,
|
||||
bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int lllogMask, int ll_Mask,
|
||||
bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int lllogMask, int ll_Mask, int llcieMask,
|
||||
float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax,
|
||||
float& meantm, float& stdtm, float& meanreti, float& stdreti);
|
||||
float& meantm, float& stdtm, float& meanreti, float& stdreti, float &fab);
|
||||
|
||||
void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk);
|
||||
void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
|
||||
@ -371,6 +384,8 @@ enum class BlurType {
|
||||
const LocwavCurve & loccomprewavCurve, bool loccomprewavutili,
|
||||
float radlevblur, int process, float chromablu, float thres, float sigmadc, float deltad);
|
||||
|
||||
void wavlc(wavelet_decomposition& wdspot, int level_bl, int level_hl, int maxlvl, int level_hr, int level_br, float ahigh, float bhigh, float alow, float blow, float sigmalc, float strength, const LocwavCurve & locwavCurve, int numThreads);
|
||||
|
||||
void wavcbd(wavelet_decomposition &wdspot, int level_bl, int maxlvl,
|
||||
const LocwavCurve& locconwavCurve, bool locconwavutili, float sigm, float offs, float chromalev, int sk);
|
||||
|
||||
|
@ -58,10 +58,20 @@ int init (const Settings* s, const Glib::ustring& baseDir, const Glib::ustring&
|
||||
#pragma omp section
|
||||
#endif
|
||||
{
|
||||
bool ok;
|
||||
|
||||
if (s->lensfunDbDirectory.empty() || Glib::path_is_absolute(s->lensfunDbDirectory)) {
|
||||
LFDatabase::init(s->lensfunDbDirectory);
|
||||
ok = LFDatabase::init(s->lensfunDbDirectory);
|
||||
} else {
|
||||
LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbDirectory));
|
||||
ok = LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbDirectory));
|
||||
}
|
||||
|
||||
if (!ok && !s->lensfunDbBundleDirectory.empty() && s->lensfunDbBundleDirectory != s->lensfunDbDirectory) {
|
||||
if (Glib::path_is_absolute(s->lensfunDbBundleDirectory)) {
|
||||
LFDatabase::init(s->lensfunDbBundleDirectory);
|
||||
} else {
|
||||
LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbBundleDirectory));
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _OPENMP
|
||||
@ -92,7 +102,7 @@ int init (const Settings* s, const Glib::ustring& baseDir, const Glib::ustring&
|
||||
#pragma omp section
|
||||
#endif
|
||||
{
|
||||
dfm.init(s->darkFramesPath);
|
||||
DFManager::getInstance().init(s->darkFramesPath);
|
||||
}
|
||||
#ifdef _OPENMP
|
||||
#pragma omp section
|
||||
|
@ -468,8 +468,8 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector<Coord2D> &src,
|
||||
double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta);
|
||||
// Camera-based.
|
||||
const double f =
|
||||
((params->perspective.camera_focal_length > 0) ? params->perspective.camera_focal_length : 24.0)
|
||||
* ((params->perspective.camera_crop_factor > 0) ? params->perspective.camera_crop_factor : 1.0)
|
||||
((params->perspective.camera_focal_length > 0) ? params->perspective.camera_focal_length : PerspectiveParams::DEFAULT_CAMERA_FOCAL_LENGTH)
|
||||
* ((params->perspective.camera_crop_factor > 0) ? params->perspective.camera_crop_factor : PerspectiveParams::DEFAULT_CAMERA_CROP_FACTOR)
|
||||
* (maxRadius / sqrt(18.0*18.0 + 12.0*12.0));
|
||||
const double p_camera_yaw = params->perspective.camera_yaw / 180.0 * rtengine::RT_PI;
|
||||
const double p_camera_pitch = params->perspective.camera_pitch / 180.0 * rtengine::RT_PI;
|
||||
@ -1162,8 +1162,8 @@ void ImProcFunctions::transformGeneral(bool highQuality, Imagefloat *original, I
|
||||
const double hptanpt = tan(hpteta);
|
||||
// Camera-based.
|
||||
const double f =
|
||||
((params->perspective.camera_focal_length > 0) ? params->perspective.camera_focal_length : 24.0)
|
||||
* ((params->perspective.camera_crop_factor > 0) ? params->perspective.camera_crop_factor : 1.0)
|
||||
((params->perspective.camera_focal_length > 0) ? params->perspective.camera_focal_length : PerspectiveParams::DEFAULT_CAMERA_FOCAL_LENGTH)
|
||||
* ((params->perspective.camera_crop_factor > 0) ? params->perspective.camera_crop_factor : PerspectiveParams::DEFAULT_CAMERA_CROP_FACTOR)
|
||||
* (maxRadius / sqrt(18.0*18.0 + 12.0*12.0));
|
||||
const double p_camera_yaw = params->perspective.camera_yaw / 180.0 * rtengine::RT_PI;
|
||||
const double p_camera_pitch = params->perspective.camera_pitch / 180.0 * rtengine::RT_PI;
|
||||
|
@ -209,7 +209,7 @@ std::unique_ptr<LUTf> ImProcFunctions::buildMeaLut(const float inVals[11], const
|
||||
}
|
||||
}
|
||||
}
|
||||
lutFactor = 1.f / lutDiff;
|
||||
lutFactor = lutDiff == 0.f ? 0.f : 1.f / lutDiff;
|
||||
return std::unique_ptr<LUTf>(new LUTf(lutVals));
|
||||
}
|
||||
|
||||
@ -301,17 +301,18 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
}
|
||||
|
||||
|
||||
if (params->wavelet.denmethod == "equ") {
|
||||
cp.denmet = 0;
|
||||
} else if (params->wavelet.denmethod == "high") {
|
||||
cp.denmet = 1;
|
||||
} else if (params->wavelet.denmethod == "low") {
|
||||
cp.denmet = 2;
|
||||
} else if (params->wavelet.denmethod == "12high") {
|
||||
cp.denmet = 3;
|
||||
} else if (params->wavelet.denmethod == "12low") {
|
||||
cp.denmet = 4;
|
||||
}
|
||||
//if (params->wavelet.denmethod == "equ") {
|
||||
// cp.denmet = 0;
|
||||
//} else if (params->wavelet.denmethod == "high") {
|
||||
// cp.denmet = 1;
|
||||
//} else if (params->wavelet.denmethod == "low") {
|
||||
// cp.denmet = 2;
|
||||
//} else if (params->wavelet.denmethod == "12high") {
|
||||
// cp.denmet = 3;
|
||||
//} else if (params->wavelet.denmethod == "12low") {
|
||||
// cp.denmet = 4;
|
||||
//}
|
||||
|
||||
if (params->wavelet.mixmethod == "nois") {
|
||||
cp.mixmet = 0;
|
||||
@ -658,7 +659,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
maxlevelcrop = 10;
|
||||
}
|
||||
|
||||
// adap maximum level wavelet to size of crop
|
||||
// adapt maximum level wavelet to size of crop
|
||||
if (minwin * skip < 1024) {
|
||||
maxlevelcrop = 9; //sampling wavelet 512
|
||||
}
|
||||
@ -694,7 +695,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
|
||||
levwav = rtengine::min(maxlevelcrop, levwav);
|
||||
|
||||
// I suppress this fonctionality ==> crash for level < 3
|
||||
// I suppress this functionality ==> crash for level < 3
|
||||
if (levwav < 1) {
|
||||
return; // nothing to do
|
||||
}
|
||||
@ -2031,7 +2032,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
}
|
||||
|
||||
a = 327.68f * Chprov * sincosv.y; // apply Munsell
|
||||
b = 327.68f * Chprov * sincosv.x; //aply Munsell
|
||||
b = 327.68f * Chprov * sincosv.x; // apply Munsell
|
||||
} else {//general case
|
||||
L = labco->L[i1][j1];
|
||||
const float Lin = std::max(0.f, L);
|
||||
|
@ -21,10 +21,14 @@
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Aligned so the first entry starts on line 30
|
||||
enum ProcEventCode {
|
||||
EvPhotoLoaded = 0,
|
||||
EvProfileLoaded = 1,
|
||||
obsolete_1 = 1,
|
||||
EvProfileChanged = 2,
|
||||
EvHistoryBrowsed = 3,
|
||||
EvBrightness = 4,
|
||||
@ -38,9 +42,9 @@ enum ProcEventCode {
|
||||
EvClip = 12,
|
||||
EvLBrightness = 13,
|
||||
EvLContrast = 14,
|
||||
EvLBlack = 15,
|
||||
EvLHLCompr = 16,
|
||||
EvLSHCompr = 17,
|
||||
obsolete_15 = 15, // obsolete
|
||||
obsolete_16 = 16, // obsolete
|
||||
obsolete_17 = 17, // obsolete
|
||||
EvLLCurve = 18,
|
||||
EvShrEnabled = 19,
|
||||
EvShrRadius = 20,
|
||||
@ -77,7 +81,7 @@ enum ProcEventCode {
|
||||
EvSHShadows = 51,
|
||||
EvSHHLTonalW = 52,
|
||||
EvSHSHTonalW = 53,
|
||||
EvSHLContrast = 54,
|
||||
obsolete_54 = 54, // obsolete
|
||||
EvSHRadius = 55,
|
||||
EvCTRotate = 56,
|
||||
EvCTHFlip = 57,
|
||||
@ -89,7 +93,7 @@ enum ProcEventCode {
|
||||
EvCrop = 63,
|
||||
EvCACorr = 64,
|
||||
EvHREnabled = 65,
|
||||
obsolete_66 = 66, //obsolete
|
||||
obsolete_66 = 66, // obsolete
|
||||
EvHRMethod = 67,
|
||||
EvWProfile = 68,
|
||||
EvOProfile = 69,
|
||||
@ -100,12 +104,12 @@ enum ProcEventCode {
|
||||
EvResizeMethod = 74,
|
||||
EvExif = 75,
|
||||
EvIPTC = 76,
|
||||
EvResizeSpec = 77,
|
||||
obsolete_77 = 77, // obsolete
|
||||
EvResizeWidth = 78,
|
||||
EvResizeHeight = 79,
|
||||
EvResizeEnabled = 80,
|
||||
EvProfileChangeNotification = 81,
|
||||
EvSHHighQuality = 82,
|
||||
obsolete_82 = 82, // obsolete
|
||||
EvPerspCorr = 83,
|
||||
EvLCPFile = 84,
|
||||
EvRGBrCurveLumamode = 85,
|
||||
@ -153,12 +157,12 @@ enum ProcEventCode {
|
||||
EvFlatFieldBlurRadius = 127,
|
||||
EvFlatFieldBlurType = 128,
|
||||
EvAutoDIST = 129,
|
||||
EvDPDNLumCurve = 130,
|
||||
EvDPDNChromCurve = 131,
|
||||
EvGAMMA = 132,
|
||||
EvGAMPOS = 133,
|
||||
EvGAMFREE = 134,
|
||||
EvSLPOS = 135,
|
||||
obsolete_130 = 130, // obsolete
|
||||
obsolete_131 = 131, // obsolete
|
||||
obsolete_132 = 132, // obsolete
|
||||
obsolete_133 = 133, // obsolete
|
||||
obsolete_134 = 134, // obsolete
|
||||
obsolete_135 = 135, // obsolete
|
||||
EvPreProcessExpBlackzero = 136,
|
||||
EvPreProcessExpBlackone = 137,
|
||||
EvPreProcessExpBlacktwo = 138,
|
||||
@ -231,7 +235,7 @@ enum ProcEventCode {
|
||||
EvCATAutoAdap = 205,
|
||||
EvPFCurve = 206,
|
||||
EvWBequal = 207,
|
||||
EvWBequalbo = 208,
|
||||
obsolete_208 = 208,
|
||||
EvGradientDegree = 209,
|
||||
EvGradientEnabled = 210,
|
||||
EvPCVignetteStrength = 211,
|
||||
@ -272,7 +276,7 @@ enum ProcEventCode {
|
||||
EvLLHCurve = 246,
|
||||
EvLHHCurve = 247,
|
||||
EvDirPyrEqualizerThreshold = 248,
|
||||
EvDPDNenhance = 249,
|
||||
obsolete_249 = 249,
|
||||
EvBWMethodalg = 250,
|
||||
EvDirPyrEqualizerSkin = 251,
|
||||
EvDirPyrEqlgamutlab = 252,
|
||||
@ -296,8 +300,8 @@ enum ProcEventCode {
|
||||
EvColorToningbluehigh = 270,
|
||||
EvColorToningbalance = 271,
|
||||
EvColorToningNeutral = 272,
|
||||
EvColorToningsatlow = 273,
|
||||
EvColorToningsathigh = 274,
|
||||
obsolete_273 = 273,
|
||||
obsolete_274 = 274,
|
||||
EvColorToningTwocolor = 275,
|
||||
EvColorToningNeutralcur = 276,
|
||||
EvColorToningLumamode = 277,
|
||||
@ -322,7 +326,7 @@ enum ProcEventCode {
|
||||
EvDPDNsmet = 296,
|
||||
EvPreProcessDeadPixel = 297,
|
||||
EvDPDNCCCurve = 298,
|
||||
EvDPDNautochroma = 299,
|
||||
obsolete_299 = 299,
|
||||
EvDPDNLmet = 300,
|
||||
EvDPDNCmet = 301,
|
||||
EvDPDNC2met = 302,
|
||||
@ -431,7 +435,7 @@ enum ProcEventCode {
|
||||
EvWavNPmet = 405,
|
||||
EvretinexMethod = 406,
|
||||
EvLneigh = 407,
|
||||
EvLgain = 408,
|
||||
obsolete_408 = 408,
|
||||
EvLoffs = 409,
|
||||
EvLstr = 410,
|
||||
EvLscal = 411,
|
||||
@ -495,7 +499,7 @@ enum ProcEventCode {
|
||||
// EvPixelShiftMedian3 = 469,
|
||||
EvPixelShiftMotionMethod = 470,
|
||||
EvPixelShiftSmooth = 471,
|
||||
EvPixelShiftLmmse = 472,
|
||||
obsolete_472 = 472,
|
||||
EvPixelShiftEqualBright = 473,
|
||||
EvPixelShiftEqualBrightChannel = 474,
|
||||
EvCATtempout = 475,
|
||||
@ -626,7 +630,7 @@ enum ProcEventCode {
|
||||
Evlocallabstreng = 600,
|
||||
Evlocallabsensisf = 601,
|
||||
Evlocallabsharblur = 602,
|
||||
EvLocenalabregion = 603,
|
||||
obsolete_603 = 603,
|
||||
EvlocallabshowmaskMethod = 604,
|
||||
EvLocallabSpotSelectedWithMask = 605,
|
||||
EvlocallabCCmaskshape = 606,
|
||||
@ -870,7 +874,7 @@ enum ProcEventCode {
|
||||
EvLocenalog = 844,
|
||||
EvLocallabAuto = 845,
|
||||
EvlocallabsourceGray = 846,
|
||||
EvlocallabsourceGrayAuto = 847,
|
||||
obsolete_847 = 847,
|
||||
EvlocallabAutogray = 848,
|
||||
EvlocallabblackEv = 849,
|
||||
EvlocallabwhiteEv = 850,
|
||||
@ -889,7 +893,7 @@ enum ProcEventCode {
|
||||
Evlocallabsigmadc = 863,
|
||||
Evlocallabdeltad = 864,
|
||||
EvlocallabwavCurvecomp = 865,
|
||||
Evlocallabfatres = 866,
|
||||
//Evlocallabfatres = 866,
|
||||
EvLocallabSpotbalanh = 867,
|
||||
EvlocallabwavCurveden = 868,
|
||||
EvlocallabHHmasklcshape = 869,
|
||||
@ -918,7 +922,7 @@ enum ProcEventCode {
|
||||
Evlocallabanglog = 892,
|
||||
EvLocallabSpotcolorde = 893,
|
||||
// EvlocallabshowmasksharMethod = 894,
|
||||
Evlocallabshowreset = 895,
|
||||
//Evlocallabshowreset = 895,
|
||||
Evlocallabstrengthw = 896,
|
||||
Evlocallabradiusw = 897,
|
||||
Evlocallabdetailw = 898,
|
||||
@ -998,7 +1002,7 @@ enum ProcEventCode {
|
||||
EvLocallabchromaskL = 972,
|
||||
EvlocallabLmaskshapeL = 973,
|
||||
Evlocallablightl = 974,
|
||||
EvlocallabLshapeL = 975,
|
||||
//EvlocallabLshapeL = 975,
|
||||
Evlocallabcontq = 976,
|
||||
Evlocallabsursour = 977,
|
||||
Evlocallablightq = 978,
|
||||
@ -1073,9 +1077,112 @@ enum ProcEventCode {
|
||||
Evlocallabreparexp = 1047,
|
||||
Evlocallabrepartm = 1048,
|
||||
Evlocallabchroml = 1049,
|
||||
Evlocallabresidgam = 1050,
|
||||
Evlocallabresidslop = 1051,
|
||||
Evlocallabnoisegam = 1052,
|
||||
Evlocallabgamlc = 1053,
|
||||
Evlocallabgamc = 1054,
|
||||
Evlocallabgamex = 1055,
|
||||
EvLocenacie = 1056,
|
||||
Evlocallabreparcie = 1057,
|
||||
EvlocallabAutograycie = 1058,
|
||||
EvlocallabsourceGraycie = 1059,
|
||||
Evlocallabsourceabscie = 1060,
|
||||
Evlocallabsursourcie = 1061,
|
||||
Evlocallabsaturlcie = 1062,
|
||||
Evlocallabchromlcie = 1063,
|
||||
Evlocallablightlcie = 1064,
|
||||
Evlocallablightqcie = 1065,
|
||||
Evlocallabcontlcie = 1066,
|
||||
Evlocallabcontthrescie = 1067,
|
||||
Evlocallabcontqcie = 1068,
|
||||
Evlocallabcolorflcie = 1069,
|
||||
Evlocallabtargabscie = 1070,
|
||||
EvlocallabtargetGraycie = 1071,
|
||||
Evlocallabcatadcie = 1072,
|
||||
Evlocallabdetailcie = 1073,
|
||||
Evlocallabsurroundcie = 1074,
|
||||
Evlocallabsensicie = 1075,
|
||||
Evlocallabmodecie = 1076,
|
||||
Evlocallabrstprotectcie = 1077,
|
||||
Evlocallabsigmoidldacie = 1078,
|
||||
Evlocallabsigmoidthcie = 1079,
|
||||
Evlocallabsigmoidblcie = 1080,
|
||||
Evlocallabsigmoidqjcie = 1081,
|
||||
Evlocallabhuecie = 1082,
|
||||
Evlocallabjabcie = 1083,
|
||||
Evlocallablightjzcie = 1084,
|
||||
Evlocallabcontjzcie = 1085,
|
||||
Evlocallabchromjzcie = 1086,
|
||||
Evlocallabhuejzcie = 1087,
|
||||
Evlocallabsigmoidldajzcie = 1088,
|
||||
Evlocallabsigmoidthjzcie = 1089,
|
||||
Evlocallabsigmoidbljzcie = 1090,
|
||||
Evlocallabadapjzcie = 1091,
|
||||
Evlocallabmodecam = 1092,
|
||||
Evlocallabhljzcie = 1093,
|
||||
Evlocallabhlthjzcie = 1094,
|
||||
Evlocallabshjzcie = 1095,
|
||||
Evlocallabshthjzcie = 1096,
|
||||
Evlocallabradjzcie = 1097,
|
||||
EvlocallabCHshapejz = 1098,
|
||||
Evlocallabjz100 = 1099,
|
||||
Evlocallabpqremap = 1100,
|
||||
EvlocallabLHshapejz = 1101,
|
||||
Evlocallabshargam = 1102,
|
||||
Evlocallabvibgam = 1103,
|
||||
EvLocallabtoneMethodcie = 1104,
|
||||
Evlocallabshapecie = 1105,
|
||||
EvLocallabtoneMethodcie2 = 1106,
|
||||
Evlocallabshapecie2 = 1107,
|
||||
Evlocallabshapejz = 1108,
|
||||
Evlocallabshapecz = 1109,
|
||||
Evlocallabshapeczjz = 1110,
|
||||
Evlocallabforcejz = 1111,
|
||||
Evlocallabpqremapcam16 = 1112,
|
||||
EvLocallabEnacieMask = 1113,
|
||||
EvlocallabCCmaskcieshape = 1114,
|
||||
EvlocallabLLmaskcieshape = 1115,
|
||||
EvlocallabHHmaskcieshape = 1116,
|
||||
Evlocallabblendmaskcie = 1117,
|
||||
Evlocallabradmaskcie = 1118,
|
||||
Evlocallabchromaskcie = 1119,
|
||||
EvlocallabLmaskcieshape = 1120,
|
||||
Evlocallabrecothrescie = 1121,
|
||||
Evlocallablowthrescie = 1122,
|
||||
Evlocallabhigthrescie = 1123,
|
||||
Evlocallabdecaycie = 1124,
|
||||
Evlocallablapmaskcie = 1125,
|
||||
Evlocallabgammaskcie = 1126,
|
||||
Evlocallabslomaskcie = 1127,
|
||||
Evlocallabqtoj = 1128,
|
||||
Evlocallabsaturjzcie = 1129,
|
||||
EvLocallabSpotdenoichmask = 1130,
|
||||
Evlocallabsigmalcjz = 1131,
|
||||
EvlocallabcsThresholdjz = 1132,
|
||||
EvlocallabwavCurvejz = 1133,
|
||||
Evlocallabclarilresjz = 1134,
|
||||
Evlocallabclaricresjz = 1135,
|
||||
Evlocallabclarisoftjz = 1136,
|
||||
EvlocallabHHshapejz = 1137,
|
||||
Evlocallabsoftjzcie = 1138,
|
||||
Evlocallabthrhjzcie = 1139,
|
||||
Evlocallabchjzcie = 1140,
|
||||
Evlocallabstrsoftjzcie = 1141,
|
||||
EvlocallabblackEvjz = 1142,
|
||||
EvlocallabwhiteEvjz = 1143,
|
||||
Evlocallablogjz = 1144,
|
||||
Evlocallabtargetjz = 1145,
|
||||
Evlocallabforcebw = 1146,
|
||||
Evlocallabsigjz = 1147,
|
||||
Evlocallabsigq = 1148,
|
||||
Evlocallablogcie = 1149,
|
||||
NUMOFEVENTS
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class ProcEvent
|
||||
{
|
||||
public:
|
||||
|
@ -949,11 +949,22 @@ struct LensProfParams {
|
||||
* Parameters of the perspective correction
|
||||
*/
|
||||
struct PerspectiveParams {
|
||||
static constexpr double DEFAULT_CAMERA_CROP_FACTOR = 1;
|
||||
static constexpr double DEFAULT_CAMERA_FOCAL_LENGTH = 24;
|
||||
|
||||
Glib::ustring method;
|
||||
bool render;
|
||||
double horizontal;
|
||||
double vertical;
|
||||
/**
|
||||
* Negative and zero values indicate an unspecified crop factor and should
|
||||
* be interpreted with {@link #DEFAULT_CAMERA_CROP_FACTOR}.
|
||||
*/
|
||||
double camera_crop_factor;
|
||||
/**
|
||||
* Negative and zero values indicate an unspecified focal length and should
|
||||
* be interpreted with {@link #DEFAULT_CAMERA_FOCAL_LENGTH}.
|
||||
*/
|
||||
double camera_focal_length;
|
||||
double camera_pitch;
|
||||
double camera_roll;
|
||||
@ -1037,6 +1048,7 @@ struct LocallabParams {
|
||||
bool shortc;
|
||||
bool savrest;
|
||||
int scopemask;
|
||||
double denoichmask;
|
||||
int lumask;
|
||||
// Color & Light
|
||||
bool visicolor;
|
||||
@ -1045,6 +1057,7 @@ struct LocallabParams {
|
||||
bool curvactiv;
|
||||
int lightness;
|
||||
double reparcol;
|
||||
double gamc;
|
||||
int contrast;
|
||||
int chroma;
|
||||
double labgridALow;
|
||||
@ -1121,6 +1134,7 @@ struct LocallabParams {
|
||||
int sensiex;
|
||||
int structexp;
|
||||
int blurexpde;
|
||||
double gamex;
|
||||
double strexp;
|
||||
double angexp;
|
||||
std::vector<double> excurve;
|
||||
@ -1199,6 +1213,7 @@ struct LocallabParams {
|
||||
int complexvibrance;
|
||||
int saturated;
|
||||
int pastels;
|
||||
double vibgam;
|
||||
int warm;
|
||||
Threshold<int> psthreshold;
|
||||
bool protectskins;
|
||||
@ -1275,6 +1290,7 @@ struct LocallabParams {
|
||||
double noiselumc;
|
||||
double noiselumdetail;
|
||||
int noiselequal;
|
||||
double noisegam;
|
||||
double noisechrof;
|
||||
double noisechroc;
|
||||
double noisechrodetail;
|
||||
@ -1393,6 +1409,7 @@ struct LocallabParams {
|
||||
int shardamping;
|
||||
int shariter;
|
||||
double sharblur;
|
||||
double shargam;
|
||||
int sensisha;
|
||||
bool inverssha;
|
||||
// Local Contrast
|
||||
@ -1410,6 +1427,9 @@ struct LocallabParams {
|
||||
double residshathr;
|
||||
double residhi;
|
||||
double residhithr;
|
||||
double gamlc;
|
||||
double residgam;
|
||||
double residslop;
|
||||
double residblur;
|
||||
double levelblur;
|
||||
double sigmabl;
|
||||
@ -1573,6 +1593,110 @@ struct LocallabParams {
|
||||
std::vector<double> Lmask_curve;
|
||||
std::vector<double> LLmask_curvewav;
|
||||
Threshold<int> csthresholdmask;
|
||||
//ciecam
|
||||
bool visicie;
|
||||
bool expcie;
|
||||
int complexcie;
|
||||
double reparcie;
|
||||
int sensicie;
|
||||
bool Autograycie;
|
||||
bool forcejz;
|
||||
bool forcebw;
|
||||
bool qtoj;
|
||||
bool jabcie;
|
||||
bool sigmoidqjcie;
|
||||
bool logcie;
|
||||
bool logjz;
|
||||
bool sigjz;
|
||||
bool sigq;
|
||||
bool chjzcie;
|
||||
double sourceGraycie;
|
||||
double sourceabscie;
|
||||
Glib::ustring sursourcie;
|
||||
Glib::ustring modecie;
|
||||
Glib::ustring modecam;
|
||||
double saturlcie;
|
||||
double rstprotectcie;
|
||||
double chromlcie;
|
||||
double huecie;
|
||||
Glib::ustring toneMethodcie;
|
||||
std::vector<double> ciecurve;
|
||||
Glib::ustring toneMethodcie2;
|
||||
std::vector<double> ciecurve2;
|
||||
double chromjzcie;
|
||||
double saturjzcie;
|
||||
double huejzcie;
|
||||
double softjzcie;
|
||||
double strsoftjzcie;
|
||||
double thrhjzcie;
|
||||
std::vector<double> jzcurve;
|
||||
std::vector<double> czcurve;
|
||||
std::vector<double> czjzcurve;
|
||||
std::vector<double> HHcurvejz;
|
||||
std::vector<double> CHcurvejz;
|
||||
std::vector<double> LHcurvejz;
|
||||
double lightlcie;
|
||||
double lightjzcie;
|
||||
double lightqcie;
|
||||
double contlcie;
|
||||
double contjzcie;
|
||||
double adapjzcie;
|
||||
double jz100;
|
||||
double pqremap;
|
||||
double pqremapcam16;
|
||||
double hljzcie;
|
||||
double hlthjzcie;
|
||||
double shjzcie;
|
||||
double shthjzcie;
|
||||
double radjzcie;
|
||||
double sigmalcjz;
|
||||
double clarilresjz;
|
||||
double claricresjz;
|
||||
double clarisoftjz;
|
||||
std::vector<double> locwavcurvejz;
|
||||
Threshold<int> csthresholdjz;
|
||||
double contthrescie;
|
||||
double blackEvjz;
|
||||
double whiteEvjz;
|
||||
double targetjz;
|
||||
double sigmoidldacie;
|
||||
double sigmoidthcie;
|
||||
double sigmoidblcie;
|
||||
double sigmoidldajzcie;
|
||||
double sigmoidthjzcie;
|
||||
double sigmoidbljzcie;
|
||||
double contqcie;
|
||||
double colorflcie;
|
||||
/*
|
||||
double lightlzcam;
|
||||
double lightqzcam;
|
||||
double contlzcam;
|
||||
double contqzcam;
|
||||
double contthreszcam;
|
||||
double colorflzcam;
|
||||
double saturzcam;
|
||||
double chromzcam;
|
||||
*/
|
||||
double targabscie;
|
||||
double targetGraycie;
|
||||
double catadcie;
|
||||
double detailcie;
|
||||
Glib::ustring surroundcie;
|
||||
bool enacieMask;
|
||||
std::vector<double> CCmaskciecurve;
|
||||
std::vector<double> LLmaskciecurve;
|
||||
std::vector<double> HHmaskciecurve;
|
||||
int blendmaskcie;
|
||||
double radmaskcie;
|
||||
double chromaskcie;
|
||||
double lapmaskcie;
|
||||
double gammaskcie;
|
||||
double slomaskcie;
|
||||
std::vector<double> Lmaskciecurve;
|
||||
double recothrescie;
|
||||
double lowthrescie;
|
||||
double higthrescie;
|
||||
double decaycie;
|
||||
|
||||
LocallabSpot();
|
||||
|
||||
@ -1946,7 +2070,7 @@ struct WaveletParams {
|
||||
std::vector<double> blcurve;
|
||||
std::vector<double> levelshc;
|
||||
std::vector<double> opacityCurveRG;
|
||||
std::vector<double> opacityCurveSH;
|
||||
//std::vector<double> opacityCurveSH;
|
||||
std::vector<double> opacityCurveBY;
|
||||
std::vector<double> opacityCurveW;
|
||||
std::vector<double> opacityCurveWL;
|
||||
@ -2019,7 +2143,7 @@ struct WaveletParams {
|
||||
Glib::ustring Backmethod;
|
||||
Glib::ustring Tilesmethod;
|
||||
Glib::ustring complexmethod;
|
||||
Glib::ustring denmethod;
|
||||
//Glib::ustring denmethod;
|
||||
Glib::ustring mixmethod;
|
||||
Glib::ustring slimethod;
|
||||
Glib::ustring quamethod;
|
||||
@ -2316,6 +2440,7 @@ struct RAWParams {
|
||||
|
||||
Glib::ustring ff_file;
|
||||
bool ff_AutoSelect;
|
||||
bool ff_FromMetaData;
|
||||
int ff_BlurRadius;
|
||||
Glib::ustring ff_BlurType;
|
||||
bool ff_AutoClipControl;
|
||||
|
@ -508,7 +508,7 @@ void ProfileStore::dumpFolderList()
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
PartialProfile *ProfileStore::loadDynamicProfile (const FramesMetaData *im)
|
||||
PartialProfile *ProfileStore::loadDynamicProfile (const FramesMetaData *im, const Glib::ustring& filename)
|
||||
{
|
||||
if (storeState == STORESTATE_NOTINITIALIZED) {
|
||||
parseProfilesOnce();
|
||||
@ -521,7 +521,7 @@ PartialProfile *ProfileStore::loadDynamicProfile (const FramesMetaData *im)
|
||||
}
|
||||
|
||||
for (auto rule : dynamicRules) {
|
||||
if (rule.matches (im)) {
|
||||
if (rule.matches (im, filename)) {
|
||||
if (settings->verbose) {
|
||||
printf ("found matching profile %s\n", rule.profilepath.c_str());
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ public:
|
||||
void addListener (ProfileStoreListener *listener);
|
||||
void removeListener (ProfileStoreListener *listener);
|
||||
|
||||
rtengine::procparams::PartialProfile* loadDynamicProfile (const rtengine::FramesMetaData *im);
|
||||
rtengine::procparams::PartialProfile* loadDynamicProfile (const rtengine::FramesMetaData *im, const Glib::ustring& filename);
|
||||
|
||||
void dumpFolderList();
|
||||
};
|
||||
|
@ -548,11 +548,18 @@ int RawImage::loadRaw(bool loadData, unsigned int imageNum, bool closeFile, Prog
|
||||
|
||||
CameraConstantsStore* ccs = CameraConstantsStore::getInstance();
|
||||
const CameraConst *cc = ccs->get(make, model);
|
||||
bool raw_crop_cc = false;
|
||||
int orig_raw_width = width;
|
||||
int orig_raw_height = height;
|
||||
|
||||
if (raw_image) {
|
||||
if (cc && cc->has_rawCrop()) {
|
||||
orig_raw_width = raw_width;
|
||||
orig_raw_height = raw_height;
|
||||
|
||||
if (cc && cc->has_rawCrop(raw_width, raw_height)) {
|
||||
raw_crop_cc = true;
|
||||
int lm, tm, w, h;
|
||||
cc->get_rawCrop(lm, tm, w, h);
|
||||
cc->get_rawCrop(raw_width, raw_height, lm, tm, w, h);
|
||||
|
||||
if (isXtrans()) {
|
||||
shiftXtransMatrix(6 - ((top_margin - tm) % 6), 6 - ((left_margin - lm) % 6));
|
||||
@ -584,9 +591,9 @@ int RawImage::loadRaw(bool loadData, unsigned int imageNum, bool closeFile, Prog
|
||||
}
|
||||
}
|
||||
|
||||
if (cc && cc->has_rawMask(0)) {
|
||||
for (int i = 0; i < 8 && cc->has_rawMask(i); i++) {
|
||||
cc->get_rawMask(i, mask[i][0], mask[i][1], mask[i][2], mask[i][3]);
|
||||
if (cc && cc->has_rawMask(orig_raw_width, orig_raw_height, 0)) {
|
||||
for (int i = 0; i < 2 && cc->has_rawMask(orig_raw_width, orig_raw_height, i); i++) {
|
||||
cc->get_rawMask(orig_raw_width, orig_raw_height, i, mask[i][0], mask[i][1], mask[i][2], mask[i][3]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -594,9 +601,10 @@ int RawImage::loadRaw(bool loadData, unsigned int imageNum, bool closeFile, Prog
|
||||
free(raw_image);
|
||||
raw_image = nullptr;
|
||||
} else {
|
||||
if (get_maker() == "Sigma" && cc && cc->has_rawCrop()) { // foveon images
|
||||
if (get_maker() == "Sigma" && cc && cc->has_rawCrop(width, height)) { // foveon images
|
||||
raw_crop_cc = true;
|
||||
int lm, tm, w, h;
|
||||
cc->get_rawCrop(lm, tm, w, h);
|
||||
cc->get_rawCrop(width, height, lm, tm, w, h);
|
||||
left_margin = lm;
|
||||
top_margin = tm;
|
||||
|
||||
@ -692,11 +700,12 @@ int RawImage::loadRaw(bool loadData, unsigned int imageNum, bool closeFile, Prog
|
||||
printf("no constants in camconst.json exists for \"%s %s\" (relying only on dcraw defaults)\n", make, model);
|
||||
}
|
||||
|
||||
printf("raw dimensions: %d x %d\n", orig_raw_width, orig_raw_height);
|
||||
printf("black levels: R:%d G1:%d B:%d G2:%d (%s)\n", get_cblack(0), get_cblack(1), get_cblack(2), get_cblack(3),
|
||||
black_from_cc ? "provided by camconst.json" : "provided by dcraw");
|
||||
printf("white levels: R:%d G1:%d B:%d G2:%d (%s)\n", get_white(0), get_white(1), get_white(2), get_white(3),
|
||||
white_from_cc ? "provided by camconst.json" : "provided by dcraw");
|
||||
printf("raw crop: %d %d %d %d (provided by %s)\n", left_margin, top_margin, iwidth, iheight, (cc && cc->has_rawCrop()) ? "camconst.json" : "dcraw");
|
||||
printf("raw crop: %d %d %d %d (provided by %s)\n", left_margin, top_margin, iwidth, iheight, raw_crop_cc ? "camconst.json" : "dcraw");
|
||||
printf("color matrix provided by %s\n", (cc && cc->has_dcrawMatrix()) ? "camconst.json" : "dcraw");
|
||||
}
|
||||
}
|
||||
|
@ -245,11 +245,6 @@ public:
|
||||
return zero_is_bad == 1;
|
||||
}
|
||||
|
||||
bool isBayer() const
|
||||
{
|
||||
return (filters != 0 && filters != 9);
|
||||
}
|
||||
|
||||
bool isXtrans() const
|
||||
{
|
||||
return filters == 9;
|
||||
|
@ -34,13 +34,16 @@
|
||||
#include "median.h"
|
||||
#include "mytime.h"
|
||||
#include "pdaflinesfilter.h"
|
||||
#include "pixelsmap.h"
|
||||
#include "procparams.h"
|
||||
#include "rawimage.h"
|
||||
#include "rawimagesource_i.h"
|
||||
#include "rawimagesource.h"
|
||||
#include "rescale.h"
|
||||
#include "rt_math.h"
|
||||
#include "rtengine.h"
|
||||
#include "rtlensfun.h"
|
||||
|
||||
#include "../rtgui/options.h"
|
||||
|
||||
#define BENCHMARK
|
||||
@ -821,7 +824,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
||||
int i = sy1 + skip * ix;
|
||||
i = std::min(i, maxy - skip); // avoid trouble
|
||||
|
||||
if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) {
|
||||
if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1 || ri->get_colors() == 3) {
|
||||
for (int j = 0, jx = sx1; j < imwidth; j++, jx += skip) {
|
||||
jx = std::min(jx, maxx - skip); // avoid trouble
|
||||
|
||||
@ -1307,14 +1310,14 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
|
||||
|
||||
Glib::ustring newDF = raw.dark_frame;
|
||||
RawImage *rid = nullptr;
|
||||
const RawImage* rid = nullptr;
|
||||
|
||||
if (!raw.df_autoselect) {
|
||||
if (!raw.dark_frame.empty()) {
|
||||
rid = dfm.searchDarkFrame(raw.dark_frame);
|
||||
rid = DFManager::getInstance().searchDarkFrame(raw.dark_frame);
|
||||
}
|
||||
} else {
|
||||
rid = dfm.searchDarkFrame(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS());
|
||||
rid = DFManager::getInstance().searchDarkFrame(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS());
|
||||
}
|
||||
|
||||
if (rid && settings->verbose) {
|
||||
@ -1345,7 +1348,6 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
rif = ffm.searchFlatField(idata->getMake(), idata->getModel(), idata->getLens(), idata->getFocalLen(), idata->getFNumber(), idata->getDateTimeAsTS());
|
||||
}
|
||||
|
||||
|
||||
bool hasFlatField = (rif != nullptr);
|
||||
|
||||
if (hasFlatField && settings->verbose) {
|
||||
@ -1385,9 +1387,12 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
}
|
||||
//FLATFIELD end
|
||||
|
||||
if (raw.ff_FromMetaData && isGainMapSupported()) {
|
||||
applyDngGainMap(c_black, ri->getGainMaps());
|
||||
}
|
||||
|
||||
// Always correct camera badpixels from .badpixels file
|
||||
std::vector<badPix> *bp = dfm.getBadPixels(ri->get_maker(), ri->get_model(), idata->getSerialNumber());
|
||||
const std::vector<badPix> *bp = DFManager::getInstance().getBadPixels(ri->get_maker(), ri->get_model(), idata->getSerialNumber());
|
||||
|
||||
if (bp) {
|
||||
if (!bitmapBads) {
|
||||
@ -1405,9 +1410,9 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le
|
||||
bp = nullptr;
|
||||
|
||||
if (raw.df_autoselect) {
|
||||
bp = dfm.getHotPixels(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS());
|
||||
bp = DFManager::getInstance().getHotPixels(idata->getMake(), idata->getModel(), idata->getISOSpeed(), idata->getShutterSpeed(), idata->getDateTimeAsTS());
|
||||
} else if (!raw.dark_frame.empty()) {
|
||||
bp = dfm.getHotPixels(raw.dark_frame);
|
||||
bp = DFManager::getInstance().getHotPixels(raw.dark_frame);
|
||||
}
|
||||
|
||||
if (bp) {
|
||||
@ -1683,6 +1688,9 @@ void RawImageSource::demosaic(const RAWParams &raw, bool autoContrast, double &c
|
||||
} else if (ri->get_colors() == 1) {
|
||||
// Monochrome
|
||||
nodemosaic(true);
|
||||
} else {
|
||||
// RGB
|
||||
nodemosaic(false);
|
||||
}
|
||||
|
||||
t2.set();
|
||||
@ -2450,7 +2458,7 @@ void RawImageSource::HLRecovery_Global(const ToneCurveParams &hrp)
|
||||
/* Copy original pixel data and
|
||||
* subtract dark frame (if present) from current image and apply flat field correction (if present)
|
||||
*/
|
||||
void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData)
|
||||
void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, const RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData)
|
||||
{
|
||||
const auto tmpfilters = ri->get_filters();
|
||||
ri->set_filters(ri->prefilters); // we need 4 blacks for bayer processing
|
||||
@ -6254,6 +6262,36 @@ void RawImageSource::getRawValues(int x, int y, int rotate, int &R, int &G, int
|
||||
}
|
||||
}
|
||||
|
||||
bool RawImageSource::isGainMapSupported() const {
|
||||
return ri->isGainMapSupported();
|
||||
}
|
||||
|
||||
void RawImageSource::applyDngGainMap(const float black[4], const std::vector<GainMap> &gainMaps) {
|
||||
// now we can apply each gain map to raw_data
|
||||
array2D<float> mvals[2][2];
|
||||
for (auto &m : gainMaps) {
|
||||
mvals[m.Top & 1][m.Left & 1](m.MapPointsH, m.MapPointsV, m.MapGain.data());
|
||||
}
|
||||
|
||||
// now we assume, col_scale and row scale is the same for all maps
|
||||
const float col_scale = float(gainMaps[0].MapPointsH-1) / float(W);
|
||||
const float row_scale = float(gainMaps[0].MapPointsV-1) / float(H);
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic, 16)
|
||||
#endif
|
||||
for (std::size_t y = 0; y < static_cast<size_t>(H); ++y) {
|
||||
const float rowBlack[2] = {black[FC(y,0)], black[FC(y,1)]};
|
||||
const float ys = y * row_scale;
|
||||
float xs = 0.f;
|
||||
for (std::size_t x = 0; x < static_cast<std::size_t>(W); ++x, xs += col_scale) {
|
||||
const float f = getBilinearValue(mvals[y & 1][x & 1], xs, ys);
|
||||
const float b = rowBlack[x & 1];
|
||||
rawData[y][x] = rtengine::max((rawData[y][x] - b) * f + b, 0.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RawImageSource::cleanup ()
|
||||
{
|
||||
delete phaseOneIccCurve;
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "array2D.h"
|
||||
#include "colortemp.h"
|
||||
#include "dnggainmap.h"
|
||||
#include "iimage.h"
|
||||
#include "imagesource.h"
|
||||
#include "procparams.h"
|
||||
@ -138,7 +139,7 @@ public:
|
||||
}
|
||||
|
||||
void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D<float> &rawData, const float black[4]);
|
||||
void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
|
||||
void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, const RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
|
||||
void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
||||
void WBauto(double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
|
||||
void getAutoWBMultipliersitc(double &tempref, double &greenref, double &tempitc, double &greenitc, float &studgood, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double &rm, double &gm, double &bm, const procparams::WBParams & wbpar, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
|
||||
@ -177,6 +178,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isGainMapSupported() const override;
|
||||
|
||||
void setProgressListener (ProgressListener* pl) override
|
||||
{
|
||||
plistener = pl;
|
||||
@ -304,6 +307,7 @@ protected:
|
||||
void vflip (Imagefloat* im);
|
||||
void getRawValues(int x, int y, int rotate, int &R, int &G, int &B) override;
|
||||
void captureSharpening(const procparams::CaptureSharpeningParams &sharpeningParams, bool showMask, double &conrastThreshold, double &radius) override;
|
||||
void applyDngGainMap(const float black[4], const std::vector<GainMap> &gainMaps);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
// Aligned so the first entry starts on line 30.
|
||||
int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
ALL, // EvPhotoLoaded,
|
||||
ALL, // EvProfileLoaded,
|
||||
0, // EvProfileLoaded : obsolete,
|
||||
ALL, // EvProfileChanged,
|
||||
ALL, // EvHistoryBrowsed,
|
||||
AUTOEXP, // EvBrightness,
|
||||
@ -42,9 +42,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
AUTOEXP, // EvClip,
|
||||
LUMINANCECURVE, // EvLBrightness,
|
||||
LUMINANCECURVE, // EvLContrast,
|
||||
LUMINANCECURVE, // EvLBlack,
|
||||
LUMINANCECURVE, // EvLHLCompr,
|
||||
LUMINANCECURVE, // EvLSHCompr,
|
||||
0, // EvLBlack : obsolete,
|
||||
0, // EvLHLCompr : obsolete,
|
||||
0, // EvLSHCompr : obsolete,
|
||||
LUMINANCECURVE, // EvLLCurve,
|
||||
SHARPENING, // EvShrEnabled,
|
||||
SHARPENING, // EvShrRadius,
|
||||
@ -81,7 +81,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
LUMINANCECURVE, // EvSHShadows,
|
||||
LUMINANCECURVE, // EvSHHLTonalW,
|
||||
LUMINANCECURVE, // EvSHSHTonalW,
|
||||
AUTOEXP, // EvSHLContrast,
|
||||
0, // EvSHLContrast : obsolete,
|
||||
LUMINANCECURVE, // EvSHRadius,
|
||||
ALLNORAW, // EvCTRotate,
|
||||
ALLNORAW, // EvCTHFlip,
|
||||
@ -93,7 +93,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
CROP, // EvCrop,
|
||||
HDR, // EvCACorr,
|
||||
ALLNORAW, // EvHREnabled,
|
||||
ALLNORAW, // EvHRAmount,
|
||||
0, // EvHRAmount : obsolete,
|
||||
ALLNORAW, // EvHRMethod,
|
||||
DEMOSAIC, // EvWProfile,
|
||||
OUTPUTPROFILE, // EvOProfile,
|
||||
@ -104,12 +104,12 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
RESIZE, // EvResizeMethod,
|
||||
EXIF, // EvExif,
|
||||
IPTC, // EvIPTC
|
||||
RESIZE, // EvResizeSpec,
|
||||
0, // EvResizeSpec : obsolete,
|
||||
RESIZE, // EvResizeWidth
|
||||
RESIZE, // EvResizeHeight
|
||||
RESIZE, // EvResizeEnabled
|
||||
ALL, // EvProfileChangeNotification
|
||||
RETINEX, // EvShrHighQuality
|
||||
0, // EvSHHighQuality : obsolete
|
||||
HDR, // EvPerspCorr
|
||||
DARKFRAME, // EvLCPFile
|
||||
AUTOEXP, // EvRGBrCurveLumamode
|
||||
@ -157,12 +157,12 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
FLATFIELD, // EvFlatFieldBlurRadius,
|
||||
FLATFIELD, // EvFlatFieldBlurType,
|
||||
HDR, // EvAutoDIST,
|
||||
ALLNORAW, // EvDPDNLumCurve,
|
||||
ALLNORAW, // EvDPDNChromCurve,
|
||||
GAMMA, // EvGAMMA
|
||||
GAMMA, // EvGAMPOS
|
||||
GAMMA, // EvGAMFREE
|
||||
GAMMA, // EvSLPOS
|
||||
0, // EvDPDNLumCurve : obsolete
|
||||
0, // EvDPDNChromCurve : obsolete
|
||||
0, // EvGAMMA : obsolete
|
||||
0, // EvGAMPOS : obsolete
|
||||
0, // EvGAMFREE : obsolete
|
||||
0, // EvSLPOS : obsolete
|
||||
DARKFRAME, // EvPreProcessExpBlackzero
|
||||
DARKFRAME, // EvPreProcessExpBlackone
|
||||
DARKFRAME, // EvPreProcessExpBlacktwo
|
||||
@ -200,7 +200,6 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
LUMINANCECURVE, // EvLLCCurve
|
||||
LUMINANCECURVE, // EvLLCredsk
|
||||
ALLNORAW, // EvDPDNLdetail
|
||||
//ALLNORAW, // EvCATEnabled
|
||||
LUMINANCECURVE, // EvCATEnabled
|
||||
LUMINANCECURVE, // EvCATDegree
|
||||
LUMINANCECURVE, // EvCATMethodsur
|
||||
@ -236,7 +235,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
LUMINANCECURVE, // EvCATAutoadap
|
||||
DEFRINGE, // EvPFCurve
|
||||
ALLNORAW, // EvWBequal
|
||||
ALLNORAW, // EvWBequalbo
|
||||
0, // EvWBequalbo : obsolete
|
||||
HDR, // EvGradientDegree
|
||||
HDR, // EvGradientEnabled
|
||||
HDR, // EvPCVignetteStrength
|
||||
@ -277,7 +276,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
LUMINANCECURVE, // EvLLHCurve
|
||||
LUMINANCECURVE, // EvLHHCurve
|
||||
ALLNORAW, // EvDirPyrEqualizerThreshold
|
||||
ALLNORAW, // EvDPDNenhance
|
||||
0, // EvDPDNenhance : obsolete
|
||||
AUTOEXP, // EvBWMethodalg
|
||||
ALLNORAW, // EvDirPyrEqualizerSkin
|
||||
ALLNORAW, // EvDirPyrEqlgamutlab
|
||||
@ -301,8 +300,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
AUTOEXP, // EvColorToningbluehigh
|
||||
AUTOEXP, // EvColorToningbalance
|
||||
AUTOEXP, // EvColorToningNeutral
|
||||
AUTOEXP, // EvColorToningsatlow
|
||||
AUTOEXP, // EvColorToningsathigh
|
||||
0, // EvColorToningsatlow : obsolete
|
||||
0, // EvColorToningsathigh : obsolete
|
||||
AUTOEXP, // EvColorToningTwocolor
|
||||
AUTOEXP, // EvColorToningNeutralcur
|
||||
AUTOEXP, // EvColorToningLumamode
|
||||
@ -327,7 +326,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
ALLNORAW, // EvDPDNsmet
|
||||
DARKFRAME, // EvPreProcessDeadPixel
|
||||
ALLNORAW, // EvDPDNCCCurve
|
||||
ALLNORAW, // EvDPDNautochroma
|
||||
0, // EvDPDNautochroma : obsolete
|
||||
ALLNORAW, // EvDPDNLmet
|
||||
ALLNORAW, // EvDPDNCmet
|
||||
ALLNORAW, // EvDPDNC2met
|
||||
@ -436,7 +435,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
DIRPYREQUALIZER, // EvWavNPmet
|
||||
DEMOSAIC, // EvretinexMethod
|
||||
RETINEX, // EvLneigh
|
||||
RETINEX, // EvLgain
|
||||
0, // EvLgain : obsolete
|
||||
RETINEX, // EvLoffs
|
||||
RETINEX, // EvLstr
|
||||
RETINEX, // EvLscal
|
||||
@ -500,7 +499,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
0, // unused
|
||||
DEMOSAIC, // EvPixelShiftMotionMethod
|
||||
DEMOSAIC, // EvPixelShiftSmooth
|
||||
DEMOSAIC, // EvPixelShiftLmmse
|
||||
0, // EvPixelShiftLmmse : obsolete
|
||||
DEMOSAIC, // EvPixelShiftEqualBright
|
||||
DEMOSAIC, // EvPixelShiftEqualBrightChannel
|
||||
LUMINANCECURVE, // EvCATtempout
|
||||
@ -524,7 +523,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
DEMOSAIC, // EvPdShrEnabled
|
||||
CAPTURESHARPEN, // EvPdShrMaskToggled
|
||||
AUTOEXP, // EvLocallabSpotDeleted
|
||||
M_VOID, // EvLocallabSpotSelected
|
||||
HDR, // EvLocallabSpotSelected
|
||||
M_VOID, // EvLocallabSpotName
|
||||
M_VOID, // EvLocallabSpotVisibility
|
||||
AUTOEXP, // EvLocallabSpotShape
|
||||
@ -631,7 +630,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
AUTOEXP, // EvLocallabstreng
|
||||
AUTOEXP, // EvLocallabsensisf
|
||||
AUTOEXP, // Evlocallabsharblur
|
||||
AUTOEXP, // EvLocenalabregion
|
||||
0, // EvLocenalabregion : obsolete
|
||||
AUTOEXP, // EvlocallabshowmaskMethod
|
||||
AUTOEXP, // EvLocallabSpotSelectedWithMask
|
||||
AUTOEXP, // EvlocallabCCmaskshape
|
||||
@ -875,7 +874,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
AUTOEXP | M_AUTOEXP, // EvLocenalog
|
||||
HDR, // EvLocallabAuto
|
||||
AUTOEXP, // EvlocallabsourceGray
|
||||
HDR, // EvlocallabsourceGrayAuto
|
||||
0, // EvlocallabsourceGrayAuto : obsolete
|
||||
HDR, // EvlocallabAutoGray
|
||||
AUTOEXP, // EvlocallabblackEv
|
||||
AUTOEXP, // EvlocallabwhiteEv
|
||||
@ -1077,8 +1076,116 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
AUTOEXP, // Evlocallabreparsh
|
||||
AUTOEXP, // Evlocallabreparexp
|
||||
AUTOEXP, // Evlocallabrepartm
|
||||
AUTOEXP // Evlocallabchroml
|
||||
|
||||
AUTOEXP, // Evlocallabchroml
|
||||
AUTOEXP, // Evlocallabresidgam
|
||||
AUTOEXP, // Evlocallabresidslop
|
||||
AUTOEXP, // Evlocallabnoisegam
|
||||
AUTOEXP, //Evlocallabgamlc
|
||||
AUTOEXP, //Evlocallabgamc
|
||||
AUTOEXP, //Evlocallabgamex
|
||||
AUTOEXP | M_AUTOEXP, // EvLocenacie
|
||||
AUTOEXP, //Evlocallabreparcie
|
||||
HDR, //EvlocallabAutograycie
|
||||
HDR, //EvlocallabsourceGraycie
|
||||
HDR, //Evlocallabsourceabscie
|
||||
AUTOEXP, //Evlocallabsursourcie
|
||||
AUTOEXP, //Evlocallabsaturlcie
|
||||
AUTOEXP, //Evlocallabchromlcie
|
||||
AUTOEXP, //Evlocallablightlcie
|
||||
AUTOEXP, //Evlocallablightqcie
|
||||
AUTOEXP, //Evlocallabcontlcie
|
||||
AUTOEXP, //Evlocallabcontthrescie
|
||||
AUTOEXP, //Evlocallabcontqcie
|
||||
AUTOEXP, //Evlocallabcolorflcie
|
||||
AUTOEXP, //Evlocallabtargabscie
|
||||
AUTOEXP, //EvlocallabtargetGraycie
|
||||
AUTOEXP, //Evlocallabcatadcie
|
||||
AUTOEXP, //Evlocallabdetailcie
|
||||
AUTOEXP, //Evlocallabsurroundcie
|
||||
AUTOEXP, //Evlocallabsensicie
|
||||
AUTOEXP, //Evlocallabmodecie
|
||||
AUTOEXP, //Evlocallabrstprotectcie
|
||||
AUTOEXP, //Evlocallabsigmoidldacie
|
||||
AUTOEXP, //Evlocallabsigmoidthcie
|
||||
AUTOEXP, //Evlocallabsigmoidblcie
|
||||
AUTOEXP, //Evlocallabsigmoidqjcie
|
||||
AUTOEXP, //Evlocallabhuecie
|
||||
AUTOEXP, //Evlocallabjabcie
|
||||
AUTOEXP, //Evlocallablightjzcie
|
||||
AUTOEXP, //Evlocallabcontjzcie
|
||||
AUTOEXP, //Evlocallabchromjzcie
|
||||
AUTOEXP, //Evlocallabhuejzcie
|
||||
AUTOEXP, //Evlocallabsigmoidldajzcie
|
||||
AUTOEXP, //Evlocallabsigmoidthjzcie
|
||||
AUTOEXP, //Evlocallabsigmoidbljzcie
|
||||
AUTOEXP, //Evlocallabadapjzcie
|
||||
AUTOEXP, //Evlocallabmodecam
|
||||
AUTOEXP, //Evlocallabhljzcie
|
||||
AUTOEXP, //Evlocallabhlthjzcie
|
||||
AUTOEXP, //Evlocallabshjzcie
|
||||
AUTOEXP, //Evlocallabshthjzcie
|
||||
AUTOEXP, //Evlocallabradjzcie
|
||||
// AUTOEXP, //EvlocallabHHshapejz
|
||||
AUTOEXP, //EvlocallabCHshapejz
|
||||
AUTOEXP, //Evlocallabjz100
|
||||
AUTOEXP, //Evlocallabpqremap
|
||||
AUTOEXP, //EvlocallabLHshapejz
|
||||
AUTOEXP, //Evlocallabshargam
|
||||
AUTOEXP, //Evlocallabvibgam
|
||||
AUTOEXP, //EvLocallabtoneMethodcie
|
||||
AUTOEXP, //Evlocallabshapecie
|
||||
AUTOEXP, //EvLocallabtoneMethodcie2
|
||||
AUTOEXP, //Evlocallabshapecie2
|
||||
AUTOEXP, //Evlocallabshapejz
|
||||
AUTOEXP, //Evlocallabshapecz
|
||||
AUTOEXP, //Evlocallabshapeczjz
|
||||
AUTOEXP, //Evlocallabforcejz
|
||||
// AUTOEXP, //Evlocallablightlzcam
|
||||
// AUTOEXP, //Evlocallablightqzcam
|
||||
// AUTOEXP, //Evlocallabcontlzcam
|
||||
// AUTOEXP, //Evlocallabcontqzcam
|
||||
// AUTOEXP, //Evlocallabcontthreszcam
|
||||
// AUTOEXP, //Evlocallabcolorflzcam
|
||||
// AUTOEXP, //Evlocallabsaturzcam
|
||||
// AUTOEXP, //Evlocallabchromzcam
|
||||
AUTOEXP, //Evlocallabpqremapcam16
|
||||
AUTOEXP, //EvLocallabEnacieMask
|
||||
AUTOEXP, //EvlocallabCCmaskcieshape
|
||||
AUTOEXP, //EvlocallabLLmaskcieshape
|
||||
AUTOEXP, //EvlocallabHHmaskcieshape
|
||||
AUTOEXP, //Evlocallabblendmaskcie
|
||||
AUTOEXP, //Evlocallabradmaskcie
|
||||
AUTOEXP, //Evlocallabchromaskcie
|
||||
AUTOEXP, //EvlocallabLmaskcieshape
|
||||
AUTOEXP, //Evlocallabrecothrescie
|
||||
AUTOEXP, //Evlocallablowthrescie
|
||||
AUTOEXP, //Evlocallabhigthrescie
|
||||
AUTOEXP, //Evlocallabdecaycie
|
||||
AUTOEXP, //Evlocallablapmaskcie
|
||||
AUTOEXP, //Evlocallabgammaskcie
|
||||
AUTOEXP, //Evlocallabslomaskcie
|
||||
AUTOEXP, //Evlocallabqtoj
|
||||
AUTOEXP, //Evlocallabsaturjzcie
|
||||
AUTOEXP, //EvLocallabSpotdenoichmask
|
||||
AUTOEXP, //Evlocallabsigmalcjz
|
||||
AUTOEXP, //EvlocallabcsThresholdjz
|
||||
AUTOEXP, //EvlocallabwavCurvejz
|
||||
AUTOEXP, //Evlocallabclarilresjz
|
||||
AUTOEXP, //Evlocallabclaricresjz
|
||||
AUTOEXP, //Evlocallabclarisoftjz
|
||||
AUTOEXP, //EvlocallabHHshapejz
|
||||
AUTOEXP, //Evlocallabsoftjzcie
|
||||
AUTOEXP, //Evlocallabthrhjzcie
|
||||
AUTOEXP, //Evlocallabchjzcie
|
||||
AUTOEXP, //Evlocallabstrsoftjzcie
|
||||
AUTOEXP, //EvlocallabblackEvjz
|
||||
AUTOEXP, //EvlocallabwhiteEvjz
|
||||
AUTOEXP, //Evlocallablogjz
|
||||
AUTOEXP, //Evlocallabtargetjz
|
||||
AUTOEXP, //Evlocallabforcebw
|
||||
AUTOEXP, //Evlocallabsigjz
|
||||
AUTOEXP, //Evlocallabsigq
|
||||
AUTOEXP //Evlocallablogcie
|
||||
|
||||
};
|
||||
|
||||
|
@ -35,14 +35,24 @@
|
||||
|
||||
namespace {
|
||||
|
||||
template<typename T>
|
||||
T calcBlendFactor(T val, T threshold) {
|
||||
float calcBlendFactor(float val, float threshold) {
|
||||
// sigmoid function
|
||||
// result is in ]0;1] range
|
||||
// inflexion point is at (x, y) (threshold, 0.5)
|
||||
return 1.f / (1.f + xexpf(16.f - (16.f / threshold) * val));
|
||||
const float x = -16.f + (16.f / threshold) * val;
|
||||
return 0.5f * (1.f + x / std::sqrt(1.f + rtengine::SQR(x)));
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
vfloat calcBlendFactor(vfloat val, vfloat threshold) {
|
||||
// sigmoid function
|
||||
// result is in ]0;1] range
|
||||
// inflexion point is at (x, y) (threshold, 0.5)
|
||||
const vfloat x = -16.f + (16.f / threshold) * val;
|
||||
return 0.5f * (1.f + x * _mm_rsqrt_ps(1.f + rtengine::SQR(x)));
|
||||
}
|
||||
#endif
|
||||
|
||||
float tileAverage(const float * const *data, size_t tileY, size_t tileX, size_t tilesize) {
|
||||
|
||||
float avg = 0.f;
|
||||
|
@ -424,6 +424,7 @@ public:
|
||||
double huer;
|
||||
double lumar;
|
||||
double chromar;
|
||||
float fab;
|
||||
};
|
||||
|
||||
struct locallabRetiMinMax {
|
||||
@ -438,9 +439,10 @@ public:
|
||||
};
|
||||
|
||||
virtual ~LocallabListener() = default;
|
||||
virtual void refChanged(const std::vector<locallabRef> &ref, int selspot) = 0;
|
||||
// virtual void refChanged(const std::vector<locallabRef> &ref, int selspot) = 0;
|
||||
virtual void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) = 0;
|
||||
virtual void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg) = 0;
|
||||
virtual void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg, const bool autocomput, const bool autocie, const float jz1) = 0;
|
||||
virtual void refChanged2(float *huerefp, float *chromarefp, float *lumarefp, float *fabrefp, int selspot) = 0;
|
||||
};
|
||||
|
||||
class AutoColorTonListener
|
||||
@ -491,7 +493,7 @@ class ImageTypeListener
|
||||
{
|
||||
public:
|
||||
virtual ~ImageTypeListener() = default;
|
||||
virtual void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans, bool is_Mono = false) = 0;
|
||||
virtual void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans, bool is_Mono = false, bool isGainMapSupported = false) = 0;
|
||||
};
|
||||
|
||||
class AutoContrastListener
|
||||
@ -610,7 +612,7 @@ public:
|
||||
|
||||
virtual void updateUnLock() = 0;
|
||||
|
||||
virtual void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int localllogMask, int locall_Mask) = 0;
|
||||
virtual void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int localllogMask, int locall_Mask, int locallcieMask) = 0;
|
||||
|
||||
/** Creates and returns a Crop instance that acts as a window on the image
|
||||
* @param editDataProvider pointer to the EditDataProvider that communicates with the EditSubscriber
|
||||
|