%Buzási Bence
%TXEVVQ

function [Y_out, Cb_out, Cr_out] = TXEVVQ_DCT(Y_in, Cb_in, Cr_in, kernel_matrix)

Y_out = zeros(8,8);
Cb_out = zeros(8,8);
Cr_out = zeros(8,8);
n1=8;
n2=8;

for u = 1 : n1
    for v = 1 : n2
       x1 = reshape(Y_in, [1 64]); 
       x2 = reshape(Cb_in, [1 64]); 
       x3 = reshape(Cr_in, [1 64]);
       x4 = reshape(kernel_matrix(:,:,(u-1)*8+v), [64 1]);
       Y_out(u,v) = x1 * x4;
       Cb_out(u,v) = x2 * x4;
       Cr_out(u,v) = x3 * x4;
    end
end





end