From klauspost at gmail.com Thu Feb 2 20:31:14 2012 From: klauspost at gmail.com (Klaus Post) Date: Thu, 02 Feb 2012 20:31:14 +0100 Subject: [Rawstudio-commit] rawspeed r407 - data Message-ID: Author: post Date: 2012-02-02 20:31:14 +0100 (Thu, 02 Feb 2012) New Revision: 407 Modified: data/cameras.xml Log: Add Canon Powershot G1 X load support. Modified: data/cameras.xml =================================================================== --- data/cameras.xml 2012-01-29 16:14:39 UTC (rev 406) +++ data/cameras.xml 2012-02-02 19:31:14 UTC (rev 407) @@ -460,6 +460,20 @@ + + + RED + GREEN + GREEN + BLUE + + + + + + + + RED From klauspost at gmail.com Thu Feb 2 20:58:32 2012 From: klauspost at gmail.com (Klaus Post) Date: Thu, 02 Feb 2012 20:58:32 +0100 Subject: [Rawstudio-commit] r4124 - trunk/plugins/load-gdk Message-ID: Author: post Date: 2012-02-02 20:58:31 +0100 (Thu, 02 Feb 2012) New Revision: 4124 Modified: trunk/plugins/load-gdk/exiv2-colorspace.cpp Log: Add support for libpng > 1.5. Modified: trunk/plugins/load-gdk/exiv2-colorspace.cpp =================================================================== --- trunk/plugins/load-gdk/exiv2-colorspace.cpp 2012-01-31 21:08:51 UTC (rev 4123) +++ trunk/plugins/load-gdk/exiv2-colorspace.cpp 2012-02-02 19:58:31 UTC (rev 4124) @@ -127,9 +127,15 @@ /* Extract embedded ICC profile */ if (png_get_valid(png_ptr, info_ptr, TRUE) & PNG_INFO_iCCP) { +#if PNG_LIBPNG_VER_SONUM >=15 png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr, + (png_charpp) &icc_profile_title, &compression_type, + (png_byte**) &icc_profile, (png_uint_32*) &icc_profile_size); +#else + png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr, (png_charpp) &icc_profile_title, &compression_type, (png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size); +#endif if (retval != 0) { RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)icc_profile, icc_profile_size, TRUE); From klauspost at gmail.com Thu Feb 2 21:09:46 2012 From: klauspost at gmail.com (Klaus Post) Date: Thu, 02 Feb 2012 21:09:46 +0100 Subject: [Rawstudio-commit] r4125 - in trunk/plugins: colorspace-adobergb output-facebook output-flickr output-jpegfile output-picasa output-pngfile output-tifffile Message-ID: Author: post Date: 2012-02-02 21:09:46 +0100 (Thu, 02 Feb 2012) New Revision: 4125 Modified: trunk/plugins/colorspace-adobergb/colorspace-adobergb.c trunk/plugins/output-facebook/output-facebook.c trunk/plugins/output-flickr/output-flickr.c trunk/plugins/output-jpegfile/output-jpegfile.c trunk/plugins/output-picasa/output-picasa.c trunk/plugins/output-picasa/rs-picasa-client.c trunk/plugins/output-pngfile/output-pngfile.c trunk/plugins/output-tifffile/output-tifffile.c Log: Fix translation of output plugins. Patch by Simone Contini. Modified: trunk/plugins/colorspace-adobergb/colorspace-adobergb.c =================================================================== --- trunk/plugins/colorspace-adobergb/colorspace-adobergb.c 2012-02-02 19:58:31 UTC (rev 4124) +++ trunk/plugins/colorspace-adobergb/colorspace-adobergb.c 2012-02-02 20:09:46 UTC (rev 4125) @@ -19,8 +19,8 @@ /* Plugin tmpl version 4 */ +#include "config.h" #include -#include "config.h" #include "gettext.h" #include /* pow() */ Modified: trunk/plugins/output-facebook/output-facebook.c =================================================================== --- trunk/plugins/output-facebook/output-facebook.c 2012-02-02 19:58:31 UTC (rev 4124) +++ trunk/plugins/output-facebook/output-facebook.c 2012-02-02 20:09:46 UTC (rev 4125) @@ -25,9 +25,9 @@ - decide if rawstudio can be dependent on libflickcurl. Will this plugin be build on dependency satisfiction or --with-output-flickr option. */ +#include "config.h" #include #include -#include "config.h" #include "output-facebook.h" #include #include Modified: trunk/plugins/output-flickr/output-flickr.c =================================================================== --- trunk/plugins/output-flickr/output-flickr.c 2012-02-02 19:58:31 UTC (rev 4124) +++ trunk/plugins/output-flickr/output-flickr.c 2012-02-02 20:09:46 UTC (rev 4125) @@ -25,9 +25,9 @@ - decide if rawstudio can be dependent on libflickcurl. Will this plugin be build on dependency satisfiction or --with-output-flickr option. */ +#include "config.h" #include -#include -#include "config.h" +#include "gettext.h" #include "output-flickr.h" #include #include Modified: trunk/plugins/output-jpegfile/output-jpegfile.c =================================================================== --- trunk/plugins/output-jpegfile/output-jpegfile.c 2012-02-02 19:58:31 UTC (rev 4124) +++ trunk/plugins/output-jpegfile/output-jpegfile.c 2012-02-02 20:09:46 UTC (rev 4125) @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "config.h" #include #ifdef WIN32 #define HAVE_BOOLEAN @@ -24,7 +25,6 @@ #endif #include #include -#include "config.h" /* stat() */ #include Modified: trunk/plugins/output-picasa/output-picasa.c =================================================================== --- trunk/plugins/output-picasa/output-picasa.c 2012-02-02 19:58:31 UTC (rev 4124) +++ trunk/plugins/output-picasa/output-picasa.c 2012-02-02 20:09:46 UTC (rev 4125) @@ -19,9 +19,9 @@ /* Output plugin tmpl version 1 */ +#include "config.h" #include #include -#include "config.h" #include #include #include "rs-picasa-client.h" Modified: trunk/plugins/output-picasa/rs-picasa-client.c =================================================================== --- trunk/plugins/output-picasa/rs-picasa-client.c 2012-02-02 19:58:31 UTC (rev 4124) +++ trunk/plugins/output-picasa/rs-picasa-client.c 2012-02-02 20:09:46 UTC (rev 4125) @@ -7,6 +7,7 @@ * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html */ +#include #include #include #include Modified: trunk/plugins/output-pngfile/output-pngfile.c =================================================================== --- trunk/plugins/output-pngfile/output-pngfile.c 2012-02-02 19:58:31 UTC (rev 4124) +++ trunk/plugins/output-pngfile/output-pngfile.c 2012-02-02 20:09:46 UTC (rev 4125) @@ -19,9 +19,9 @@ /* Output plugin tmpl version 1 */ +#include "config.h" #include #include -#include "config.h" #include #include Modified: trunk/plugins/output-tifffile/output-tifffile.c =================================================================== --- trunk/plugins/output-tifffile/output-tifffile.c 2012-02-02 19:58:31 UTC (rev 4124) +++ trunk/plugins/output-tifffile/output-tifffile.c 2012-02-02 20:09:46 UTC (rev 4125) @@ -17,10 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "config.h" #include #include #include -#include "config.h" #define RS_TYPE_TIFFFILE (rs_tifffile_type) #define RS_TIFFFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_TIFFFILE, RSTifffile)) From klauspost at gmail.com Thu Feb 2 22:19:08 2012 From: klauspost at gmail.com (Klaus Post) Date: Thu, 02 Feb 2012 22:19:08 +0100 Subject: [Rawstudio-commit] r4126 - trunk/contrib Message-ID: Author: post Date: 2012-02-02 22:19:08 +0100 (Thu, 02 Feb 2012) New Revision: 4126 Modified: trunk/contrib/output-template.c Log: Fix translation of output plugins. Patch by Simone Contini. Modified: trunk/contrib/output-template.c =================================================================== --- trunk/contrib/output-template.c 2012-02-02 20:09:46 UTC (rev 4125) +++ trunk/contrib/output-template.c 2012-02-02 21:19:08 UTC (rev 4126) @@ -19,9 +19,9 @@ /* Output plugin tmpl version 1 */ +#include "config.h" #include #include -#include "config.h" #define RS_TYPE_TEMPLATE (rs_template_type) #define RS_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_TEMPLATE, RSTemplate)) From anders at kvistmail.dk Fri Feb 10 22:11:20 2012 From: anders at kvistmail.dk (Anders Kvist) Date: Fri, 10 Feb 2012 22:11:20 +0100 Subject: [Rawstudio-commit] r4127 - trunk/po Message-ID: Author: akv Date: 2012-02-10 22:11:19 +0100 (Fri, 10 Feb 2012) New Revision: 4127 Modified: trunk/po/it.po Log: Updated Italian translation by Matteo Lucarelli. Modified: trunk/po/it.po =================================================================== --- trunk/po/it.po 2012-02-02 21:19:08 UTC (rev 4126) +++ trunk/po/it.po 2012-02-10 21:11:19 UTC (rev 4127) @@ -3,6 +3,7 @@ # This file is distributed under the same license as the Rawstudio package. # # Simone Contini , 2008. +# Matteo Lucarelli , 2012. msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" @@ -24,7 +25,7 @@ #: librawstudio/rs-lens-db-editor.c:364 msgid "Deselect" -msgstr "" +msgstr "Deseleziona" #: librawstudio/rs-lens-db-editor.c:570 msgid "Error updating lensfun database" @@ -70,7 +71,7 @@ #: librawstudio/rs-lens-db-editor.c:687 msgid "Defish" -msgstr "" +msgstr "Rettifica" #: librawstudio/rs-lens-db-editor.c:725 msgid "Update lensfun database" @@ -143,7 +144,7 @@ #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1144 msgid "Lens Library" -msgstr "Libreria di ottiche" +msgstr "Libreria delle ottiche" #: librawstudio/rs-library.c:254 #, c-format @@ -229,7 +230,7 @@ #: librawstudio/rs-metadata.c:553 #, c-format msgid "%+.1fEV " -msgstr "" +msgstr "%+.1fEV " #: librawstudio/rs-metadata.c:555 #, c-format @@ -318,38 +319,38 @@ #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" -msgstr "" +msgstr "RdLum" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" -msgstr "" +msgstr "Riduzione Disturbo Luminanza" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" -msgstr "" +msgstr "RdCro" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" -msgstr "" +msgstr "Riduzione Disturbo Crominanza" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" -msgstr "" +msgstr "AC R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" -msgstr "" +msgstr "Correzione Aberrazione Cromatica Rosso" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" -msgstr "" +msgstr "AC B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" -msgstr "" +msgstr "Correzione Aberrazione Cromatica Blu" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 @@ -367,7 +368,7 @@ #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" -msgstr "" +msgstr "Regolazione Quantit? di Rosso" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 @@ -376,7 +377,7 @@ #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" -msgstr "" +msgstr "Regolazione Quantit? di Verde" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 @@ -385,15 +386,15 @@ #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" -msgstr "" +msgstr "Regolazione Quantit? di Blu" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" -msgstr "" +msgstr "Stampa spazio colore compatibile con Adobe RGB (1998)" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" -msgstr "" +msgstr "Spazio colore ad ampia gamma" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 @@ -404,7 +405,7 @@ #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" -msgstr "" +msgstr "Didascalia" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" @@ -423,7 +424,7 @@ #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" -msgstr "" +msgstr "Autentica Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" @@ -477,13 +478,15 @@ #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." -msgstr "" +msgstr "Abbiamo ricevuto un errore durante l'autenticazione. Riprova." #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" +"Rawstudio non ha potuto effeture il caricamento delle immagini " +"perch? l'autenticazione ? stata negata. Riprova." #: plugins/output-flickr/output-flickr.c:309 msgid "" @@ -524,7 +527,7 @@ #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" -msgstr "" +msgstr "Percorso completo di esportazione" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 @@ -573,7 +576,7 @@ #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" -msgstr "" +msgstr "Cambia utente" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 @@ -605,7 +608,7 @@ #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " -msgstr "Utente:" +msgstr "Utente: " #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " @@ -697,31 +700,31 @@ #: src/filename.c:391 msgid "%w - Week Number from Exif (Start Sunday)" -msgstr "" +msgstr "%w - Numero della settimana dai dati Exif (a partire da Domenica)" #: src/filename.c:392 msgid "%W - Week Number from Exif (Start Monday)" -msgstr "" +msgstr "%W - Numero della settimana dai dati Exif (a partire da Luned?)" #: src/filename.c:393 msgid "%Mi - ISO Value of Image" -msgstr "" +msgstr "%Mi - Valore ISO dell'immagine" #: src/filename.c:394 msgid "%Ma - Aperture (2.8)" -msgstr "" +msgstr "%Ma - Apertura (2.8)" #: src/filename.c:395 msgid "%Ms - Shutter Time in Seconds (0.008)" -msgstr "" +msgstr "%Ms - Tempo di esposizione in secondi (0.008)" #: src/filename.c:396 msgid "%MS - Inverted Shutter Time (125)" -msgstr "" +msgstr "%Ms - Reciproco del tempo di esposizione (125)" #: src/filename.c:397 msgid "%Mf - Focal Length in mm (70)" -msgstr "" +msgstr "%Mf - Lunghezza focale in mm (70)" #: src/gtk-interface.c:210 msgid "Width" @@ -779,11 +782,11 @@ #: src/gtk-interface.c:677 msgid "Select Screen for fullscreen preview" -msgstr "" +msgstr "Seleziona lo schermo da utilizzare per l'anteprima" #: src/gtk-interface.c:686 msgid "Select OK to use this screen for fullscreen preview" -msgstr "" +msgstr "Premi OK per usare questo schermo per l'anteprima" #: src/gtk-interface.c:847 msgid "Directory:" @@ -840,7 +843,7 @@ #: src/gtk-interface.c:1013 msgid "Histogram, Curve & Exp. Mask:" -msgstr "" +msgstr "Istogramma, Curva & Maschera di esposizione:" #: src/gtk-interface.c:1086 msgid "General" @@ -893,7 +896,7 @@ #. Construct this to load dcp profiles early #: src/gtk-interface.c:1674 msgid "Rawstudio: Loading Color Profiles" -msgstr "" +msgstr "Rawstudio sta caricando i profili colore" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" @@ -971,7 +974,7 @@ #: src/rs-actions.c:468 #, fuzzy msgid "White Balance" -msgstr "_Bilanciamento del Bianco" +msgstr "Bilanciamento del Bianco" #: src/rs-actions.c:469 msgid "Sharpen" @@ -979,7 +982,7 @@ #: src/rs-actions.c:470 msgid "Denoise" -msgstr "" +msgstr "Riduzione rumore" #: src/rs-actions.c:471 #, fuzzy @@ -992,7 +995,7 @@ #: src/rs-actions.c:473 msgid "TCA" -msgstr "" +msgstr "ACT" #: src/rs-actions.c:474 msgid "Vignetting" @@ -1034,7 +1037,7 @@ #: src/rs-actions.c:699 #, c-format msgid "Settings saved as default for %s %s" -msgstr "" +msgstr "Settaggi salvati come predefiniti per %s %s" #: src/rs-actions.c:782 msgid "Adjusting to auto white balance" @@ -1405,15 +1408,15 @@ #: src/rs-actions.c:1530 msgid "_Lights Out" -msgstr "" +msgstr "_Oscura" #: src/rs-actions.c:1536 msgid "Name" -msgstr "" +msgstr "Nome" #: src/rs-actions.c:1537 msgid "Timestamp" -msgstr "" +msgstr "Data-ora" #: src/rs-actions.c:1538 msgid "ISO" @@ -1421,11 +1424,11 @@ #: src/rs-actions.c:1540 msgid "Focallength" -msgstr "" +msgstr "Focale" #: src/rs-actions.c:1541 msgid "Shutterspeed" -msgstr "" +msgstr "Tempo" #. Snapshot labels #: src/rs-actions.c:1546 src/rs-toolbox.c:208 src/rs-toolbox.c:1265 @@ -1630,17 +1633,19 @@ #: src/rs-preview-widget.c:650 msgid "Display Navigation" -msgstr "" +msgstr "Display di navigazione" #: src/rs-preview-widget.c:962 msgid "Light out mode not available" -msgstr "" +msgstr "Oscuramento non disponibile" #: src/rs-preview-widget.c:963 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" +"Il tuo sistema non sembra supportare RGBA. Verifica le " +"impostazioni del sistema operativo per abilitarlo." #: src/rs-preview-widget.c:1199 msgid "Size" @@ -1744,12 +1749,16 @@ "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" +"Ritaglio: Trascina per selezionare l'area di ritaglio. Click destro all'interno " +"dell'area di ritaglio: applica ritaglio; All'esterno: annulla" #: src/rs-preview-widget.c:1314 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" +"Raddrizzamento: Traccia sull'immagine una linea che dovrebbe essere verticale" +"o orizzontale. Il click destro annulla." #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:529 @@ -1772,10 +1781,13 @@ "\n" "Check that you have write permissions to this folder." msgstr "" +"Impossibile salvare il file: %s\n" +"\n" +"controlla di avere i permessi di scrittura." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" -msgstr "Sovrascrivo il file?" +msgstr "Sovrascrivere il file?" #: src/rs-save-dialog.c:384 #, c-format @@ -1784,6 +1796,9 @@ "\n" "Do you want to overwrite the file?" msgstr "" +"Il file '%s' esiste gi?.\n" +"\n" +"Confermi la sovrascittura?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" @@ -1957,11 +1972,11 @@ #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" -msgstr "" +msgstr "Ricerca Tag [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" -msgstr "" +msgstr "Gphoto2 restituisce un errore di contesto:\n" #: src/rs-tethered-shooting.c:272 #, c-format @@ -1969,23 +1984,25 @@ "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" +"ERROR: Gphoto2 ritorna l'errore %d\n" +"Il messaggio ?: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" -msgstr "" +msgstr "Abilita la modalit? di cattura per fotocamere Canon.\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" -msgstr "" +msgstr "Abilita la modalit? di cattura per fotocamere Nikon.\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" -msgstr "" +msgstr "Cattura abilitata.\n" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." -msgstr "" +msgstr "La porta specificata ('%s') non ? stata trovata." #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" @@ -1993,7 +2010,7 @@ #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" -msgstr "" +msgstr "Caricamento e aggiunta immagine.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" @@ -2005,7 +2022,7 @@ #: src/rs-tethered-shooting.c:603 msgid "Capturing.\n" -msgstr "" +msgstr "Cattura in corso.\n" #: src/rs-tethered-shooting.c:638 #, c-format @@ -2013,6 +2030,8 @@ "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" +"Errore %d,durante l'attesa della fotocamera.\n" +"Descrizione: %s\n" #: src/rs-tethered-shooting.c:649 #, c-format @@ -2020,6 +2039,8 @@ "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" +"Errore %d, durante la ricezione dell'immagine.\n" +"Descrizione: %s\n" #: src/rs-tethered-shooting.c:653 msgid "File Downloaded Succesfully.\n" @@ -2027,7 +2048,7 @@ #: src/rs-tethered-shooting.c:657 msgid "Camera monitor shutting down.\n" -msgstr "" +msgstr "Sto spegnendo il processo di cattura.\n" #: src/rs-tethered-shooting.c:675 src/rs-tethered-shooting.c:848 #, c-format @@ -2035,6 +2056,8 @@ "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" +"Error %d, durante la cattura.\n" +"Descrizione: %s\n" #: src/rs-tethered-shooting.c:686 #, c-format @@ -2043,18 +2066,21 @@ "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" +"Attenzione: E' necessario un tempo pi? lungo per la cattura dell'immagine\n" +"sono richiesti %.1f secondi per la ricezione.\n" +"L'intervallo dovrebbe essere aumentato.\n" #: src/rs-tethered-shooting.c:688 msgid "Waiting for next image.\n" -msgstr "" +msgstr "In attesa della prossima immagine.\n" #: src/rs-tethered-shooting.c:716 src/rs-tethered-shooting.c:1123 msgid "Start Shooting" -msgstr "" +msgstr "Avvio Riprese" #: src/rs-tethered-shooting.c:717 msgid "Interval shooting shutting down.\n" -msgstr "" +msgstr "Interruzione delle riprese intervallate.\n" #: src/rs-tethered-shooting.c:728 msgid "Disconnecting current camera\n" @@ -2089,23 +2115,23 @@ #: src/rs-tethered-shooting.c:841 msgid "Shutting down running thread to enable remote capture.\n" -msgstr "" +msgstr "Interrompere il processo in esecuzione per abilitare la cattura remota.\n" #: src/rs-tethered-shooting.c:886 msgid "Shutting down already running thread.\n" -msgstr "" +msgstr "Interrompere il processo in esecuzione.\n" #: src/rs-tethered-shooting.c:892 msgid "Starting Monitor Thread.\n" -msgstr "" +msgstr "Avvio del processo di controllo.\n" #: src/rs-tethered-shooting.c:897 msgid "Monitor Thread already running.\n" -msgstr "" +msgstr "Il processo di controllo ? gi? in esecuzione.\n" #: src/rs-tethered-shooting.c:928 msgid "Shutting down interval capture thread.\n" -msgstr "" +msgstr "Interrompere il processo di riprese intervallate.\n" #: src/rs-tethered-shooting.c:939 msgid "No camera connected.\n" @@ -2113,7 +2139,7 @@ #: src/rs-tethered-shooting.c:959 msgid "Staring Interval Shooting Thread.\n" -msgstr "" +msgstr "Avviare il prcesso di riprese intervallate.\n" #: src/rs-tethered-shooting.c:962 msgid "Stop Shooting" @@ -2129,11 +2155,11 @@ #: src/rs-tethered-shooting.c:1032 msgid "Monitor Camera" -msgstr "" +msgstr "Controllo fotocamera" #: src/rs-tethered-shooting.c:1037 msgid "Disconnect Camera" -msgstr "" +msgstr "Disconnettere la fotocamera" #. Status window #: src/rs-tethered-shooting.c:1046 @@ -2143,7 +2169,7 @@ #. Add main box #: src/rs-tethered-shooting.c:1061 msgid "Master Control" -msgstr "" +msgstr "Controllo principale" #: src/rs-tethered-shooting.c:1068 msgid "Filename template:" @@ -2155,7 +2181,7 @@ #: src/rs-tethered-shooting.c:1093 msgid "Tags for new images:" -msgstr "" +msgstr "Etichette per le nuove immagini" #. Add filename& tags box #: src/rs-tethered-shooting.c:1106 @@ -2164,34 +2190,36 @@ #: src/rs-tethered-shooting.c:1112 msgid "Seconds between each shot:" -msgstr "" +msgstr "Intervallo (s) tra gli scatti:" #. Add interval shooting box #: src/rs-tethered-shooting.c:1131 msgid "Interval Shooting" -msgstr "" +msgstr "Riprese intervallate" #: src/rs-tethered-shooting.c:1138 msgid "Minimize this window after capture" -msgstr "" +msgstr "Minimizza la finestra dopo la cattura" #: src/rs-tethered-shooting.c:1142 msgid "Copy settings from active to new image" -msgstr "" +msgstr "Copia i settaggi dell'immagine attiva" #: src/rs-tethered-shooting.c:1148 msgid "Open new images after capture" -msgstr "" +msgstr "Apri la nuova immagine dopo la cattura" #: src/rs-tethered-shooting.c:1177 msgid "Rawstudio Tethered Shooting" -msgstr "" +msgstr "Controllo Remoto Fotocamera " #: src/rs-tethered-shooting.c:1200 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" +"Benvenuto nel sistema di controllo remoto!\n" +"Verifica che la fotocamera non sia montata dal sistema operativo.\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:230 @@ -2204,11 +2232,11 @@ #: src/rs-toolbox.c:451 msgid ". Click to reset value" -msgstr "" +msgstr ". Clicca per resettare il valore" #: src/rs-toolbox.c:457 msgid ". Click to edit value" -msgstr "" +msgstr ". Clicca per modificare il valore" #: src/rs-toolbox.c:573 src/rs-toolbox.c:712 msgid "Open curve ..." @@ -2216,7 +2244,7 @@ #: src/rs-toolbox.c:677 msgid "Select Saved Curve" -msgstr "" +msgstr "Seleziona la curva salvata" #: src/rs-toolbox.c:707 msgid "Select Action" From klauspost at gmail.com Sat Feb 11 18:18:55 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 11 Feb 2012 18:18:55 +0100 Subject: [Rawstudio-commit] r4128 - trunk/librawstudio Message-ID: Author: post Date: 2012-02-11 18:18:55 +0100 (Sat, 11 Feb 2012) New Revision: 4128 Modified: trunk/librawstudio/rs-metadata.c Log: Don't display Exposure Compensation in short summary, and don't display F-stop when unknown. [FREDEKL8?] Modified: trunk/librawstudio/rs-metadata.c =================================================================== --- trunk/librawstudio/rs-metadata.c 2012-02-10 21:11:19 UTC (rev 4127) +++ trunk/librawstudio/rs-metadata.c 2012-02-11 17:18:55 UTC (rev 4128) @@ -547,10 +547,8 @@ g_string_append_printf(label, _("%.1fs "), 1/metadata->shutterspeed); else if (metadata->shutterspeed >= 4) g_string_append_printf(label, _("1/%.0fs "), metadata->shutterspeed); - if (metadata->aperture!=0.0) + if (metadata->aperture>0.0) g_string_append_printf(label, _("F/%.1f "), metadata->aperture); - if (metadata->exposurebias>-999.0) - g_string_append_printf(label, _("%+.1fEV "), metadata->exposurebias); if (metadata->iso!=0) g_string_append_printf(label, _("ISO%d"), metadata->iso); From klauspost at gmail.com Sat Feb 11 18:20:40 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 11 Feb 2012 18:20:40 +0100 Subject: [Rawstudio-commit] r4129 - trunk/src Message-ID: Author: post Date: 2012-02-11 18:20:40 +0100 (Sat, 11 Feb 2012) New Revision: 4129 Modified: trunk/src/rs-toolbox.c Log: Update histogram after loading an image. Modified: trunk/src/rs-toolbox.c =================================================================== --- trunk/src/rs-toolbox.c 2012-02-11 17:18:55 UTC (rev 4128) +++ trunk/src/rs-toolbox.c 2012-02-11 17:20:40 UTC (rev 4129) @@ -1188,6 +1188,8 @@ /* Update histogram in curve editor */ rs_curve_draw_histogram(RS_CURVE_WIDGET(toolbox->curve[toolbox->selected_snapshot])); + /* Update histogram */ + rs_histogram_redraw(RS_HISTOGRAM_WIDGET(toolbox->histogram)); gtk_widget_set_sensitive(toolbox->transforms, !!(toolbox->photo)); } From klauspost at gmail.com Sat Feb 11 18:22:16 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 11 Feb 2012 18:22:16 +0100 Subject: [Rawstudio-commit] r4130 - trunk/src Message-ID: Author: post Date: 2012-02-11 18:22:16 +0100 (Sat, 11 Feb 2012) New Revision: 4130 Modified: trunk/src/gtk-interface.c trunk/src/rs-store.c trunk/src/rs-store.h Log: Always select next image when image is removed from the active tab. Modified: trunk/src/gtk-interface.c =================================================================== --- trunk/src/gtk-interface.c 2012-02-11 17:20:40 UTC (rev 4129) +++ trunk/src/gtk-interface.c 2012-02-11 17:22:16 UTC (rev 4130) @@ -357,21 +357,19 @@ selected = rs_store_get_selected_iters(rs->store); num_selected = g_list_length(selected); - /* If we are deleting images, select next */ - if (prio == 51) - { - GList *selected_names = rs_store_get_selected_names(rs->store); - if (g_list_length(selected_names)) - next_name = (const gchar*)(g_list_last(selected_names)->data); - else if (rs->photo) - next_name = rs->photo->filename; + /* If moving to another iconview, select next */ + GList *selected_names = rs_store_get_selected_names(rs->store); + if (g_list_length(selected_names)) + next_name = (const gchar*)(g_list_last(selected_names)->data); + else if (rs->photo) + next_name = rs->photo->filename; - /* Load next image if deleting */ - if (next_name) - next_name = rs_store_get_prevnext(rs->store, next_name, 2); + /* Select next image if moving */ + if (next_name) + next_name = rs_store_get_prevnext(rs->store, next_name, 10 + prio); + if (next_name) gui_set_block_keyboard(TRUE); - } /* Iterate throuh all selected thumbnails */ for(i=0;icurrent_iconview); + if (direction >= 10 ) + { + gint new_prio = direction - 10; + if (new_prio <= 3) + { + switch (store->current_priority) + { + case PRIO_ALL: + return(NULL); + break; + case PRIO_U: + if (new_prio == 0) + return(NULL); + break; + case PRIO_D: + if (new_prio == 51) + return(NULL); + default: + if (store->current_priority == new_prio) + return(NULL); + break; + } + } + direction = 2; + } /* Get a list of selected icons */ selected = gtk_icon_view_get_selected_items(iconview); if (g_list_length(selected) == 1) Modified: trunk/src/rs-store.h =================================================================== --- trunk/src/rs-store.h 2012-02-11 17:20:40 UTC (rev 4129) +++ trunk/src/rs-store.h 2012-02-11 17:22:16 UTC (rev 4130) @@ -173,7 +173,7 @@ * Get the filename of the previous or next thumbnail * @param store A RSStore * @param current_filename Current filename or NULL if none - * @param direction 1: previous, 2: next + * @param direction 1: previous, 2: next, 10 + priority will select next if priority will remove it from current view * @return filename of next or previous file, NULL if none. */ const gchar* From klauspost at gmail.com Mon Feb 13 17:00:43 2012 From: klauspost at gmail.com (Klaus Post) Date: Mon, 13 Feb 2012 17:00:43 +0100 Subject: [Rawstudio-commit] r4131 - trunk/src Message-ID: Author: post Date: 2012-02-13 17:00:43 +0100 (Mon, 13 Feb 2012) New Revision: 4131 Modified: trunk/src/application.c Log: g_thread_init is deprecated on newer glibs. Modified: trunk/src/application.c =================================================================== --- trunk/src/application.c 2012-02-11 17:22:16 UTC (rev 4130) +++ trunk/src/application.c 2012-02-13 16:00:43 UTC (rev 4131) @@ -703,8 +703,10 @@ rs_debug_setup(debug); gdk_threads_set_lock_functions(rs_gdk_lock, rs_gdk_unlock); +#if GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION < 31 g_thread_init(NULL); gdk_threads_init(); +#endif #ifdef ENABLE_NLS bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); From klauspost at gmail.com Mon Feb 13 17:31:58 2012 From: klauspost at gmail.com (Klaus Post) Date: Mon, 13 Feb 2012 17:31:58 +0100 Subject: [Rawstudio-commit] r4132 - trunk/plugins/dcp Message-ID: Author: post Date: 2012-02-13 17:31:58 +0100 (Mon, 13 Feb 2012) New Revision: 4132 Modified: trunk/plugins/dcp/dcp-sse4.c Log: Use PEXTRD for getting out curve lookup values, and be sure to set correct rounding mode. Modified: trunk/plugins/dcp/dcp-sse4.c =================================================================== --- trunk/plugins/dcp/dcp-sse4.c 2012-02-13 16:00:43 UTC (rev 4131) +++ trunk/plugins/dcp/dcp-sse4.c 2012-02-13 16:31:58 UTC (rev 4132) @@ -348,6 +348,8 @@ __m128 r, g, b, r2, g2, b2; __m128i zero; + int _mm_rounding = _MM_GET_ROUNDING_MODE(); + _MM_SET_ROUNDING_MODE(_MM_ROUND_DOWN); gboolean do_contrast = (dcp->contrast > 1.001f); gboolean do_highrec = (dcp->contrast < 0.999f); __m128 hue_add = _mm_set_ps(dcp->hue, dcp->hue, dcp->hue, dcp->hue); @@ -362,7 +364,6 @@ SETFLOAT4_SAME(_recover_radius, 1.0 - __recover_radius); SETFLOAT4_SAME(_contr_base, 0.5f); SETFLOAT4_SAME(_inv_contrast, 1.0f - dcp->contrast); - int xfer[4] __attribute__ ((aligned (16))); SETFLOAT4(_min_cam, 0.0f, dcp->camera_white.z, dcp->camera_white.y, dcp->camera_white.x); SETFLOAT4_SAME(_black_minus_radius, dcp->exposure_black - dcp->exposure_radius); @@ -556,18 +557,17 @@ { /* Convert v to lookup values and interpolate */ __m128 v_mul = _mm_mul_ps(v, _mm_load_ps(_twofiftysix_ps)); - __m128i lookup = _mm_cvtps_epi32(v_mul); - _mm_store_si128((__m128i*)&xfer[0], lookup); + __m128i lookup = _mm_slli_epi32(_mm_cvtps_epi32(v_mul),1); /* Calculate fractions */ __m128 frac = _mm_sub_ps(v_mul, _mm_floor_ps(v_mul)); __m128 inv_frac = _mm_sub_ps(_mm_load_ps(_ones_ps), frac); /* Load two adjacent curve values and interpolate between them */ - __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[xfer[0]*2])); - __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[xfer[2]*2])); - p0p1 = _mm_loadh_pi(p0p1, (__m64*)&dcp->curve_samples[xfer[1]*2]); - p2p3 = _mm_loadh_pi(p2p3, (__m64*)&dcp->curve_samples[xfer[3]*2]); + __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[_mm_extract_epi32(lookup,0)])); + __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[_mm_extract_epi32(lookup,2)])); + p0p1 = _mm_loadh_pi(p0p1, (__m64*)&dcp->curve_samples[_mm_extract_epi32(lookup,1)]); + p2p3 = _mm_loadh_pi(p2p3, (__m64*)&dcp->curve_samples[_mm_extract_epi32(lookup,3)]); /* Pack all lower values in v0, high in v1 and interpolate */ __m128 v0 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(2,0,2,0)); @@ -627,6 +627,7 @@ _mm_store_si128(pixel + 1, p2); } } + _MM_SET_ROUNDING_MODE(_mm_rounding); return TRUE; } #undef DW From klauspost at gmail.com Mon Feb 13 18:08:23 2012 From: klauspost at gmail.com (Klaus Post) Date: Mon, 13 Feb 2012 18:08:23 +0100 Subject: [Rawstudio-commit] r4133 - trunk/plugins/dcp Message-ID: Author: post Date: 2012-02-13 18:08:23 +0100 (Mon, 13 Feb 2012) New Revision: 4133 Modified: trunk/plugins/dcp/dcp-sse4.c Log: Prefer pinsrq for loading SSE4 quadword when looking up. Modified: trunk/plugins/dcp/dcp-sse4.c =================================================================== --- trunk/plugins/dcp/dcp-sse4.c 2012-02-13 16:31:58 UTC (rev 4132) +++ trunk/plugins/dcp/dcp-sse4.c 2012-02-13 17:08:23 UTC (rev 4133) @@ -37,6 +37,13 @@ static gfloat _16_bit_ps[4] __attribute__ ((aligned (16))) = {65535.0, 65535.0, 65535.0, 65535.0}; +/* Insert two floats into high qword of register using pinsrq, GCC doesn't detect this */ +static inline __m128 +_mm_insert_two_high(__m128 low, const gfloat* pos) +{ + return _mm_castsi128_ps(_mm_insert_epi64(_mm_castps_si128(low), *(long long*)pos, 1)); +} + static inline __m128 sse_matrix3_mul(float* mul, __m128 a, __m128 b, __m128 c) { @@ -232,17 +239,17 @@ { /* Convert v to lookup values and interpolate */ __m128 mul = _mm_mul_ps(value, _mm_load_ps(_thousand_24_ps)); - __m128i lookup = _mm_cvtps_epi32(mul); + __m128i lookup = _mm_slli_epi32(_mm_cvtps_epi32(mul),1); /* Calculate fractions */ __m128 frac = _mm_sub_ps(mul, _mm_floor_ps(mul)); __m128 inv_frac = _mm_sub_ps(_mm_load_ps(_ones_ps), frac); /* Load two adjacent curve values and interpolate between them */ - __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&tone_lut[_mm_extract_epi32(lookup,0)*2])); - __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&tone_lut[_mm_extract_epi32(lookup,2)*2])); - p0p1 = _mm_loadh_pi(p0p1, (__m64*)&tone_lut[_mm_extract_epi32(lookup,1)*2]); - p2p3 = _mm_loadh_pi(p2p3, (__m64*)&tone_lut[_mm_extract_epi32(lookup,3)*2]); + __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&tone_lut[_mm_extract_epi32(lookup,0)])); + __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&tone_lut[_mm_extract_epi32(lookup,2)])); + p0p1 = _mm_insert_two_high(p0p1, &tone_lut[_mm_extract_epi32(lookup,1)]); + p2p3 = _mm_insert_two_high(p2p3, &tone_lut[_mm_extract_epi32(lookup,3)]); /* Pack all lower values in v0, high in v1 and interpolate */ __m128 v0 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(2,0,2,0)); @@ -333,6 +340,7 @@ #define SETFLOAT4_SAME(N, A) float N[4] __attribute__ ((aligned (16))); \ N[0] = A; N[1] = A; N[2] = A; N[3] = A; + static gfloat _twofiftysix_ps[4] __attribute__ ((aligned (16))) = {255.9999f,255.9999f,255.9999f,255.9999f}; @@ -566,8 +574,8 @@ /* Load two adjacent curve values and interpolate between them */ __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[_mm_extract_epi32(lookup,0)])); __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[_mm_extract_epi32(lookup,2)])); - p0p1 = _mm_loadh_pi(p0p1, (__m64*)&dcp->curve_samples[_mm_extract_epi32(lookup,1)]); - p2p3 = _mm_loadh_pi(p2p3, (__m64*)&dcp->curve_samples[_mm_extract_epi32(lookup,3)]); + p0p1 = _mm_insert_two_high(p0p1, &dcp->curve_samples[_mm_extract_epi32(lookup,1)]); + p2p3 = _mm_insert_two_high(p2p3, &dcp->curve_samples[_mm_extract_epi32(lookup,3)]); /* Pack all lower values in v0, high in v1 and interpolate */ __m128 v0 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(2,0,2,0)); From klauspost at gmail.com Thu Feb 16 19:07:44 2012 From: klauspost at gmail.com (Klaus Post) Date: Thu, 16 Feb 2012 19:07:44 +0100 Subject: [Rawstudio-commit] r4134 - trunk/plugins/dcp Message-ID: Author: post Date: 2012-02-16 19:07:44 +0100 (Thu, 16 Feb 2012) New Revision: 4134 Modified: trunk/plugins/dcp/dcp-avx.c trunk/plugins/dcp/dcp.c Log: Use SSE4 functions for AVX, re-enable, but use SSE2 tonemapping function, since GCC 4.6.1 seem to miscompile AVX for this function. Modified: trunk/plugins/dcp/dcp-avx.c =================================================================== --- trunk/plugins/dcp/dcp-avx.c 2012-02-13 17:08:23 UTC (rev 4133) +++ trunk/plugins/dcp/dcp-avx.c 2012-02-16 18:07:44 UTC (rev 4134) @@ -21,7 +21,7 @@ #ifdef __AVX__ -#include +#include #include /* powf() */ #pragma GCC diagnostic ignored "-Wstrict-aliasing" @@ -38,26 +38,17 @@ static gfloat _six_ps[4] __attribute__ ((aligned (16))) = {6.0f-1e-15, 6.0f-1e-15, 6.0f-1e-15, 6.0f-1e-15}; static gfloat _very_small_ps[4] __attribute__ ((aligned (16))) = {1e-15, 1e-15, 1e-15, 1e-15}; static const gfloat _two_to_23_ps[4] __attribute__ ((aligned (16))) = { 0x1.0p23f, 0x1.0p23f, 0x1.0p23f, 0x1.0p23f }; -static guint _ps_mask_sign[4] __attribute__ ((aligned (16))) = {0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff}; #define DW(A) _mm_castps_si128(A) #define PS(A) _mm_castsi128_ps(A) -/* Floor for positive numbers */ -static inline __m128 _mm_floor_positive_ps( __m128 v ) -{ - __m128 two_to_23_ps = _mm_load_ps(_two_to_23_ps); - return _mm_sub_ps( _mm_add_ps( v, two_to_23_ps ), two_to_23_ps ); -} static inline void -RGBtoHSV_AVX(__m128 *c0, __m128 *c1, __m128 *c2) +RGBtoHSV_SSE4(__m128 *c0, __m128 *c1, __m128 *c2) { - - __m128i zero_i = _mm_setzero_si128(); + __m128 zero_ps = _mm_setzero_ps(); __m128 small_ps = _mm_load_ps(_very_small_ps); __m128 ones_ps = _mm_load_ps(_ones_ps); - __m128i ps_mask_sign = _mm_load_si128((__m128i*)_ps_mask_sign); // Any number > 1 __m128 add_v = _mm_load_ps(_two_ps); @@ -71,12 +62,16 @@ g = _mm_min_ps(_mm_max_ps(g, small_ps),ones_ps); b = _mm_min_ps(_mm_max_ps(b, small_ps),ones_ps); - __m128 v = _mm_max_ps(b,_mm_max_ps(r,g)); + __m128 h, v; + v = _mm_max_ps(b,_mm_max_ps(r,g)); + __m128 m = _mm_min_ps(b,_mm_min_ps(r,g)); __m128 gap = _mm_sub_ps(v,m); - __m128 v_mask = PS(_mm_cmpeq_epi32(_mm_and_si128(DW(gap), ps_mask_sign), zero_i)); + __m128 v_mask = _mm_cmpeq_ps(gap, zero_ps); v = _mm_add_ps(v, _mm_and_ps(add_v, v_mask)); + h = _mm_setzero_ps(); + /* Set gap to one where sat = 0, this will avoid divisions by zero, these values will not be used */ ones_ps = _mm_and_ps(ones_ps, v_mask); gap = _mm_or_ps(gap, ones_ps); @@ -85,32 +80,32 @@ /* if r == v */ /* h = (g - b) / gap; */ - __m128i mask = _mm_cmpeq_epi32(DW(r), DW(v)); + __m128 mask = _mm_cmpeq_ps(r, v); __m128 val = _mm_mul_ps(gap_inv, _mm_sub_ps(g, b)); /* fill h */ - v = _mm_add_ps(v, _mm_and_ps(add_v, PS(mask))); - __m128i h = _mm_and_si128(DW(val), mask); + v = _mm_add_ps(v, _mm_and_ps(add_v, mask)); + h = _mm_blendv_ps(h, val, mask); /* if g == v */ /* h = 2.0f + (b - r) / gap; */ __m128 two_ps = _mm_load_ps(_two_ps); - mask = _mm_cmpeq_epi32(DW(g), DW(v)); + mask = _mm_cmpeq_ps(g, v); val = _mm_sub_ps(b, r); val = _mm_mul_ps(val, gap_inv); val = _mm_add_ps(val, two_ps); - v = _mm_add_ps(v, _mm_and_ps(add_v, PS(mask))); - h = _mm_or_si128(h, _mm_and_si128(DW(val), mask)); + v = _mm_add_ps(v, _mm_and_ps(add_v, mask)); + h = _mm_blendv_ps(h, val, mask); /* If (b == v) */ /* h = 4.0f + (r - g) / gap; */ __m128 four_ps = _mm_add_ps(two_ps, two_ps); - mask = _mm_cmpeq_epi32(DW(b), DW(v)); + mask = _mm_cmpeq_ps(b, v); val = _mm_add_ps(four_ps, _mm_mul_ps(gap_inv, _mm_sub_ps(r, g))); - h = _mm_or_si128(h, _mm_and_si128(DW(val), mask)); - v = _mm_add_ps(v, _mm_and_ps(add_v, PS(mask))); + v = _mm_add_ps(v, _mm_and_ps(add_v, mask)); + h = _mm_blendv_ps(h, val, mask); __m128 s; /* Fill s, if gap > 0 */ @@ -119,20 +114,19 @@ s = _mm_andnot_ps(v_mask, val ); /* Check if h < 0 */ - zero_i = _mm_setzero_si128(); - __m128i six_ps_i = _mm_load_si128((__m128i*)_six_ps); - /* We can use integer comparision, since we are checking if h < 0, since the sign bit is same in integer */ - mask = _mm_cmplt_epi32(h, zero_i); - __m128 h2 = _mm_add_ps(PS(h), PS(_mm_and_si128(mask, six_ps_i))); + zero_ps = _mm_setzero_ps(); + __m128 six_ps = _mm_load_ps(_six_ps); + mask = _mm_cmplt_ps(h, zero_ps); + h = _mm_add_ps(h, _mm_and_ps(mask, six_ps)); - *c0 = h2; + *c0 = h; *c1 = s; *c2 = v; } static inline void -HSVtoRGB_SSE(__m128 *c0, __m128 *c1, __m128 *c2) +HSVtoRGB_SSE4(__m128 *c0, __m128 *c1, __m128 *c2) { __m128 h = *c0; __m128 s = *c1; @@ -140,9 +134,9 @@ __m128 r, g, b; /* Convert get the fraction of h - * h_fraction = h - floor(h) */ + * h_fraction = h - (float)(int)h */ __m128 ones_ps = _mm_load_ps(_ones_ps); - __m128 h_fraction = _mm_sub_ps(h,_mm_floor_positive_ps(h)); + __m128 h_fraction = _mm_sub_ps(h, _mm_floor_ps(h)); /* p = v * (1.0f - s) */ __m128 p = _mm_mul_ps(v, _mm_sub_ps(ones_ps, s)); @@ -164,9 +158,9 @@ __m128 m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); - r = _mm_or_ps(r, _mm_and_ps(q, m)); - g = _mm_or_ps(g, _mm_and_ps(v, m)); - b = _mm_or_ps(b, _mm_and_ps(p, m)); + r = _mm_blendv_ps(r, q, m); + g = _mm_blendv_ps(g, v, m); + b = _mm_blendv_ps(b, p, m); out_mask = _mm_or_ps(out_mask, m); /* h < 3 (case 2)*/ @@ -174,9 +168,9 @@ m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); - r = _mm_or_ps(r, _mm_and_ps(p, m)); - g = _mm_or_ps(g, _mm_and_ps(v, m)); - b = _mm_or_ps(b, _mm_and_ps(t, m)); + r = _mm_blendv_ps(r, p, m); + g = _mm_blendv_ps(g, v, m); + b = _mm_blendv_ps(b, t, m); out_mask = _mm_or_ps(out_mask, m); /* h < 4 (case 3)*/ @@ -184,9 +178,9 @@ m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); - r = _mm_or_ps(r, _mm_and_ps(p, m)); - g = _mm_or_ps(g, _mm_and_ps(q, m)); - b = _mm_or_ps(b, _mm_and_ps(v, m)); + r = _mm_blendv_ps(r, p, m); + g = _mm_blendv_ps(g, q, m); + b = _mm_blendv_ps(b, v, m); out_mask = _mm_or_ps(out_mask, m); /* h < 5 (case 4)*/ @@ -201,9 +195,11 @@ /* Remainder (case 5) */ /* case 5: *r = v; *g = p; *b = q; break; */ - r = _mm_or_ps(r, _mm_andnot_ps(out_mask,v)); - g = _mm_or_ps(g, _mm_andnot_ps(out_mask,p)); - b = _mm_or_ps(b, _mm_andnot_ps(out_mask,q)); + __m128 all_ones = _mm_cmpeq_ps(h,h); + m = _mm_xor_ps(out_mask, all_ones); + r = _mm_blendv_ps(r, v, m); + g = _mm_blendv_ps(g, p, m); + b = _mm_blendv_ps(b, q, m); *c0 = r; *c1 = g; @@ -211,10 +207,10 @@ } +/* GCC 4.6.1 seems to miscompile this function with AVX, so disabled for now */ +#if 0 static gint _ones_epi32[4] __attribute__ ((aligned (16))) = {1,1,1,1}; -/* Until now the same as the SSE2 version, but included here to allow AVX compilation */ -/* to utilize 3-paramater instructions */ void huesat_map_AVX(RSHuesatMap *map, const PrecalcHSM* precalc, __m128 *_h, __m128 *_s, __m128 *_v) @@ -331,7 +327,6 @@ __m128 hScaled = _mm_mul_ps(h, _mm_load_ps(precalc->hScale)); __m128 sScaled = _mm_mul_ps(s, _mm_load_ps(precalc->sScale)); __m128 vScaled = _mm_mul_ps(v, _mm_load_ps(precalc->vScale)); - __m128i hIndex0 = _mm_cvttps_epi32(hScaled); __m128i sIndex0 = _mm_cvttps_epi32(sScaled); __m128i vIndex0 = _mm_cvttps_epi32(vScaled); @@ -480,7 +475,9 @@ *_s = s; *_v = v; } +#endif + static gfloat _16_bit_ps[4] __attribute__ ((aligned (16))) = {65535.0, 65535.0, 65535.0, 65535.0}; static gfloat _thousand_24_ps[4] __attribute__ ((aligned (16))) = {1023.99999f, 1023.99999f, 1023.99999f, 1023.99999f}; @@ -494,7 +491,7 @@ _mm_store_si128((__m128i*)&xfer[0], lookup); /* Calculate fractions */ - __m128 frac = _mm_sub_ps(mul, _mm_floor_positive_ps(mul)); + __m128 frac = _mm_sub_ps(mul, _mm_floor_ps(mul)); __m128 inv_frac = _mm_sub_ps(_mm_load_ps(_ones_ps), frac); /* Load two adjacent curve values and interpolate between them */ @@ -614,6 +611,8 @@ #define SETFLOAT4_SAME(N, A) float N[4] __attribute__ ((aligned (16))); \ N[0] = A; N[1] = A; N[2] = A; N[3] = A; +extern void huesat_map_SSE2(RSHuesatMap *map, const PrecalcHSM* precalc, __m128 *_h, __m128 *_s, __m128 *_v); + gboolean render_AVX(ThreadInfo* t) { @@ -728,12 +727,12 @@ g2 = sse_matrix3_mul(&cam_prof[12], r, g, b); b2 = sse_matrix3_mul(&cam_prof[24], r, g, b); - RGBtoHSV_AVX(&r2, &g2, &b2); + RGBtoHSV_SSE4(&r2, &g2, &b2); h = r2; s = g2; v = b2; if (dcp->huesatmap) { - huesat_map_AVX(dcp->huesatmap, dcp->huesatmap_precalc, &h, &s, &v); + huesat_map_SSE2(dcp->huesatmap, dcp->huesatmap_precalc, &h, &s, &v); } /* Saturation */ @@ -766,7 +765,7 @@ h = _mm_add_ps(h, six_masked_lt); __m128 v_stored = v; - HSVtoRGB_SSE(&h, &s, &v); + HSVtoRGB_SSE4(&h, &s, &v); r = h; g = s; b = v; /* Exposure */ @@ -849,7 +848,7 @@ } /* Convert to HSV */ - RGBtoHSV_AVX(&r, &g, &b); + RGBtoHSV_SSE4(&r, &g, &b); h = r; s = g; v = b; if (!dcp->curve_is_flat) @@ -860,7 +859,7 @@ _mm_store_si128((__m128i*)&xfer[0], lookup); /* Calculate fractions */ - __m128 frac = _mm_sub_ps(v_mul, _mm_floor_positive_ps(v_mul)); + __m128 frac = _mm_sub_ps(v_mul, _mm_floor_ps(v_mul)); __m128 inv_frac = _mm_sub_ps(_mm_load_ps(_ones_ps), frac); /* Load two adjacent curve values and interpolate between them */ @@ -877,7 +876,7 @@ /* Apply looktable */ if (dcp->looktable) { - huesat_map_AVX(dcp->looktable, dcp->looktable_precalc, &h, &s, &v); + huesat_map_SSE2(dcp->looktable, dcp->looktable_precalc, &h, &s, &v); } /* Ensure that hue is within range */ @@ -892,7 +891,7 @@ /* s always slightly > 0 when converting to RGB */ s = _mm_max_ps(s, min_val); - HSVtoRGB_SSE(&h, &s, &v); + HSVtoRGB_SSE4(&h, &s, &v); r = h; g = s; b = v; /* Apply Tone Curve in RGB space*/ Modified: trunk/plugins/dcp/dcp.c =================================================================== --- trunk/plugins/dcp/dcp.c 2012-02-13 17:08:23 UTC (rev 4133) +++ trunk/plugins/dcp/dcp.c 2012-02-16 18:07:44 UTC (rev 4134) @@ -471,7 +471,7 @@ pre_cache_tables(t->dcp); if (tmp->pixelsize == 4 && (rs_detect_cpu_features() & RS_CPU_FLAG_SSE2) && !t->dcp->read_out_curve) { - if (FALSE && (rs_detect_cpu_features() & RS_CPU_FLAG_AVX) && render_AVX(t)) + if ((rs_detect_cpu_features() & RS_CPU_FLAG_AVX) && render_AVX(t)) { /* AVX routine renders 4 pixels in parallel, but any remaining must be */ /* calculated using C routines */ From klauspost at gmail.com Fri Feb 17 18:12:14 2012 From: klauspost at gmail.com (Klaus Post) Date: Fri, 17 Feb 2012 18:12:14 +0100 Subject: [Rawstudio-commit] r4135 - trunk/librawstudio Message-ID: Author: post Date: 2012-02-17 18:12:14 +0100 (Fri, 17 Feb 2012) New Revision: 4135 Modified: trunk/librawstudio/rs-output.c Log: Fix warnings (const to non-const cast) Modified: trunk/librawstudio/rs-output.c =================================================================== --- trunk/librawstudio/rs-output.c 2012-02-16 18:07:44 UTC (rev 4134) +++ trunk/librawstudio/rs-output.c 2012-02-17 17:12:14 UTC (rev 4135) @@ -276,7 +276,7 @@ { GtkWidget *cs_widget = rs_color_space_selector_new(); GtkWidget *label = gtk_label_new(g_param_spec_get_blurb(specs[i])); - g_object_set_data(G_OBJECT(cs_widget), "spec-name", specs[i]->name); + g_object_set_data(G_OBJECT(cs_widget), "spec-name", (gpointer)specs[i]->name); g_object_set_data_full(G_OBJECT(cs_widget), "conf-path", confpath, g_free); rs_color_space_selector_add_all(RS_COLOR_SPACE_SELECTOR(cs_widget)); @@ -310,7 +310,7 @@ widget = gtk_check_button_new_with_label(g_param_spec_get_blurb(specs[i])); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), boolean); - g_object_set_data(G_OBJECT(widget), "spec-name", specs[i]->name); + g_object_set_data(G_OBJECT(widget), "spec-name", (gpointer)specs[i]->name); g_object_set_data_full(G_OBJECT(widget), "conf-path", confpath, g_free); g_signal_connect(widget, "toggled", G_CALLBACK(boolean_changed), output); break; @@ -332,7 +332,7 @@ (gdouble) (((GParamSpecInt*)specs[i])->minimum), (gdouble) (((GParamSpecInt*)specs[i])->maximum), 1.0, 10.0, 0.0); - g_object_set_data(G_OBJECT(adj), "spec-name", specs[i]->name); + g_object_set_data(G_OBJECT(adj), "spec-name", (gpointer)specs[i]->name); g_object_set_data_full(G_OBJECT(adj), "conf-path", confpath, g_free); g_signal_connect(adj, "value-changed", G_CALLBACK(integer_changed), output); @@ -365,7 +365,7 @@ g_free(str); } - g_object_set_data(G_OBJECT(entry), "spec-name", specs[i]->name); + g_object_set_data(G_OBJECT(entry), "spec-name", (gpointer)specs[i]->name); g_object_set_data_full(G_OBJECT(entry), "conf-path", confpath, g_free); g_signal_connect(entry, "changed", G_CALLBACK(string_changed), output); From klauspost at gmail.com Fri Feb 17 18:12:49 2012 From: klauspost at gmail.com (Klaus Post) Date: Fri, 17 Feb 2012 18:12:49 +0100 Subject: [Rawstudio-commit] r4136 - trunk/librawstudio Message-ID: Author: post Date: 2012-02-17 18:12:48 +0100 (Fri, 17 Feb 2012) New Revision: 4136 Modified: trunk/librawstudio/rs-tiff.c Log: Return actual return values. Modified: trunk/librawstudio/rs-tiff.c =================================================================== --- trunk/librawstudio/rs-tiff.c 2012-02-17 17:12:14 UTC (rev 4135) +++ trunk/librawstudio/rs-tiff.c 2012-02-17 17:12:48 UTC (rev 4136) @@ -145,7 +145,7 @@ break; } - return TRUE; + return ret; } static gboolean @@ -163,7 +163,7 @@ ret = FALSE; } - return RS_TIFF_GET_CLASS(tiff)->read_file_header(tiff); + return ret && RS_TIFF_GET_CLASS(tiff)->read_file_header(tiff); } RSTiff * From klauspost at gmail.com Fri Feb 17 18:14:05 2012 From: klauspost at gmail.com (Klaus Post) Date: Fri, 17 Feb 2012 18:14:05 +0100 Subject: [Rawstudio-commit] r4137 - trunk/src Message-ID: Author: post Date: 2012-02-17 18:14:05 +0100 (Fri, 17 Feb 2012) New Revision: 4137 Modified: trunk/src/rs-dir-selector.c trunk/src/rs-histogram.c trunk/src/rs-pixbuf.c trunk/src/rs-store.c Log: Remove unused variables. Modified: trunk/src/rs-dir-selector.c =================================================================== --- trunk/src/rs-dir-selector.c 2012-02-17 17:12:48 UTC (rev 4136) +++ trunk/src/rs-dir-selector.c 2012-02-17 17:14:05 UTC (rev 4137) @@ -56,11 +56,6 @@ static void rs_dir_selector_class_init(RSDirSelectorClass *klass) { - GtkWidgetClass *widget_class; - GtkObjectClass *object_class; - widget_class = GTK_WIDGET_CLASS(klass); - object_class = GTK_OBJECT_CLASS(klass); - signals[DIRECTORY_ACTIVATED_SIGNAL] = g_signal_new ("directory-activated", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, Modified: trunk/src/rs-histogram.c =================================================================== --- trunk/src/rs-histogram.c 2012-02-17 17:12:48 UTC (rev 4136) +++ trunk/src/rs-histogram.c 2012-02-17 17:14:05 UTC (rev 4137) @@ -56,9 +56,7 @@ rs_histogram_widget_class_init(RSHistogramWidgetClass *klass) { GtkWidgetClass *widget_class; - GtkObjectClass *object_class; widget_class = GTK_WIDGET_CLASS(klass); - object_class = GTK_OBJECT_CLASS(klass); widget_class->expose_event = expose; } Modified: trunk/src/rs-pixbuf.c =================================================================== --- trunk/src/rs-pixbuf.c 2012-02-17 17:12:48 UTC (rev 4136) +++ trunk/src/rs-pixbuf.c 2012-02-17 17:14:05 UTC (rev 4137) @@ -22,7 +22,6 @@ void rs_pixbuf_draw_hline(GdkPixbuf *pixbuf, guint x, guint y, guint length, guint R, guint G, guint B, guint A) { - gint width, height; guint rowstride; guchar *pixels; gint channels; @@ -30,8 +29,6 @@ rowstride = gdk_pixbuf_get_rowstride (pixbuf); pixels = gdk_pixbuf_get_pixels (pixbuf); - width = gdk_pixbuf_get_width (pixbuf); - height = gdk_pixbuf_get_height (pixbuf); channels = gdk_pixbuf_get_n_channels (pixbuf); for (i = x*channels; i < (length+x)*channels; i+=channels) @@ -47,7 +44,6 @@ void rs_pixbuf_draw_vline(GdkPixbuf *pixbuf, guint x, guint y, guint length, guint R, guint G, guint B, guint A) { - gint width, height; guint rowstride; guchar *pixels; gint channels; @@ -55,8 +51,6 @@ rowstride = gdk_pixbuf_get_rowstride (pixbuf); pixels = gdk_pixbuf_get_pixels (pixbuf); - width = gdk_pixbuf_get_width (pixbuf); - height = gdk_pixbuf_get_height (pixbuf); channels = gdk_pixbuf_get_n_channels (pixbuf); for (i = y; i < y+length; i++) Modified: trunk/src/rs-store.c =================================================================== --- trunk/src/rs-store.c 2012-02-17 17:12:48 UTC (rev 4136) +++ trunk/src/rs-store.c 2012-02-17 17:14:05 UTC (rev 4137) @@ -183,10 +183,6 @@ static void rs_store_class_init(RSStoreClass *klass) { - GtkWidgetClass *widget_class; - GtkObjectClass *object_class; - widget_class = GTK_WIDGET_CLASS(klass); - object_class = GTK_OBJECT_CLASS(klass); signals[THUMB_ACTIVATED_SIGNAL] = g_signal_new ("thumb-activated", G_TYPE_FROM_CLASS (klass), @@ -382,7 +378,7 @@ if (! ((event->state & GDK_CONTROL_MASK) || ((event->state & GDK_SHIFT_MASK)))) { event->button = 1; - GdkEvent *copy = gdk_event_copy(event); + GdkEvent *copy = gdk_event_copy((GdkEvent*)event); gdk_event_put(copy); GTK_CATCHUP(); gdk_event_free(copy); @@ -1732,14 +1728,11 @@ gchar * rs_store_get_name(RSStore *store, GtkTreeIter *iter) { - GtkTreeModel *model; gchar *fullname = NULL; g_assert(RS_IS_STORE(store)); g_assert(iter != NULL); - model = gtk_icon_view_get_model (GTK_ICON_VIEW(store->current_iconview)); - gtk_tree_model_get(GTK_TREE_MODEL(store->store), iter, FULLNAME_COLUMN, &fullname, -1); return(fullname); @@ -2114,21 +2107,10 @@ cairo_surface_destroy(surface); #else - - guint rowstride; - guchar *pixels; - gint channels; - gint new_width, new_height; GdkPixbuf *pixbuf_scaled; width -= 6; height -= 6; - - rowstride = gdk_pixbuf_get_rowstride (new_pixbuf); - pixels = gdk_pixbuf_get_pixels (new_pixbuf); - new_width = gdk_pixbuf_get_width (new_pixbuf); - new_height = gdk_pixbuf_get_height (new_pixbuf); - channels = gdk_pixbuf_get_n_channels (new_pixbuf); // draw horizontal lines rs_pixbuf_draw_hline(new_pixbuf, 0, 0, width+2, 0x00, 0x00, 0x00, 0xFF); From klauspost at gmail.com Fri Feb 17 20:36:23 2012 From: klauspost at gmail.com (Klaus Post) Date: Fri, 17 Feb 2012 20:36:23 +0100 Subject: [Rawstudio-commit] r4138 - trunk/plugins/dcp Message-ID: Author: post Date: 2012-02-17 20:36:23 +0100 (Fri, 17 Feb 2012) New Revision: 4138 Modified: trunk/plugins/dcp/dcp.c Log: Add recursive lock to DCP to avoid clashes between new settings (profiles) and rendering thread. Modified: trunk/plugins/dcp/dcp.c =================================================================== --- trunk/plugins/dcp/dcp.c 2012-02-17 17:14:05 UTC (rev 4137) +++ trunk/plugins/dcp/dcp.c 2012-02-17 19:36:23 UTC (rev 4138) @@ -51,6 +51,7 @@ static void free_dcp_profile(RSDcp *dcp); static void set_prophoto_wb(RSDcp *dcp, gfloat warmth, gfloat tint); static void calculate_huesat_maps(RSDcp *dcp, gfloat temp); +static GStaticRecMutex dcp_mutex = G_STATIC_REC_MUTEX_INIT; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) @@ -289,7 +290,9 @@ } if (changed) + { rs_filter_changed(RS_FILTER(dcp), RS_FILTER_CHANGED_PIXELDATA); + } } /* This will free all ressources that are related to a DCP profile */ @@ -411,6 +414,7 @@ RSDcp *dcp = RS_DCP(object); RSFilter *filter = RS_FILTER(dcp); gpointer temp; + gboolean changed = FALSE; switch (property_id) { @@ -431,33 +435,39 @@ g_object_weak_ref(G_OBJECT(dcp->settings), settings_weak_notify, dcp); break; case PROP_PROFILE: + g_static_rec_mutex_lock(&dcp_mutex); read_profile(dcp, g_value_get_object(value)); precalc(dcp); - rs_filter_changed(filter, RS_FILTER_CHANGED_PIXELDATA); + changed = TRUE; + g_static_rec_mutex_unlock(&dcp_mutex); break; case PROP_READ_OUT_CURVE: temp = g_value_get_object(value); if (temp != dcp->read_out_curve) - rs_filter_changed(RS_FILTER(dcp), RS_FILTER_CHANGED_PIXELDATA); + changed = TRUE; dcp->read_out_curve = temp; break; case PROP_USE_PROFILE: + g_static_rec_mutex_lock(&dcp_mutex); dcp->use_profile = g_value_get_boolean(value); if (!dcp->use_profile) free_dcp_profile(dcp); else precalc(dcp); break; + g_static_rec_mutex_unlock(&dcp_mutex); default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } + + if (changed) + rs_filter_changed(filter, RS_FILTER_CHANGED_PIXELDATA); } static void settings_weak_notify(gpointer data, GObject *where_the_object_was) { RSDcp *dcp = RS_DCP(data); - dcp->settings = NULL; } @@ -589,6 +599,7 @@ rs_filter_response_set_image(response, output); g_object_unref(output); + g_static_rec_mutex_lock(&dcp_mutex); init_exposure(dcp); guint i, y_offset, y_per_thread, threaded_h; @@ -624,6 +635,9 @@ for(i = 0; threads > 1 && i < threads; i++) g_thread_join(t[i].threadid); + /* Settings can change now */ + g_static_rec_mutex_unlock(&dcp_mutex); + /* If we must deliver histogram data, do it now */ if (dcp->read_out_curve) { @@ -1435,13 +1449,14 @@ }}; /* Camera to ProPhoto */ + g_static_rec_mutex_lock(&dcp_mutex); if (dcp->use_profile) matrix3_multiply(&xyz_to_prophoto, &dcp->camera_to_pcs, &dcp->camera_to_prophoto); /* verified by SDK */ if (dcp->huesatmap) calc_hsm_constants(dcp->huesatmap, dcp->huesatmap_precalc); if (dcp->looktable) calc_hsm_constants(dcp->looktable, dcp->looktable_precalc); - + g_static_rec_mutex_unlock(&dcp_mutex); } static void From klauspost at gmail.com Fri Feb 17 23:00:57 2012 From: klauspost at gmail.com (Klaus Post) Date: Fri, 17 Feb 2012 23:00:57 +0100 Subject: [Rawstudio-commit] r4139 - trunk/pixmaps Message-ID: Author: post Date: 2012-02-17 23:00:57 +0100 (Fri, 17 Feb 2012) New Revision: 4139 Modified: trunk/pixmaps/rawstudio.png Log: Update icon to 96x96 pixels. Modified: trunk/pixmaps/rawstudio.png =================================================================== (Binary files differ) From klauspost at gmail.com Fri Feb 17 23:32:25 2012 From: klauspost at gmail.com (Klaus Post) Date: Fri, 17 Feb 2012 23:32:25 +0100 Subject: [Rawstudio-commit] r4140 - trunk/src Message-ID: Author: post Date: 2012-02-17 23:32:25 +0100 (Fri, 17 Feb 2012) New Revision: 4140 Modified: trunk/src/rs-actions.c Log: Make failures on export more visible Modified: trunk/src/rs-actions.c =================================================================== --- trunk/src/rs-actions.c 2012-02-17 22:00:57 UTC (rev 4139) +++ trunk/src/rs-actions.c 2012-02-17 22:32:25 UTC (rev 4140) @@ -250,7 +250,7 @@ if (FALSE == g_file_test(parsed_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) if (g_mkdir_with_parents(parsed_dir, 0x1ff)) { - gui_status_notify(_("Could not create output directory.")); + gui_status_error(_("Could not create output directory.")); return; } @@ -267,7 +267,7 @@ g_free(status); } else - gui_status_notify(_("Export failed")); + gui_status_error(_("Export failed")); gui_status_pop(msg); gui_set_busy(FALSE); @@ -290,7 +290,7 @@ gtk_widget_show(GTK_WIDGET(dialog)); } else - gui_status_notify(_("Export failed")); + gui_status_error(_("Export failed")); } ACTION(export_to_gimp) From klauspost at gmail.com Fri Feb 17 23:33:03 2012 From: klauspost at gmail.com (Klaus Post) Date: Fri, 17 Feb 2012 23:33:03 +0100 Subject: [Rawstudio-commit] r4141 - trunk/src Message-ID: Author: post Date: 2012-02-17 23:33:03 +0100 (Fri, 17 Feb 2012) New Revision: 4141 Modified: trunk/src/rs-tethered-shooting.c Log: Unlock gdk thread while waiting for Quick Export to finish Modified: trunk/src/rs-tethered-shooting.c =================================================================== --- trunk/src/rs-tethered-shooting.c 2012-02-17 22:32:25 UTC (rev 4140) +++ trunk/src/rs-tethered-shooting.c 2012-02-17 22:33:03 UTC (rev 4141) @@ -582,10 +582,12 @@ GTK_CATCHUP(); if (quick_export) { + gdk_threads_unlock(); /* Lets just make sure we aren't ahead by more than 1 image */ while (NULL != t->rs->post_open_event) g_usleep(100*1000); t->rs->post_open_event = "QuickExport"; + gdk_threads_lock(); } g_free(tmp_name_ptr); From klauspost at gmail.com Fri Feb 17 23:45:57 2012 From: klauspost at gmail.com (Klaus Post) Date: Fri, 17 Feb 2012 23:45:57 +0100 Subject: [Rawstudio-commit] r4142 - trunk/src Message-ID: Author: post Date: 2012-02-17 23:45:57 +0100 (Fri, 17 Feb 2012) New Revision: 4142 Modified: trunk/src/rs-tethered-shooting.c Log: Allow next image to export while downloading next image from camera. Modified: trunk/src/rs-tethered-shooting.c =================================================================== --- trunk/src/rs-tethered-shooting.c 2012-02-17 22:33:03 UTC (rev 4141) +++ trunk/src/rs-tethered-shooting.c 2012-02-17 22:45:57 UTC (rev 4142) @@ -501,6 +501,11 @@ CHECKRETVAL(retval); retval = gp_camera_file_delete(t->camera, camera_file_path->folder, camera_file_path->name, t->context); CHECKRETVAL(retval); + + /* Be sure there isn't a quick export still running */ + while (NULL != t->rs->post_open_event) + g_usleep(100*1000); + gdk_threads_lock(); /* Copy settings */ @@ -579,16 +584,8 @@ if (minimize) gtk_window_iconify(GTK_WINDOW(t->window)); - GTK_CATCHUP(); if (quick_export) - { - gdk_threads_unlock(); - /* Lets just make sure we aren't ahead by more than 1 image */ - while (NULL != t->rs->post_open_event) - g_usleep(100*1000); t->rs->post_open_event = "QuickExport"; - gdk_threads_lock(); - } g_free(tmp_name_ptr); return GP_OK; From klauspost at gmail.com Sat Feb 18 02:43:58 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 18 Feb 2012 02:43:58 +0100 Subject: [Rawstudio-commit] r4143 - trunk/plugins/dcp Message-ID: Author: post Date: 2012-02-18 02:43:58 +0100 (Sat, 18 Feb 2012) New Revision: 4143 Modified: trunk/plugins/dcp/dcp.c Log: Release lock after profile change Modified: trunk/plugins/dcp/dcp.c =================================================================== --- trunk/plugins/dcp/dcp.c 2012-02-17 22:45:57 UTC (rev 4142) +++ trunk/plugins/dcp/dcp.c 2012-02-18 01:43:58 UTC (rev 4143) @@ -454,8 +454,8 @@ free_dcp_profile(dcp); else precalc(dcp); + g_static_rec_mutex_unlock(&dcp_mutex); break; - g_static_rec_mutex_unlock(&dcp_mutex); default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } From klauspost at gmail.com Sat Feb 18 11:21:44 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 18 Feb 2012 11:21:44 +0100 Subject: [Rawstudio-commit] r4144 - in trunk: . librawstudio plugins/colorspace-transform plugins/load-dcraw plugins/load-gdk plugins/meta-x3f src Message-ID: Author: post Date: 2012-02-18 11:21:44 +0100 (Sat, 18 Feb 2012) New Revision: 4144 Modified: trunk/configure.in trunk/librawstudio/rs-settings.c trunk/plugins/colorspace-transform/Makefile.am trunk/plugins/colorspace-transform/rs-cmm.c trunk/plugins/load-dcraw/Makefile.am trunk/plugins/load-dcraw/dcraw.cc trunk/plugins/load-gdk/Makefile.am trunk/plugins/load-gdk/load-gdk.c trunk/plugins/meta-x3f/x3f-meta.c trunk/src/application.c trunk/src/rs-cache.c trunk/src/rs-preview-widget.c trunk/src/rs-preview-widget.h Log: Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/configure.in 2012-02-18 10:21:44 UTC (rev 4144) @@ -100,9 +100,9 @@ AC_SUBST(LENSFUN_CFLAGS) AC_SUBST(LENSFUN_LIBS) -PKG_CHECK_MODULES(LCMS, [lcms]) -AC_SUBST(LCMS_CFLAGS) -AC_SUBST(LCMS_LIBS) +PKG_CHECK_MODULES(LCMS2, [lcms2]) +AC_SUBST(LCMS2_CFLAGS) +AC_SUBST(LCMS2_LIBS) PKG_CHECK_MODULES(LIBGPHOTO2, [libgphoto2]) AC_SUBST(LIBGPHOTO2_CFLAGS) Modified: trunk/librawstudio/rs-settings.c =================================================================== --- trunk/librawstudio/rs-settings.c 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/librawstudio/rs-settings.c 2012-02-18 10:21:44 UTC (rev 4144) @@ -115,7 +115,7 @@ PROP_DCP_TEMP, g_param_spec_float( /* @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! */ "dcp-temp", _("Temp"), _("Temperature"), - 2000.0, 12000.0, 5000.0, G_PARAM_READWRITE) + 1700.0, 60000.0, 5000.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_DCP_TINT, g_param_spec_float( Modified: trunk/plugins/colorspace-transform/Makefile.am =================================================================== --- trunk/plugins/colorspace-transform/Makefile.am 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/plugins/colorspace-transform/Makefile.am 2012-02-18 10:21:44 UTC (rev 4144) @@ -9,7 +9,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS_CFLAGS@ \ + @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -17,7 +17,7 @@ libdir = $(datadir)/rawstudio/plugins/ -colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ colorspace_transform_avx.lo colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo +colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ colorspace_transform_avx.lo colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo colorspace_transform_la_LDFLAGS = -module -avoid-version colorspace_transform_la_SOURCES = Modified: trunk/plugins/colorspace-transform/rs-cmm.c =================================================================== --- trunk/plugins/colorspace-transform/rs-cmm.c 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/plugins/colorspace-transform/rs-cmm.c 2012-02-18 10:21:44 UTC (rev 4144) @@ -17,7 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include +#include +#include #include "rs-cmm.h" static gushort gammatable22[65536]; @@ -41,6 +43,7 @@ cmsHTRANSFORM lcms_transform8; cmsHTRANSFORM lcms_transform16; const GdkRectangle *roi; + gboolean is_gamma_corrected; }; G_DEFINE_TYPE (RSCmm, rs_cmm, G_TYPE_OBJECT) @@ -170,29 +173,59 @@ gushort *in = GET_PIXEL(input, start_x, y); gushort *out = GET_PIXEL(output, start_x, y); gushort *buffer_pointer = buffer; - for(x=start_x; xis_gamma_corrected) { - register gfloat r = (gfloat) MIN(*in, cmm->clip[R]); in++; - register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; - register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; - in++; + for(x=start_x; xclip[R]); in++; + register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; + register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; + in++; - r = MIN(r, cmm->clip[R]); - g = MIN(g, cmm->clip[G]); - b = MIN(b, cmm->clip[B]); + r = MIN(r, cmm->clip[R]); + g = MIN(g, cmm->clip[G]); + b = MIN(b, cmm->clip[B]); - r = r * cmm->premul[R]; - g = g * cmm->premul[G]; - b = b * cmm->premul[B]; + r = r * cmm->premul[R]; + g = g * cmm->premul[G]; + b = b * cmm->premul[B]; - r = MIN(r, 65535.0); - g = MIN(g, 65535.0); - b = MIN(b, 65535.0); + r = MIN(r, 65535.0); + g = MIN(g, 65535.0); + b = MIN(b, 65535.0); - *(buffer_pointer++) = (gushort) r; - *(buffer_pointer++) = (gushort) g; - *(buffer_pointer++) = (gushort) b; - buffer_pointer++; + *(buffer_pointer++) = gammatable22[(gushort) r]; + *(buffer_pointer++) = gammatable22[(gushort) g]; + *(buffer_pointer++) = gammatable22[(gushort) b]; + buffer_pointer++; + } + } + else + { + for(x=start_x; xclip[R]); in++; + register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; + register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; + in++; + + r = MIN(r, cmm->clip[R]); + g = MIN(g, cmm->clip[G]); + b = MIN(b, cmm->clip[B]); + + r = r * cmm->premul[R]; + g = g * cmm->premul[G]; + b = b * cmm->premul[B]; + + r = MIN(r, 65535.0); + g = MIN(g, 65535.0); + b = MIN(b, 65535.0); + + *(buffer_pointer++) = (gushort) r; + *(buffer_pointer++) = (gushort) g; + *(buffer_pointer++) = (gushort) b; + buffer_pointer++; + } } cmsDoTransform(cmm->lcms_transform16, buffer, out, w); } @@ -218,8 +251,9 @@ guchar *out = GET_PIXBUF_PIXEL(output, start_x, y); cmsDoTransform(cmm->lcms_transform8, in, out, w); /* Set alpha */ + guint *outi = (guint*) out; for (i = 0; i < w; i++) - out[i*4+3] = 0xff; + outi[i] &= 0xff000000; } } @@ -285,9 +319,9 @@ g_free(t); } - +#if 0 static guchar * -pack_rgb_w4(void *info, register WORD wOut[], register LPBYTE output) +pack_rgb_w4(void *info, register cmsUInt16Number wOut[], register LPBYTE output) { *(LPWORD) output = wOut[0]; output+= 2; *(LPWORD) output = wOut[1]; output+= 2; @@ -315,7 +349,7 @@ return(accum); } - +#endif static void load_profile(RSCmm *cmm, const RSIccProfile *profile, const RSIccProfile **profile_target, cmsHPROFILE *lcms_target) { @@ -399,10 +433,11 @@ {0.115, 0.826, 0.724938}, {0.157, 0.018, 0.016875}}; cmsCIExyY D65; - LPGAMMATABLE gamma[3]; + cmsToneCurve* gamma[3]; + gint context = 1337; - cmsWhitePointFromTemp(6504, &D65); - gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(2,1.0); + cmsWhitePointFromTemp(&D65, 6504); + gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(&context,1.0); linear = cmsCreateRGBProfile(&D65, &srgb_primaries, gamma); } g_mutex_unlock(is_profile_gamma_22_corrected_linear_lock); @@ -436,15 +471,17 @@ cmsDeleteTransform(cmm->lcms_transform16); cmm->lcms_transform16 = cmsCreateTransform( - cmm->lcms_input_profile, TYPE_RGB_16, - cmm->lcms_output_profile, TYPE_RGB_16, - INTENT_PERCEPTUAL, 0); + cmm->lcms_input_profile, TYPE_RGBA_16, + cmm->lcms_output_profile, TYPE_RGBA_16, + INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE); g_warn_if_fail(cmm->lcms_transform16 != NULL); /* Enable packing/unpacking for pixelsize==4 */ /* If we estimate that the input profile will apply gamma correction, we try to undo it in 16 bit transform */ + cmm->is_gamma_corrected = is_profile_gamma_22_corrected(cmm->lcms_input_profile); +/* if (is_profile_gamma_22_corrected(cmm->lcms_input_profile)) cmsSetUserFormatters(cmm->lcms_transform16, TYPE_RGB_16, unroll_rgb_w4_gammatable22, @@ -453,6 +490,6 @@ cmsSetUserFormatters(cmm->lcms_transform16, TYPE_RGB_16, unroll_rgb_w4, TYPE_RGB_16, pack_rgb_w4); - +*/ cmm->dirty16 = FALSE; } Modified: trunk/plugins/load-dcraw/Makefile.am =================================================================== --- trunk/plugins/load-dcraw/Makefile.am 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/plugins/load-dcraw/Makefile.am 2012-02-18 10:21:44 UTC (rev 4144) @@ -12,7 +12,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS_CFLAGS@\ + @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@\ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -20,6 +20,6 @@ libdir = $(datadir)/rawstudio/plugins/ -load_dcraw_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ +load_dcraw_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ load_dcraw_la_LDFLAGS = -module -avoid-version load_dcraw_la_SOURCES = dcrawloader.c dcraw.cc dcraw.h dcraw_api.cc dcraw_api.h mmap-hack.c mmap-hack.h Modified: trunk/plugins/load-dcraw/dcraw.cc =================================================================== --- trunk/plugins/load-dcraw/dcraw.cc 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/plugins/load-dcraw/dcraw.cc 2012-02-18 10:21:44 UTC (rev 4144) @@ -62,7 +62,7 @@ NO_LCMS disables the "-p" option. */ #ifndef NO_LCMS -#include +#include #endif #ifdef HAVE_LIBJPEG extern "C" { @@ -5040,8 +5040,10 @@ double cc[4][4], cm[4][3], cam_xyz[4][3], num; double ab[]={ 1,1,1,1 }, asn[] = { 0,0,0,0 }, xyz[] = { 1,1,1 }; int sony_curve[] = { 0,0,0,0,0,4095 }; +#ifndef WITH_MMAP_HACK unsigned sony_offset=0, sony_length=0, sony_key=0; - struct jhead jh; +#endif + struct jhead jh; #ifndef WITH_MMAP_HACK unsigned *buf; FILE *sfp; @@ -5206,10 +5208,12 @@ for (j = sony_curve[i]+1; j <= sony_curve[i+1]; j++) curve[j] = curve[j-1] + (1 << i); break; +#ifndef WITH_MMAP_HACK case 29184: sony_offset = get4(); break; case 29185: sony_length = get4(); break; case 29217: sony_key = get4(); break; - case 29264: +#endif + case 29264: parse_minolta (ftell(ifp)); raw_width = 0; break; @@ -8576,7 +8580,7 @@ FILE *fp; unsigned size; - cmsErrorAction (LCMS_ERROR_SHOW); +// cmsErrorAction (LCMS_ERROR_SHOW); if (strcmp (input, "embed")) hInProfile = cmsOpenProfileFromFile (input, "r"); else if (profile_length) { Modified: trunk/plugins/load-gdk/Makefile.am =================================================================== --- trunk/plugins/load-gdk/Makefile.am 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/plugins/load-gdk/Makefile.am 2012-02-18 10:21:44 UTC (rev 4144) @@ -9,7 +9,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS_CFLAGS@ @EXIV2_CFLAGS@ \ + @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@ @EXIV2_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -17,6 +17,6 @@ libdir = $(datadir)/rawstudio/plugins/ -load_gdk_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ @EXIV2_LIBS@ @LIBJPEG@ +load_gdk_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ @EXIV2_LIBS@ @LIBJPEG@ load_gdk_la_LDFLAGS = -module -avoid-version load_gdk_la_SOURCES = load-gdk.c exiv2-colorspace.cpp exiv2-colorspace.h Modified: trunk/plugins/load-gdk/load-gdk.c =================================================================== --- trunk/plugins/load-gdk/load-gdk.c 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/plugins/load-gdk/load-gdk.c 2012-02-18 10:21:44 UTC (rev 4144) @@ -20,7 +20,7 @@ #include #include /* pow() */ #include "exiv2-colorspace.h" -#include +#include /** @@ -56,15 +56,15 @@ cmsHPROFILE *lcms_target = cmsOpenProfileFromMem(data, length); if (lcms_target) { - LPGAMMATABLE curve = NULL; - if (cmsIsTag(lcms_target, icSigGrayTRCTag)) - curve = cmsReadICCGamma(lcms_target, icSigGrayTRCTag); + cmsToneCurve *curve = NULL; + if (cmsIsTag(lcms_target, cmsSigGrayTRCTag)) + curve = cmsReadTag(lcms_target, cmsSigGrayTRCTag); - if (NULL== curve && cmsIsTag(lcms_target, icSigRedTRCTag)) - curve = cmsReadICCGamma(lcms_target, icSigRedTRCTag); + if (NULL== curve && cmsIsTag(lcms_target, cmsSigRedTRCTag)) + curve = cmsReadTag(lcms_target, cmsSigRedTRCTag); if (curve) { - double gamma = cmsEstimateGamma(curve); + double gamma = cmsEstimateGamma(curve, 0.01); if (gamma>0.0) gamma_guess = gamma; } Modified: trunk/plugins/meta-x3f/x3f-meta.c =================================================================== --- trunk/plugins/meta-x3f/x3f-meta.c 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/plugins/meta-x3f/x3f-meta.c 2012-02-18 10:21:44 UTC (rev 4144) @@ -15,6 +15,13 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * * 2011-09 + * * T?m Merlant : + * * - Added thumbnailing and properties extraction for SD15, DP1, DP2 and SD1 + * * - Modified the way the embedded thumbnails were found + * * - Made sure we load the embedded thumbnail and not the fullsize preview + * */ #include @@ -39,10 +46,16 @@ typedef enum x3f_data_format { X3F_DATA_FORMAT_UNCOMPRESSED = 3, + X3F_DATA_FORMAT_HUFFMAN_WITH_TABLE = 6, X3F_DATA_FORMAT_HUFFMAN = 11, X3F_DATA_FORMAT_JPEG = 18, } X3F_DATA_FORMAT; +typedef enum x3f_type_of_image_data { + X3F_DATA_TYPE_PROCESSED = 2, + X3F_DATA_TYPE_RAW = 3, +} X3F_TYPE_OF_IMAGE_DATA; + /* * These structs is mostly used to define the file format - they can not * be directly mapped to file because of endian differences on some platforms @@ -108,6 +121,29 @@ guint value_offset; /* offset from start of CHARACTER data */ } __attribute__ ((packed)) X3F_PROPERTY_ENTRY; + +static GdkPixbuf * +jpeg_load (guchar *content, gsize length) +{ + GdkPixbufLoader *pl; + GdkPixbuf *pixbuf = NULL; + gboolean cont = TRUE; /* Are we good to continue? */ + gint pos = 0; + + pl = gdk_pixbuf_loader_new(); + while((length > 100000) && cont) + { + cont = gdk_pixbuf_loader_write(pl, &content[pos], 80000, NULL); + length -= 80000; + pos += 80000; + } + if (cont) + gdk_pixbuf_loader_write(pl, &content[pos], length, NULL); + pixbuf = gdk_pixbuf_loader_get_pixbuf(pl); + gdk_pixbuf_loader_close(pl, NULL); + return(pixbuf); +} + static gboolean x3f_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { @@ -115,10 +151,12 @@ X3F_FILE file; X3F_DIRECTORY_SECTION directory; X3F_DIRECTORY_ENTRY directory_entry; - X3F_IMAGE_DATA image_data; - guint start=0, width=0, height=0, rowstride=0; + guint start=0, width=0, height=0, rowstride=0, length=0; + X3F_TYPE_OF_IMAGE_DATA type_of_image_data; + X3F_DATA_FORMAT data_format; GdkPixbuf *pixbuf = NULL, *pixbuf2 = NULL; gdouble ratio=1.0; + gboolean thumb_ok=FALSE, prop_ok=FALSE; /* Check if this is infact a Sigma-file */ if (!raw_strcmp(rawfile, G_STRUCT_OFFSET(X3F_FILE, identifier), "FOVb", 4)) @@ -178,22 +216,33 @@ file.directory_start+G_STRUCT_OFFSET(X3F_DIRECTORY_SECTION, number_of_entries), &directory.number_of_entries); - for(i=0;i=0;i--) { gint offset = file.directory_start + sizeof(X3F_DIRECTORY_SECTION) + i * sizeof(X3F_DIRECTORY_ENTRY); raw_get_uint(rawfile, offset+G_STRUCT_OFFSET(X3F_DIRECTORY_ENTRY, offset), &directory_entry.offset); - raw_get_uint(rawfile, offset+G_STRUCT_OFFSET(X3F_DIRECTORY_ENTRY, length), &directory_entry.length); - - if (raw_strcmp(rawfile, offset+G_STRUCT_OFFSET(X3F_DIRECTORY_ENTRY, type), "IMA", 3)) + if (raw_strcmp(rawfile, offset+G_STRUCT_OFFSET(X3F_DIRECTORY_ENTRY, type), "IMA", 3) && !thumb_ok) { /* Image Data */ - raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, data_format), &image_data.data_format); - if (image_data.data_format == X3F_DATA_FORMAT_UNCOMPRESSED) + raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, type_of_image_data), &type_of_image_data); + if (type_of_image_data == X3F_DATA_TYPE_PROCESSED) { - start = directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, image_data); raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, columns), &width); - raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, rows), &height); - raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, rowstride), &rowstride); + if (width < 500) /* assume thumbnails are always less than 500pixels wide */ + { + raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, data_format), &data_format); + raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, rows), &height); + raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, rowstride), &rowstride); + raw_get_uint(rawfile, directory_entry.offset+G_STRUCT_OFFSET(X3F_DIRECTORY_ENTRY, length), &length); + start = directory_entry.offset+G_STRUCT_OFFSET(X3F_IMAGE_DATA, image_data); + if (data_format == X3F_DATA_FORMAT_UNCOMPRESSED) + pixbuf = gdk_pixbuf_new_from_data(raw_get_map(rawfile)+start, GDK_COLORSPACE_RGB, FALSE, 8, + width, height, rowstride, NULL, NULL); + else if (data_format == X3F_DATA_FORMAT_JPEG) + pixbuf = jpeg_load (raw_get_map(rawfile)+start, length-28); + thumb_ok = (NULL != pixbuf); + } } } else if (raw_strcmp(rawfile, offset+G_STRUCT_OFFSET(X3F_DIRECTORY_ENTRY, type), "PROP", 4)) @@ -244,7 +293,7 @@ } else if (g_str_equal(name, "CAMMODEL")) meta->model_ascii = g_strdup(value); - else if (g_str_equal(name, "APERTURE")) /* Example: 8.000 */ + else if (g_str_equal(name, "AP_DESC")) /* Example: 8.000 */ meta->aperture = rs_atof(value); else if (g_str_equal(name, "SH_DESC")) /* Example: 1/60 */ { @@ -264,16 +313,14 @@ g_free(name); if (value) g_free(value); + } + prop_ok=TRUE; } } } } } - if (width > 0) - pixbuf = gdk_pixbuf_new_from_data(raw_get_map(rawfile)+start, GDK_COLORSPACE_RGB, FALSE, 8, - width, height, rowstride, NULL, NULL); - if (pixbuf) { if (file.rotation > 0) Modified: trunk/src/application.c =================================================================== --- trunk/src/application.c 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/src/application.c 2012-02-18 10:21:44 UTC (rev 4144) @@ -72,6 +72,7 @@ { g_assert(rs != NULL); + rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); /* Unref old photo if any */ if (rs->photo) g_object_unref(rs->photo); @@ -92,6 +93,7 @@ g_signal_connect(G_OBJECT(rs->photo), "spatial-changed", G_CALLBACK(photo_spatial_changed), rs); g_signal_connect(G_OBJECT(rs->photo), "profile-changed", G_CALLBACK(photo_profile_changed), rs); } + rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); } static void @@ -99,12 +101,14 @@ { if (photo == rs->photo) { +// rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); /* Update crop and rotate filters */ rs_filter_set_recursive(rs->filter_end, "rectangle", rs_photo_get_crop(photo), "angle", rs_photo_get_angle(photo), "orientation", rs->photo->orientation, NULL); +// rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); } } @@ -114,6 +118,7 @@ { if (photo == rs->photo) { +// rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); if (RS_IS_ICC_PROFILE(profile)) { RSColorSpace *cs = rs_color_space_icc_new_from_icc(profile); @@ -130,6 +135,7 @@ anything - this works because RSDcp is requesting Prophoto. */ g_object_set(rs->filter_input, "color-space", rs_color_space_new_singleton("RSProphoto"), NULL); } +// rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); } } Modified: trunk/src/rs-cache.c =================================================================== --- trunk/src/rs-cache.c 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/src/rs-cache.c 2012-02-18 10:21:44 UTC (rev 4144) @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include #include #include #include Modified: trunk/src/rs-preview-widget.c =================================================================== --- trunk/src/rs-preview-widget.c 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/src/rs-preview-widget.c 2012-02-18 10:21:44 UTC (rev 4144) @@ -266,18 +266,13 @@ static gboolean make_cbdata(RSPreviewWidget *preview, const gint view, RS_PREVIEW_CALLBACK_DATA *cbdata, gint screen_x, gint screen_y, gint real_x, gint real_y); static gpointer render_thread_func(gpointer _thread_info); static void rs_preview_do_render(RSPreviewWidget *preview, GdkRectangle *dirty_area); - +static void rs_preview_wait_for_render(RSPreviewWidget *preview); /** * Class initializer */ static void rs_preview_widget_class_init(RSPreviewWidgetClass *klass) { - GtkWidgetClass *widget_class; - GtkObjectClass *object_class; - widget_class = GTK_WIDGET_CLASS(klass); - object_class = GTK_OBJECT_CLASS(klass); - signals[WB_PICKED] = g_signal_new ("wb-picked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, @@ -496,6 +491,20 @@ return widget; } +extern void +rs_preview_widget_lock_renderer(RSPreviewWidget *preview) +{ + g_assert(RS_IS_PREVIEW_WIDGET(preview)); + g_mutex_lock(preview->render_thread->render_mutex); +} + +extern void +rs_preview_widget_unlock_renderer(RSPreviewWidget *preview) +{ + g_assert(RS_IS_PREVIEW_WIDGET(preview)); + g_mutex_unlock(preview->render_thread->render_mutex); +} + void rs_preview_widget_update_display_colorspace(RSPreviewWidget *preview, gboolean force) { @@ -2183,6 +2192,7 @@ { gint view; + preview->last_required_direct_redraw = TRUE; if (photo == preview->photo) { /* Set view profile */ @@ -2453,9 +2463,9 @@ rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", preview->exposure_color_space); /* We set input to the cache placed before exposure mask */ - gdk_threads_leave(); + rs_preview_wait_for_render(preview); response = rs_filter_get_image8(preview->filter_cache3[view], request); - gdk_threads_enter(); + g_mutex_unlock(preview->render_thread->render_mutex); GdkPixbuf *buffer = rs_filter_response_get_image8(response); g_object_unref(response); g_object_unref(request); @@ -2932,7 +2942,25 @@ g_mutex_unlock(preview->render_thread->render_mutex); } +/* Waits for the renderer to finish and keeps the render_mutex */ +/* gdk_threads must be held, and will be retained */ +static void +rs_preview_wait_for_render(RSPreviewWidget *preview) +{ + preview->render_thread->finish_rendering = TRUE; + gdk_threads_leave(); + g_mutex_lock(preview->render_thread->render_mutex); + while (preview->render_thread->render_pending) + { + g_cond_signal(preview->render_thread->render); + g_mutex_unlock(preview->render_thread->render_mutex); + g_usleep(1000); + g_mutex_lock(preview->render_thread->render_mutex); + } + gdk_threads_enter(); +} + static gpointer render_thread_func(gpointer _thread_info) { Modified: trunk/src/rs-preview-widget.h =================================================================== --- trunk/src/rs-preview-widget.h 2012-02-18 01:43:58 UTC (rev 4143) +++ trunk/src/rs-preview-widget.h 2012-02-18 10:21:44 UTC (rev 4144) @@ -178,6 +178,12 @@ extern void rs_preview_widget_update_display_colorspace(RSPreviewWidget *preview, gboolean force); +extern void +rs_preview_widget_lock_renderer(RSPreviewWidget *preview); + +extern void +rs_preview_widget_unlock_renderer(RSPreviewWidget *preview); + #define RS_PREVIEW_TYPE_WIDGET (rs_preview_widget_get_type ()) #define RS_PREVIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_PREVIEW_TYPE_WIDGET, RSPreviewWidget)) #define RS_PREVIEW_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), RS_PREVIEW_WIDGET, RSPreviewWidgetClass)) From anders at brander.dk Sat Feb 18 11:43:54 2012 From: anders at brander.dk (Anders Brander) Date: Sat, 18 Feb 2012 11:43:54 +0100 Subject: [Rawstudio-commit] r4145 - in trunk: . librawstudio plugins/colorspace-transform plugins/load-dcraw plugins/load-gdk plugins/meta-x3f src Message-ID: Author: abrander Date: 2012-02-18 11:43:54 +0100 (Sat, 18 Feb 2012) New Revision: 4145 Modified: trunk/configure.in trunk/librawstudio/rs-settings.c trunk/plugins/colorspace-transform/Makefile.am trunk/plugins/colorspace-transform/rs-cmm.c trunk/plugins/load-dcraw/Makefile.am trunk/plugins/load-dcraw/dcraw.cc trunk/plugins/load-gdk/Makefile.am trunk/plugins/load-gdk/load-gdk.c trunk/plugins/meta-x3f/x3f-meta.c trunk/src/application.c trunk/src/rs-cache.c trunk/src/rs-preview-widget.c trunk/src/rs-preview-widget.h Log: Reverted rogue revision 4144. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/configure.in 2012-02-18 10:43:54 UTC (rev 4145) @@ -100,9 +100,9 @@ AC_SUBST(LENSFUN_CFLAGS) AC_SUBST(LENSFUN_LIBS) -PKG_CHECK_MODULES(LCMS2, [lcms2]) -AC_SUBST(LCMS2_CFLAGS) -AC_SUBST(LCMS2_LIBS) +PKG_CHECK_MODULES(LCMS, [lcms]) +AC_SUBST(LCMS_CFLAGS) +AC_SUBST(LCMS_LIBS) PKG_CHECK_MODULES(LIBGPHOTO2, [libgphoto2]) AC_SUBST(LIBGPHOTO2_CFLAGS) Modified: trunk/librawstudio/rs-settings.c =================================================================== --- trunk/librawstudio/rs-settings.c 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/librawstudio/rs-settings.c 2012-02-18 10:43:54 UTC (rev 4145) @@ -115,7 +115,7 @@ PROP_DCP_TEMP, g_param_spec_float( /* @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! */ "dcp-temp", _("Temp"), _("Temperature"), - 1700.0, 60000.0, 5000.0, G_PARAM_READWRITE) + 2000.0, 12000.0, 5000.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_DCP_TINT, g_param_spec_float( Modified: trunk/plugins/colorspace-transform/Makefile.am =================================================================== --- trunk/plugins/colorspace-transform/Makefile.am 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/plugins/colorspace-transform/Makefile.am 2012-02-18 10:43:54 UTC (rev 4145) @@ -9,7 +9,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@ \ + @PACKAGE_CFLAGS@ @LCMS_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -17,7 +17,7 @@ libdir = $(datadir)/rawstudio/plugins/ -colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ colorspace_transform_avx.lo colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo +colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ colorspace_transform_avx.lo colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo colorspace_transform_la_LDFLAGS = -module -avoid-version colorspace_transform_la_SOURCES = Modified: trunk/plugins/colorspace-transform/rs-cmm.c =================================================================== --- trunk/plugins/colorspace-transform/rs-cmm.c 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/plugins/colorspace-transform/rs-cmm.c 2012-02-18 10:43:54 UTC (rev 4145) @@ -17,9 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include #include "rs-cmm.h" static gushort gammatable22[65536]; @@ -43,7 +41,6 @@ cmsHTRANSFORM lcms_transform8; cmsHTRANSFORM lcms_transform16; const GdkRectangle *roi; - gboolean is_gamma_corrected; }; G_DEFINE_TYPE (RSCmm, rs_cmm, G_TYPE_OBJECT) @@ -173,59 +170,29 @@ gushort *in = GET_PIXEL(input, start_x, y); gushort *out = GET_PIXEL(output, start_x, y); gushort *buffer_pointer = buffer; - if (cmm->is_gamma_corrected) + for(x=start_x; xclip[R]); in++; - register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; - register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; - in++; + register gfloat r = (gfloat) MIN(*in, cmm->clip[R]); in++; + register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; + register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; + in++; - r = MIN(r, cmm->clip[R]); - g = MIN(g, cmm->clip[G]); - b = MIN(b, cmm->clip[B]); + r = MIN(r, cmm->clip[R]); + g = MIN(g, cmm->clip[G]); + b = MIN(b, cmm->clip[B]); - r = r * cmm->premul[R]; - g = g * cmm->premul[G]; - b = b * cmm->premul[B]; + r = r * cmm->premul[R]; + g = g * cmm->premul[G]; + b = b * cmm->premul[B]; - r = MIN(r, 65535.0); - g = MIN(g, 65535.0); - b = MIN(b, 65535.0); + r = MIN(r, 65535.0); + g = MIN(g, 65535.0); + b = MIN(b, 65535.0); - *(buffer_pointer++) = gammatable22[(gushort) r]; - *(buffer_pointer++) = gammatable22[(gushort) g]; - *(buffer_pointer++) = gammatable22[(gushort) b]; - buffer_pointer++; - } - } - else - { - for(x=start_x; xclip[R]); in++; - register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; - register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; - in++; - - r = MIN(r, cmm->clip[R]); - g = MIN(g, cmm->clip[G]); - b = MIN(b, cmm->clip[B]); - - r = r * cmm->premul[R]; - g = g * cmm->premul[G]; - b = b * cmm->premul[B]; - - r = MIN(r, 65535.0); - g = MIN(g, 65535.0); - b = MIN(b, 65535.0); - - *(buffer_pointer++) = (gushort) r; - *(buffer_pointer++) = (gushort) g; - *(buffer_pointer++) = (gushort) b; - buffer_pointer++; - } + *(buffer_pointer++) = (gushort) r; + *(buffer_pointer++) = (gushort) g; + *(buffer_pointer++) = (gushort) b; + buffer_pointer++; } cmsDoTransform(cmm->lcms_transform16, buffer, out, w); } @@ -251,9 +218,8 @@ guchar *out = GET_PIXBUF_PIXEL(output, start_x, y); cmsDoTransform(cmm->lcms_transform8, in, out, w); /* Set alpha */ - guint *outi = (guint*) out; for (i = 0; i < w; i++) - outi[i] &= 0xff000000; + out[i*4+3] = 0xff; } } @@ -319,9 +285,9 @@ g_free(t); } -#if 0 + static guchar * -pack_rgb_w4(void *info, register cmsUInt16Number wOut[], register LPBYTE output) +pack_rgb_w4(void *info, register WORD wOut[], register LPBYTE output) { *(LPWORD) output = wOut[0]; output+= 2; *(LPWORD) output = wOut[1]; output+= 2; @@ -349,7 +315,7 @@ return(accum); } -#endif + static void load_profile(RSCmm *cmm, const RSIccProfile *profile, const RSIccProfile **profile_target, cmsHPROFILE *lcms_target) { @@ -433,11 +399,10 @@ {0.115, 0.826, 0.724938}, {0.157, 0.018, 0.016875}}; cmsCIExyY D65; - cmsToneCurve* gamma[3]; - gint context = 1337; + LPGAMMATABLE gamma[3]; - cmsWhitePointFromTemp(&D65, 6504); - gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(&context,1.0); + cmsWhitePointFromTemp(6504, &D65); + gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(2,1.0); linear = cmsCreateRGBProfile(&D65, &srgb_primaries, gamma); } g_mutex_unlock(is_profile_gamma_22_corrected_linear_lock); @@ -471,17 +436,15 @@ cmsDeleteTransform(cmm->lcms_transform16); cmm->lcms_transform16 = cmsCreateTransform( - cmm->lcms_input_profile, TYPE_RGBA_16, - cmm->lcms_output_profile, TYPE_RGBA_16, - INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE); + cmm->lcms_input_profile, TYPE_RGB_16, + cmm->lcms_output_profile, TYPE_RGB_16, + INTENT_PERCEPTUAL, 0); g_warn_if_fail(cmm->lcms_transform16 != NULL); /* Enable packing/unpacking for pixelsize==4 */ /* If we estimate that the input profile will apply gamma correction, we try to undo it in 16 bit transform */ - cmm->is_gamma_corrected = is_profile_gamma_22_corrected(cmm->lcms_input_profile); -/* if (is_profile_gamma_22_corrected(cmm->lcms_input_profile)) cmsSetUserFormatters(cmm->lcms_transform16, TYPE_RGB_16, unroll_rgb_w4_gammatable22, @@ -490,6 +453,6 @@ cmsSetUserFormatters(cmm->lcms_transform16, TYPE_RGB_16, unroll_rgb_w4, TYPE_RGB_16, pack_rgb_w4); -*/ + cmm->dirty16 = FALSE; } Modified: trunk/plugins/load-dcraw/Makefile.am =================================================================== --- trunk/plugins/load-dcraw/Makefile.am 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/plugins/load-dcraw/Makefile.am 2012-02-18 10:43:54 UTC (rev 4145) @@ -12,7 +12,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@\ + @PACKAGE_CFLAGS@ @LCMS_CFLAGS@\ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -20,6 +20,6 @@ libdir = $(datadir)/rawstudio/plugins/ -load_dcraw_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ +load_dcraw_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ load_dcraw_la_LDFLAGS = -module -avoid-version load_dcraw_la_SOURCES = dcrawloader.c dcraw.cc dcraw.h dcraw_api.cc dcraw_api.h mmap-hack.c mmap-hack.h Modified: trunk/plugins/load-dcraw/dcraw.cc =================================================================== --- trunk/plugins/load-dcraw/dcraw.cc 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/plugins/load-dcraw/dcraw.cc 2012-02-18 10:43:54 UTC (rev 4145) @@ -62,7 +62,7 @@ NO_LCMS disables the "-p" option. */ #ifndef NO_LCMS -#include +#include #endif #ifdef HAVE_LIBJPEG extern "C" { @@ -5040,10 +5040,8 @@ double cc[4][4], cm[4][3], cam_xyz[4][3], num; double ab[]={ 1,1,1,1 }, asn[] = { 0,0,0,0 }, xyz[] = { 1,1,1 }; int sony_curve[] = { 0,0,0,0,0,4095 }; -#ifndef WITH_MMAP_HACK unsigned sony_offset=0, sony_length=0, sony_key=0; -#endif - struct jhead jh; + struct jhead jh; #ifndef WITH_MMAP_HACK unsigned *buf; FILE *sfp; @@ -5208,12 +5206,10 @@ for (j = sony_curve[i]+1; j <= sony_curve[i+1]; j++) curve[j] = curve[j-1] + (1 << i); break; -#ifndef WITH_MMAP_HACK case 29184: sony_offset = get4(); break; case 29185: sony_length = get4(); break; case 29217: sony_key = get4(); break; -#endif - case 29264: + case 29264: parse_minolta (ftell(ifp)); raw_width = 0; break; @@ -8580,7 +8576,7 @@ FILE *fp; unsigned size; -// cmsErrorAction (LCMS_ERROR_SHOW); + cmsErrorAction (LCMS_ERROR_SHOW); if (strcmp (input, "embed")) hInProfile = cmsOpenProfileFromFile (input, "r"); else if (profile_length) { Modified: trunk/plugins/load-gdk/Makefile.am =================================================================== --- trunk/plugins/load-gdk/Makefile.am 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/plugins/load-gdk/Makefile.am 2012-02-18 10:43:54 UTC (rev 4145) @@ -9,7 +9,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@ @EXIV2_CFLAGS@ \ + @PACKAGE_CFLAGS@ @LCMS_CFLAGS@ @EXIV2_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -17,6 +17,6 @@ libdir = $(datadir)/rawstudio/plugins/ -load_gdk_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ @EXIV2_LIBS@ @LIBJPEG@ +load_gdk_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ @EXIV2_LIBS@ @LIBJPEG@ load_gdk_la_LDFLAGS = -module -avoid-version load_gdk_la_SOURCES = load-gdk.c exiv2-colorspace.cpp exiv2-colorspace.h Modified: trunk/plugins/load-gdk/load-gdk.c =================================================================== --- trunk/plugins/load-gdk/load-gdk.c 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/plugins/load-gdk/load-gdk.c 2012-02-18 10:43:54 UTC (rev 4145) @@ -20,7 +20,7 @@ #include #include /* pow() */ #include "exiv2-colorspace.h" -#include +#include /** @@ -56,15 +56,15 @@ cmsHPROFILE *lcms_target = cmsOpenProfileFromMem(data, length); if (lcms_target) { - cmsToneCurve *curve = NULL; - if (cmsIsTag(lcms_target, cmsSigGrayTRCTag)) - curve = cmsReadTag(lcms_target, cmsSigGrayTRCTag); + LPGAMMATABLE curve = NULL; + if (cmsIsTag(lcms_target, icSigGrayTRCTag)) + curve = cmsReadICCGamma(lcms_target, icSigGrayTRCTag); - if (NULL== curve && cmsIsTag(lcms_target, cmsSigRedTRCTag)) - curve = cmsReadTag(lcms_target, cmsSigRedTRCTag); + if (NULL== curve && cmsIsTag(lcms_target, icSigRedTRCTag)) + curve = cmsReadICCGamma(lcms_target, icSigRedTRCTag); if (curve) { - double gamma = cmsEstimateGamma(curve, 0.01); + double gamma = cmsEstimateGamma(curve); if (gamma>0.0) gamma_guess = gamma; } Modified: trunk/plugins/meta-x3f/x3f-meta.c =================================================================== --- trunk/plugins/meta-x3f/x3f-meta.c 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/plugins/meta-x3f/x3f-meta.c 2012-02-18 10:43:54 UTC (rev 4145) @@ -15,13 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * * 2011-09 - * * T?m Merlant : - * * - Added thumbnailing and properties extraction for SD15, DP1, DP2 and SD1 - * * - Modified the way the embedded thumbnails were found - * * - Made sure we load the embedded thumbnail and not the fullsize preview - * */ #include @@ -46,16 +39,10 @@ typedef enum x3f_data_format { X3F_DATA_FORMAT_UNCOMPRESSED = 3, - X3F_DATA_FORMAT_HUFFMAN_WITH_TABLE = 6, X3F_DATA_FORMAT_HUFFMAN = 11, X3F_DATA_FORMAT_JPEG = 18, } X3F_DATA_FORMAT; -typedef enum x3f_type_of_image_data { - X3F_DATA_TYPE_PROCESSED = 2, - X3F_DATA_TYPE_RAW = 3, -} X3F_TYPE_OF_IMAGE_DATA; - /* * These structs is mostly used to define the file format - they can not * be directly mapped to file because of endian differences on some platforms @@ -121,29 +108,6 @@ guint value_offset; /* offset from start of CHARACTER data */ } __attribute__ ((packed)) X3F_PROPERTY_ENTRY; - -static GdkPixbuf * -jpeg_load (guchar *content, gsize length) -{ - GdkPixbufLoader *pl; - GdkPixbuf *pixbuf = NULL; - gboolean cont = TRUE; /* Are we good to continue? */ - gint pos = 0; - - pl = gdk_pixbuf_loader_new(); - while((length > 100000) && cont) - { - cont = gdk_pixbuf_loader_write(pl, &content[pos], 80000, NULL); - length -= 80000; - pos += 80000; - } - if (cont) - gdk_pixbuf_loader_write(pl, &content[pos], length, NULL); - pixbuf = gdk_pixbuf_loader_get_pixbuf(pl); - gdk_pixbuf_loader_close(pl, NULL); - return(pixbuf); -} - static gboolean x3f_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { @@ -151,12 +115,10 @@ X3F_FILE file; X3F_DIRECTORY_SECTION directory; X3F_DIRECTORY_ENTRY directory_entry; - guint start=0, width=0, height=0, rowstride=0, length=0; - X3F_TYPE_OF_IMAGE_DATA type_of_image_data; - X3F_DATA_FORMAT data_format; + X3F_IMAGE_DATA image_data; + guint start=0, width=0, height=0, rowstride=0; GdkPixbuf *pixbuf = NULL, *pixbuf2 = NULL; gdouble ratio=1.0; - gboolean thumb_ok=FALSE, prop_ok=FALSE; /* Check if this is infact a Sigma-file */ if (!raw_strcmp(rawfile, G_STRUCT_OFFSET(X3F_FILE, identifier), "FOVb", 4)) @@ -216,33 +178,22 @@ file.directory_start+G_STRUCT_OFFSET(X3F_DIRECTORY_SECTION, number_of_entries), &directory.number_of_entries); - while (!(thumb_ok && prop_ok)) { - /* parse in reverse order to make sure the last added thumbnail and prop section get found first. See X3F spec for more info */ - for(i=directory.number_of_entries;i>=0;i--) + for(i=0;imodel_ascii = g_strdup(value); - else if (g_str_equal(name, "AP_DESC")) /* Example: 8.000 */ + else if (g_str_equal(name, "APERTURE")) /* Example: 8.000 */ meta->aperture = rs_atof(value); else if (g_str_equal(name, "SH_DESC")) /* Example: 1/60 */ { @@ -313,14 +264,16 @@ g_free(name); if (value) g_free(value); - } - prop_ok=TRUE; } } } } } + if (width > 0) + pixbuf = gdk_pixbuf_new_from_data(raw_get_map(rawfile)+start, GDK_COLORSPACE_RGB, FALSE, 8, + width, height, rowstride, NULL, NULL); + if (pixbuf) { if (file.rotation > 0) Modified: trunk/src/application.c =================================================================== --- trunk/src/application.c 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/src/application.c 2012-02-18 10:43:54 UTC (rev 4145) @@ -72,7 +72,6 @@ { g_assert(rs != NULL); - rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); /* Unref old photo if any */ if (rs->photo) g_object_unref(rs->photo); @@ -93,7 +92,6 @@ g_signal_connect(G_OBJECT(rs->photo), "spatial-changed", G_CALLBACK(photo_spatial_changed), rs); g_signal_connect(G_OBJECT(rs->photo), "profile-changed", G_CALLBACK(photo_profile_changed), rs); } - rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); } static void @@ -101,14 +99,12 @@ { if (photo == rs->photo) { -// rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); /* Update crop and rotate filters */ rs_filter_set_recursive(rs->filter_end, "rectangle", rs_photo_get_crop(photo), "angle", rs_photo_get_angle(photo), "orientation", rs->photo->orientation, NULL); -// rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); } } @@ -118,7 +114,6 @@ { if (photo == rs->photo) { -// rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); if (RS_IS_ICC_PROFILE(profile)) { RSColorSpace *cs = rs_color_space_icc_new_from_icc(profile); @@ -135,7 +130,6 @@ anything - this works because RSDcp is requesting Prophoto. */ g_object_set(rs->filter_input, "color-space", rs_color_space_new_singleton("RSProphoto"), NULL); } -// rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); } } Modified: trunk/src/rs-cache.c =================================================================== --- trunk/src/rs-cache.c 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/src/rs-cache.c 2012-02-18 10:43:54 UTC (rev 4145) @@ -17,7 +17,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include #include #include #include Modified: trunk/src/rs-preview-widget.c =================================================================== --- trunk/src/rs-preview-widget.c 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/src/rs-preview-widget.c 2012-02-18 10:43:54 UTC (rev 4145) @@ -266,13 +266,18 @@ static gboolean make_cbdata(RSPreviewWidget *preview, const gint view, RS_PREVIEW_CALLBACK_DATA *cbdata, gint screen_x, gint screen_y, gint real_x, gint real_y); static gpointer render_thread_func(gpointer _thread_info); static void rs_preview_do_render(RSPreviewWidget *preview, GdkRectangle *dirty_area); -static void rs_preview_wait_for_render(RSPreviewWidget *preview); + /** * Class initializer */ static void rs_preview_widget_class_init(RSPreviewWidgetClass *klass) { + GtkWidgetClass *widget_class; + GtkObjectClass *object_class; + widget_class = GTK_WIDGET_CLASS(klass); + object_class = GTK_OBJECT_CLASS(klass); + signals[WB_PICKED] = g_signal_new ("wb-picked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, @@ -491,20 +496,6 @@ return widget; } -extern void -rs_preview_widget_lock_renderer(RSPreviewWidget *preview) -{ - g_assert(RS_IS_PREVIEW_WIDGET(preview)); - g_mutex_lock(preview->render_thread->render_mutex); -} - -extern void -rs_preview_widget_unlock_renderer(RSPreviewWidget *preview) -{ - g_assert(RS_IS_PREVIEW_WIDGET(preview)); - g_mutex_unlock(preview->render_thread->render_mutex); -} - void rs_preview_widget_update_display_colorspace(RSPreviewWidget *preview, gboolean force) { @@ -2192,7 +2183,6 @@ { gint view; - preview->last_required_direct_redraw = TRUE; if (photo == preview->photo) { /* Set view profile */ @@ -2463,9 +2453,9 @@ rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", preview->exposure_color_space); /* We set input to the cache placed before exposure mask */ - rs_preview_wait_for_render(preview); + gdk_threads_leave(); response = rs_filter_get_image8(preview->filter_cache3[view], request); - g_mutex_unlock(preview->render_thread->render_mutex); + gdk_threads_enter(); GdkPixbuf *buffer = rs_filter_response_get_image8(response); g_object_unref(response); g_object_unref(request); @@ -2942,25 +2932,7 @@ g_mutex_unlock(preview->render_thread->render_mutex); } -/* Waits for the renderer to finish and keeps the render_mutex */ -/* gdk_threads must be held, and will be retained */ -static void -rs_preview_wait_for_render(RSPreviewWidget *preview) -{ - preview->render_thread->finish_rendering = TRUE; - gdk_threads_leave(); - g_mutex_lock(preview->render_thread->render_mutex); - while (preview->render_thread->render_pending) - { - g_cond_signal(preview->render_thread->render); - g_mutex_unlock(preview->render_thread->render_mutex); - g_usleep(1000); - g_mutex_lock(preview->render_thread->render_mutex); - } - gdk_threads_enter(); -} - static gpointer render_thread_func(gpointer _thread_info) { Modified: trunk/src/rs-preview-widget.h =================================================================== --- trunk/src/rs-preview-widget.h 2012-02-18 10:21:44 UTC (rev 4144) +++ trunk/src/rs-preview-widget.h 2012-02-18 10:43:54 UTC (rev 4145) @@ -178,12 +178,6 @@ extern void rs_preview_widget_update_display_colorspace(RSPreviewWidget *preview, gboolean force); -extern void -rs_preview_widget_lock_renderer(RSPreviewWidget *preview); - -extern void -rs_preview_widget_unlock_renderer(RSPreviewWidget *preview); - #define RS_PREVIEW_TYPE_WIDGET (rs_preview_widget_get_type ()) #define RS_PREVIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_PREVIEW_TYPE_WIDGET, RSPreviewWidget)) #define RS_PREVIEW_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), RS_PREVIEW_WIDGET, RSPreviewWidgetClass)) From klauspost at gmail.com Sat Feb 18 11:58:35 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 18 Feb 2012 11:58:35 +0100 Subject: [Rawstudio-commit] r4146 - in trunk: . plugins/colorspace-transform plugins/load-dcraw plugins/load-gdk Message-ID: Author: post Date: 2012-02-18 11:58:35 +0100 (Sat, 18 Feb 2012) New Revision: 4146 Modified: trunk/configure.in trunk/plugins/colorspace-transform/Makefile.am trunk/plugins/colorspace-transform/rs-cmm.c trunk/plugins/load-dcraw/Makefile.am trunk/plugins/load-dcraw/dcraw.cc trunk/plugins/load-gdk/Makefile.am trunk/plugins/load-gdk/load-gdk.c Log: Switch to liblcms2. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2012-02-18 10:43:54 UTC (rev 4145) +++ trunk/configure.in 2012-02-18 10:58:35 UTC (rev 4146) @@ -100,9 +100,9 @@ AC_SUBST(LENSFUN_CFLAGS) AC_SUBST(LENSFUN_LIBS) -PKG_CHECK_MODULES(LCMS, [lcms]) -AC_SUBST(LCMS_CFLAGS) -AC_SUBST(LCMS_LIBS) +PKG_CHECK_MODULES(LCMS2, [lcms2]) +AC_SUBST(LCMS2_CFLAGS) +AC_SUBST(LCMS2_LIBS) PKG_CHECK_MODULES(LIBGPHOTO2, [libgphoto2]) AC_SUBST(LIBGPHOTO2_CFLAGS) Modified: trunk/plugins/colorspace-transform/Makefile.am =================================================================== --- trunk/plugins/colorspace-transform/Makefile.am 2012-02-18 10:43:54 UTC (rev 4145) +++ trunk/plugins/colorspace-transform/Makefile.am 2012-02-18 10:58:35 UTC (rev 4146) @@ -9,7 +9,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS_CFLAGS@ \ + @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -17,7 +17,7 @@ libdir = $(datadir)/rawstudio/plugins/ -colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ colorspace_transform_avx.lo colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo +colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ colorspace_transform_avx.lo colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo colorspace_transform_la_LDFLAGS = -module -avoid-version colorspace_transform_la_SOURCES = Modified: trunk/plugins/colorspace-transform/rs-cmm.c =================================================================== --- trunk/plugins/colorspace-transform/rs-cmm.c 2012-02-18 10:43:54 UTC (rev 4145) +++ trunk/plugins/colorspace-transform/rs-cmm.c 2012-02-18 10:58:35 UTC (rev 4146) @@ -17,7 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include +#include +#include #include "rs-cmm.h" static gushort gammatable22[65536]; @@ -41,6 +43,7 @@ cmsHTRANSFORM lcms_transform8; cmsHTRANSFORM lcms_transform16; const GdkRectangle *roi; + gboolean is_gamma_corrected; }; G_DEFINE_TYPE (RSCmm, rs_cmm, G_TYPE_OBJECT) @@ -170,29 +173,59 @@ gushort *in = GET_PIXEL(input, start_x, y); gushort *out = GET_PIXEL(output, start_x, y); gushort *buffer_pointer = buffer; - for(x=start_x; xis_gamma_corrected) { - register gfloat r = (gfloat) MIN(*in, cmm->clip[R]); in++; - register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; - register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; - in++; + for(x=start_x; xclip[R]); in++; + register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; + register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; + in++; - r = MIN(r, cmm->clip[R]); - g = MIN(g, cmm->clip[G]); - b = MIN(b, cmm->clip[B]); + r = MIN(r, cmm->clip[R]); + g = MIN(g, cmm->clip[G]); + b = MIN(b, cmm->clip[B]); - r = r * cmm->premul[R]; - g = g * cmm->premul[G]; - b = b * cmm->premul[B]; + r = r * cmm->premul[R]; + g = g * cmm->premul[G]; + b = b * cmm->premul[B]; - r = MIN(r, 65535.0); - g = MIN(g, 65535.0); - b = MIN(b, 65535.0); + r = MIN(r, 65535.0); + g = MIN(g, 65535.0); + b = MIN(b, 65535.0); - *(buffer_pointer++) = (gushort) r; - *(buffer_pointer++) = (gushort) g; - *(buffer_pointer++) = (gushort) b; - buffer_pointer++; + *(buffer_pointer++) = gammatable22[(gushort) r]; + *(buffer_pointer++) = gammatable22[(gushort) g]; + *(buffer_pointer++) = gammatable22[(gushort) b]; + buffer_pointer++; + } + } + else + { + for(x=start_x; xclip[R]); in++; + register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; + register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; + in++; + + r = MIN(r, cmm->clip[R]); + g = MIN(g, cmm->clip[G]); + b = MIN(b, cmm->clip[B]); + + r = r * cmm->premul[R]; + g = g * cmm->premul[G]; + b = b * cmm->premul[B]; + + r = MIN(r, 65535.0); + g = MIN(g, 65535.0); + b = MIN(b, 65535.0); + + *(buffer_pointer++) = (gushort) r; + *(buffer_pointer++) = (gushort) g; + *(buffer_pointer++) = (gushort) b; + buffer_pointer++; + } } cmsDoTransform(cmm->lcms_transform16, buffer, out, w); } @@ -218,8 +251,9 @@ guchar *out = GET_PIXBUF_PIXEL(output, start_x, y); cmsDoTransform(cmm->lcms_transform8, in, out, w); /* Set alpha */ + guint *outi = (guint*) out; for (i = 0; i < w; i++) - out[i*4+3] = 0xff; + outi[i] &= 0xff000000; } } @@ -286,36 +320,6 @@ g_free(t); } -static guchar * -pack_rgb_w4(void *info, register WORD wOut[], register LPBYTE output) -{ - *(LPWORD) output = wOut[0]; output+= 2; - *(LPWORD) output = wOut[1]; output+= 2; - *(LPWORD) output = wOut[2]; output+= 4; - - return(output); -} - -static guchar * -unroll_rgb_w4(void *info, register WORD wIn[], register LPBYTE accum) -{ - wIn[0] = *(LPWORD) accum; accum+= 2; - wIn[1] = *(LPWORD) accum; accum+= 2; - wIn[2] = *(LPWORD) accum; accum+= 4; - - return(accum); -} - -static guchar * -unroll_rgb_w4_gammatable22(void *info, register WORD wIn[], register LPBYTE accum) -{ - wIn[0] = gammatable22[*(LPWORD) accum]; accum+= 2; - wIn[1] = gammatable22[*(LPWORD) accum]; accum+= 2; - wIn[2] = gammatable22[*(LPWORD) accum]; accum+= 4; - - return(accum); -} - static void load_profile(RSCmm *cmm, const RSIccProfile *profile, const RSIccProfile **profile_target, cmsHPROFILE *lcms_target) { @@ -399,10 +403,11 @@ {0.115, 0.826, 0.724938}, {0.157, 0.018, 0.016875}}; cmsCIExyY D65; - LPGAMMATABLE gamma[3]; + cmsToneCurve* gamma[3]; + gint context = 1337; - cmsWhitePointFromTemp(6504, &D65); - gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(2,1.0); + cmsWhitePointFromTemp(&D65, 6504); + gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(&context,1.0); linear = cmsCreateRGBProfile(&D65, &srgb_primaries, gamma); } g_mutex_unlock(is_profile_gamma_22_corrected_linear_lock); @@ -436,23 +441,16 @@ cmsDeleteTransform(cmm->lcms_transform16); cmm->lcms_transform16 = cmsCreateTransform( - cmm->lcms_input_profile, TYPE_RGB_16, - cmm->lcms_output_profile, TYPE_RGB_16, - INTENT_PERCEPTUAL, 0); + cmm->lcms_input_profile, TYPE_RGBA_16, + cmm->lcms_output_profile, TYPE_RGBA_16, + INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE); g_warn_if_fail(cmm->lcms_transform16 != NULL); /* Enable packing/unpacking for pixelsize==4 */ /* If we estimate that the input profile will apply gamma correction, we try to undo it in 16 bit transform */ - if (is_profile_gamma_22_corrected(cmm->lcms_input_profile)) - cmsSetUserFormatters(cmm->lcms_transform16, - TYPE_RGB_16, unroll_rgb_w4_gammatable22, - TYPE_RGB_16, pack_rgb_w4); - else - cmsSetUserFormatters(cmm->lcms_transform16, - TYPE_RGB_16, unroll_rgb_w4, - TYPE_RGB_16, pack_rgb_w4); + cmm->is_gamma_corrected = is_profile_gamma_22_corrected(cmm->lcms_input_profile); cmm->dirty16 = FALSE; } Modified: trunk/plugins/load-dcraw/Makefile.am =================================================================== --- trunk/plugins/load-dcraw/Makefile.am 2012-02-18 10:43:54 UTC (rev 4145) +++ trunk/plugins/load-dcraw/Makefile.am 2012-02-18 10:58:35 UTC (rev 4146) @@ -12,7 +12,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS_CFLAGS@\ + @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@\ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -20,6 +20,6 @@ libdir = $(datadir)/rawstudio/plugins/ -load_dcraw_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ +load_dcraw_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ load_dcraw_la_LDFLAGS = -module -avoid-version load_dcraw_la_SOURCES = dcrawloader.c dcraw.cc dcraw.h dcraw_api.cc dcraw_api.h mmap-hack.c mmap-hack.h Modified: trunk/plugins/load-dcraw/dcraw.cc =================================================================== --- trunk/plugins/load-dcraw/dcraw.cc 2012-02-18 10:43:54 UTC (rev 4145) +++ trunk/plugins/load-dcraw/dcraw.cc 2012-02-18 10:58:35 UTC (rev 4146) @@ -62,7 +62,7 @@ NO_LCMS disables the "-p" option. */ #ifndef NO_LCMS -#include +#include #endif #ifdef HAVE_LIBJPEG extern "C" { @@ -5040,8 +5040,10 @@ double cc[4][4], cm[4][3], cam_xyz[4][3], num; double ab[]={ 1,1,1,1 }, asn[] = { 0,0,0,0 }, xyz[] = { 1,1,1 }; int sony_curve[] = { 0,0,0,0,0,4095 }; +#ifndef WITH_MMAP_HACK unsigned sony_offset=0, sony_length=0, sony_key=0; - struct jhead jh; +#endif + struct jhead jh; #ifndef WITH_MMAP_HACK unsigned *buf; FILE *sfp; @@ -5206,10 +5208,12 @@ for (j = sony_curve[i]+1; j <= sony_curve[i+1]; j++) curve[j] = curve[j-1] + (1 << i); break; +#ifndef WITH_MMAP_HACK case 29184: sony_offset = get4(); break; case 29185: sony_length = get4(); break; case 29217: sony_key = get4(); break; - case 29264: +#endif + case 29264: parse_minolta (ftell(ifp)); raw_width = 0; break; @@ -8576,7 +8580,7 @@ FILE *fp; unsigned size; - cmsErrorAction (LCMS_ERROR_SHOW); +// cmsErrorAction (LCMS_ERROR_SHOW); if (strcmp (input, "embed")) hInProfile = cmsOpenProfileFromFile (input, "r"); else if (profile_length) { Modified: trunk/plugins/load-gdk/Makefile.am =================================================================== --- trunk/plugins/load-gdk/Makefile.am 2012-02-18 10:43:54 UTC (rev 4145) +++ trunk/plugins/load-gdk/Makefile.am 2012-02-18 10:58:35 UTC (rev 4146) @@ -9,7 +9,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS_CFLAGS@ @EXIV2_CFLAGS@ \ + @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@ @EXIV2_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -17,6 +17,6 @@ libdir = $(datadir)/rawstudio/plugins/ -load_gdk_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ @EXIV2_LIBS@ @LIBJPEG@ +load_gdk_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ @EXIV2_LIBS@ @LIBJPEG@ load_gdk_la_LDFLAGS = -module -avoid-version load_gdk_la_SOURCES = load-gdk.c exiv2-colorspace.cpp exiv2-colorspace.h Modified: trunk/plugins/load-gdk/load-gdk.c =================================================================== --- trunk/plugins/load-gdk/load-gdk.c 2012-02-18 10:43:54 UTC (rev 4145) +++ trunk/plugins/load-gdk/load-gdk.c 2012-02-18 10:58:35 UTC (rev 4146) @@ -20,7 +20,7 @@ #include #include /* pow() */ #include "exiv2-colorspace.h" -#include +#include /** @@ -56,15 +56,15 @@ cmsHPROFILE *lcms_target = cmsOpenProfileFromMem(data, length); if (lcms_target) { - LPGAMMATABLE curve = NULL; - if (cmsIsTag(lcms_target, icSigGrayTRCTag)) - curve = cmsReadICCGamma(lcms_target, icSigGrayTRCTag); + cmsToneCurve *curve = NULL; + if (cmsIsTag(lcms_target, cmsSigGrayTRCTag)) + curve = cmsReadTag(lcms_target, cmsSigGrayTRCTag); - if (NULL== curve && cmsIsTag(lcms_target, icSigRedTRCTag)) - curve = cmsReadICCGamma(lcms_target, icSigRedTRCTag); + if (NULL== curve && cmsIsTag(lcms_target, cmsSigRedTRCTag)) + curve = cmsReadTag(lcms_target, cmsSigRedTRCTag); if (curve) { - double gamma = cmsEstimateGamma(curve); + double gamma = cmsEstimateGamma(curve, 0.01); if (gamma>0.0) gamma_guess = gamma; } From klauspost at gmail.com Sat Feb 18 12:22:50 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 18 Feb 2012 12:22:50 +0100 Subject: [Rawstudio-commit] r4147 - trunk/src Message-ID: Author: post Date: 2012-02-18 12:22:50 +0100 (Sat, 18 Feb 2012) New Revision: 4147 Modified: trunk/src/application.c trunk/src/rs-preview-widget.c trunk/src/rs-preview-widget.h Log: Add helper functions for locking the renderer, and lock while loading image. Modified: trunk/src/application.c =================================================================== --- trunk/src/application.c 2012-02-18 10:58:35 UTC (rev 4146) +++ trunk/src/application.c 2012-02-18 11:22:50 UTC (rev 4147) @@ -72,6 +72,7 @@ { g_assert(rs != NULL); + rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); /* Unref old photo if any */ if (rs->photo) g_object_unref(rs->photo); @@ -92,6 +93,7 @@ g_signal_connect(G_OBJECT(rs->photo), "spatial-changed", G_CALLBACK(photo_spatial_changed), rs); g_signal_connect(G_OBJECT(rs->photo), "profile-changed", G_CALLBACK(photo_profile_changed), rs); } + rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); } static void Modified: trunk/src/rs-preview-widget.c =================================================================== --- trunk/src/rs-preview-widget.c 2012-02-18 10:58:35 UTC (rev 4146) +++ trunk/src/rs-preview-widget.c 2012-02-18 11:22:50 UTC (rev 4147) @@ -266,18 +266,13 @@ static gboolean make_cbdata(RSPreviewWidget *preview, const gint view, RS_PREVIEW_CALLBACK_DATA *cbdata, gint screen_x, gint screen_y, gint real_x, gint real_y); static gpointer render_thread_func(gpointer _thread_info); static void rs_preview_do_render(RSPreviewWidget *preview, GdkRectangle *dirty_area); - +static void rs_preview_wait_for_render(RSPreviewWidget *preview); /** * Class initializer */ static void rs_preview_widget_class_init(RSPreviewWidgetClass *klass) { - GtkWidgetClass *widget_class; - GtkObjectClass *object_class; - widget_class = GTK_WIDGET_CLASS(klass); - object_class = GTK_OBJECT_CLASS(klass); - signals[WB_PICKED] = g_signal_new ("wb-picked", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, @@ -496,6 +491,20 @@ return widget; } +extern void +rs_preview_widget_lock_renderer(RSPreviewWidget *preview) +{ + g_assert(RS_IS_PREVIEW_WIDGET(preview)); + g_mutex_lock(preview->render_thread->render_mutex); +} + +extern void +rs_preview_widget_unlock_renderer(RSPreviewWidget *preview) +{ + g_assert(RS_IS_PREVIEW_WIDGET(preview)); + g_mutex_unlock(preview->render_thread->render_mutex); +} + void rs_preview_widget_update_display_colorspace(RSPreviewWidget *preview, gboolean force) { @@ -2183,6 +2192,7 @@ { gint view; + preview->last_required_direct_redraw = TRUE; if (photo == preview->photo) { /* Set view profile */ @@ -2453,9 +2463,9 @@ rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", preview->exposure_color_space); /* We set input to the cache placed before exposure mask */ - gdk_threads_leave(); + rs_preview_wait_for_render(preview); response = rs_filter_get_image8(preview->filter_cache3[view], request); - gdk_threads_enter(); + g_mutex_unlock(preview->render_thread->render_mutex); GdkPixbuf *buffer = rs_filter_response_get_image8(response); g_object_unref(response); g_object_unref(request); @@ -2932,7 +2942,25 @@ g_mutex_unlock(preview->render_thread->render_mutex); } +/* Waits for the renderer to finish and keeps the render_mutex */ +/* gdk_threads must be held, and will be retained */ +static void +rs_preview_wait_for_render(RSPreviewWidget *preview) +{ + preview->render_thread->finish_rendering = TRUE; + gdk_threads_leave(); + g_mutex_lock(preview->render_thread->render_mutex); + while (preview->render_thread->render_pending) + { + g_cond_signal(preview->render_thread->render); + g_mutex_unlock(preview->render_thread->render_mutex); + g_usleep(1000); + g_mutex_lock(preview->render_thread->render_mutex); + } + gdk_threads_enter(); +} + static gpointer render_thread_func(gpointer _thread_info) { Modified: trunk/src/rs-preview-widget.h =================================================================== --- trunk/src/rs-preview-widget.h 2012-02-18 10:58:35 UTC (rev 4146) +++ trunk/src/rs-preview-widget.h 2012-02-18 11:22:50 UTC (rev 4147) @@ -178,6 +178,12 @@ extern void rs_preview_widget_update_display_colorspace(RSPreviewWidget *preview, gboolean force); +extern void +rs_preview_widget_lock_renderer(RSPreviewWidget *preview); + +extern void +rs_preview_widget_unlock_renderer(RSPreviewWidget *preview); + #define RS_PREVIEW_TYPE_WIDGET (rs_preview_widget_get_type ()) #define RS_PREVIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_PREVIEW_TYPE_WIDGET, RSPreviewWidget)) #define RS_PREVIEW_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), RS_PREVIEW_WIDGET, RSPreviewWidgetClass)) From klauspost at gmail.com Sat Feb 18 17:17:41 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 18 Feb 2012 17:17:41 +0100 Subject: [Rawstudio-commit] r4148 - in trunk: . plugins/colorspace-transform plugins/load-dcraw plugins/load-gdk Message-ID: Author: post Date: 2012-02-18 17:17:41 +0100 (Sat, 18 Feb 2012) New Revision: 4148 Modified: trunk/configure.in trunk/plugins/colorspace-transform/Makefile.am trunk/plugins/colorspace-transform/rs-cmm.c trunk/plugins/load-dcraw/Makefile.am trunk/plugins/load-dcraw/dcraw.cc trunk/plugins/load-gdk/load-gdk.c Log: Support both lcms v1 and v2 - automatically determined at configure. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2012-02-18 11:22:50 UTC (rev 4147) +++ trunk/configure.in 2012-02-18 16:17:41 UTC (rev 4148) @@ -100,9 +100,14 @@ AC_SUBST(LENSFUN_CFLAGS) AC_SUBST(LENSFUN_LIBS) -PKG_CHECK_MODULES(LCMS2, [lcms2]) -AC_SUBST(LCMS2_CFLAGS) -AC_SUBST(LCMS2_LIBS) +PKG_CHECK_MODULES([LCMS], [lcms2], + [AC_DEFINE([HAVE_LCMS2], [1], [Use LCMS2])], + [PKG_CHECK_MODULES([LCMS], [lcms], + [AC_DEFINE([HAVE_LCMS], [1], [Use LCMS]) + ], AC_MSG_ERROR([*** liblcms or liblcms2 not found!])) +]) +AC_SUBST(LCMS_CFLAGS) +AC_SUBST(LCMS_LIBS) PKG_CHECK_MODULES(LIBGPHOTO2, [libgphoto2]) AC_SUBST(LIBGPHOTO2_CFLAGS) Modified: trunk/plugins/colorspace-transform/Makefile.am =================================================================== --- trunk/plugins/colorspace-transform/Makefile.am 2012-02-18 11:22:50 UTC (rev 4147) +++ trunk/plugins/colorspace-transform/Makefile.am 2012-02-18 16:17:41 UTC (rev 4148) @@ -9,7 +9,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@ \ + @PACKAGE_CFLAGS@ @LCMS_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -17,7 +17,7 @@ libdir = $(datadir)/rawstudio/plugins/ -colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ colorspace_transform_avx.lo colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo +colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ colorspace_transform_avx.lo colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo colorspace_transform_la_LDFLAGS = -module -avoid-version colorspace_transform_la_SOURCES = Modified: trunk/plugins/colorspace-transform/rs-cmm.c =================================================================== --- trunk/plugins/colorspace-transform/rs-cmm.c 2012-02-18 11:22:50 UTC (rev 4147) +++ trunk/plugins/colorspace-transform/rs-cmm.c 2012-02-18 16:17:41 UTC (rev 4148) @@ -17,7 +17,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include + +#if defined(HAVE_LCMS2) #include +#elif defined(HAVE_LCMS) +#include +#else +#error "LCMS v1 or LCMS v2 required" +#endif + #include #include #include "rs-cmm.h" @@ -403,11 +412,18 @@ {0.115, 0.826, 0.724938}, {0.157, 0.018, 0.016875}}; cmsCIExyY D65; + +#if defined(HAVE_LCMS2) + gint context = 1337; cmsToneCurve* gamma[3]; - gint context = 1337; - cmsWhitePointFromTemp(&D65, 6504); gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(&context,1.0); +#else + LPGAMMATABLE gamma[3]; + cmsWhitePointFromTemp(6504, &D65); + gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(2,1.0); +#endif + linear = cmsCreateRGBProfile(&D65, &srgb_primaries, gamma); } g_mutex_unlock(is_profile_gamma_22_corrected_linear_lock); @@ -443,8 +459,11 @@ cmm->lcms_transform16 = cmsCreateTransform( cmm->lcms_input_profile, TYPE_RGBA_16, cmm->lcms_output_profile, TYPE_RGBA_16, +#if defined(HAVE_LCMS2) INTENT_PERCEPTUAL, cmsFLAGS_NOCACHE); - +#else + INTENT_PERCEPTUAL, 0); +#endif g_warn_if_fail(cmm->lcms_transform16 != NULL); /* Enable packing/unpacking for pixelsize==4 */ Modified: trunk/plugins/load-dcraw/Makefile.am =================================================================== --- trunk/plugins/load-dcraw/Makefile.am 2012-02-18 11:22:50 UTC (rev 4147) +++ trunk/plugins/load-dcraw/Makefile.am 2012-02-18 16:17:41 UTC (rev 4148) @@ -12,7 +12,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@\ + @PACKAGE_CFLAGS@ @LCMS_CFLAGS@\ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -20,6 +20,6 @@ libdir = $(datadir)/rawstudio/plugins/ -load_dcraw_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ +load_dcraw_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ load_dcraw_la_LDFLAGS = -module -avoid-version load_dcraw_la_SOURCES = dcrawloader.c dcraw.cc dcraw.h dcraw_api.cc dcraw_api.h mmap-hack.c mmap-hack.h Modified: trunk/plugins/load-dcraw/dcraw.cc =================================================================== --- trunk/plugins/load-dcraw/dcraw.cc 2012-02-18 11:22:50 UTC (rev 4147) +++ trunk/plugins/load-dcraw/dcraw.cc 2012-02-18 16:17:41 UTC (rev 4148) @@ -62,8 +62,16 @@ NO_LCMS disables the "-p" option. */ #ifndef NO_LCMS +#include +#if defined(HAVE_LCMS2) #include +#elif defined(HAVE_LCMS) +#include +#else +#error "LCMS v1 or LCMS v2 required" #endif +#endif + #ifdef HAVE_LIBJPEG extern "C" { #include /* Decode compressed Kodak DC120 photos */ Modified: trunk/plugins/load-gdk/load-gdk.c =================================================================== --- trunk/plugins/load-gdk/load-gdk.c 2012-02-18 11:22:50 UTC (rev 4147) +++ trunk/plugins/load-gdk/load-gdk.c 2012-02-18 16:17:41 UTC (rev 4148) @@ -20,7 +20,14 @@ #include #include /* pow() */ #include "exiv2-colorspace.h" +#include +#if defined(HAVE_LCMS2) #include +#elif defined(HAVE_LCMS) +#include +#else +#error "LCMS v1 or LCMS v2 required" +#endif /** @@ -56,6 +63,7 @@ cmsHPROFILE *lcms_target = cmsOpenProfileFromMem(data, length); if (lcms_target) { +#if defined(HAVE_LCMS2) cmsToneCurve *curve = NULL; if (cmsIsTag(lcms_target, cmsSigGrayTRCTag)) curve = cmsReadTag(lcms_target, cmsSigGrayTRCTag); @@ -68,6 +76,21 @@ if (gamma>0.0) gamma_guess = gamma; } +#else + LPGAMMATABLE curve = NULL; + if (cmsIsTag(lcms_target, icSigGrayTRCTag)) + curve = cmsReadICCGamma(lcms_target, icSigGrayTRCTag); + + if (NULL== curve && cmsIsTag(lcms_target, icSigRedTRCTag)) + curve = cmsReadICCGamma(lcms_target, icSigRedTRCTag); + + if (curve) + { + double gamma = cmsEstimateGamma(curve); + if (gamma>0.0) + gamma_guess = gamma; + } +#endif } } From klauspost at gmail.com Sat Feb 18 17:34:54 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 18 Feb 2012 17:34:54 +0100 Subject: [Rawstudio-commit] r4149 - trunk/plugins/load-gdk Message-ID: Author: post Date: 2012-02-18 17:34:54 +0100 (Sat, 18 Feb 2012) New Revision: 4149 Modified: trunk/plugins/load-gdk/Makefile.am Log: Use new flags for lcms. Modified: trunk/plugins/load-gdk/Makefile.am =================================================================== --- trunk/plugins/load-gdk/Makefile.am 2012-02-18 16:17:41 UTC (rev 4148) +++ trunk/plugins/load-gdk/Makefile.am 2012-02-18 16:34:54 UTC (rev 4149) @@ -9,7 +9,7 @@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ - @PACKAGE_CFLAGS@ @LCMS2_CFLAGS@ @EXIV2_CFLAGS@ \ + @PACKAGE_CFLAGS@ @LCMS_CFLAGS@ @EXIV2_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @@ -17,6 +17,6 @@ libdir = $(datadir)/rawstudio/plugins/ -load_gdk_la_LIBADD = @PACKAGE_LIBS@ @LCMS2_LIBS@ @EXIV2_LIBS@ @LIBJPEG@ +load_gdk_la_LIBADD = @PACKAGE_LIBS@ @LCMS_LIBS@ @EXIV2_LIBS@ @LIBJPEG@ load_gdk_la_LDFLAGS = -module -avoid-version load_gdk_la_SOURCES = load-gdk.c exiv2-colorspace.cpp exiv2-colorspace.h From anders at brander.dk Sat Feb 18 17:51:12 2012 From: anders at brander.dk (Anders Brander) Date: Sat, 18 Feb 2012 17:51:12 +0100 Subject: [Rawstudio-commit] r4150 - in trunk: . librawstudio Message-ID: Author: abrander Date: 2012-02-18 17:51:12 +0100 (Sat, 18 Feb 2012) New Revision: 4150 Added: trunk/librawstudio/rawstudio-2.1.pc.in Removed: trunk/librawstudio/rawstudio-2.0.pc.in Modified: trunk/configure.in trunk/librawstudio/Makefile.am Log: Bumped version to 2.1. Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2012-02-18 16:34:54 UTC (rev 4149) +++ trunk/configure.in 2012-02-18 16:51:12 UTC (rev 4150) @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) -AM_INIT_AUTOMAKE(rawstudio, 2.0) +AM_INIT_AUTOMAKE(rawstudio, 2.1) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AM_PROG_LIBTOOL @@ -207,7 +207,7 @@ AC_OUTPUT([ Makefile librawstudio/Makefile -librawstudio/rawstudio-2.0.pc +librawstudio/rawstudio-2.1.pc plugins/Makefile plugins/cache/Makefile plugins/colorspace-adobergb/Makefile Modified: trunk/librawstudio/Makefile.am =================================================================== --- trunk/librawstudio/Makefile.am 2012-02-18 16:34:54 UTC (rev 4149) +++ trunk/librawstudio/Makefile.am 2012-02-18 16:51:12 UTC (rev 4150) @@ -62,8 +62,8 @@ rs-gui-functions.h \ x86-cpu.h -lib_LTLIBRARIES = librawstudio-2.0.la -librawstudio_2_0_la_SOURCES = \ +lib_LTLIBRARIES = librawstudio-2.1.la +librawstudio_2_1_la_SOURCES = \ rs-debug.c rs-debug.h \ rs-io-job.c rs-io-job.h \ rs-io-job-checksum.c rs-io-job-checksum.h \ @@ -113,10 +113,10 @@ rs-gui-functions.c rs-gui-functions.h \ rs-stock.c rs-stock.h -librawstudio_2_0_la_LIBADD = @PACKAGE_LIBS@ @GCONF_LIBS@ @SQLITE3_LIBS@ @LENSFUN_LIBS@ @EXIV2_LIBS@ @LIBCURL_LIBS@ $(INTLLIBS) +librawstudio_2_1_la_LIBADD = @PACKAGE_LIBS@ @GCONF_LIBS@ @SQLITE3_LIBS@ @LENSFUN_LIBS@ @EXIV2_LIBS@ @LIBCURL_LIBS@ $(INTLLIBS) pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = rawstudio-2.0.pc +pkgconfig_DATA = rawstudio-2.1.pc sharedir = $(datadir)/rawstudio/ share_DATA = lens_fix.xml Deleted: trunk/librawstudio/rawstudio-2.0.pc.in =================================================================== --- trunk/librawstudio/rawstudio-2.0.pc.in 2012-02-18 16:34:54 UTC (rev 4149) +++ trunk/librawstudio/rawstudio-2.0.pc.in 2012-02-18 16:51:12 UTC (rev 4150) @@ -1,12 +0,0 @@ -prefix=@prefix@ -exec_prefix=${prefix} -libdir=@libdir@ -includedir=${prefix}/include -plugindir=@prefix@/share/rawstudio/plugins - -Name: @PACKAGE@ -Description: Rawstudio backend library -Version: @VERSION@ -Libs: -L${libdir} -l at PACKAGE@- at VERSION@ -Cflags: -I${includedir}/@PACKAGE at -@VERSION@ -I${libdir}/@PACKAGE at -@VERSION@/include -Requires: gtk+-2.0 Copied: trunk/librawstudio/rawstudio-2.1.pc.in (from rev 4081, trunk/librawstudio/rawstudio-2.0.pc.in) =================================================================== --- trunk/librawstudio/rawstudio-2.1.pc.in (rev 0) +++ trunk/librawstudio/rawstudio-2.1.pc.in 2012-02-18 16:51:12 UTC (rev 4150) @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=@libdir@ +includedir=${prefix}/include +plugindir=@prefix@/share/rawstudio/plugins + +Name: @PACKAGE@ +Description: Rawstudio backend library +Version: @VERSION@ +Libs: -L${libdir} -l at PACKAGE@- at VERSION@ +Cflags: -I${includedir}/@PACKAGE at -@VERSION@ -I${libdir}/@PACKAGE at -@VERSION@/include +Requires: gtk+-2.0 From klauspost at gmail.com Sat Feb 18 18:57:24 2012 From: klauspost at gmail.com (Klaus Post) Date: Sat, 18 Feb 2012 18:57:24 +0100 Subject: [Rawstudio-commit] r4151 - trunk Message-ID: Author: post Date: 2012-02-18 18:57:23 +0100 (Sat, 18 Feb 2012) New Revision: 4151 Modified: trunk/.version Log: Bump UI version. Modified: trunk/.version =================================================================== --- trunk/.version 2012-02-18 16:51:12 UTC (rev 4150) +++ trunk/.version 2012-02-18 17:57:23 UTC (rev 4151) @@ -1 +1 @@ -2.0 +2.1 From klauspost at gmail.com Sun Feb 19 14:10:32 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 14:10:32 +0100 Subject: [Rawstudio-commit] r4152 - trunk/src Message-ID: Author: post Date: 2012-02-19 14:10:31 +0100 (Sun, 19 Feb 2012) New Revision: 4152 Modified: trunk/src/application.c trunk/src/gtk-interface.c trunk/src/rs-preview-widget.c Log: Don't intermediately display old image with new settings. Modified: trunk/src/application.c =================================================================== --- trunk/src/application.c 2012-02-18 17:57:23 UTC (rev 4151) +++ trunk/src/application.c 2012-02-19 13:10:31 UTC (rev 4152) @@ -72,7 +72,6 @@ { g_assert(rs != NULL); - rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); /* Unref old photo if any */ if (rs->photo) g_object_unref(rs->photo); @@ -93,7 +92,6 @@ g_signal_connect(G_OBJECT(rs->photo), "spatial-changed", G_CALLBACK(photo_spatial_changed), rs); g_signal_connect(G_OBJECT(rs->photo), "profile-changed", G_CALLBACK(photo_profile_changed), rs); } - rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); } static void Modified: trunk/src/gtk-interface.c =================================================================== --- trunk/src/gtk-interface.c 2012-02-18 17:57:23 UTC (rev 4151) +++ trunk/src/gtk-interface.c 2012-02-19 13:10:31 UTC (rev 4152) @@ -244,6 +244,7 @@ set_photo_info_label(photo); + rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); rs_set_photo(rs, photo); /* We need check if we should calculate and set auto wb here because the photo needs to be loaded for filterchain to work */ @@ -258,6 +259,8 @@ /* Set photo in preview-widget */ rs_preview_widget_set_photo(RS_PREVIEW_WIDGET(rs->preview), photo); rs->photo->proposed_crop = NULL; + rs_preview_widget_unlock_renderer(RS_PREVIEW_WIDGET(rs->preview)); + rs_preview_widget_update(RS_PREVIEW_WIDGET(rs->preview), TRUE); GTK_CATCHUP(); if (rs->photo && NULL==rs->photo->crop && rs->photo->proposed_crop) rs_photo_set_crop(rs->photo, rs->photo->proposed_crop); Modified: trunk/src/rs-preview-widget.c =================================================================== --- trunk/src/rs-preview-widget.c 2012-02-18 17:57:23 UTC (rev 4151) +++ trunk/src/rs-preview-widget.c 2012-02-19 13:10:31 UTC (rev 4152) @@ -728,7 +728,6 @@ photo->thumbnail_filter = preview->navigator_filter_end; g_signal_connect(G_OBJECT(preview->photo), "lens-changed", G_CALLBACK(lens_changed), preview); g_signal_connect(G_OBJECT(preview->photo), "profile-changed", G_CALLBACK(profile_changed), preview); - rs_preview_widget_update(preview, TRUE); } } From klauspost at gmail.com Sun Feb 19 14:34:36 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 14:34:36 +0100 Subject: [Rawstudio-commit] r4153 - trunk/src Message-ID: Author: post Date: 2012-02-19 14:34:36 +0100 (Sun, 19 Feb 2012) New Revision: 4153 Modified: trunk/src/gtk-interface.c Log: Unlock GDK while waiting for renderer to finish Modified: trunk/src/gtk-interface.c =================================================================== --- trunk/src/gtk-interface.c 2012-02-19 13:10:31 UTC (rev 4152) +++ trunk/src/gtk-interface.c 2012-02-19 13:34:36 UTC (rev 4153) @@ -244,7 +244,9 @@ set_photo_info_label(photo); + gdk_threads_leave(); rs_preview_widget_lock_renderer(RS_PREVIEW_WIDGET(rs->preview)); + gdk_threads_enter(); rs_set_photo(rs, photo); /* We need check if we should calculate and set auto wb here because the photo needs to be loaded for filterchain to work */ From klauspost at gmail.com Sun Feb 19 14:55:45 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 14:55:45 +0100 Subject: [Rawstudio-commit] r4154 - trunk/src Message-ID: Author: post Date: 2012-02-19 14:55:45 +0100 (Sun, 19 Feb 2012) New Revision: 4154 Modified: trunk/src/gtk-helper.c trunk/src/rs-batch.c trunk/src/rs-save-dialog.c Log: Don't use int casts for GType numbers. Modified: trunk/src/gtk-helper.c =================================================================== --- trunk/src/gtk-helper.c 2012-02-19 13:34:36 UTC (rev 4153) +++ trunk/src/gtk-helper.c 2012-02-19 13:55:45 UTC (rev 4154) @@ -228,7 +228,7 @@ gchar *name = g_strdup(g_type_name(savers[i])); /* FIXME: Stop leaking! */ GType type = g_type_from_name(name); klass = g_type_class_ref(savers[i]); - gui_confbox_add_entry(confbox, name, klass->display_name, GINT_TO_POINTER(type)); + gui_confbox_add_entry(confbox, name, klass->display_name, (gpointer)type); g_type_class_unref(klass); } g_free(savers); Modified: trunk/src/rs-batch.c =================================================================== --- trunk/src/rs-batch.c 2012-02-19 13:34:36 UTC (rev 4153) +++ trunk/src/rs-batch.c 2012-02-19 13:55:45 UTC (rev 4154) @@ -795,7 +795,7 @@ filetype_changed(gpointer active, gpointer user_data) { RS_QUEUE *queue = (RS_QUEUE *) user_data; - GType filetype = GPOINTER_TO_INT(active); + GType filetype = (GType)active; if (!filetype) return; Modified: trunk/src/rs-save-dialog.c =================================================================== --- trunk/src/rs-save-dialog.c 2012-02-19 13:34:36 UTC (rev 4153) +++ trunk/src/rs-save-dialog.c 2012-02-19 13:55:45 UTC (rev 4154) @@ -147,7 +147,7 @@ RSOutputClass *klass; gchar *name = g_strdup(g_type_name(savers[i])); klass = g_type_class_ref(savers[i]); - gui_confbox_add_entry(dialog->type_box, name, klass->display_name, GINT_TO_POINTER(savers[i])); + gui_confbox_add_entry(dialog->type_box, name, klass->display_name, (gpointer)savers[i]); g_type_class_unref(klass); } g_free(savers); @@ -233,7 +233,7 @@ file_type_changed(gpointer active, gpointer user_data) { RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data); - const gchar *identifier = g_type_name(GPOINTER_TO_INT(active)); + const gchar *identifier = g_type_name((GType)active); if (dialog->output) g_object_unref(dialog->output); From klauspost at gmail.com Sun Feb 19 15:40:36 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 15:40:36 +0100 Subject: [Rawstudio-commit] r4155 - in trunk/profiles: . recipes simple-src Message-ID: Author: post Date: 2012-02-19 15:40:36 +0100 (Sun, 19 Feb 2012) New Revision: 4155 Added: trunk/profiles/FUJIFILM_FinePix_E810-simple.dcp trunk/profiles/FUJIFILM_FinePix_F550EXR-simple.dcp trunk/profiles/FUJIFILM_FinePix_F700-simple.dcp trunk/profiles/FUJIFILM_FinePix_F710-simple.dcp trunk/profiles/FUJIFILM_FinePix_S200EXR-simple.dcp trunk/profiles/Fuji_HS20EXR-simple.dcp trunk/profiles/PENTAX_K10D_Rawstudio_Advanced_Profile.dcp trunk/profiles/recipes/Pentax_K10D.dcpr trunk/profiles/simple-src/FUJIFILM_FinePix_E810-simple.xml trunk/profiles/simple-src/FUJIFILM_FinePix_F550EXR-simple.xml trunk/profiles/simple-src/FUJIFILM_FinePix_F700-simple.xml trunk/profiles/simple-src/FUJIFILM_FinePix_F710-simple.xml trunk/profiles/simple-src/FUJIFILM_FinePix_S200EXR-simple.xml trunk/profiles/simple-src/Fuji_HS20EXR-simple.xml Modified: trunk/profiles/Makefile.am trunk/profiles/simple-src/compile.bat Log: Add Fuji HS20, E810, F550EXR, F700, F100, S200EXR simple & Pentax advanced profiles Added: trunk/profiles/FUJIFILM_FinePix_E810-simple.dcp =================================================================== (Binary files differ) Property changes on: trunk/profiles/FUJIFILM_FinePix_E810-simple.dcp ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/profiles/FUJIFILM_FinePix_F550EXR-simple.dcp =================================================================== (Binary files differ) Property changes on: trunk/profiles/FUJIFILM_FinePix_F550EXR-simple.dcp ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/profiles/FUJIFILM_FinePix_F700-simple.dcp =================================================================== (Binary files differ) Property changes on: trunk/profiles/FUJIFILM_FinePix_F700-simple.dcp ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/profiles/FUJIFILM_FinePix_F710-simple.dcp =================================================================== (Binary files differ) Property changes on: trunk/profiles/FUJIFILM_FinePix_F710-simple.dcp ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/profiles/FUJIFILM_FinePix_S200EXR-simple.dcp =================================================================== (Binary files differ) Property changes on: trunk/profiles/FUJIFILM_FinePix_S200EXR-simple.dcp ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/profiles/Fuji_HS20EXR-simple.dcp =================================================================== (Binary files differ) Property changes on: trunk/profiles/Fuji_HS20EXR-simple.dcp ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/profiles/Makefile.am =================================================================== --- trunk/profiles/Makefile.am 2012-02-19 13:55:45 UTC (rev 4154) +++ trunk/profiles/Makefile.am 2012-02-19 14:40:36 UTC (rev 4155) @@ -111,6 +111,12 @@ FUJIFILM_IS_Pro-simple.dcp\ FUJIFILM_IS-1-simple.dcp\ Fuji_HS10-simple.dcp\ + FUJIFILM_FinePix_S200EXR-simple.dcp\ + Fuji_HS20EXR-simple.dcp\ + FUJIFILM_FinePix_E810-simple.dcp\ + FUJIFILM_FinePix_F700-simple.dcp\ + FUJIFILM_FinePix_F710-simple.dcp\ + FUJIFILM_FinePix_F550EXR-simple.dcp\ Imacon_Ixpress-simple.dcp\ Kodak_DCS_Pro_14-simple.dcp\ Kodak_DCS_Pro_14nx-simple.dcp\ @@ -397,6 +403,7 @@ PENTAX_K200D_Rawstudio_Advanced_Profile.dcp\ PENTAX_K20D_Rawstudio_Advanced_Profile.dcp\ PENTAX_Q_Rawstudio_Advanced_Profile.dcp\ + PENTAX_K10D_Rawstudio_Advanced_Profile.dcp\ Panasonic_DMC-G1_Rawstudio_Advanced_Profile.dcp\ Panasonic_DMC-G2_Rawstudio_Advanced_Profile.dcp\ Panasonic_DMC-G3_Rawstudio_Advanced_Profile.dcp\ @@ -502,6 +509,7 @@ recipes/Pentax_Kr.dcpr\ recipes/Pentax_Kx.dcpr\ recipes/Pentax_Q.dcpr\ + recipes/Pentax_K10D.dcpr\ recipes/Sony_A200.dcpr\ recipes/Sony_A230.dcpr\ recipes/Sony_A290.dcpr\ @@ -625,6 +633,12 @@ simple-src/FUJIFILM_IS-1-simple.xml\ simple-src/FUJIFILM_IS_Pro-simple.xml\ simple-src/Fuji_HS10-simple.xml\ + simple-src/FUJIFILM_FinePix_F550EXR-simple.xml\ + simple-src/FUJIFILM_FinePix_F710-simple.xml\ + simple-src/FUJIFILM_FinePix_F700-simple.xml\ + simple-src/FUJIFILM_FinePix_E810-simple.xml\ + simple-src/Fuji_HS20EXR-simple.xml\ + simple-src/FUJIFILM_FinePix_S200EXR-simple.xml\ simple-src/Imacon_Ixpress-simple.xml\ simple-src/Kodak_DCS315C-simple.xml\ simple-src/Kodak_DCS330C-simple.xml\ Added: trunk/profiles/PENTAX_K10D_Rawstudio_Advanced_Profile.dcp =================================================================== (Binary files differ) Property changes on: trunk/profiles/PENTAX_K10D_Rawstudio_Advanced_Profile.dcp ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/profiles/recipes/Pentax_K10D.dcpr =================================================================== --- trunk/profiles/recipes/Pentax_K10D.dcpr (rev 0) +++ trunk/profiles/recipes/Pentax_K10D.dcpr 2012-02-19 14:40:36 UTC (rev 4155) @@ -0,0 +1,506 @@ + + + + 1.0 + + + 27 + 52 + 0 + 0 + 0 + 0 + 352 + 62 + 0 + 100 + 1 + + + 23 + 48 + 4 + -4 + 0 + 0 + 348 + 58 + 0 + 100 + 1 + + + 230 + 50 + 1 + -4 + 0 + 0 + 195 + 265 + 0 + 100 + 1 + + + 78 + 54 + 7 + 1 + 0 + 0 + 43 + 113 + 0 + 100 + 1 + + + 249 + 47 + 0 + -4 + 0 + 0 + 214 + 284 + 0 + 100 + 1 + + + 167 + 39 + -4 + 0 + 0 + 0 + 132 + 202 + 0 + 100 + 1 + + + 28 + 86 + 1 + 1 + 0 + 0 + 353 + 63 + 0 + 100 + 1 + + + 241 + 74 + 2 + -4 + 0 + 0 + 206 + 276 + 0 + 100 + 1 + + + 4 + 65 + 0 + -1 + 0 + 0 + 329 + 39 + 0 + 100 + 1 + + + 272 + 55 + -1 + 3 + 0 + 0 + 237 + 307 + 0 + 100 + 1 + + + 76 + 75 + 4 + 2 + 0 + 0 + 41 + 111 + 0 + 100 + 1 + + + 41 + 86 + 0 + 1 + 0 + 0 + 6 + 76 + 0 + 100 + 1 + + + 240 + 83 + 4 + -2 + 0 + 0 + 205 + 275 + 0 + 100 + 1 + + + 100 + 62 + 5 + 3 + 0 + 0 + 65 + 135 + 0 + 100 + 1 + + + 10 + 80 + -3 + 2 + 0 + 0 + 335 + 45 + 0 + 100 + 1 + + + 52 + 86 + 1 + 0 + 0 + 0 + 17 + 87 + 0 + 100 + 1 + + + 323 + 61 + -3 + 0 + 0 + 0 + 288 + 358 + 0 + 100 + 1 + + + 218 + 69 + -3 + -1 + 0 + 0 + 183 + 253 + 0 + 100 + 1 + + + + + 27 + 52 + 0 + 0 + 0 + 0 + 352 + 62 + 0 + 100 + 1 + + + 23 + 48 + 4 + -4 + 0 + 0 + 348 + 58 + 0 + 100 + 1 + + + 230 + 50 + 1 + -4 + 0 + 0 + 195 + 265 + 0 + 100 + 1 + + + 78 + 54 + 7 + 1 + 0 + 0 + 43 + 113 + 0 + 100 + 1 + + + 249 + 47 + 0 + -4 + 0 + 0 + 214 + 284 + 0 + 100 + 1 + + + 167 + 39 + -4 + 0 + 0 + 0 + 132 + 202 + 0 + 100 + 1 + + + 28 + 86 + 1 + 1 + 0 + 0 + 353 + 63 + 0 + 100 + 1 + + + 241 + 74 + 2 + -4 + 0 + 0 + 206 + 276 + 0 + 100 + 1 + + + 4 + 65 + 0 + -1 + 0 + 0 + 329 + 39 + 0 + 100 + 1 + + + 272 + 55 + -1 + 3 + 0 + 0 + 237 + 307 + 0 + 100 + 1 + + + 76 + 75 + 4 + 2 + 0 + 0 + 41 + 111 + 0 + 100 + 1 + + + 41 + 86 + 0 + 1 + 0 + 0 + 6 + 76 + 0 + 100 + 1 + + + 240 + 83 + 4 + -2 + 0 + 0 + 205 + 275 + 0 + 100 + 1 + + + 100 + 62 + 5 + 3 + 0 + 0 + 65 + 135 + 0 + 100 + 1 + + + 10 + 80 + -3 + 2 + 0 + 0 + 335 + 45 + 0 + 100 + 1 + + + 52 + 86 + 1 + 0 + 0 + 0 + 17 + 87 + 0 + 100 + 1 + + + 323 + 61 + -3 + 0 + 0 + 0 + 288 + 358 + 0 + 100 + 1 + + + 218 + 69 + -3 + -1 + 0 + 0 + 183 + 253 + 0 + 100 + 1 + + + + + 0 + 0 + + + 255 + 255 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + Rawstudio Advanced Profile + CC-BY-SA 3.0, rawstudio.org + 3 + 0 + 4949524308000000070014C602000C0000006200000021C60A00090000006E00000022C60A0009000000B60000005AC6030001000000110000005BC603000100000015000000F8C602000D000000FE000000FDC6040001000000030000000000000050454E544158204B31304400954E0000102700002BE4FFFF102700003CF5FFFF102700007DF0FFFF10270000A529000010270000000300001027000016FDFFFF10270000AE050000102700003D0D000010270000C82E0000102700000BF5FFFF1027000062FEFFFF10270000CAE7FFFF102700009F35000010270000A70A00001027000020FDFFFF102700009702000010270000A529000010270000436F6C6F72436865636B65720000 + 8A67F8F117A4D2C7C40FAFD89D1009B9 + PENTAX K10D + ColorChecker + + + Added: trunk/profiles/simple-src/FUJIFILM_FinePix_E810-simple.xml =================================================================== --- trunk/profiles/simple-src/FUJIFILM_FinePix_E810-simple.xml (rev 0) +++ trunk/profiles/simple-src/FUJIFILM_FinePix_E810-simple.xml 2012-02-19 14:40:36 UTC (rev 4155) @@ -0,0 +1,44 @@ + + + + FUJIFILM FinePix E810 Simple + 17 + 21 + + 0.792100 + 0.154700 + -0.079600 + 0.293900 + 1.285200 + -0.547200 + 0.022200 + -0.612500 + 1.299700 + + + 0.806900 + 0.227600 + -0.153100 + 0.220800 + 1.516700 + -0.724800 + -0.112000 + -0.388800 + 1.104400 + + + + + + 3 + Fujifilm FinePix F810 + CC-BY-SA 3.0, rawstudio.org + Added: trunk/profiles/simple-src/FUJIFILM_FinePix_F550EXR-simple.xml =================================================================== --- trunk/profiles/simple-src/FUJIFILM_FinePix_F550EXR-simple.xml (rev 0) +++ trunk/profiles/simple-src/FUJIFILM_FinePix_F550EXR-simple.xml 2012-02-19 14:40:36 UTC (rev 4155) @@ -0,0 +1,44 @@ + + + + Fujifilm FinePix F550EXR Simple + 17 + 21 + + 0.500200 + 0.089300 + 0.025500 + 0.256900 + 1.067300 + -0.289600 + -0.059000 + -0.656200 + 1.414300 + + + 0.439500 + 0.155400 + -0.013200 + 0.199800 + 1.160000 + -0.336900 + -0.147400 + -0.535800 + 1.369000 + + + + + + 3 + Fujifilm FinePix F550EXR + CC-BY-SA 3.0, rawstudio.org + Added: trunk/profiles/simple-src/FUJIFILM_FinePix_F700-simple.xml =================================================================== --- trunk/profiles/simple-src/FUJIFILM_FinePix_F700-simple.xml (rev 0) +++ trunk/profiles/simple-src/FUJIFILM_FinePix_F700-simple.xml 2012-02-19 14:40:36 UTC (rev 4155) @@ -0,0 +1,44 @@ + + + + Fujifilm FinePix F700 Simple + 17 + 21 + + 0.823300 + 0.183400 + -0.120200 + 0.263500 + 1.339800 + -0.577900 + -0.042200 + -0.455000 + 1.088700 + + + 0.773500 + 0.256500 + -0.186300 + 0.210700 + 1.504700 + -0.703600 + -0.120100 + -0.321900 + 1.000400 + + + + + + 3 + Fujifilm FinePix F700 + CC-BY-SA 3.0, rawstudio.org + Added: trunk/profiles/simple-src/FUJIFILM_FinePix_F710-simple.xml =================================================================== --- trunk/profiles/simple-src/FUJIFILM_FinePix_F710-simple.xml (rev 0) +++ trunk/profiles/simple-src/FUJIFILM_FinePix_F710-simple.xml 2012-02-19 14:40:36 UTC (rev 4155) @@ -0,0 +1,44 @@ + + + + Fujifilm FinePix F710 Simple + 17 + 21 + + 0.823300 + 0.183400 + -0.120200 + 0.263500 + 1.339800 + -0.577900 + -0.042200 + -0.455000 + 1.088700 + + + 0.773500 + 0.256500 + -0.186300 + 0.210700 + 1.504700 + -0.703600 + -0.120100 + -0.321900 + 1.000400 + + + + + + 3 + Fujifilm FinePix F710 + CC-BY-SA 3.0, rawstudio.org + Added: trunk/profiles/simple-src/FUJIFILM_FinePix_S200EXR-simple.xml =================================================================== --- trunk/profiles/simple-src/FUJIFILM_FinePix_S200EXR-simple.xml (rev 0) +++ trunk/profiles/simple-src/FUJIFILM_FinePix_S200EXR-simple.xml 2012-02-19 14:40:36 UTC (rev 4155) @@ -0,0 +1,44 @@ + + + + Fujifilm FinePix S200EXR Simple + 17 + 21 + + 0.647400 + 0.070000 + -0.028600 + 0.359500 + 1.080600 + -0.391200 + -0.053400 + -0.591100 + 1.207900 + + + 0.594100 + 0.156800 + -0.083800 + 0.261300 + 1.275100 + -0.508800 + -0.131200 + -0.449800 + 1.140100 + + + + + + 3 + Fujifilm FinePix S200EXR + CC-BY-SA 3.0, rawstudio.org + Added: trunk/profiles/simple-src/Fuji_HS20EXR-simple.xml =================================================================== --- trunk/profiles/simple-src/Fuji_HS20EXR-simple.xml (rev 0) +++ trunk/profiles/simple-src/Fuji_HS20EXR-simple.xml 2012-02-19 14:40:36 UTC (rev 4155) @@ -0,0 +1,44 @@ + + + + Fujifilm FinePix HS20EXR Simple + 17 + 21 + + 0.500200 + 0.089300 + 0.025500 + 0.256900 + 1.067300 + -0.289600 + -0.059000 + -0.656200 + 1.414300 + + + 0.439500 + 0.155400 + -0.013200 + 0.199800 + 1.160000 + -0.336900 + -0.147400 + -0.535800 + 1.369000 + + + + + + 3 + Fujifilm FinePix HS20EXR + CC-BY-SA 3.0, rawstudio.org + Modified: trunk/profiles/simple-src/compile.bat =================================================================== --- trunk/profiles/simple-src/compile.bat 2012-02-19 13:55:45 UTC (rev 4154) +++ trunk/profiles/simple-src/compile.bat 2012-02-19 14:40:36 UTC (rev 4155) @@ -328,3 +328,9 @@ dcptool -c "NIKON_1_J1.xml" "..\NIKON_1_J1.dcp" dcptool -c "NIKON_1_V1.xml" "..\NIKON_1_V1.dcp" dcptool -c "Panasonic_DMC-GX1-simple.xml" "..\Panasonic_DMC-GX1-simple.dcp" +dcptool -c "FUJIFILM_FinePix_F550EXR-simple.xml" "..\FUJIFILM_FinePix_F550EXR-simple.dcp" +dcptool -c "FUJIFILM_FinePix_F710-simple.xml" "..\FUJIFILM_FinePix_F710-simple.dcp" +dcptool -c "FUJIFILM_FinePix_F700-simple.xml" "..\FUJIFILM_FinePix_F700-simple.dcp" +dcptool -c "FUJIFILM_FinePix_E810-simple.xml" "..\FUJIFILM_FinePix_E810-simple.dcp" +dcptool -c "Fuji_HS20EXR-simple.xml" "..\Fuji_HS20EXR-simple.dcp" +dcptool -c "FUJIFILM_FinePix_S200EXR-simple.xml" "..\FUJIFILM_FinePix_S200EXR-simple.dcp" From klauspost at gmail.com Sun Feb 19 15:47:57 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 15:47:57 +0100 Subject: [Rawstudio-commit] r4156 - trunk/profiles Message-ID: Author: post Date: 2012-02-19 15:47:57 +0100 (Sun, 19 Feb 2012) New Revision: 4156 Modified: trunk/profiles/rawstudio-cameras.xml Log: Add Fuji HS20, E810, F550EXR, F700, F100, S200EXR camera aliases. Modified: trunk/profiles/rawstudio-cameras.xml =================================================================== --- trunk/profiles/rawstudio-cameras.xml 2012-02-19 14:40:36 UTC (rev 4155) +++ trunk/profiles/rawstudio-cameras.xml 2012-02-19 14:47:57 UTC (rev 4156) @@ -357,10 +357,29 @@ + + + + + + + + + + + + + + + + + + + @@ -373,6 +392,10 @@ + + + + From klauspost at gmail.com Sun Feb 19 18:24:57 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 18:24:57 +0100 Subject: [Rawstudio-commit] r4157 - in trunk/plugins: meta-raf meta-tiff Message-ID: Author: post Date: 2012-02-19 18:24:57 +0100 (Sun, 19 Feb 2012) New Revision: 4157 Modified: trunk/plugins/meta-raf/raf-meta.c trunk/plugins/meta-tiff/tiff-meta.c Log: Add support for whitebalance on new FUJI cameras. Modified: trunk/plugins/meta-raf/raf-meta.c =================================================================== --- trunk/plugins/meta-raf/raf-meta.c 2012-02-19 14:47:57 UTC (rev 4156) +++ trunk/plugins/meta-raf/raf-meta.c 2012-02-19 17:24:57 UTC (rev 4157) @@ -67,8 +67,17 @@ offset = offset + 4 + length; } } + guint meta_offset = 0; + if (raw_get_uint(rawfile, 100, &meta_offset)) + { + gushort order = raw_get_byteorder(rawfile); + rs_filetype_meta_load(".tiff", meta, rawfile, meta_offset); + raw_set_byteorder(rawfile, order); + raw_reset_base(rawfile); + } meta->thumbnail = rs_raf_load_thumb(rawfile); rs_filetype_meta_load(".tiff", meta, rawfile, meta->preview_start+12); + return TRUE; } return FALSE; Modified: trunk/plugins/meta-tiff/tiff-meta.c =================================================================== --- trunk/plugins/meta-tiff/tiff-meta.c 2012-02-19 14:47:57 UTC (rev 4156) +++ trunk/plugins/meta-tiff/tiff-meta.c 2012-02-19 17:24:57 UTC (rev 4157) @@ -1759,6 +1759,21 @@ if (raw_get_rational(rawfile, ifd.value_offset+24, &float_temp)) meta->lens_max_aperture = float_temp; break; + case 61440: /* FUJI RAW TiffIFD */ + if (meta->make == MAKE_FUJIFILM) + ifd_reader(rawfile, ifd.value_offset, meta); + break; + case 61454: + if (meta->make == MAKE_FUJIFILM) + { + raw_get_uint(rawfile, ifd.value_offset, &uint_temp1); + meta->cam_mul[1] = uint_temp1; + raw_get_uint(rawfile, ifd.value_offset+4, &uint_temp1); + meta->cam_mul[0] = uint_temp1; + raw_get_uint(rawfile, ifd.value_offset+8, &uint_temp1); + meta->cam_mul[2] = uint_temp1; + meta->cam_mul[3] = meta->cam_mul[1]; + } } } From klauspost at gmail.com Sun Feb 19 18:51:29 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 18:51:29 +0100 Subject: [Rawstudio-commit] r4158 - trunk/plugins/meta-tiff Message-ID: Author: post Date: 2012-02-19 18:51:29 +0100 (Sun, 19 Feb 2012) New Revision: 4158 Modified: trunk/plugins/meta-tiff/tiff-meta.c Log: Add Whitebalance support for Nikon 1 J1 & V1. Modified: trunk/plugins/meta-tiff/tiff-meta.c =================================================================== --- trunk/plugins/meta-tiff/tiff-meta.c 2012-02-19 17:24:57 UTC (rev 4157) +++ trunk/plugins/meta-tiff/tiff-meta.c 2012-02-19 17:51:29 UTC (rev 4158) @@ -601,6 +601,7 @@ raw_get_uint(rawfile, offset, &uint_temp1); offset = base + uint_temp1; } + g_debug("Nikon tag:0x%x", fieldtag); switch(fieldtag) { case 0x0002: /* ISO */ @@ -614,6 +615,8 @@ || g_str_equal(meta->model_ascii, "NIKON D3000") || g_str_equal(meta->model_ascii, "NIKON D3100") || g_str_equal(meta->model_ascii, "NIKON D5000") + || g_str_equal(meta->model_ascii, "NIKON 1 J1") + || g_str_equal(meta->model_ascii, "NIKON 1 V1") || g_str_equal(meta->model_ascii, "NIKON D7000")) { meta->cam_mul[0] = get_rational(rawfile, offset); From klauspost at gmail.com Sun Feb 19 19:51:42 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 19:51:42 +0100 Subject: [Rawstudio-commit] r4159 - trunk/plugins/meta-tiff Message-ID: Author: post Date: 2012-02-19 19:51:42 +0100 (Sun, 19 Feb 2012) New Revision: 4159 Modified: trunk/plugins/meta-tiff/tiff-meta.c Log: Add whitebalance support for Nikon P7000. Modified: trunk/plugins/meta-tiff/tiff-meta.c =================================================================== --- trunk/plugins/meta-tiff/tiff-meta.c 2012-02-19 17:51:29 UTC (rev 4158) +++ trunk/plugins/meta-tiff/tiff-meta.c 2012-02-19 18:51:42 UTC (rev 4159) @@ -601,7 +601,7 @@ raw_get_uint(rawfile, offset, &uint_temp1); offset = base + uint_temp1; } - g_debug("Nikon tag:0x%x", fieldtag); + g_debug("Nikon tag:0x%x, type=%d, len=%d", fieldtag, fieldtype, valuecount); switch(fieldtag) { case 0x0002: /* ISO */ @@ -653,6 +653,26 @@ ifd_reader(rawfile, uint_temp1+base, meta); meta->thumbnail_start += base; break; + case 0x0014: /* Whitebalance */ + if (fieldtype == 7) + { + if (raw_strcmp(rawfile,offset,"NRW",3)) + { + offset += raw_strcmp(rawfile,offset+4,"0100",4) ? 1556 : 56; + raw_get_uint(rawfile, offset, &uint_temp1); + meta->cam_mul[0] = uint_temp1 << 2; + raw_get_uint(rawfile, offset+4, &uint_temp1); + meta->cam_mul[1] = uint_temp1; + raw_get_uint(rawfile, offset+8, &uint_temp1); + meta->cam_mul[1] += uint_temp1; + raw_get_uint(rawfile, offset+12, &uint_temp1); + meta->cam_mul[2] = uint_temp1 << 2; + meta->cam_mul[3] = meta->cam_mul[1]; + rs_metadata_normalize_wb(meta); + got_wb = TRUE; + } + } + break; case 0x0084: /* Lens - rational64u[4] */ raw_get_rational(rawfile, offset, &float_temp1); meta->lens_min_focal = float_temp1; From klauspost at gmail.com Sun Feb 19 20:20:23 2012 From: klauspost at gmail.com (Klaus Post) Date: Sun, 19 Feb 2012 20:20:23 +0100 Subject: [Rawstudio-commit] r4160 - trunk/plugins/meta-tiff Message-ID: Author: post Date: 2012-02-19 20:20:23 +0100 (Sun, 19 Feb 2012) New Revision: 4160 Modified: trunk/plugins/meta-tiff/tiff-meta.c Log: Remove debug print Modified: trunk/plugins/meta-tiff/tiff-meta.c =================================================================== --- trunk/plugins/meta-tiff/tiff-meta.c 2012-02-19 18:51:42 UTC (rev 4159) +++ trunk/plugins/meta-tiff/tiff-meta.c 2012-02-19 19:20:23 UTC (rev 4160) @@ -601,7 +601,6 @@ raw_get_uint(rawfile, offset, &uint_temp1); offset = base + uint_temp1; } - g_debug("Nikon tag:0x%x, type=%d, len=%d", fieldtag, fieldtype, valuecount); switch(fieldtag) { case 0x0002: /* ISO */ From klauspost at gmail.com Mon Feb 20 11:58:17 2012 From: klauspost at gmail.com (Klaus Post) Date: Mon, 20 Feb 2012 11:58:17 +0100 Subject: [Rawstudio-commit] r4161 - trunk/librawstudio Message-ID: Author: post Date: 2012-02-20 11:58:16 +0100 (Mon, 20 Feb 2012) New Revision: 4161 Modified: trunk/librawstudio/rs-metadata.c Log: Bump metadata version to re-generate metadata caches. Modified: trunk/librawstudio/rs-metadata.c =================================================================== --- trunk/librawstudio/rs-metadata.c 2012-02-19 19:20:23 UTC (rev 4160) +++ trunk/librawstudio/rs-metadata.c 2012-02-20 10:58:16 UTC (rev 4161) @@ -117,7 +117,7 @@ return g_object_new (RS_TYPE_METADATA, NULL); } -#define METACACHEVERSION 8 +#define METACACHEVERSION 9 void rs_metadata_cache_save(RSMetadata *metadata, const gchar *filename) { From klauspost at gmail.com Tue Feb 21 18:51:38 2012 From: klauspost at gmail.com (Klaus Post) Date: Tue, 21 Feb 2012 18:51:38 +0100 Subject: [Rawstudio-commit] r4162 - trunk/plugins/meta-tiff Message-ID: Author: post Date: 2012-02-21 18:51:37 +0100 (Tue, 21 Feb 2012) New Revision: 4162 Modified: trunk/plugins/meta-tiff/tiff-meta.c Log: Use DCP profiles for rendering RAW-based thumbnails for better accuracy. Also be more liberal on accepting camera names, so DNG images always have previews. Modified: trunk/plugins/meta-tiff/tiff-meta.c =================================================================== --- trunk/plugins/meta-tiff/tiff-meta.c 2012-02-20 10:58:16 UTC (rev 4161) +++ trunk/plugins/meta-tiff/tiff-meta.c 2012-02-21 17:51:37 UTC (rev 4162) @@ -28,6 +28,7 @@ #include /* memcpy() */ #include #include "rs-utils.h" +#include "rs-profile-camera.h" /* It is required having some arbitrary maximum exposure time to prevent borked * shutter speed values being interpreted from the tiff. @@ -1693,6 +1694,8 @@ meta->make = MAKE_RICOH; else if (raw_strcmp(rawfile, ifd.value_offset, "SAMSUNG", 7)) meta->make = MAKE_SAMSUNG; + else if (raw_strcmp(rawfile, ifd.value_offset, "SIGMA", 5)) + meta->make = MAKE_SIGMA; /* Do not detect SONY, we don't want to call private_sony() unless we're sure we have a hidden SonyMeta */ else if (raw_strcmp(rawfile, ifd.value_offset, "FUJIFILM", 4)) @@ -1848,7 +1851,7 @@ } while (next>0); rs_metadata_normalize_wb(meta); - return !!meta->make; + return (!!meta->make) || (meta->make_ascii); } /** @@ -1877,7 +1880,6 @@ thumbnail_reader(const gchar *service, RAWFILE *rawfile, guint offset, guint length, RSMetadata *meta) { GdkPixbuf *pixbuf=NULL; - if ((offset>0) && (length>0) && (length<5000000)) { if ((length==165888) && (meta->make == MAKE_CANON)) @@ -1975,25 +1977,80 @@ RSFilter *finput = rs_filter_new("RSInputFile", NULL); RSFilter *fdemosaic = rs_filter_new("RSDemosaic", finput); RSFilter *fresample = rs_filter_new("RSResample", fdemosaic); - RSFilter *fcst = rs_filter_new("RSColorspaceTransform", fresample); + RSFilter *fdcp = rs_filter_new("RSDcp", fresample); + RSFilter *fcst = rs_filter_new("RSColorspaceTransform", fdcp); g_object_set(fresample, "width", 256, "height", 256, "bounding-box", TRUE, NULL); - g_object_set(finput, "filename", service, - "color-space", rs_color_space_new_singleton("RSSrgb"), NULL); + g_object_set(finput, "filename", service, NULL); + /* Find a dcp profile */ + const gchar* camera_id = rs_profile_camera_find(meta->make_ascii, meta->model_ascii); + RSDcpFile *dcp = NULL; + if (camera_id) + { + RSProfileFactory *factory = rs_profile_factory_new_default(); + GSList *all_profiles = rs_profile_factory_find_from_model(factory, camera_id); + if (g_slist_length(all_profiles) > 0) + { + GSList *profiles_i = all_profiles; + do { + if (profiles_i->data && RS_IS_DCP_FILE(profiles_i->data)) + dcp = RS_DCP_FILE(profiles_i->data); + profiles_i = profiles_i->next; + } while (NULL == dcp && profiles_i); + + g_slist_free(all_profiles); + } + } + + if (NULL != dcp) + g_object_set(fdcp, "use-profile", TRUE, "profile", dcp, NULL); + else + g_object_set(fdcp, "use-profile", FALSE, NULL); + rs_filter_set_recursive(RS_FILTER(fdemosaic), "demosaic-allow-downscale", TRUE, NULL); RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_roi(request, FALSE); rs_filter_request_set_quick(request, TRUE); - for(c=0;c<4;c++) - pre_mul[c] = (gfloat) meta->cam_mul[c] * 1.5f; - rs_filter_param_set_float4(RS_FILTER_PARAM(request), "premul", pre_mul); + if (dcp) + { + RSSettings *settings = rs_settings_new(); + gdouble buf[3]; + gint c; + gdouble max=0.0, warmth, tint; + + for (c=0; c < 3; c++) + buf[c] = meta->cam_mul[c]; + + for (c=0; c < 3; c++) + if (max < buf[c]) + max = buf[c]; + + for(c=0;c<3;c++) + buf[c] /= max; + + buf[R] *= (1.0/buf[G]); + buf[B] *= (1.0/buf[G]); + buf[G] = 1.0; + + tint = (buf[B] + buf[R] - 4.0)/-2.0; + warmth = (buf[R]/(2.0-tint))-1.0; + rs_settings_set_wb(settings, warmth, tint, ""); + g_object_set(fdcp, "settings", settings, NULL); + } + else + { + g_object_set(finput, "color-space", rs_color_space_new_singleton("RSSrgb"), NULL); + for(c=0;c<4;c++) + pre_mul[c] = (gfloat) meta->cam_mul[c] * 1.5f; + rs_filter_param_set_float4(RS_FILTER_PARAM(request), "premul", pre_mul); + } rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", rs_color_space_new_singleton("RSSrgb")); RSFilterResponse *response = rs_filter_get_image8(fcst, request); From klauspost at gmail.com Wed Feb 22 08:39:05 2012 From: klauspost at gmail.com (Klaus Post) Date: Wed, 22 Feb 2012 08:39:05 +0100 Subject: [Rawstudio-commit] r4163 - trunk/plugins/meta-tiff Message-ID: Author: post Date: 2012-02-22 08:39:04 +0100 (Wed, 22 Feb 2012) New Revision: 4163 Modified: trunk/plugins/meta-tiff/tiff-meta.c Log: Unref dcp filter. Modified: trunk/plugins/meta-tiff/tiff-meta.c =================================================================== --- trunk/plugins/meta-tiff/tiff-meta.c 2012-02-21 17:51:37 UTC (rev 4162) +++ trunk/plugins/meta-tiff/tiff-meta.c 2012-02-22 07:39:04 UTC (rev 4163) @@ -2059,6 +2059,8 @@ g_object_unref(finput); g_object_unref(fdemosaic); g_object_unref(fresample); + if (NULL != fdcp) + g_object_unref(fdcp); g_object_unref(fcst); g_object_unref(request); g_object_unref(response); From klauspost at gmail.com Mon Feb 27 21:26:56 2012 From: klauspost at gmail.com (Klaus Post) Date: Mon, 27 Feb 2012 21:26:56 +0100 Subject: [Rawstudio-commit] rawspeed r408 - RawSpeed Message-ID: Author: post Date: 2012-02-27 21:26:56 +0100 (Mon, 27 Feb 2012) New Revision: 408 Modified: RawSpeed/Camera.cpp Log: Fix string leaks, when re-loading camera metadata (thanks to Daniel Andersson for patch) Modified: RawSpeed/Camera.cpp =================================================================== --- RawSpeed/Camera.cpp 2012-02-02 19:31:14 UTC (rev 407) +++ RawSpeed/Camera.cpp 2012-02-27 20:26:56 UTC (rev 408) @@ -59,6 +59,7 @@ key = xmlGetProp(cur, (const xmlChar *)"decoder_version"); if (key) { decoderVersion = getAttributeAsInt(cur, cur->name, "decoder_version"); + xmlFree(key); } else { decoderVersion = 0; } @@ -183,7 +184,6 @@ cfa.setColorAt(iPoint2D(x, y), CFA_BLUE); xmlFree(key); - } } @@ -239,9 +239,17 @@ if (!key) ThrowCME("Could not find attribute %s in tag %s, in camera %s %s.", attribute, tag, make.c_str(), model.c_str()); - int i = StringToInt(key, tag, attribute); + try { + int i = StringToInt(key, tag, attribute); + xmlFree(key); + return i; + } catch (CameraMetadataException &e) { + xmlFree(key); + throw e; + } - return i; + /* Never actually reachable */ + return 0; } void Camera::parseAlias( xmlDocPtr doc, xmlNodePtr cur ) @@ -262,14 +270,18 @@ xmlChar *key; string hint_name, hint_value; key = xmlGetProp(cur, (const xmlChar *)"name"); - if (key) + if (key) { hint_name = string((const char*)key); + xmlFree(key); + } else ThrowCME("CameraMetadata: Could not find name for hint for %s %s camera.", make.c_str(), model.c_str()); key = xmlGetProp(cur, (const xmlChar *)"value"); - if (key) + if (key) { hint_value = string((const char*)key); + xmlFree(key); + } else ThrowCME("CameraMetadata: Could not find value for hint %s for %s %s camera.", hint_name.c_str(), make.c_str(), model.c_str()); @@ -285,13 +297,16 @@ int white = getAttributeAsInt(cur, cur->name, "white"); xmlChar *key = xmlGetProp(cur, (const xmlChar *)"iso_min"); - if (key) + if (key) { min_iso = StringToInt(key, cur->name, "iso_min"); + xmlFree(key); + } key = xmlGetProp(cur, (const xmlChar *)"iso_max"); - if (key) + if (key) { max_iso = StringToInt(key, cur->name, "iso_max"); - + xmlFree(key); + } sensorInfo.push_back(CameraSensorInfo(black, white, min_iso, max_iso)); } From klauspost at gmail.com Mon Feb 27 21:27:24 2012 From: klauspost at gmail.com (Klaus Post) Date: Mon, 27 Feb 2012 21:27:24 +0100 Subject: [Rawstudio-commit] rawspeed r409 - RawSpeed Message-ID: Author: post Date: 2012-02-27 21:27:24 +0100 (Mon, 27 Feb 2012) New Revision: 409 Modified: RawSpeed/RawImage.cpp Log: Fix image initialization (thanks to Daniel Andersson) Modified: RawSpeed/RawImage.cpp =================================================================== --- RawSpeed/RawImage.cpp 2012-02-27 20:26:56 UTC (rev 408) +++ RawSpeed/RawImage.cpp 2012-02-27 20:27:24 UTC (rev 409) @@ -41,7 +41,7 @@ RawImageData::RawImageData(iPoint2D _dim, uint32 _bpc, uint32 _cpp) : dim(_dim), blackLevel(-1), whitePoint(65536), - dataRefCount(0), data(0), cpp(cpp), bpp(_bpc), + dataRefCount(0), data(0), cpp(_cpp), bpp(_bpc), uncropped_dim(0, 0) { blackLevelSeparate[0] = blackLevelSeparate[1] = blackLevelSeparate[2] = blackLevelSeparate[3] = -1; subsampling.x = subsampling.y = 1;