OpenCores
URL https://opencores.org/ocsvn/mkjpeg/mkjpeg/trunk

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [mdct/] [FDCT.vhd] - Diff between revs 61 and 63

Show entire file | Details | Blame | View Log

Rev 61 Rev 63
Line 566... Line 566...
      Cr_Reg_3 <= (others => '0');
      Cr_Reg_3 <= (others => '0');
      Y_Reg    <= (others => '0');
      Y_Reg    <= (others => '0');
      Cb_Reg   <= (others => '0');
      Cb_Reg   <= (others => '0');
      Cr_Reg   <= (others => '0');
      Cr_Reg   <= (others => '0');
    elsif CLK'event and CLK = '1' then
    elsif CLK'event and CLK = '1' then
 
      -- RGB input
 
      if C_YUV_INPUT = '0' then
      Y_Reg_1  <= R_s*C_Y_1;
      Y_Reg_1  <= R_s*C_Y_1;
      Y_Reg_2  <= G_s*C_Y_2;
      Y_Reg_2  <= G_s*C_Y_2;
      Y_Reg_3  <= B_s*C_Y_3;
      Y_Reg_3  <= B_s*C_Y_3;
 
 
      Cb_Reg_1 <= R_s*C_Cb_1;
      Cb_Reg_1 <= R_s*C_Cb_1;
Line 581... Line 583...
      Cr_Reg_3 <= B_s*C_Cr_3;
      Cr_Reg_3 <= B_s*C_Cr_3;
 
 
      Y_Reg  <= Y_Reg_1 + Y_Reg_2 + Y_Reg_3;
      Y_Reg  <= Y_Reg_1 + Y_Reg_2 + Y_Reg_3;
      Cb_Reg <= Cb_Reg_1 + Cb_Reg_2 + Cb_Reg_3 + to_signed(128*16384,Cb_Reg'length);
      Cb_Reg <= Cb_Reg_1 + Cb_Reg_2 + Cb_Reg_3 + to_signed(128*16384,Cb_Reg'length);
      Cr_Reg <= Cr_Reg_1 + Cr_Reg_2 + Cr_Reg_3 + to_signed(128*16384,Cr_Reg'length);
      Cr_Reg <= Cr_Reg_1 + Cr_Reg_2 + Cr_Reg_3 + to_signed(128*16384,Cr_Reg'length);
 
      -- YCbCr input
 
      -- R-G-B misused as Y-Cb-Cr
 
      else
 
        Y_Reg_1  <= '0' & R_s & "00000000000000";
 
        Cb_Reg_1 <= '0' & G_s & "00000000000000";
 
        Cr_Reg_1 <= '0' & B_s & "00000000000000";
 
 
 
        Y_Reg  <= Y_Reg_1;
 
        Cb_Reg <= Cb_Reg_1;
 
        Cr_Reg <= Cr_Reg_1;
 
      end if;
    end if;
    end if;
  end process;
  end process;
 
 
  Y_8bit  <= unsigned(Y_Reg(21 downto 14));
  Y_8bit  <= unsigned(Y_Reg(21 downto 14));
  Cb_8bit <= unsigned(Cb_Reg(21 downto 14));
  Cb_8bit <= unsigned(Cb_Reg(21 downto 14));

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.