Loading src/TileProcessor.cuh +49 −29 Original line number Original line Diff line number Diff line Loading @@ -45,6 +45,15 @@ #include "TileProcessor.h" #include "TileProcessor.h" #endif // #ifndef JCUDA #endif // #ifndef JCUDA // CUDA fast math is slower! //#define FASTMATH 1 /* fast GPU run time =620.210698ms, (direct conversion: 24.077195999999997ms, imclt: 17.218263ms), corr2D: 85.503204ms), textures: 237.225665ms, RGBA: 256.185703ms nofast GPU run time =523.451927ms, (direct conversion: 24.080189999999998ms, imclt: 17.090526999999998ms), corr2D: 30.623282999999997ms), textures: 231.154339ms, RGBA: 220.503017ms */ #define TASK_TEXTURE_BITS ((1 << TASK_TEXTURE_N_BIT) | (1 << TASK_TEXTURE_E_BIT) | (1 << TASK_TEXTURE_S_BIT) | (1 << TASK_TEXTURE_W_BIT)) #define TASK_TEXTURE_BITS ((1 << TASK_TEXTURE_N_BIT) | (1 << TASK_TEXTURE_E_BIT) | (1 << TASK_TEXTURE_S_BIT) | (1 << TASK_TEXTURE_W_BIT)) //#define IMCLT14 //#define IMCLT14 Loading Loading @@ -1019,19 +1028,7 @@ __global__ void correlate2D( __syncthreads();// __syncwarp(); __syncthreads();// __syncwarp(); #endif #endif #endif #endif } // if (color == 1){ // LPF only after B (nothing in mono) } // if (color == 1){ // LPF only after B (nothing in mono) } // for (int color = 0; color < colors; color++){ } // for (int color = 0; color < colors; color++){ normalizeTileAmplitude( normalizeTileAmplitude( clt_corr, // float * clt_tile, // [4][DTT_SIZE][DTT_SIZE1], // +1 to alternate column ports clt_corr, // float * clt_tile, // [4][DTT_SIZE][DTT_SIZE1], // +1 to alternate column ports Loading Loading @@ -1083,23 +1080,6 @@ __global__ void correlate2D( #endif #endif #endif #endif dttii_2d(clt_corr); dttii_2d(clt_corr); /* // change to 16-32 threads?? in next iteration // vert pass (hor pass in Java, before transpose. Here transposed, no transform needed) for (int q = 0; q < 4; q++){ int is_sin = (q >> 1) & 1; dttii_shared_mem_nonortho(clt_corr + q * (DTT_SIZE1 * DTT_SIZE) + threadIdx.x , DTT_SIZE1, is_sin); // vertical pass, thread is column } __syncthreads(); // hor pass, corresponding to vert pass in Java for (int q = 0; q < 4; q++){ int is_sin = q & 1; dttii_shared_mem_nonortho(clt_corr + (q * DTT_SIZE + threadIdx.x) * DTT_SIZE1 , 1, is_sin); // horizontal pass, tread is row } __syncthreads(); */ #ifdef DBG_TILE #ifdef DBG_TILE #ifdef DEBUG6 #ifdef DEBUG6 Loading Loading @@ -2655,7 +2635,11 @@ __device__ void normalizeTileAmplitude( *(clt_tile_j1) * *(clt_tile_j1) + *(clt_tile_j1) * *(clt_tile_j1) + *(clt_tile_j2) * *(clt_tile_j2) + *(clt_tile_j2) * *(clt_tile_j2) + *(clt_tile_j3) * *(clt_tile_j3); *(clt_tile_j3) * *(clt_tile_j3); #ifdef FASTMATH float scale = __frsqrt_rn(s2); // 1.0/sqrt(s2) #else float scale = rsqrtf(s2); // 1.0/sqrt(s2) float scale = rsqrtf(s2); // 1.0/sqrt(s2) #endif *(clt_tile_j0) *= scale; *(clt_tile_j0) *= scale; *(clt_tile_j1) *= scale; *(clt_tile_j1) *= scale; *(clt_tile_j2) *= scale; *(clt_tile_j2) *= scale; Loading Loading @@ -3333,7 +3317,12 @@ __device__ void debayer_shot( if (scale_shot > 0.0) { if (scale_shot > 0.0) { #ifdef FASTMATH float k = __frsqrt_rn(min_shot); #else float k = rsqrtf(min_shot); float k = rsqrtf(min_shot); #endif // double k = 1.0/Math.sqrt(min_shot); //sqrtf // double k = 1.0/Math.sqrt(min_shot); //sqrtf //for (int i = 0; i < tile.length; i++) tile_db[i] = scale_shot* ((tile_db[i] > min_shot)? Math.sqrt(tile_db[i]) : (k*tile_db[i])); //for (int i = 0; i < tile.length; i++) tile_db[i] = scale_shot* ((tile_db[i] > min_shot)? Math.sqrt(tile_db[i]) : (k*tile_db[i])); Loading @@ -3343,7 +3332,14 @@ __device__ void debayer_shot( #pragma unroll #pragma unroll for (int col = 0; col < DTT_SIZE2; col += DTT_SIZE){ for (int col = 0; col < DTT_SIZE2; col += DTT_SIZE){ float d = *mcltp; float d = *mcltp; #ifdef FASTMATH *mcltp = scale_shot * (( d > min_shot)? __fsqrt_rn(d) : (k * d)); #else *mcltp = scale_shot * (( d > min_shot)? sqrtf(d) : (k * d)); *mcltp = scale_shot * (( d > min_shot)? sqrtf(d) : (k * d)); #endif mcltp += DTT_SIZE; mcltp += DTT_SIZE; } } mcltp += (DTT_SIZE21-DTT_SIZE2); mcltp += (DTT_SIZE21-DTT_SIZE2); Loading Loading @@ -3549,10 +3545,19 @@ __device__ void tile_combine_rgba( s2 += d * d; s2 += d * d; } } float mse = (s0*s2 - s1*s1) / (s0 * s0); float mse = (s0*s2 - s1*s1) / (s0 * s0); #ifdef FASTMATH * crms_col_i = __fsqrt_rn(mse); #else * crms_col_i = sqrtf(mse); * crms_col_i = sqrtf(mse); #endif sw += *(chn_weights +ncol) * mse; sw += *(chn_weights +ncol) * mse; } } #ifdef FASTMATH *(crms_i + (DTT_SIZE2*DTT_SIZE21) * colors) = __fsqrt_rn(sw); // will fade as window #else *(crms_i + (DTT_SIZE2*DTT_SIZE21) * colors) = sqrtf(sw); // will fade as window *(crms_i + (DTT_SIZE2*DTT_SIZE21) * colors) = sqrtf(sw); // will fade as window #endif } } #ifdef DEBUG9 #ifdef DEBUG9 } } Loading Loading @@ -3605,7 +3610,12 @@ __device__ void tile_combine_rgba( dc *= wnd2_inv; // to compensate fading near the edges dc *= wnd2_inv; // to compensate fading near the edges d+= *(chn_weights + ncol) * dc * dc; d+= *(chn_weights + ncol) * dc * dc; } } #ifdef FASTMATH d = __expf(-pair_dist2r[ipair] * d) + (FAT_ZERO_WEIGHT); // 0.5 for exact match, lower for mismatch. Add this weight to both ports involved #else d = expf(-pair_dist2r[ipair] * d) + (FAT_ZERO_WEIGHT); // 0.5 for exact match, lower for mismatch. Add this weight to both ports involved d = expf(-pair_dist2r[ipair] * d) + (FAT_ZERO_WEIGHT); // 0.5 for exact match, lower for mismatch. Add this weight to both ports involved #endif // Add weight to both channels in a pair // Add weight to both channels in a pair *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * pair_ports[ipair][0]) +=d; *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * pair_ports[ipair][0]) +=d; *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * pair_ports[ipair][1]) +=d; *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * pair_ports[ipair][1]) +=d; Loading Loading @@ -3711,7 +3721,13 @@ __device__ void tile_combine_rgba( } } // TODO: Should it use pair_dist2r ? no as it is relative? // TODO: Should it use pair_dist2r ? no as it is relative? // port_weights[ip][i] = Math.exp(-ksigma * d2[ip]); // port_weights[ip][i] = Math.exp(-ksigma * d2[ip]); #ifdef FASTMATH *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * cam) = __expf(-ksigma * d2_ip) + (FAT_ZERO_WEIGHT); #else *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * cam) = expf(-ksigma * d2_ip) + (FAT_ZERO_WEIGHT); *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * cam) = expf(-ksigma * d2_ip) + (FAT_ZERO_WEIGHT); #endif } } // and now make a new average with those weights // and now make a new average with those weights // Inserting dust remove here // Inserting dust remove here Loading Loading @@ -3879,7 +3895,11 @@ __device__ void tile_combine_rgba( for (int i = 0; i < TEXTURE_THREADS_PER_TILE; i++){ for (int i = 0; i < TEXTURE_THREADS_PER_TILE; i++){ mx = fmaxf(mx, max_diff_tmp[cam][i]); mx = fmaxf(mx, max_diff_tmp[cam][i]); } } #ifdef FASTMATH max_diff[cam] = __fsqrt_rn(mx); #else max_diff[cam] = sqrtf(mx); max_diff[cam] = sqrtf(mx); #endif } } } } Loading src/TileProcessor.h +41 −0 Original line number Original line Diff line number Diff line Loading @@ -41,6 +41,18 @@ #include "tp_defines.h" #include "tp_defines.h" #endif #endif extern "C" __global__ void convert_correct_tiles( float ** gpu_kernel_offsets, // [NUM_CAMS], float ** gpu_kernels, // [NUM_CAMS], float ** gpu_images, // [NUM_CAMS], struct tp_task * gpu_tasks, float ** gpu_clt, // [NUM_CAMS][TILESY][TILESX][NUM_COLORS][DTT_SIZE*DTT_SIZE] size_t dstride, // in floats (pixels) int num_tiles, // number of tiles in task int lpf_mask); // apply lpf to colors : bit 0 - red, bit 1 - blue, bit2 - green. Now - always 0 ! extern "C" __global__ void clear_texture_list( extern "C" __global__ void clear_texture_list( int * gpu_texture_indices,// packed tile + bits (now only (1 << 7) int * gpu_texture_indices,// packed tile + bits (now only (1 << 7) int width, // <= TILESX, use for faster processing of LWIR images int width, // <= TILESX, use for faster processing of LWIR images Loading Loading @@ -102,5 +114,34 @@ extern "C" __global__ void imclt_rbg( int h_offset, int h_offset, const size_t dstride); // in floats (pixels) const size_t dstride); // in floats (pixels) extern "C" __global__ void generate_RBGA( // Parameters to generate texture tasks struct tp_task * gpu_tasks, int num_tiles, // number of tiles in task list // declare arrays in device code? int * gpu_texture_indices,// packed tile + bits (now only (1 << 7) int * num_texture_tiles, // number of texture tiles to process (8 separate elements for accumulation) int * woi, // x,y,width,height of the woi int width, // <= TILESX, use for faster processing of LWIR images (should be actual + 1) int height, // <= TILESY, use for faster processing of LWIR images // Parameters for the texture generation float ** gpu_clt, // [NUM_CAMS] ->[TILESY][TILESX][NUM_COLORS][DTT_SIZE*DTT_SIZE] float * gpu_port_offsets, // relative ports x,y offsets - just to scale differences, may be approximate int colors, // number of colors (3/1) int is_lwir, // do not perform shot correction float min_shot, // 10.0 float scale_shot, // 3.0 float diff_sigma, // pixel value/pixel change float diff_threshold, // pixel value/pixel change float min_agree, // minimal number of channels to agree on a point (real number to work with fuzzy averages) float weight0, // scale for R float weight1, // scale for B float weight2, // scale for G int dust_remove, // Do not reduce average weight when only one image differs much from the average int keep_weights, // return channel weights after A in RGBA (was removed) const size_t texture_rbga_stride, // in floats float * gpu_texture_tiles); // (number of colors +1 + ?)*16*16 rgba texture tiles src/dtt8x8.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -72,9 +72,9 @@ // kernels (not used so far) // kernels (not used so far) #ifdef BBBB #if 0 extern "C" __global__ void GPU_DTT24_DRV(float *dst, float *src, int src_stride, int dtt_mode); extern "C" __global__ void GPU_DTT24_DRV(float *dst, float *src, int src_stride, int dtt_mode); #endif// #ifdef BBBB #endif// #if 0 //=========================== 2D functions =============== //=========================== 2D functions =============== extern __device__ void corrUnfoldTile( extern __device__ void corrUnfoldTile( Loading Loading
src/TileProcessor.cuh +49 −29 Original line number Original line Diff line number Diff line Loading @@ -45,6 +45,15 @@ #include "TileProcessor.h" #include "TileProcessor.h" #endif // #ifndef JCUDA #endif // #ifndef JCUDA // CUDA fast math is slower! //#define FASTMATH 1 /* fast GPU run time =620.210698ms, (direct conversion: 24.077195999999997ms, imclt: 17.218263ms), corr2D: 85.503204ms), textures: 237.225665ms, RGBA: 256.185703ms nofast GPU run time =523.451927ms, (direct conversion: 24.080189999999998ms, imclt: 17.090526999999998ms), corr2D: 30.623282999999997ms), textures: 231.154339ms, RGBA: 220.503017ms */ #define TASK_TEXTURE_BITS ((1 << TASK_TEXTURE_N_BIT) | (1 << TASK_TEXTURE_E_BIT) | (1 << TASK_TEXTURE_S_BIT) | (1 << TASK_TEXTURE_W_BIT)) #define TASK_TEXTURE_BITS ((1 << TASK_TEXTURE_N_BIT) | (1 << TASK_TEXTURE_E_BIT) | (1 << TASK_TEXTURE_S_BIT) | (1 << TASK_TEXTURE_W_BIT)) //#define IMCLT14 //#define IMCLT14 Loading Loading @@ -1019,19 +1028,7 @@ __global__ void correlate2D( __syncthreads();// __syncwarp(); __syncthreads();// __syncwarp(); #endif #endif #endif #endif } // if (color == 1){ // LPF only after B (nothing in mono) } // if (color == 1){ // LPF only after B (nothing in mono) } // for (int color = 0; color < colors; color++){ } // for (int color = 0; color < colors; color++){ normalizeTileAmplitude( normalizeTileAmplitude( clt_corr, // float * clt_tile, // [4][DTT_SIZE][DTT_SIZE1], // +1 to alternate column ports clt_corr, // float * clt_tile, // [4][DTT_SIZE][DTT_SIZE1], // +1 to alternate column ports Loading Loading @@ -1083,23 +1080,6 @@ __global__ void correlate2D( #endif #endif #endif #endif dttii_2d(clt_corr); dttii_2d(clt_corr); /* // change to 16-32 threads?? in next iteration // vert pass (hor pass in Java, before transpose. Here transposed, no transform needed) for (int q = 0; q < 4; q++){ int is_sin = (q >> 1) & 1; dttii_shared_mem_nonortho(clt_corr + q * (DTT_SIZE1 * DTT_SIZE) + threadIdx.x , DTT_SIZE1, is_sin); // vertical pass, thread is column } __syncthreads(); // hor pass, corresponding to vert pass in Java for (int q = 0; q < 4; q++){ int is_sin = q & 1; dttii_shared_mem_nonortho(clt_corr + (q * DTT_SIZE + threadIdx.x) * DTT_SIZE1 , 1, is_sin); // horizontal pass, tread is row } __syncthreads(); */ #ifdef DBG_TILE #ifdef DBG_TILE #ifdef DEBUG6 #ifdef DEBUG6 Loading Loading @@ -2655,7 +2635,11 @@ __device__ void normalizeTileAmplitude( *(clt_tile_j1) * *(clt_tile_j1) + *(clt_tile_j1) * *(clt_tile_j1) + *(clt_tile_j2) * *(clt_tile_j2) + *(clt_tile_j2) * *(clt_tile_j2) + *(clt_tile_j3) * *(clt_tile_j3); *(clt_tile_j3) * *(clt_tile_j3); #ifdef FASTMATH float scale = __frsqrt_rn(s2); // 1.0/sqrt(s2) #else float scale = rsqrtf(s2); // 1.0/sqrt(s2) float scale = rsqrtf(s2); // 1.0/sqrt(s2) #endif *(clt_tile_j0) *= scale; *(clt_tile_j0) *= scale; *(clt_tile_j1) *= scale; *(clt_tile_j1) *= scale; *(clt_tile_j2) *= scale; *(clt_tile_j2) *= scale; Loading Loading @@ -3333,7 +3317,12 @@ __device__ void debayer_shot( if (scale_shot > 0.0) { if (scale_shot > 0.0) { #ifdef FASTMATH float k = __frsqrt_rn(min_shot); #else float k = rsqrtf(min_shot); float k = rsqrtf(min_shot); #endif // double k = 1.0/Math.sqrt(min_shot); //sqrtf // double k = 1.0/Math.sqrt(min_shot); //sqrtf //for (int i = 0; i < tile.length; i++) tile_db[i] = scale_shot* ((tile_db[i] > min_shot)? Math.sqrt(tile_db[i]) : (k*tile_db[i])); //for (int i = 0; i < tile.length; i++) tile_db[i] = scale_shot* ((tile_db[i] > min_shot)? Math.sqrt(tile_db[i]) : (k*tile_db[i])); Loading @@ -3343,7 +3332,14 @@ __device__ void debayer_shot( #pragma unroll #pragma unroll for (int col = 0; col < DTT_SIZE2; col += DTT_SIZE){ for (int col = 0; col < DTT_SIZE2; col += DTT_SIZE){ float d = *mcltp; float d = *mcltp; #ifdef FASTMATH *mcltp = scale_shot * (( d > min_shot)? __fsqrt_rn(d) : (k * d)); #else *mcltp = scale_shot * (( d > min_shot)? sqrtf(d) : (k * d)); *mcltp = scale_shot * (( d > min_shot)? sqrtf(d) : (k * d)); #endif mcltp += DTT_SIZE; mcltp += DTT_SIZE; } } mcltp += (DTT_SIZE21-DTT_SIZE2); mcltp += (DTT_SIZE21-DTT_SIZE2); Loading Loading @@ -3549,10 +3545,19 @@ __device__ void tile_combine_rgba( s2 += d * d; s2 += d * d; } } float mse = (s0*s2 - s1*s1) / (s0 * s0); float mse = (s0*s2 - s1*s1) / (s0 * s0); #ifdef FASTMATH * crms_col_i = __fsqrt_rn(mse); #else * crms_col_i = sqrtf(mse); * crms_col_i = sqrtf(mse); #endif sw += *(chn_weights +ncol) * mse; sw += *(chn_weights +ncol) * mse; } } #ifdef FASTMATH *(crms_i + (DTT_SIZE2*DTT_SIZE21) * colors) = __fsqrt_rn(sw); // will fade as window #else *(crms_i + (DTT_SIZE2*DTT_SIZE21) * colors) = sqrtf(sw); // will fade as window *(crms_i + (DTT_SIZE2*DTT_SIZE21) * colors) = sqrtf(sw); // will fade as window #endif } } #ifdef DEBUG9 #ifdef DEBUG9 } } Loading Loading @@ -3605,7 +3610,12 @@ __device__ void tile_combine_rgba( dc *= wnd2_inv; // to compensate fading near the edges dc *= wnd2_inv; // to compensate fading near the edges d+= *(chn_weights + ncol) * dc * dc; d+= *(chn_weights + ncol) * dc * dc; } } #ifdef FASTMATH d = __expf(-pair_dist2r[ipair] * d) + (FAT_ZERO_WEIGHT); // 0.5 for exact match, lower for mismatch. Add this weight to both ports involved #else d = expf(-pair_dist2r[ipair] * d) + (FAT_ZERO_WEIGHT); // 0.5 for exact match, lower for mismatch. Add this weight to both ports involved d = expf(-pair_dist2r[ipair] * d) + (FAT_ZERO_WEIGHT); // 0.5 for exact match, lower for mismatch. Add this weight to both ports involved #endif // Add weight to both channels in a pair // Add weight to both channels in a pair *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * pair_ports[ipair][0]) +=d; *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * pair_ports[ipair][0]) +=d; *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * pair_ports[ipair][1]) +=d; *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * pair_ports[ipair][1]) +=d; Loading Loading @@ -3711,7 +3721,13 @@ __device__ void tile_combine_rgba( } } // TODO: Should it use pair_dist2r ? no as it is relative? // TODO: Should it use pair_dist2r ? no as it is relative? // port_weights[ip][i] = Math.exp(-ksigma * d2[ip]); // port_weights[ip][i] = Math.exp(-ksigma * d2[ip]); #ifdef FASTMATH *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * cam) = __expf(-ksigma * d2_ip) + (FAT_ZERO_WEIGHT); #else *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * cam) = expf(-ksigma * d2_ip) + (FAT_ZERO_WEIGHT); *(port_weights_i + (DTT_SIZE2*DTT_SIZE21) * cam) = expf(-ksigma * d2_ip) + (FAT_ZERO_WEIGHT); #endif } } // and now make a new average with those weights // and now make a new average with those weights // Inserting dust remove here // Inserting dust remove here Loading Loading @@ -3879,7 +3895,11 @@ __device__ void tile_combine_rgba( for (int i = 0; i < TEXTURE_THREADS_PER_TILE; i++){ for (int i = 0; i < TEXTURE_THREADS_PER_TILE; i++){ mx = fmaxf(mx, max_diff_tmp[cam][i]); mx = fmaxf(mx, max_diff_tmp[cam][i]); } } #ifdef FASTMATH max_diff[cam] = __fsqrt_rn(mx); #else max_diff[cam] = sqrtf(mx); max_diff[cam] = sqrtf(mx); #endif } } } } Loading
src/TileProcessor.h +41 −0 Original line number Original line Diff line number Diff line Loading @@ -41,6 +41,18 @@ #include "tp_defines.h" #include "tp_defines.h" #endif #endif extern "C" __global__ void convert_correct_tiles( float ** gpu_kernel_offsets, // [NUM_CAMS], float ** gpu_kernels, // [NUM_CAMS], float ** gpu_images, // [NUM_CAMS], struct tp_task * gpu_tasks, float ** gpu_clt, // [NUM_CAMS][TILESY][TILESX][NUM_COLORS][DTT_SIZE*DTT_SIZE] size_t dstride, // in floats (pixels) int num_tiles, // number of tiles in task int lpf_mask); // apply lpf to colors : bit 0 - red, bit 1 - blue, bit2 - green. Now - always 0 ! extern "C" __global__ void clear_texture_list( extern "C" __global__ void clear_texture_list( int * gpu_texture_indices,// packed tile + bits (now only (1 << 7) int * gpu_texture_indices,// packed tile + bits (now only (1 << 7) int width, // <= TILESX, use for faster processing of LWIR images int width, // <= TILESX, use for faster processing of LWIR images Loading Loading @@ -102,5 +114,34 @@ extern "C" __global__ void imclt_rbg( int h_offset, int h_offset, const size_t dstride); // in floats (pixels) const size_t dstride); // in floats (pixels) extern "C" __global__ void generate_RBGA( // Parameters to generate texture tasks struct tp_task * gpu_tasks, int num_tiles, // number of tiles in task list // declare arrays in device code? int * gpu_texture_indices,// packed tile + bits (now only (1 << 7) int * num_texture_tiles, // number of texture tiles to process (8 separate elements for accumulation) int * woi, // x,y,width,height of the woi int width, // <= TILESX, use for faster processing of LWIR images (should be actual + 1) int height, // <= TILESY, use for faster processing of LWIR images // Parameters for the texture generation float ** gpu_clt, // [NUM_CAMS] ->[TILESY][TILESX][NUM_COLORS][DTT_SIZE*DTT_SIZE] float * gpu_port_offsets, // relative ports x,y offsets - just to scale differences, may be approximate int colors, // number of colors (3/1) int is_lwir, // do not perform shot correction float min_shot, // 10.0 float scale_shot, // 3.0 float diff_sigma, // pixel value/pixel change float diff_threshold, // pixel value/pixel change float min_agree, // minimal number of channels to agree on a point (real number to work with fuzzy averages) float weight0, // scale for R float weight1, // scale for B float weight2, // scale for G int dust_remove, // Do not reduce average weight when only one image differs much from the average int keep_weights, // return channel weights after A in RGBA (was removed) const size_t texture_rbga_stride, // in floats float * gpu_texture_tiles); // (number of colors +1 + ?)*16*16 rgba texture tiles
src/dtt8x8.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -72,9 +72,9 @@ // kernels (not used so far) // kernels (not used so far) #ifdef BBBB #if 0 extern "C" __global__ void GPU_DTT24_DRV(float *dst, float *src, int src_stride, int dtt_mode); extern "C" __global__ void GPU_DTT24_DRV(float *dst, float *src, int src_stride, int dtt_mode); #endif// #ifdef BBBB #endif// #if 0 //=========================== 2D functions =============== //=========================== 2D functions =============== extern __device__ void corrUnfoldTile( extern __device__ void corrUnfoldTile( Loading