%% blkfreqcomp.m
% usage: blkfreqcomp(dX,m,n,k,l)
% compute block DCT preimage of a single frequency vector
% dX is the mxn block dct of an image X
% k and l are the "frequencies" with 0<=k<m, 0<=l<n 

% S. Allen Broughton - 31 Oct 2010

function Y = blkfreqcomp(dX,m,n,k,l)
[p,q]=size(dX);
r = p/m; s = q/n;
Y = zeros(p,q);
Y(1+k+m*(0:(r-1)),1+l+n*(0:(s-1))) = dX(1+k+m*(0:(r-1)),1+l+n*(0:(s-1)));
Y =blkidct2(Y,m,n);


