clang -cc1 -cc1 -triple x86_64-pc-linux-gnu -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name filmfilter.cpp -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fdebug-compilation-dir=/home/gilles/devel/GIT/8.x/build.scan/core/libs/dimg -fcoverage-compilation-dir=/home/gilles/devel/GIT/8.x/build.scan/core/libs/dimg -resource-dir /usr/lib/llvm-18/lib/clang/18 -D BUILDING_XMPCOMPAREANDMERGE_AS_STATIC=1 -D BUILDING_XMPCOMPAREANDMERGE_LIB=1 -D BanAllEntityUsage=1 -D CMS_NO_REGISTER_KEYWORD=1 -D EnablePluginManager=0 -D HAVE_FFMPEG_VERSION5 -D LIBPGF_DISABLE_OPENMP -D LINKING_XMPCORE_LIB=1 -D MAGICKCORE_HDRI_ENABLE=0 -D MAGICKCORE_QUANTUM_DEPTH=16 -D QT_DEPRECATED_WARNINGS -D QT_DEPRECATED_WARNINGS_SINCE=0x060000 -D QT_DISABLE_DEPRECATED_BEFORE=0x050E00 -D QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_FROM_BYTEARRAY -D QT_NO_CAST_TO_ASCII -D QT_NO_KEYWORDS -D QT_NO_NARROWING_CONVERSIONS_IN_CONNECT -D QT_NO_URL_CAST_FROM_STRING -D QT_STRICT_ITERATORS -D QT_USE_QSTRINGBUILDER -D TRANSLATION_DOMAIN="digikam" -D UNIX_ENV=1 -D USE_JASPER -D USE_JPEG -D USE_JPEG8 -D XMP_COMPONENT_INT_NAMESPACE=AdobeXMPCompareAndMerge_Int -D XMP_StaticBuild=1 -D _GNU_SOURCE -D _LARGEFILE64_SOURCE -D digikamcore_EXPORTS -D qDNGDebug=0 -D qDNGLittleEndian=1 -D qDNGThreadSafe=1 -D qDNGUseLibJPEG=1 -D qDNGUseStdInt=1 -D qDNGUseXMP=1 -D qDNGValidateTarget=1 -D qDNGXMPDocOps=0 -D qDNGXMPFiles=0 -D qLinux=1 -D qMacOS=0 -D qWinOS=0 -I /home/gilles/devel/GIT/8.x/build.scan/core/libs/dimg -I /home/gilles/devel/GIT/8.x/core/libs/dimg -I /home/gilles/devel/GIT/8.x/build.scan/core/libs/dimg/core_dimg_obj_autogen/include -I /home/gilles/devel/GIT/8.x/core/libs/video/player/qtmm -I /home/gilles/devel/GIT/8.x/core/libs/album/engine -I /home/gilles/devel/GIT/8.x/core/libs/album/manager -I /home/gilles/devel/GIT/8.x/core/libs/album/treeview -I /home/gilles/devel/GIT/8.x/core/libs/album/widgets -I /home/gilles/devel/GIT/8.x/core/libs/database/collection -I /home/gilles/devel/GIT/8.x/core/libs/database/coredb -I /home/gilles/devel/GIT/8.x/core/libs/database/dbjobs -I /home/gilles/devel/GIT/8.x/core/libs/database/engine -I /home/gilles/devel/GIT/8.x/core/libs/database/haar -I /home/gilles/devel/GIT/8.x/core/libs/database/history -I /home/gilles/devel/GIT/8.x/core/libs/database/item/containers -I /home/gilles/devel/GIT/8.x/core/libs/database/item/lister -I /home/gilles/devel/GIT/8.x/core/libs/database/item/query -I /home/gilles/devel/GIT/8.x/core/libs/database/item/scanner -I /home/gilles/devel/GIT/8.x/core/libs/database/models -I /home/gilles/devel/GIT/8.x/core/libs/database/server -I /home/gilles/devel/GIT/8.x/core/libs/database/similaritydb -I /home/gilles/devel/GIT/8.x/core/libs/database/tags -I /home/gilles/devel/GIT/8.x/core/libs/database/thumbsdb -I /home/gilles/devel/GIT/8.x/core/libs/database/utils/ifaces -I /home/gilles/devel/GIT/8.x/core/libs/database/utils/scan -I /home/gilles/devel/GIT/8.x/core/libs/database/utils/widgets -I /home/gilles/devel/GIT/8.x/core/libs/dialogs -I /home/gilles/devel/GIT/8.x/core/libs/dimg/color -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/auto -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/bcg -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/bw -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/cb -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/curves -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/decorate -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/film -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/fx -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/greycstoration/cimg -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/greycstoration -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/hotpixels -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/hsl -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/icc -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/lc -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/lens -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/levels -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/nr -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/raw -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/redeye -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/sharp -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/transform -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/wb -I /home/gilles/devel/GIT/8.x/core/libs/dimg/history -I /home/gilles/devel/GIT/8.x/core/libs/dimg/loaders -I /home/gilles/devel/GIT/8.x/core/libs/dngwriter -I /home/gilles/devel/GIT/8.x/core/libs/dplugins/core -I /home/gilles/devel/GIT/8.x/core/libs/dplugins/iface -I /home/gilles/devel/GIT/8.x/core/libs/dplugins/setup -I /home/gilles/devel/GIT/8.x/core/libs/dplugins/webservices -I /home/gilles/devel/GIT/8.x/core/libs/dplugins/widgets -I /home/gilles/devel/GIT/8.x/core/libs/dragdrop -I /home/gilles/devel/GIT/8.x/core/libs/dtrash -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/common -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/detection -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/detection/opencv-dnn -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/facedb -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/preprocessing -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/preprocessing/recognition -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/preprocessing/shape-predictor -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/recognition -I /home/gilles/devel/GIT/8.x/core/libs/facesengine/recognition/opencv-dnn -I /home/gilles/devel/GIT/8.x/core/libs/fileactionmanager -I /home/gilles/devel/GIT/8.x/core/libs/filters -I /home/gilles/devel/GIT/8.x/core/libs/imgqsort/detectors -I /home/gilles/devel/GIT/8.x/core/libs/imgqsort -I /home/gilles/devel/GIT/8.x/core/libs/iojobs -I /home/gilles/devel/GIT/8.x/core/libs/jpegutils -I /home/gilles/devel/GIT/8.x/core/libs/metadataengine/containers -I /home/gilles/devel/GIT/8.x/core/libs/metadataengine/dmetadata -I /home/gilles/devel/GIT/8.x/core/libs/metadataengine/engine -I /home/gilles/devel/GIT/8.x/core/libs/metadataengine/exiftool -I /home/gilles/devel/GIT/8.x/core/libs/metadataengine/focuspoint -I /home/gilles/devel/GIT/8.x/core/libs/models -I /home/gilles/devel/GIT/8.x/core/libs/networkmanager -I /home/gilles/devel/GIT/8.x/core/libs/notificationmanager -I /home/gilles/devel/GIT/8.x/core/libs/onlineversion -I /home/gilles/devel/GIT/8.x/core/libs/pgfutils -I /home/gilles/devel/GIT/8.x/core/libs/progressmanager -I /home/gilles/devel/GIT/8.x/core/libs/properties/captions -I /home/gilles/devel/GIT/8.x/core/libs/properties/geolocation -I /home/gilles/devel/GIT/8.x/core/libs/properties/history -I /home/gilles/devel/GIT/8.x/core/libs/properties/import -I /home/gilles/devel/GIT/8.x/core/libs/properties -I /home/gilles/devel/GIT/8.x/core/libs/rawengine -I /home/gilles/devel/GIT/8.x/core/libs/settings -I /home/gilles/devel/GIT/8.x/core/libs/tags/autoassignment -I /home/gilles/devel/GIT/8.x/core/libs/tags/autoassignment/model -I /home/gilles/devel/GIT/8.x/core/libs/tags/engine -I /home/gilles/devel/GIT/8.x/core/libs/tags/manager/models -I /home/gilles/devel/GIT/8.x/core/libs/tags/manager -I /home/gilles/devel/GIT/8.x/core/libs/tags/widgets -I /home/gilles/devel/GIT/8.x/core/libs/template -I /home/gilles/devel/GIT/8.x/core/libs/threadimageio/engine -I /home/gilles/devel/GIT/8.x/core/libs/threadimageio/fileio -I /home/gilles/devel/GIT/8.x/core/libs/threadimageio/preview -I /home/gilles/devel/GIT/8.x/core/libs/threadimageio/thumb -I /home/gilles/devel/GIT/8.x/core/libs/threadimageio/video -I /home/gilles/devel/GIT/8.x/core/libs/threads -I /home/gilles/devel/GIT/8.x/core/libs/timeadjust -I /home/gilles/devel/GIT/8.x/core/libs/transitionmngr -I /home/gilles/devel/GIT/8.x/core/libs/versionmanager -I /home/gilles/devel/GIT/8.x/core/libs/video -I /home/gilles/devel/GIT/8.x/core/libs/video/manager -I /home/gilles/devel/GIT/8.x/core/libs/video/osd -I /home/gilles/devel/GIT/8.x/core/libs/video/player -I /home/gilles/devel/GIT/8.x/core/libs/widgets/colors -I /home/gilles/devel/GIT/8.x/core/libs/widgets/combo -I /home/gilles/devel/GIT/8.x/core/libs/widgets/files -I /home/gilles/devel/GIT/8.x/core/libs/widgets/fonts -I /home/gilles/devel/GIT/8.x/core/libs/widgets/graphicsview -I /home/gilles/devel/GIT/8.x/core/libs/widgets/history -I /home/gilles/devel/GIT/8.x/core/libs/widgets/iccprofiles -I /home/gilles/devel/GIT/8.x/core/libs/widgets/itemview -I /home/gilles/devel/GIT/8.x/core/libs/widgets/layout -I /home/gilles/devel/GIT/8.x/core/libs/widgets/mainview -I /home/gilles/devel/GIT/8.x/core/libs/widgets/metadata/config -I /home/gilles/devel/GIT/8.x/core/libs/widgets/metadata/exiftool -I /home/gilles/devel/GIT/8.x/core/libs/widgets/metadata/exiv2 -I /home/gilles/devel/GIT/8.x/core/libs/widgets/metadata/labels -I /home/gilles/devel/GIT/8.x/core/libs/widgets/metadata/utils -I /home/gilles/devel/GIT/8.x/core/libs/widgets/range -I /home/gilles/devel/GIT/8.x/core/libs/widgets/text -I /home/gilles/devel/GIT/8.x/core/libs/jpegutils/libjpeg/84 -I /home/gilles/devel/GIT/8.x/core/app/utils -I /home/gilles/devel/GIT/8.x/build.scan/core/app/utils -I /home/gilles/devel/GIT/8.x/core/utilities/advancedrename -I /home/gilles/devel/GIT/8.x/core/utilities/advancedrename/common -I /home/gilles/devel/GIT/8.x/core/utilities/advancedrename/parser -I /home/gilles/devel/GIT/8.x/core/utilities/advancedrename/parser/modifiers -I /home/gilles/devel/GIT/8.x/core/utilities/advancedrename/parser/options -I /home/gilles/devel/GIT/8.x/core/utilities/advancedrename/parser/options/database -I /home/gilles/devel/GIT/8.x/core/utilities/advancedrename/parser/options/database/keys -I /home/gilles/devel/GIT/8.x/core/utilities/extrasupport/addressbook -I /home/gilles/devel/GIT/8.x/core/utilities/extrasupport/filesindexer -I /home/gilles/devel/GIT/8.x/core/utilities/facemanagement/bench -I /home/gilles/devel/GIT/8.x/core/utilities/facemanagement/database -I /home/gilles/devel/GIT/8.x/core/utilities/facemanagement/items -I /home/gilles/devel/GIT/8.x/core/utilities/facemanagement/threads -I /home/gilles/devel/GIT/8.x/core/utilities/facemanagement/widgets -I /home/gilles/devel/GIT/8.x/core/utilities/facemanagement/workers -I /home/gilles/devel/GIT/8.x/core/utilities/firstrun -I /home/gilles/devel/GIT/8.x/core/utilities/focuspointmanagement -I /home/gilles/devel/GIT/8.x/core/utilities/fuzzysearch -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/backends -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/bookmark -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/core -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/correlator -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/dragdrop -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/items -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/lookup -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/reversegeocoding -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/tiles -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/tracks -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geoiface/widgets -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/geomapwrapper -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/mapsearches -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/astro -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/blendings -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/core -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/data -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/graphicsitem -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/handlers/dgml -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/handlers/kml -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/parser -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/scene -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/writer -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/writers/dgml -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/geodata/writers/kml -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/graphicsview -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/layers -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/models -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/osm -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/atmosphere -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/compass -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/crosshairs -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/graticule -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/mapscale -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/measure -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/navigation -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/overviewmap -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/render/progress -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/cache -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/gpsbabel -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/gpx -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/gpx/handlers -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/json -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/kml -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/nominatim-reversegeocoding -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/osm -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/osm/o5mreader -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/osm/translators -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/osm/writers -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/pn2 -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/plugins/runner/pnt -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/projections -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/runners -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/settings -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/storage -I /home/gilles/devel/GIT/8.x/core/utilities/geolocation/marble/tile -I /home/gilles/devel/GIT/8.x/core/utilities/imageeditor/core -I /home/gilles/devel/GIT/8.x/core/utilities/imageeditor/dialogs -I /home/gilles/devel/GIT/8.x/core/utilities/imageeditor/editor -I /home/gilles/devel/GIT/8.x/core/utilities/imageeditor/main -I /home/gilles/devel/GIT/8.x/core/utilities/imageeditor/widgets -I /home/gilles/devel/GIT/8.x/core/utilities/import/backend -I /home/gilles/devel/GIT/8.x/core/utilities/import/dialogs -I /home/gilles/devel/GIT/8.x/core/utilities/import/items -I /home/gilles/devel/GIT/8.x/core/utilities/import/main -I /home/gilles/devel/GIT/8.x/core/utilities/import/models -I /home/gilles/devel/GIT/8.x/core/utilities/import/views -I /home/gilles/devel/GIT/8.x/core/utilities/import/widgets -I /home/gilles/devel/GIT/8.x/core/utilities/lighttable -I /home/gilles/devel/GIT/8.x/core/utilities/maintenance -I /home/gilles/devel/GIT/8.x/core/utilities/queuemanager/dplugins -I /home/gilles/devel/GIT/8.x/core/utilities/queuemanager/main -I /home/gilles/devel/GIT/8.x/core/utilities/queuemanager/manager -I /home/gilles/devel/GIT/8.x/core/utilities/queuemanager/views -I /home/gilles/devel/GIT/8.x/core/utilities/searchwindow -I /home/gilles/devel/GIT/8.x/core/utilities/setup/album -I /home/gilles/devel/GIT/8.x/core/utilities/setup/camera -I /home/gilles/devel/GIT/8.x/core/utilities/setup/collections -I /home/gilles/devel/GIT/8.x/core/utilities/setup/downloader -I /home/gilles/devel/GIT/8.x/core/utilities/setup/editor -I /home/gilles/devel/GIT/8.x/core/utilities/setup/metadata -I /home/gilles/devel/GIT/8.x/core/utilities/setup/misc -I /home/gilles/devel/GIT/8.x/core/utilities/setup -I /home/gilles/devel/GIT/8.x/core/app/main -I /home/gilles/devel/GIT/8.x/core/app/date -I /home/gilles/devel/GIT/8.x/core/app/dragdrop -I /home/gilles/devel/GIT/8.x/core/app/views/stack -I /home/gilles/devel/GIT/8.x/core/app/views/utils -I /home/gilles/devel/GIT/8.x/core/app/items/utils -I /home/gilles/devel/GIT/8.x/core/app/items/delegate -I /home/gilles/devel/GIT/8.x/core/app/views/sidebar -I /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/transform/lqr -I /usr/include/opencv4 -I /usr/include/ImageMagick-6 -I /usr/include/x86_64-linux-gnu/ImageMagick-6 -I /opt/qt6/include/QtMultimedia -I /opt/qt6/include -I /opt/qt6/include/QtCore -I /opt/qt6/mkspecs/linux-g++ -I /opt/qt6/include/QtGui -I /opt/qt6/include/QtNetwork -I /opt/qt6/include/QtMultimediaWidgets -I /opt/qt6/include/QtWidgets -I /usr/include/glib-2.0 -I /usr/lib/x86_64-linux-gnu/glib-2.0/include -I /usr/include/lensfun -I /usr/include/eigen3 -I /opt/qt6/include/QtConcurrent -I /opt/qt6/include/QtXml -I /opt/qt6/include/KF6/KCoreAddons -I /opt/qt6/include/KF6/KConfig -I /opt/qt6/include/KF6/KConfigCore -I /opt/qt6/include/KF6/KI18n -I /opt/qt6/include/KF6/KWidgetsAddons -I /opt/qt6/include/QtGui/6.7.0 -I /opt/qt6/include/QtGui/6.7.0/QtGui -I /opt/qt6/include/QtCore/6.7.0 -I /opt/qt6/include/QtCore/6.7.0/QtCore -I /opt/qt6/include/QtDBus/6.7.0 -I /opt/qt6/include/QtDBus/6.7.0/QtDBus -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/x86_64-linux-gnu/c++/13 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/backward -internal-isystem /usr/lib/llvm-18/lib/clang/18/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/13/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wno-long-long -Wno-deprecated-copy -std=c++20 -fdeprecated-macro -ferror-limit 19 -fvisibility=hidden -fvisibility-inlines-hidden -fno-operator-names -fopenmp -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -analyzer-output=html -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /mnt/data2/devel/GIT/8.x/project/reports/report.scan/2024-05-02-171729-435512-1 -x c++ /home/gilles/devel/GIT/8.x/core/libs/dimg/filters/film/filmfilter.cpp
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | #include "filmfilter_p.h" |
16 | |
17 | |
18 | |
19 | #include <cmath> |
20 | |
21 | |
22 | |
23 | #include <QListWidget> |
24 | |
25 | |
26 | |
27 | #include "invertfilter.h" |
28 | #include "digikam_globals_p.h" // For KF6::Ki18n deprecated |
29 | |
30 | namespace Digikam |
31 | { |
32 | |
33 | FilmContainer::FilmContainer() |
34 | : d(QSharedPointer<Private>(new Private)) |
35 | { |
36 | } |
37 | |
38 | FilmContainer::FilmContainer(CNFilmProfile profile, double gamma, bool sixteenBit) |
39 | : d(QSharedPointer<Private>(new Private)) |
40 | { |
41 | d->gamma = gamma; |
42 | d->sixteenBit = sixteenBit; |
43 | d->whitePoint = DColor(QColor("white"), sixteenBit); |
44 | setCNType(profile); |
45 | } |
46 | |
47 | void FilmContainer::setWhitePoint(const DColor& wp) |
48 | { |
49 | d->whitePoint = wp; |
50 | } |
51 | |
52 | DColor FilmContainer::whitePoint() const |
53 | { |
54 | return d->whitePoint; |
55 | } |
56 | |
57 | void FilmContainer::setExposure(double strength) |
58 | { |
59 | d->exposure = strength; |
60 | } |
61 | |
62 | double FilmContainer::exposure() const |
63 | { |
64 | return d->exposure; |
65 | } |
66 | |
67 | void FilmContainer::setSixteenBit(bool val) |
68 | { |
69 | d->sixteenBit = val; |
70 | } |
71 | |
72 | void FilmContainer::setGamma(double val) |
73 | { |
74 | d->gamma = val; |
75 | } |
76 | double FilmContainer::gamma() const |
77 | { |
78 | return d->gamma; |
79 | } |
80 | |
81 | void FilmContainer::setCNType(CNFilmProfile profile) |
82 | { |
83 | d->cnType = profile; |
84 | |
85 | switch (profile) |
86 | { |
87 | default: |
88 | { |
89 | d->profile = FilmProfile(1.0, 1.0, 1.0); |
90 | d->cnType = CNNeutral; |
91 | break; |
92 | } |
93 | |
94 | case CNKodakGold100: |
95 | { |
96 | d->profile = FilmProfile(1.53, 2.00, 2.40); |
97 | break; |
98 | } |
99 | |
100 | case CNKodakGold200: |
101 | { |
102 | d->profile = FilmProfile(1.53, 2.00, 2.40); |
103 | break; |
104 | } |
105 | |
106 | case CNKodakEktar100: |
107 | { |
108 | d->profile = FilmProfile(1.40, 1.85, 2.34); |
109 | break; |
110 | } |
111 | |
112 | case CNKodakProfessionalPortra160NC: |
113 | { |
114 | d->profile = FilmProfile(1.49, 1.96, 2.46); |
115 | break; |
116 | } |
117 | |
118 | case CNKodakProfessionalPortra160VC: |
119 | { |
120 | d->profile = FilmProfile(1.56, 2.03, 2.55); |
121 | break; |
122 | } |
123 | |
124 | case CNKodakProfessionalPortra400NC: |
125 | { |
126 | d->profile = FilmProfile(1.69, 2.15, 2.69); |
127 | break; |
128 | } |
129 | |
130 | case CNKodakProfessionalPortra400VC: |
131 | { |
132 | d->profile = FilmProfile(1.78, 2.21, 2.77); |
133 | break; |
134 | } |
135 | |
136 | case CNKodakProfessionalPortra800Box: |
137 | { |
138 | d->profile = FilmProfile(1.89, 2.29, 2.89); |
139 | break; |
140 | } |
141 | |
142 | case CNKodakProfessionalPortra800P1: |
143 | { |
144 | d->profile = FilmProfile(1.53, 2.01, 2.46); |
145 | break; |
146 | } |
147 | |
148 | case CNKodakProfessionalPortra800P2: |
149 | { |
150 | d->profile = FilmProfile(1.74, 2.22, 2.64); |
151 | break; |
152 | } |
153 | |
154 | case CNKodakProfessionalNewPortra160: |
155 | { |
156 | d->profile = FilmProfile(1.41, 1.88, 2.32); |
157 | break; |
158 | } |
159 | |
160 | case CNKodakProfessionalNewPortra400: |
161 | { |
162 | d->profile = FilmProfile(1.69, 2.15, 2.68); |
163 | break; |
164 | } |
165 | |
166 | case CNKodakFarbwelt100: |
167 | { |
168 | d->profile = FilmProfile(1.86, 2.33, 2.77); |
169 | break; |
170 | } |
171 | |
172 | case CNKodakFarbwelt200: |
173 | { |
174 | d->profile = FilmProfile(1.55, 2.03, 2.42); |
175 | break; |
176 | } |
177 | |
178 | case CNKodakFarbwelt400: |
179 | { |
180 | d->profile = FilmProfile(1.93, 2.43, 2.95); |
181 | break; |
182 | } |
183 | |
184 | case CNKodakRoyalGold400: |
185 | { |
186 | d->profile = FilmProfile(2.24, 2.76, 3.27); |
187 | break; |
188 | } |
189 | |
190 | case CNAgfaphotoVistaPlus200: |
191 | { |
192 | d->profile = FilmProfile(1.70, 2.13, 2.50); |
193 | break; |
194 | } |
195 | |
196 | case CNAgfaphotoVistaPlus400: |
197 | { |
198 | d->profile = FilmProfile(1.86, 2.35, 2.67); |
199 | break; |
200 | } |
201 | |
202 | case CNFujicolorPro160S: |
203 | { |
204 | d->profile = FilmProfile(1.73, 2.27, 2.53); |
205 | break; |
206 | } |
207 | |
208 | case CNFujicolorPro160C: |
209 | { |
210 | d->profile = FilmProfile(1.96, 2.46, 2.69); |
211 | break; |
212 | } |
213 | |
214 | case CNFujicolorNPL160: |
215 | { |
216 | d->profile = FilmProfile(2.13, 2.36, 2.92); |
217 | break; |
218 | } |
219 | |
220 | case CNFujicolorPro400H: |
221 | { |
222 | d->profile = FilmProfile(1.95, 2.37, 2.62); |
223 | break; |
224 | } |
225 | |
226 | case CNFujicolorPro800Z: |
227 | { |
228 | d->profile = FilmProfile(2.12, 2.37, 2.56); |
229 | break; |
230 | } |
231 | |
232 | case CNFujicolorSuperiaReala: |
233 | { |
234 | d->profile = FilmProfile(1.79, 2.14, 2.49); |
235 | break; |
236 | } |
237 | |
238 | case CNFujicolorSuperia100: |
239 | { |
240 | d->profile = FilmProfile(2.02, 2.46, 2.81); |
241 | break; |
242 | } |
243 | |
244 | case CNFujicolorSuperia200: |
245 | { |
246 | d->profile = FilmProfile(2.11, 2.50, 2.79); |
247 | break; |
248 | } |
249 | |
250 | case CNFujicolorSuperiaXtra400: |
251 | { |
252 | d->profile = FilmProfile(2.11, 2.58, 2.96); |
253 | break; |
254 | } |
255 | |
256 | case CNFujicolorSuperiaXtra800: |
257 | { |
258 | d->profile = FilmProfile(2.44, 2.83, 3.18); |
259 | break; |
260 | } |
261 | |
262 | case CNFujicolorTrueDefinition400: |
263 | { |
264 | d->profile = FilmProfile(1.93, 2.21, 2.39); |
265 | break; |
266 | } |
267 | |
268 | case CNFujicolorSuperia1600: |
269 | { |
270 | d->profile = FilmProfile(2.35, 2.68, 2.96); |
271 | break; |
272 | } |
273 | } |
274 | } |
275 | |
276 | FilmContainer::CNFilmProfile FilmContainer::cnType() const |
277 | { |
278 | return d->cnType; |
279 | } |
280 | |
281 | void FilmContainer::setApplyBalance(bool val) |
282 | { |
283 | d->applyBalance = val; |
284 | } |
285 | |
286 | bool FilmContainer::applyBalance() const |
287 | { |
288 | return d->applyBalance; |
289 | } |
290 | |
291 | int FilmContainer::whitePointForChannel(int ch) const |
292 | { |
293 | int max = d->sixteenBit ? 65535 : 255; |
294 | |
295 | switch (ch) |
296 | { |
297 | case RedChannel: |
298 | { |
299 | return d->whitePoint.red(); |
300 | } |
301 | |
302 | case GreenChannel: |
303 | { |
304 | return d->whitePoint.green(); |
305 | } |
306 | |
307 | case BlueChannel: |
308 | { |
309 | return d->whitePoint.blue(); |
310 | } |
311 | |
312 | default: |
313 | { |
314 | return max; |
315 | } |
316 | } |
317 | |
318 | |
319 | |
320 | return max; |
321 | } |
322 | |
323 | double FilmContainer::blackPointForChannel(int ch) const |
324 | { |
325 | if ((ch == LuminosityChannel) || (ch == AlphaChannel)) |
326 | { |
327 | return 0.0; |
328 | } |
329 | |
330 | return pow(10, -d->profile.dmax(ch)); |
331 | } |
332 | |
333 | double FilmContainer::gammaForChannel(int ch) const |
334 | { |
335 | int max = d->sixteenBit ? 65535 : 255; |
336 | |
337 | if ((ch == GreenChannel) || (ch == BlueChannel)) |
338 | { |
339 | double bpc = blackPointForChannel(ch)*d->exposure; |
340 | double wpc = (double)whitePointForChannel(ch)/(double)max; |
341 | double bpr = blackPointForChannel(RedChannel)*d->exposure; |
342 | double wpr = (double)whitePointForChannel(RedChannel)/(double)max; |
343 | |
344 | return (log10(bpc / wpc) / log10(bpr / wpr)); |
345 | } |
346 | |
347 | return 1.0; |
348 | } |
349 | |
350 | LevelsContainer FilmContainer::toLevels() const |
351 | { |
352 | LevelsContainer l; |
353 | int max = d->sixteenBit ? 65535 : 255; |
354 | |
355 | for (int i = LuminosityChannel ; i <= AlphaChannel ; ++i) |
356 | { |
357 | l.lInput[i] = blackPointForChannel(i) * max * d->exposure; |
358 | l.hInput[i] = whitePointForChannel(i) * d->profile.wp(i); |
359 | l.lOutput[i] = 0; |
360 | l.hOutput[i] = max; |
361 | |
362 | if (d->applyBalance) |
363 | { |
364 | l.gamma[i] = gammaForChannel(i); |
365 | } |
366 | else |
367 | { |
368 | l.gamma[i] = 1.0; |
369 | } |
370 | } |
371 | |
372 | return l; |
373 | } |
374 | |
375 | CBContainer FilmContainer::toCB() const |
376 | { |
377 | CBContainer cb; |
378 | |
379 | cb.red = d->profile.balance(RedChannel); |
380 | cb.green = d->profile.balance(GreenChannel); |
381 | cb.blue = d->profile.balance(BlueChannel); |
382 | cb.gamma = 1.0; |
383 | |
384 | return cb; |
385 | } |
386 | |
387 | QList<FilmContainer::ListItem*> FilmContainer::profileItemList(QListWidget* view) |
388 | { |
389 | QList<FilmContainer::ListItem*> itemList; |
390 | QMap<int, QString>::ConstIterator it; |
391 | |
392 | for (it = profileMap.constBegin() ; it != profileMap.constEnd() ; ++it) |
393 | { |
394 | itemList << new ListItem(it.value(), view, (CNFilmProfile)it.key()); |
395 | } |
396 | |
397 | return itemList; |
398 | } |
399 | |
400 | QMap<int, QString> FilmContainer::profileMapInitializer() |
401 | { |
402 | QMap<int, QString> profileMap; |
403 | |
404 | profileMap[CNNeutral] = QLatin1String("Neutral"); |
405 | profileMap[CNKodakGold100] = QLatin1String("Kodak Gold 100"); |
406 | profileMap[CNKodakGold200] = QLatin1String("Kodak Gold 200"); |
407 | profileMap[CNKodakProfessionalNewPortra160] = QLatin1String("Kodak Professional New Portra 160"); |
408 | profileMap[CNKodakProfessionalNewPortra400] = QLatin1String("Kodak Professional New Portra 400"); |
409 | profileMap[CNKodakEktar100] = QLatin1String("Kodak Ektar 100"); |
410 | profileMap[CNKodakFarbwelt100] = QLatin1String("Kodak Farbwelt 100"); |
411 | profileMap[CNKodakFarbwelt200] = QLatin1String("Kodak Farbwelt 200"); |
412 | profileMap[CNKodakFarbwelt400] = QLatin1String("Kodak Farbwelt 400"); |
413 | profileMap[CNKodakProfessionalPortra160NC] = QLatin1String("Kodak Professional Portra 160NC"); |
414 | profileMap[CNKodakProfessionalPortra160VC] = QLatin1String("Kodak Professional Portra 160VC"); |
415 | profileMap[CNKodakProfessionalPortra400NC] = QLatin1String("Kodak Professional Portra 400NC"); |
416 | profileMap[CNKodakProfessionalPortra400VC] = QLatin1String("Kodak Professional Portra 400VC"); |
417 | profileMap[CNKodakProfessionalPortra800Box] = QLatin1String("Kodak Professional Portra 800 (Box Speed"); |
418 | profileMap[CNKodakProfessionalPortra800P1] = QLatin1String("Kodak Professional Portra 800 (Push 1 stop"); |
419 | profileMap[CNKodakProfessionalPortra800P2] = QLatin1String("Kodak Professional Portra 800 (Push 2 stop"); |
420 | profileMap[CNKodakRoyalGold400] = QLatin1String("Kodak Royal Gold 400"); |
421 | profileMap[CNAgfaphotoVistaPlus200] = QLatin1String("Agfaphoto Vista Plus 200"); |
422 | profileMap[CNAgfaphotoVistaPlus400] = QLatin1String("Agfaphoto Vista Plus 400"); |
423 | profileMap[CNFujicolorPro160S] = QLatin1String("Fujicolor Pro 160S"); |
424 | profileMap[CNFujicolorPro160C] = QLatin1String("Fujicolor Pro 160C"); |
425 | profileMap[CNFujicolorNPL160] = QLatin1String("Fujicolor NPL 160"); |
426 | profileMap[CNFujicolorPro400H] = QLatin1String("Fujicolor Pro 400H"); |
427 | profileMap[CNFujicolorPro800Z] = QLatin1String("Fujicolor Pro 800Z"); |
428 | profileMap[CNFujicolorSuperiaReala] = QLatin1String("Fujicolor Superia Reala"); |
429 | profileMap[CNFujicolorSuperia100] = QLatin1String("Fujicolor Superia 100"); |
430 | profileMap[CNFujicolorSuperia200] = QLatin1String("Fujicolor Superia 200"); |
431 | profileMap[CNFujicolorSuperiaXtra400] = QLatin1String("Fujicolor Superia X-Tra 400"); |
432 | profileMap[CNFujicolorSuperiaXtra800] = QLatin1String("Fujicolor Superia X-Tra 800"); |
433 | profileMap[CNFujicolorTrueDefinition400] = QLatin1String("Fujicolor Superia True Definition 400"); |
434 | profileMap[CNFujicolorSuperia1600] = QLatin1String("Fujicolor Superia 1600"); |
435 | |
436 | return profileMap; |
437 | } |
438 | |
439 | const QMap<int, QString> FilmContainer::profileMap = FilmContainer::profileMapInitializer(); |
440 | |
441 | |
442 | |
443 | FilmFilter::FilmFilter(QObject* const parent) |
444 | : DImgThreadedFilter(parent, QLatin1String("FilmFilter")), |
445 | d (new Private) |
446 | { |
447 | d->film = FilmContainer(); |
448 | initFilter(); |
449 | } |
450 | |
451 | FilmFilter::FilmFilter(DImg* const orgImage, QObject* const parent, const FilmContainer& settings) |
452 | : DImgThreadedFilter(orgImage, parent, QLatin1String("FilmFilter")), |
453 | d (new Private) |
454 | { |
455 | d->film = settings; |
456 | initFilter(); |
457 | } |
458 | |
459 | FilmFilter::~FilmFilter() |
460 | { |
461 | cancelFilter(); |
462 | delete d; |
463 | } |
464 | |
465 | QString FilmFilter::DisplayableName() |
466 | { |
467 | return QString::fromUtf8(I18N_NOOP("Color Negative Inverter")); |
468 | } |
469 | |
470 | void FilmFilter::filterImage() |
471 | { |
472 | DImg tmpLevel; |
473 | DImg tmpGamma; |
474 | DImg tmpInv; |
475 | |
476 | LevelsContainer l = d->film.toLevels(); |
477 | CBContainer cb = d->film.toCB(); |
| Value stored to 'cb' during its initialization is never read |
478 | CBContainer gamma; |
479 | |
480 | |
481 | |
482 | |
483 | |
484 | LevelsFilter(l, this, m_orgImage, tmpLevel, 0, 40); |
485 | |
486 | |
487 | |
488 | |
489 | |
490 | |
491 | gamma.gamma = d->film.gamma(); |
492 | |
493 | |
494 | CBFilter(gamma, this, tmpLevel, tmpGamma, 40, 80); |
495 | |
496 | |
497 | |
498 | |
499 | InvertFilter(this, tmpGamma, tmpInv, 80, 100); |
500 | |
501 | m_destImage = tmpInv; |
502 | postProgress(100); |
503 | } |
504 | |
505 | FilterAction FilmFilter::filterAction() |
506 | { |
507 | FilterAction action(FilterIdentifier(), CurrentVersion()); |
508 | action.setDisplayableName(DisplayableName()); |
509 | |
510 | action.addParameter(QLatin1String("CNType"), d->film.cnType()); |
511 | action.addParameter(QLatin1String("ProfileName"), FilmContainer::profileMap[d->film.cnType()]); |
512 | action.addParameter(QLatin1String("Exposure"), d->film.exposure()); |
513 | action.addParameter(QLatin1String("Gamma"), d->film.gamma()); |
514 | action.addParameter(QLatin1String("ApplyColorBalance"), d->film.applyBalance()); |
515 | action.addParameter(QLatin1String("WhitePointRed"), d->film.whitePoint().red()); |
516 | action.addParameter(QLatin1String("WhitePointGreen"), d->film.whitePoint().green()); |
517 | action.addParameter(QLatin1String("WhitePointBlue"), d->film.whitePoint().blue()); |
518 | action.addParameter(QLatin1String("WhitePointAlpha"), d->film.whitePoint().alpha()); |
519 | action.addParameter(QLatin1String("WhitePointSixteenBit"), d->film.whitePoint().sixteenBit()); |
520 | |
521 | return action; |
522 | } |
523 | |
524 | void FilmFilter::readParameters(const FilterAction& action) |
525 | { |
526 | double red = action.parameter(QLatin1String("WhitePointRed")).toDouble(); |
527 | double green = action.parameter(QLatin1String("WhitePointGreen")).toDouble(); |
528 | double blue = action.parameter(QLatin1String("WhitePointBlue")).toDouble(); |
529 | double alpha = action.parameter(QLatin1String("WhitePointAlpha")).toDouble(); |
530 | bool sb = action.parameter(QLatin1String("WhitePointSixteenBit")).toBool(); |
531 | bool balance = action.parameter(QLatin1String("ApplyColorBalance")).toBool(); |
532 | |
533 | d->film.setWhitePoint(DColor(red, green, blue, alpha, sb)); |
534 | d->film.setExposure(action.parameter(QLatin1String("Exposure")).toDouble()); |
535 | d->film.setGamma(action.parameter(QLatin1String("Gamma")).toDouble()); |
536 | d->film.setCNType((FilmContainer::CNFilmProfile)(action.parameter(QLatin1String("CNType")).toInt())); |
537 | d->film.setApplyBalance(balance); |
538 | } |
539 | |
540 | } |
541 | |
542 | #include "moc_filmfilter.cpp" |