/*
 * Raw_Processor_Creater.cpp
 *
 *  Created on: 21.10.2010
 *      Author: uwe
 */

#include "Raw_Processor_Creater.h"

namespace MobilePhotoTool{

	Raw_Processor *Raw_Processor_Creater::create_Processor(MPT_Exception *exception, IFD *raw_ifd, IFD *ifd0)
	{
		Raw_Processor *processor = NULL;
	#ifdef __OPENCL__
		processor = new Raw_Processor_OpenCL(exception, raw_ifd, ifd0);
	#else
		processor = new Raw_Processor(exception, raw_ifd, ifd0);
	#endif
		MPT_EXCEPTION_TEST NULL;

		processor->set_zoom(exception, 1.f, NULL);
		MPT_EXCEPTION_TEST NULL;

		processor->init(exception);
		MPT_EXCEPTION_TEST NULL;

		return processor;
	}

	void Raw_Processor_Creater::delete_Processor( Raw_Processor *processor)
	{
		delete processor;
	}
}
