[an error occurred while processing this directive]
|
............//registering constants
always @ (posedge clk)
begin
const1 = 10'b 0100101001; //1.164 = 01.00101001
const2 = 10'b 0110011000; //1.596 = 01.10011000
const3 = 10'b 0011010000; //0.813 = 00.11010000
const4 = 10'b 0001100100; //0.392 = 00.01100100
const5 = 10'b 1000000100; //2.017 = 10.00000100
end.........
always @ (posedge clk or posedge rst)
if (rst)
begin
R_int <= 0; G_int <= 0; B_int <= 0;
end
else
begin
R_int <= (const1 * (Y_reg - 'd64)) + (const2 * (Cr_reg - 'd512));
G_int <= (const1 * (Y_reg - 'd64)) - (const3 * (Cr_reg - 'd512)) - (const4 * (Cb_reg - 'd512));
B_int <= (const1 * (Y_reg - 'd64)) + (const5 * (Cb_reg - 'd512));
end...........
E-mail: info@telesys.ru