Author: post Date: 2010-02-06 16:37:47 +0100 (Sat, 06 Feb 2010) New Revision: 191
Removed: RawSpeed/compile-rawstudio.sh RawSpeed/rawstudio-plugin-api.cpp RawSpeed/rawstudio-plugin-api.h RawSpeed/rawstudio-plugin.c RawSpeed/rawstudio-plugin.makefile Log: Delete Rawstudio specific items within Rawspeed directory. Deleted: RawSpeed/compile-rawstudio.sh =================================================================== --- RawSpeed/compile-rawstudio.sh 2010-02-06 14:39:17 UTC (rev 190) +++ RawSpeed/compile-rawstudio.sh 2010-02-06 15:37:47 UTC (rev 191) @@ -1,3 +0,0 @@ -#!/bin/sh - -make -j4 -f rawstudio-plugin.makefile all && sudo make -f rawstudio-plugin.makefile install \ No newline at end of file Deleted: RawSpeed/rawstudio-plugin-api.cpp =================================================================== --- RawSpeed/rawstudio-plugin-api.cpp 2010-02-06 14:39:17 UTC (rev 190) +++ RawSpeed/rawstudio-plugin-api.cpp 2010-02-06 15:37:47 UTC (rev 191) @@ -1,156 +0,0 @@ -#include <rawstudio.h> -#include "StdAfx.h" -#include "FileReader.h" -#include "TiffParser.h" -#include "RawDecoder.h" -#include "CameraMetaData.h" -#include "rawstudio-plugin-api.h" -/* - RawSpeed - RAW file decoder. - - Copyright (C) 2009 Klaus Post - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - http://www.klauspost.com -*/ - -#define TIME_LOAD 1 - -using namespace RawSpeed; - -extern "C" { - -RS_IMAGE16 * -load_rawspeed(const gchar *filename) -{ - static CameraMetaData *c = NULL; - if (!c) - { - gchar *path = g_build_filename(rs_confdir_get(), "cameras.xml", NULL); - try { - c = new CameraMetaData(path); - } catch (CameraMetadataException e) { - printf("RawSpeed: Could not open camera metadata information.\n%s\nRawSpeed will not be used!\n", e.what()); - return NULL; - } - g_free(path); - } - - RS_IMAGE16 *image = NULL; - FileReader f((char *) filename); - RawDecoder *d = 0; - FileMap* m = 0; - - try - { -#ifdef TIME_LOAD - GTimer *gt = g_timer_new(); -#endif - - try - { - rs_io_lock(); - m = f.readFile(); - rs_io_unlock(); - } catch (FileIOException e) { - printf("RawSpeed: IO Error occured:%s\n", e.what()); - g_timer_destroy(gt); - return image; - } - -#ifdef TIME_LOAD - printf("RawSpeed Open %s: %.03fs\n", filename, g_timer_elapsed(gt, NULL)); - g_timer_destroy(gt); -#endif - - TiffParser t(m); - t.parseData(); - d = t.getDecoder(); - - try - { - gint col, row; - gint cpp; - -#ifdef TIME_LOAD - gt = g_timer_new(); -#endif - d->checkSupport(c); - d->decodeRaw(); - d->decodeMetaData(c); - - for (guint i = 0; i < d->errors.size(); i++) - printf("RawSpeed: Error Encountered:%s\n", d->errors[i]); - - RawImage r = d->mRaw; - r->scaleBlackWhite(); - -#ifdef TIME_LOAD - printf("RawSpeed Decode %s: %.03fs\n", filename, g_timer_elapsed(gt, NULL)); - g_timer_destroy(gt); -#endif - - cpp = r->getCpp(); - if (cpp == 1) - image = rs_image16_new(r->dim.x, r->dim.y, cpp, cpp); - else if (cpp == 3) - image = rs_image16_new(r->dim.x, r->dim.y, 3, 4); - else { - printf("RawSpeed: Unsupported component per pixel count\n"); - return NULL; - } - - if (r->isCFA) - image->filters = r->cfa.getDcrawFilter(); - - - if (cpp == 1) - { - BitBlt((guchar *)(GET_PIXEL(image,0,0)),image->pitch*2, - r->getData(0,0), r->pitch, r->bpp*r->dim.x, r->dim.y); - } else - { - for(row=0;row<image->h;row++) - { - gushort *inpixel = (gushort*)&r->getData()[row*r->pitch]; - gushort *outpixel = GET_PIXEL(image, 0, row); - for(col=0;col<image->w;col++) - { - *outpixel++ = *inpixel++; - *outpixel++ = *inpixel++; - *outpixel++ = *inpixel++; - outpixel++; - } - } - } - } - catch (RawDecoderException e) - { - printf("RawSpeed: RawDecoderException: %s\n", e.what()); - } - } - catch (TiffParserException e) - { - printf("RawSpeed: TiffParserException: %s\n", e.what()); - } - - if (d) delete d; - if (m) delete m; - - return image; -} - -} /* extern "C" */ Deleted: RawSpeed/rawstudio-plugin-api.h =================================================================== --- RawSpeed/rawstudio-plugin-api.h 2010-02-06 14:39:17 UTC (rev 190) +++ RawSpeed/rawstudio-plugin-api.h 2010-02-06 15:37:47 UTC (rev 191) @@ -1,30 +0,0 @@ -#include <rawstudio.h> -/* - RawSpeed - RAW file decoder. - - Copyright (C) 2009 Klaus Post - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - http://www.klauspost.com -*/ - -G_BEGIN_DECLS - -RS_IMAGE16 * -load_rawspeed(const gchar *filename); - -G_END_DECLS - Deleted: RawSpeed/rawstudio-plugin.c =================================================================== --- RawSpeed/rawstudio-plugin.c 2010-02-06 14:39:17 UTC (rev 190) +++ RawSpeed/rawstudio-plugin.c 2010-02-06 15:37:47 UTC (rev 191) @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2006-2009 Anders Brander <[email protected]> and - * Anders Kvist <[email protected]> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include <rawstudio.h> -#include "rawstudio-plugin-api.h" - -G_MODULE_EXPORT void -rs_plugin_load(RSPlugin *plugin) -{ - rs_filetype_register_loader(".arw", "Sony", load_rawspeed, 5); - rs_filetype_register_loader(".cr2", "Canon CR2", load_rawspeed, 5); - rs_filetype_register_loader(".dng", "Adobe Digital Negative", load_rawspeed, 5); - rs_filetype_register_loader(".nef", "Nikon NEF", load_rawspeed, 5); - rs_filetype_register_loader(".orf", "Olympus", load_rawspeed, 5); - rs_filetype_register_loader(".pef", "Pentax raw", load_rawspeed, 5); - rs_filetype_register_loader(".rw2", "Panasonic raw", load_rawspeed, 5); -} Deleted: RawSpeed/rawstudio-plugin.makefile =================================================================== --- RawSpeed/rawstudio-plugin.makefile 2010-02-06 14:39:17 UTC (rev 190) +++ RawSpeed/rawstudio-plugin.makefile 2010-02-06 15:37:47 UTC (rev 191) @@ -1,67 +0,0 @@ -CC=g++ -CFLAGS=-fPIC -Wall -O4 -g `pkg-config --cflags rawstudio-1.1 libxml-2.0` -LDFLAGS=`pkg-config --libs rawstudio-1.1 libxml-2.0` -INSTALLPATH=`pkg-config --variable=plugindir rawstudio-1.1` - -CPP_SOURCES= rawstudio-plugin-api.cpp \ - ArwDecoder.cpp \ - BitPumpJPEG.cpp \ - BitPumpMSB.cpp \ - BitPumpPlain.cpp \ - BlackArea.cpp \ - ByteStream.cpp \ - Camera.cpp \ - CameraMetaData.cpp \ - CameraMetadataException.cpp \ - ColorFilterArray.cpp \ - Common.cpp \ - Cr2Decoder.cpp \ - DngDecoder.cpp \ - DngDecoderSlices.cpp \ - FileIOException.cpp \ - FileMap.cpp \ - FileReader.cpp \ - IOException.cpp \ - LJpegDecompressor.cpp \ - LJpegPlain.cpp \ - NefDecoder.cpp \ - NikonDecompressor.cpp \ - OrfDecoder.cpp \ - PefDecoder.cpp \ - PentaxDecompressor.cpp \ - RawDecoder.cpp \ - RawDecoderException.cpp \ - RawImage.cpp \ - Rw2Decoder.cpp \ - StdAfx.cpp \ - TiffEntryBE.cpp \ - TiffEntry.cpp \ - TiffIFDBE.cpp \ - TiffIFD.cpp \ - TiffParser.cpp \ - TiffParserException.cpp \ - TiffParserHeaderless.cpp \ - TiffParserOlympus.cpp -CPP_OBJECTS=$(CPP_SOURCES:.cpp=.o) - -all: $(CPP_OBJECTS) $(CPP_SOURCES) load-rawspeed.so - -load-rawspeed.o: rawstudio-plugin.c - gcc -c $(CFLAGS) $< -o $@ - -.cpp.o: - $(CC) -c $(CFLAGS) $< -o $@ - -load-rawspeed.so: $(CPP_OBJECTS) load-rawspeed.o - g++ $(CFLAGS) $(LDFLAGS) -shared -o load-rawspeed.so $(CPP_OBJECTS) load-rawspeed.o -lc - -install: load-rawspeed.so ~/.rawstudio - cp -a load-rawspeed.so $(INSTALLPATH) - cp -a ../data/cameras.xml ~/.rawstudio/ - -~/.rawstudio: - echo Please start Rawstudio once before installing - exit 1 - -clean: - rm -f *.o *.so _______________________________________________ Rawstudio-commit mailing list [email protected] http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit
