function res=fft2c_on_blocks(X,block_size,inverse)
res=zeros(size(X));
if inverse
else
    for i=1:size(X,1)/block_size
        res(block_size*(i-1)+1:block_size*i,:)=ifft2c(X(block_size*(i-1)+1:block_size*i,:));
    end
    for i=1:size(X,1)/block_size
        res(block_size*(i-1)+1:block_size*i,:)=fft2c(X(block_size*(i-1)+1:block_size*i,:));
    end
end


