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

Subversion Repositories mkjpeg

[/] [mkjpeg/] [trunk/] [design/] [JFIFGen/] [JFIFGen.vhd] - Diff between revs 25 and 32

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 25 Rev 32
Line 56... Line 56...
        -- ByteStuffer
        -- ByteStuffer
        num_enc_bytes      : in  std_logic_vector(23 downto 0);
        num_enc_bytes      : in  std_logic_vector(23 downto 0);
 
 
        -- HOST IF
        -- HOST IF
        qwren              : in  std_logic;
        qwren              : in  std_logic;
        qwaddr             : in  std_logic_vector(5 downto 0);
        qwaddr             : in  std_logic_vector(6 downto 0);
        qwdata             : in  std_logic_vector(7 downto 0);
        qwdata             : in  std_logic_vector(7 downto 0);
        image_size_reg     : in  std_logic_vector(31 downto 0);
        image_size_reg     : in  std_logic_vector(31 downto 0);
        image_size_reg_wr  : in  std_logic;
        image_size_reg_wr  : in  std_logic;
 
 
        -- OUT RAM
        -- OUT RAM
Line 81... Line 81...
  constant C_SIZE_Y_L  : integer := 26;
  constant C_SIZE_Y_L  : integer := 26;
  constant C_SIZE_X_H  : integer := 27;
  constant C_SIZE_X_H  : integer := 27;
  constant C_SIZE_X_L  : integer := 28;
  constant C_SIZE_X_L  : integer := 28;
 
 
  constant C_EOI       : std_logic_vector(15 downto 0) := X"FFD9";
  constant C_EOI       : std_logic_vector(15 downto 0) := X"FFD9";
 
  constant C_QLUM_BASE : integer := 44;
 
  constant C_QCHR_BASE : integer := 44+69;
 
 
 
 
  signal hr_data      : std_logic_vector(7 downto 0);
  signal hr_data      : std_logic_vector(7 downto 0);
  signal hr_waddr     : std_logic_vector(8 downto 0);
  signal hr_waddr     : std_logic_vector(8 downto 0);
  signal hr_raddr     : std_logic_vector(8 downto 0);
  signal hr_raddr     : std_logic_vector(8 downto 0);
Line 176... Line 178...
              null;
              null;
          end case;
          end case;
        end if;
        end if;
      -- write Quantization table
      -- write Quantization table
      elsif qwren = '1' then
      elsif qwren = '1' then
        hr_waddr <= std_logic_vector( resize(unsigned(qwaddr),hr_waddr'length) +
        -- luminance table select
                    to_unsigned(44,hr_waddr'length));
        if qwaddr(6) = '0' then
 
          hr_waddr <= std_logic_vector
 
                        ( resize(unsigned(qwaddr(5 downto 0)),hr_waddr'length) +
 
                          to_unsigned(C_QLUM_BASE,hr_waddr'length));
 
        else
 
          -- chrominance table select
 
          hr_waddr <= std_logic_vector
 
                        ( resize(unsigned(qwaddr(5 downto 0)),hr_waddr'length) +
 
                          to_unsigned(C_QCHR_BASE,hr_waddr'length));
 
        end if;
        hr_we   <= '1';
        hr_we   <= '1';
        hr_data <= qwdata;
        hr_data <= qwdata;
      end if;
      end if;
 
 
    end if;
    end if;

powered by: WebSVN 2.1.0

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