uzh-rpg / vilib

CUDA Visual Library by RPG

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hard to understand [pyramid_gpu.cu], may more details ?

Mrsonwden opened this issue · comments

Hello !
When I review vilib code , I confused the fucntion : image_halfsample_gpu_kernel , could you explain it more detial and which theory is based on ? The main hard to understand is the three line:

const int dst  = y*pitch_dst_px/N + x; //every thread writes N bytes. the next row starts at pitch_dst_px/N
int src_top    = y*pitch_src_px + x*N; //every thread reads in Nx2 bytes
int src_bottom = y*pitch_src_px + x*N + (pitch_src_px/2);

location : pyramid_gpu.cu
Thanks!