~ubuntu-branches/ubuntu/vivid/luminance-hdr/vivid-proposed

« back to all changes in this revision

Viewing changes to src/TonemappingOperators/mantiuk08/display_adaptive_tmo.cpp

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2012-11-03 09:09:25 UTC
  • mfrom: (3.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20121103090925-6b12x4a4cpqd3u4q
Tags: 2.3.0-2
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
  else return log10( x );
151
151
}
152
152
 
153
 
#ifdef __USE_SSE__
 
153
#ifdef LUMINANCE_USE_SSE
154
154
 
155
155
#define LOG2_10 3.3219280948874f
156
156
#define LOG2_10__1 (1.0f/LOG2_10)
441
441
  
442
442
  // Compute log10 of an image
443
443
#pragma omp parallel for default(none) shared(LP_high_raw, L)
444
 
#ifndef __USE_SSE__
 
444
#ifndef LUMINANCE_USE_SSE
445
445
  for( int i=0; i < pix_count; i++ )
446
446
    LP_high_raw[i] = safe_log10( L[i], min_val );
447
447
#else
1025
1025
    float L_fix = clamp_channel(L_in[i]);
1026
1026
    const float L_out = tc_lut.interp( log10(L_fix) );
1027
1027
    const float s = cc_lut.interp( log10(L_fix) ); // color correction
1028
 
#ifdef __USE_SSE__
 
1028
#ifdef LUMINANCE_USE_SSE
1029
1029
    v4sf vec = _mm_set_ps(R_in[i], G_in[i], B_in[i], 0) / _mm_set1_ps(L_fix);
1030
1030
    vec = _mm_max_ps(vec, _mm_set1_ps(MIN_PHVAL));
1031
1031
    vec = _mm_pow_ps(vec, _mm_set1_ps(s));