[Digikam-devel] [Bug 305382] editing RAW gives artefacts with Bilinear quality

Gilles Caulier caulier.gilles at gmail.com
Sat Oct 27 13:28:15 BST 2012


https://bugs.kde.org/show_bug.cgi?id=305382

--- Comment #14 from Gilles Caulier <caulier.gilles at gmail.com> ---
Marcel,

I tried another way : compile libraw source code directly with all sample
files, instead to use a STATIC or a SHARED libraw :

# -- Compile LibRaw library
--------------------------------------------------------------------------------

# Flag to include demosaic pack GPL2
ADD_DEFINITIONS(-DLIBRAW_DEMOSAIC_PACK_GPL2)

# Flag to include demosaic pack GPL3
ADD_DEFINITIONS(-DLIBRAW_DEMOSAIC_PACK_GPL3)

# Flag to debug LibRaw
ADD_DEFINITIONS(-DDCRAW_VERBOSE)

# Flag used by default into LibRaw to not use dedicated external thread
ADD_DEFINITIONS(-DLIBRAW_NOTHREADS)

# Flag to export library symbols
ADD_DEFINITIONS(-DLIBRAW_BUILDLIB)


INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/
                    ${CMAKE_CURRENT_SOURCE_DIR}/demosaic-pack-GPL2
                    ${CMAKE_CURRENT_SOURCE_DIR}/demosaic-pack-GPL3
                   )

# Do not compile LibRaw with KDE FINAL mode.
KDE4_NO_ENABLE_FINAL(raw)

SET(raw_LIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/internal/dcraw_common.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/internal/dcraw_fileio.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/internal/demosaic_packs.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/src/libraw_cxx.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/src/libraw_c_api.cpp
                 ${CMAKE_CURRENT_SOURCE_DIR}/src/libraw_datastream.cpp
   )

# Disable compilation warnings from LibRaw. Just to be clear on the console.
# Adjust flag for static lib and 64 bits computers using -fPIC for GCC compiler
(B.K.O: #269903)
FOREACH(_curentfile ${raw_LIB_SRCS})
    SET_SOURCE_FILES_PROPERTIES(${_curentfile} PROPERTIES COMPILE_FLAGS "-w")
ENDFOREACH(_curentfile ${raw_LIB_SRCS})

# -- Compile LibRaw Samples
--------------------------------------------------------------------------------

# add a small macro so that this is a bit cleaner
MACRO(LIBRAW_BUILD_SAMPLES)

    SET(_filename ${ARGV0})
    STRING(REPLACE "." ";" _temp ${_filename})
    LIST(GET _temp 0 _target)

    SET(${_target}_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/samples/${_filename})

    SET_SOURCE_FILES_PROPERTIES(${${_target}_SRCS} PROPERTIES COMPILE_FLAGS -w)

    ADD_EXECUTABLE(${_target} ${raw_LIB_SRCS} ${${_target}_SRCS})

    TARGET_LINK_LIBRARIES(${_target} ${OPENMP_LDFLAGS} ${MATH_LIBRARY}
${LCMS2_LIBRARIES})

    IF(RAWSPEED_SUPPORT_CAN_BE_COMPILED)
        TARGET_LINK_LIBRARIES(${_target} librawspeed)
    ENDIF()

    IF(JPEG_FOUND)
        TARGET_LINK_LIBRARIES(${_target} ${JPEG_LIBRARY})
    ENDIF()

    IF(JASPER_FOUND)
        TARGET_LINK_LIBRARIES(${_target} ${JASPER_LIBRARIES})
    ENDIF()

    IF(WIN32)
        TARGET_LINK_LIBRARIES(${_target} ws2_32)
    ENDIF(WIN32)

ENDMACRO(LIBRAW_BUILD_SAMPLES)

LIBRAW_BUILD_SAMPLES(simple_dcraw.cpp)
LIBRAW_BUILD_SAMPLES(mem_image.cpp)
LIBRAW_BUILD_SAMPLES(dcraw_emu.cpp)
LIBRAW_BUILD_SAMPLES(4channels.cpp)
LIBRAW_BUILD_SAMPLES(unprocessed_raw.cpp)
LIBRAW_BUILD_SAMPLES(raw-identify.cpp)
LIBRAW_BUILD_SAMPLES(multirender_test.cpp)
LIBRAW_BUILD_SAMPLES(postprocessing_benchmark.cpp)
#IF(WIN32)
#    LIBRAW_BUILD_SAMPLES(half_mt_win32.c)
#ELSE(WIN32)
#    LIBRAW_BUILD_SAMPLES(dcraw_half.c)
#    LIBRAW_BUILD_SAMPLES(half_mt.c)
#ENDIF(WIN32)

No chance. The result is exactly the same. output PPM image is always
corrupted. This proof that linking with STATIC lib is not the problem here.
Right ?

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list