%Buzási Bence
%TXEVVQ

function[Y, Cb, Cr] = TXEVVQ_IDCT(DCT_Y, DCT_Cb, DCT_Cr, kernel_inverse_matrix)

Y = zeros(8,8);
Cb = zeros(8,8);
Cr = zeros(8,8);
n1=8;
n2=8;

for x = 1 : n1
    for y = 1 : n2
       x1 = reshape(DCT_Y, [1 64]);
       x2 = reshape(DCT_Cb, [1 64]);
       x3 = reshape(DCT_Cr, [1 64]);
       x4 = reshape(kernel_inverse_matrix(:,:,(x-1)*8+y), [64 1]);
       Y(x,y) = x1 * x4;
       Cb(x,y) = x2 * x4;
       Cr(x,y) = x3 * x4;
    end
end

end