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

Subversion Repositories mkjpeg

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /mkjpeg
    from Rev 62 to Rev 63
    Reverse comparison

Rev 62 → Rev 63

/trunk/tb/vhdl/MDCTTB_PKG.vhd
37,8 → 37,8
----------------------------------------------
-- constant section 1
----------------------------------------------
constant MAX_IMAGE_SIZE_X : INTEGER := 1280;
constant MAX_IMAGE_SIZE_Y : INTEGER := 1280;
constant MAX_IMAGE_SIZE_X : INTEGER := 2048;
constant MAX_IMAGE_SIZE_Y : INTEGER := 2048;
----------------------------------------------
-- type section
----------------------------------------------
/trunk/design/mdct/FDCT.vhd
568,22 → 568,34
Cb_Reg <= (others => '0');
Cr_Reg <= (others => '0');
elsif CLK'event and CLK = '1' then
Y_Reg_1 <= R_s*C_Y_1;
Y_Reg_2 <= G_s*C_Y_2;
Y_Reg_3 <= B_s*C_Y_3;
Cb_Reg_1 <= R_s*C_Cb_1;
Cb_Reg_2 <= G_s*C_Cb_2;
Cb_Reg_3 <= B_s*C_Cb_3;
Cr_Reg_1 <= R_s*C_Cr_1;
Cr_Reg_2 <= G_s*C_Cr_2;
Cr_Reg_3 <= B_s*C_Cr_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);
Cr_Reg <= Cr_Reg_1 + Cr_Reg_2 + Cr_Reg_3 + to_signed(128*16384,Cr_Reg'length);
 
-- RGB input
if C_YUV_INPUT = '0' then
Y_Reg_1 <= R_s*C_Y_1;
Y_Reg_2 <= G_s*C_Y_2;
Y_Reg_3 <= B_s*C_Y_3;
Cb_Reg_1 <= R_s*C_Cb_1;
Cb_Reg_2 <= G_s*C_Cb_2;
Cb_Reg_3 <= B_s*C_Cb_3;
Cr_Reg_1 <= R_s*C_Cr_1;
Cr_Reg_2 <= G_s*C_Cr_2;
Cr_Reg_3 <= B_s*C_Cr_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);
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 process;
/trunk/design/common/JPEG_PKG.vhd
32,7 → 32,7
-- warning! this parameter heavily affects memory size required
-- if expected image width is known change this parameter to match this
-- otherwise some onchip RAM will be wasted and never used
constant C_MAX_LINE_WIDTH : integer := 1280;
constant C_MAX_LINE_WIDTH : integer := 2048;
-- memory/performance tradeoff
-- 8 extra lines highest performance
40,10 → 40,14
constant C_EXTRA_LINES : integer := 8; -- from 0 to 8
 
-- 24 bit format RGB 888 bits
-- 16 bit format RGB 565 bits
-- 24 bit format RGB/YCbCr 888 bits
-- 16 bit format RGB/YCbCr 565 bits
constant C_PIXEL_BITS : integer := 24;
-- 0 = RGB
-- 1 = YUV/YCbCr
constant C_YUV_INPUT : std_logic := '0';
type T_SM_SETTINGS is record
x_cnt : unsigned(15 downto 0);
y_cnt : unsigned(15 downto 0);

powered by: WebSVN 2.1.0

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