"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "rtengine/demosaic_algos.cc" between
rawtherapee-5.6.tar.xz and rawtherapee-5.7.tar.xz

About: RawTherapee is a powerful cross-platform raw image processing program.

demosaic_algos.cc  (rawtherapee-5.6.tar.xz):demosaic_algos.cc  (rawtherapee-5.7.tar.xz)
skipping to change at line 17 skipping to change at line 17
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* RawTherapee is distributed in the hope that it will be useful, * RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>. * along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include <cmath> #include <cmath>
#include <cassert> #include <cassert>
#include "rawimagesource.h" #include "rawimagesource.h"
#include "rawimage.h" #include "rawimage.h"
#include "mytime.h" #include "mytime.h"
#include "image8.h" #include "image8.h"
#include "rt_math.h" #include "rt_math.h"
#include "color.h" #include "color.h"
skipping to change at line 1121 skipping to change at line 1121
* *
* Bayer CFA Demosaicing using Integrated Gaussian Vector on Color Differences * Bayer CFA Demosaicing using Integrated Gaussian Vector on Color Differences
* Revision 1.0 - 2013/02/28 * Revision 1.0 - 2013/02/28
* *
* Copyright (c) 2007-2013 Luis Sanz Rodriguez * Copyright (c) 2007-2013 Luis Sanz Rodriguez
* Using High Order Interpolation technique by Jim S, Jimmy Li, and Sharmil Ran dhawa * Using High Order Interpolation technique by Jim S, Jimmy Li, and Sharmil Ran dhawa
* *
* Contact info: luis.sanz.rodriguez@gmail.com * Contact info: luis.sanz.rodriguez@gmail.com
* *
* This code is distributed under a GNU General Public License, version 3. * This code is distributed under a GNU General Public License, version 3.
* Visit <http://www.gnu.org/licenses/> for more information. * Visit <https://www.gnu.org/licenses/> for more information.
* *
***/ ***/
// Adapted to RawTherapee by Jacques Desmis 3/2013 // Adapted to RawTherapee by Jacques Desmis 3/2013
// SSE version by Ingo Weyrich 5/2013 // SSE version by Ingo Weyrich 5/2013
#ifdef __SSE2__ #ifdef __SSE2__
#define CLIPV(a) vclampf(a,zerov,c65535v) #define CLIPV(a) vclampf(a,zerov,c65535v)
void RawImageSource::igv_interpolate(int winw, int winh) void RawImageSource::igv_interpolate(int winw, int winh)
{ {
static const float eps = 1e-5f, epssq = 1e-5f; //mod epssq -10f =>-5f Jacque s 3/2013 to prevent artifact (divide by zero) static const float eps = 1e-5f, epssq = 1e-5f; //mod epssq -10f =>-5f Jacque s 3/2013 to prevent artifact (divide by zero)
skipping to change at line 1206 skipping to change at line 1206
temp1v = CLIPV( temp1v ); temp1v = CLIPV( temp1v );
temp2v = LVFU( rawData[row][col + 4] ); temp2v = LVFU( rawData[row][col + 4] );
temp2v = CLIPV( temp2v ); temp2v = CLIPV( temp2v );
tempv = _mm_shuffle_ps( temp1v, temp2v, _MM_SHUFFLE( 2, 0, 2, 0 ) ); tempv = _mm_shuffle_ps( temp1v, temp2v, _MM_SHUFFLE( 2, 0, 2, 0 ) );
_mm_storeu_ps( &dest1[indx >> 1], tempv ); _mm_storeu_ps( &dest1[indx >> 1], tempv );
tempv = _mm_shuffle_ps( temp1v, temp2v, _MM_SHUFFLE( 3, 1, 3, 1 ) ); tempv = _mm_shuffle_ps( temp1v, temp2v, _MM_SHUFFLE( 3, 1, 3, 1 ) );
_mm_storeu_ps( &dest2[indx >> 1], tempv ); _mm_storeu_ps( &dest2[indx >> 1], tempv );
} }
for (; col < width; col++, indx += 2) { for (; col < width; col++, indx += 2) {
dest1[indx >> 1] = CLIP(rawData[row][col]); //rawData = RT datas dest1[indx >> 1] = CLIP(rawData[row][col]); //rawData = RT data
col++; col++;
if(col < width) if(col < width)
dest2[indx >> 1] = CLIP(rawData[row][col]); //rawData = RT d atas dest2[indx >> 1] = CLIP(rawData[row][col]); //rawData = RT d ata
} }
} }
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp single #pragma omp single
#endif #endif
{ {
if (plistener) { if (plistener) {
plistener->setProgress (0.13); plistener->setProgress (0.13);
} }
skipping to change at line 1561 skipping to change at line 1561
float ng, eg, wg, sg, nv, ev, wv, sv, nwg, neg, swg, seg, nwv, nev, swv, sev; float ng, eg, wg, sg, nv, ev, wv, sv, nwg, neg, swg, seg, nwv, nev, swv, sev;
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp for #pragma omp for
#endif #endif
for (int row = 0; row < height - 0; row++) for (int row = 0; row < height - 0; row++)
for (int col = 0, indx = row * width + col; col < width - 0; col++, indx++) { for (int col = 0, indx = row * width + col; col < width - 0; col++, indx++) {
int c = FC(row, col); int c = FC(row, col);
rgb[c][indx] = CLIP(rawData[row][col]); //rawData = RT datas rgb[c][indx] = CLIP(rawData[row][col]); //rawData = RT data
} }
// border_interpolate2(7, rgb); // border_interpolate2(7, rgb);
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp single #pragma omp single
#endif #endif
{ {
if (plistener) { if (plistener) {
plistener->setProgress (0.13); plistener->setProgress (0.13);
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)