亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? compressor.vhd

?? vhdl source for jpeg beginner
?? VHD
?? 第 1 頁 / 共 5 頁
字號:
            when 5 =>               result := "001000000000110";            when 6 =>               result := "001100000001110";            when 7 =>               result := "010000000011110";            when 8 =>               result := "010100000111110";            when 9 =>               result := "011000001111110";            when 10 =>               result := "011100011111110";            when others => --11               result := "100000111111110";         end case;      else --DC chrominance table         case Cat is            when 0 =>               result := "000100000000000";            when 1 =>               result := "000100000000001";            when 2 =>               result := "000100000000010";            when 3 =>               result := "001000000000110";            when 4 =>               result := "001100000001110";            when 5 =>               result := "010000000011110";            when 6 =>               result := "010100000111110";            when 7 =>               result := "011000001111110";            when 8 =>               result := "011100011111110";            when 9 =>               result := "100000111111110";            when 10 =>               result := "100101111111110";            when others => --11               result := "101011111111110";         end case;      end if;         return result;   end CompressDC;      begin      with Save select addr <= addribk when '1', addri when others;      with CompressingInt select addrY <= addrY2 when '1', addrY1 when others;   with CompressingInt select addrCb <= addrCb2 when '1', addrCb1 when others;   with CompressingInt select addrCr <= addrCr2 when '1', addrCr1 when others;      with CompressingInt select weY <= weY2 when '1', weY1 when others;   with CompressingInt select weCb <= weCb2 when '1', weCb1 when others;   with CompressingInt select weCr <= weCr2 when '1', weCr1 when others;      with CompressingInt select dinY <= dinY2 when '1', dinY1 when others;   with CompressingInt select dinCb <= dinCb2 when '1', dinCb1 when others;   with CompressingInt select dinCr <= dinCr2 when '1', dinCr1 when others;      DCT1 : dct2d port map (ND,RDY,RFD,clk,DIND,DOUTD);   buffer_compY : buffer_comp port map (addrY,clk,dinY,doutY,weY);   buffer_compCb : buffer_comp_chrom port map (addrCb,clk,dinCb,doutCb,weCb);   buffer_compCr : buffer_comp_chrom port map (addrCr,clk,dinCr,doutCr,weCr);   Q_ROM1 : q_rom port map (addrQ,clk,doutQ);   Huffman_ROM : huff_rom port map (addrH,clk,doutH);   Tabla_Q1 : tabla_q port map(addrTablaQ,clk,doutTablaQ);            RGB2YCbCr : process(reset, clk)      --It applies the transformation from RGB to YCBCr and pass it to the JPEG process      -- but what we are going to save in the buffers will be the pixels of the components with      -- the JPEG level shift already applied, so that the transformation's last addition: [0;128;128] will become -[128;0;0]      variable Baton : integer range 0 to 3 := 0; --indicates the current state of the FSM      variable Red1 : std_logic_vector(17 downto 0);      variable Red2 : std_logic_vector(17 downto 0);      variable Red3 : std_logic_vector(17 downto 0);      variable Green1 : std_logic_vector(17 downto 0);      variable Green2 : std_logic_vector(17 downto 0);      variable Green3 : std_logic_vector(17 downto 0);      variable Blue1 : std_logic_vector(17 downto 0);      variable Blue2 : std_logic_vector(17 downto 0);      variable Blue3 : std_logic_vector(17 downto 0);            variable Cb, Cr : std_logic_vector(10 downto 0);   begin      if (reset = '1') then         Compressing <= '0';         addrY1 <= (others => '0');         addrCb1 <= (others => '0');         addrCr1 <= (others => '0');         weY1 <= '0';         weCb1 <= '0';         weCr1 <= '0';         dinCb1 <= (others => '0');         dinCr1 <= (others => '0');         dinY1 <= (others => '0');         LineToCompress <= "0000";         LineAbsToCompress <= (others => '0');         ColumnToCompress <= (others => '0');         Baton := 0;         Cb := (others => '0');         Cr := (others => '0');         ProcessingRGB <= '0';         MakeDCT <= '0';         Red1 := (others => '0');         Red2 := (others => '0');         Red3 := (others => '0');         Green1 := (others => '0');         Green2 := (others => '0');         Green3 := (others => '0');         Blue1 := (others => '0');         Blue2 := (others => '0');         Blue3 := (others => '0');      elsif (clk = '1' and clk'event) then         if CompressImage = '1' then            Compressing <= '1';            addrY1 <= (others => '0');            addrCb1 <= (others => '0');            addrCr1 <= (others => '0');            weY1 <= '0';            weCb1 <= '0';            weCr1 <= '0';                        LineToCompress <= "0000";            LineAbsToCompress <= (others => '0');            ColumnToCompress <= (others => '0');            Baton := 0;            ProcessingRGB <= '0';         end if;                  if (ProcessRGB = '1') then            ProcessingRGB <= '1'; --while this one is high, there won't be another ProcessRGB='1'            Baton := 1;         end if;         addrY1 <= Mult_Columns(LineToCompress) + ColumnToCompress;         addrCb1 <= Mult_Half_Columns(LineToCompress(3 downto 1)) + (ColumnToCompress(9 downto 1)); --for the subsampling         addrCr1 <= Mult_Half_Columns(LineToCompress(3 downto 1)) + (ColumnToCompress(9 downto 1));         --we pre-read the saved data, so as to average the chroma components Cb and Cr         --to be able to do a proper subsampling 2x2 1x1 1x1                  case Baton is            when 0 =>               weY1 <= '0';               weCb1 <= '0';               weCr1 <= '0';               MakeDCT <= '0';            when 1 =>                                                   --we apply only the transformation RGB to YCbCr               Red1 := Multiplier(Red, "0010011001"); --153               Red2 := Multiplier(Red, "0010101101"); --173               Red3 := "0000000000" & Red; --1               Green1 := Multiplier(Green, "1001011001"); --601               Green2 := Multiplier(Green, "0101010011"); --339               Green3 := Multiplier(Green, "0110101101"); --429               Blue1 := Multiplier(Blue, "0001110101"); --117               Blue2 := "0000000000" & Blue; --1               Blue3 := Multiplier(Blue, "0001010011"); --83               --the largest obtainable result would be 255*601=153255 (100101011010100111)               Baton := 2;                              MakeDCT <= '0';            when 2 =>               --dinY1 <= "111110000000"; --for debugging, to make Y zero, so that in the resulting image the Blue channel will be Cb and the Red one will be Cr               dinY1 <= "0000" & (Red1(16 downto 9) + Green1(17 downto 10) + Blue1(17 downto 10) - "10000000");-- + Red1(8) + Green1(9) + Blue1(9)); --Red1/512+Green1/1024+Blue1/1024 and with -128 for the level shift               if Mono = '1' then                  Cb := (others => '0');                  Cr := (others => '0');               else                  Cb := "000" & (Blue2(8 downto 1) - Red2(17 downto 10) - Green2(17 downto 10)); -- + Blue2(0) - Red2(9) - Green2(9)); --Red & Green between 1024 and Blue between 2                  Cr := "000" & (Red3(8 downto 1) - Green3(17 downto 10) - Blue3(17 downto 10)); -- + Red3(0) - Green3(9) - Blue3(9)); --between 1024 all but Red                  --debug: the bits added/substracted at the end are the nearest integer rounding               end if;                                 --Subsampling: average groups of 4 pixels in blocks of 2x2               if LineAbsToCompress(0) = '0' and ColumnToCompress(0) = '0' then --element (0,0)                  --dinCb1 <= "0000" & Cb(7 downto 0);                  --dinCr1 <= "0000" & Cr(7 downto 0);                  dinCb1 <= "0000" & Cb(7 downto 0);                  dinCr1 <= "0000" & Cr(7 downto 0);               elsif LineAbsToCompress(0) = '0' and ColumnToCompress(0) = '1' then --element (0,1)                  Cb := (Cb(7) & Cb(7) & Cb(7) & Cb(7 downto 0)) + (doutCb(7) & doutCb(7 downto 0));                  Cr := (Cr(7) & Cr(7) & Cr(7) & Cr(7 downto 0)) + (doutCr(7) & doutCr(7 downto 0));                  dinCb1 <= "000" & Cb(8 downto 0);                  dinCr1 <= "000" & Cr(8 downto 0);                  elsif LineAbsToCompress(0) = '1' and ColumnToCompress(0) = '0' then --element (1,0)                  Cb := (Cb(7) & Cb(7) & Cb(7) & Cb(7 downto 0)) + (doutCb(8) & doutCb(8 downto 0));                  Cr := (Cr(7) & Cr(7) & Cr(7) & Cr(7 downto 0)) + (doutCr(8) & doutCr(8 downto 0));                  dinCb1 <= "00" & Cb(9 downto 0);                  dinCr1 <= "00" & Cr(9 downto 0);                  else --element (1,1) before, we have added directly, now we add and write the average of the 4 pixels, so as to not lose precission                  Cb := (Cb(7) & Cb(7) & Cb(7) & Cb(7 downto 0)) + (doutCb(9) & doutCb(9 downto 0));                  Cr := (Cr(7) & Cr(7) & Cr(7) & Cr(7 downto 0)) + (doutCr(9) & doutCr(9 downto 0));                  dinCb1 <= "0000" & Cb(9 downto 2);                  dinCr1 <= "0000" & Cr(9 downto 2);                  --next lines are for debugging purposes (instead of the last if,elsifs and else to write just                  --one chrominance value for Cb and Cr instead of averaging)                  --Cb := (Cb(7) & Cb(7) & Cb(7) & Cb(7 downto 2)) + (doutCb(7) & doutCb(7 downto 0));                  --Cr := (Cr(7) & Cr(7) & Cr(7) & Cr(7 downto 2)) + (doutCr(7) & doutCr(7 downto 0));                  --dinCb1 <= "0000" & Cb(7 downto 0);                  --dinCr1 <= "0000" & Cr(7 downto 0);                  --weCb1 <= '1';                  --weCr1 <= '1';                              --else                  --weCb1 <= '0';                  --weCr1 <= '0';                              end if;                                    weY1 <= '1';               weCb1 <= '1';               weCr1 <= '1';               if (LineToCompress(2 downto 0) = "111") then                  if (ColumnToCompress(2 downto 0) = "111") then --we've just written pixel 64 of the block [of 64 pixels]                     MakeDCT <= '1';                                                                               else                     MakeDCT <= '0';                  end if;                  else                                    MakeDCT <= '0';               end if;                              if (ColumnToCompress = ImgColumns) then                  LineToCompress <= LineToCompress + 1;                  LineAbsToCompress <= LineAbsToCompress + 1;                  ColumnToCompress <= (others => '0');               else                  ColumnToCompress <= ColumnToCompress + 1;               end if;                                             Baton := 3;            when 3 => --with this dummy cycle we give time to CompressingInt to rise, if it must, and make the following "if" work fine               weY1 <= '0';               weCb1 <= '0';               weCr1 <= '0';               MakeDCT <= '0';               Baton := 0;         end case;         --MakeDCT is rised in cycle 0, in cycle 1 it is read by the process JPEG which then rises CompressingInt         --and in cycle 2 this process reads CompressingInt='1' so that in that intermediate cycle 1 is when         --the case "when 3 =>" gets executed and the following "if", in which MakeDCT is 1 and CompressingInt is 0         --but it is going to be inverted.         if (Baton = 0 and MakeDCT = '0' and CompressingInt = '0') then --it is fine!            if (LineAbsToCompress > ImgLines) then               Compressing <= '0'; --Compression has ended, image ready               LineAbsToCompress <= (others => '0'); --absolutely incredible, without this line it will only work for the                              --first image (it took me much time to debug this one, folks)            end if;               ProcessingRGB <= '0';         end if;                  end if;      end process RGB2YCbCr;                     JPEG : process (reset, clk)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品初高中害羞小美女文| 中文字幕永久在线不卡| 91精品国产综合久久香蕉的特点| 欧美日韩1234| 欧美大片拔萝卜| 国产精品久久久久久久久果冻传媒| 亚洲人成精品久久久久久| 香蕉成人伊视频在线观看| 五月激情综合婷婷| 韩国理伦片一区二区三区在线播放 | 国产精品久99| 亚洲成人免费在线| 韩国理伦片一区二区三区在线播放| 成人av影院在线| 欧美色爱综合网| 中文字幕免费不卡在线| 亚洲成人av福利| 国产99久久精品| 91精品国产福利| 国产精品国产三级国产aⅴ原创 | 久久成人av少妇免费| 国产99久久久精品| 欧美一区二区三区成人| 1024精品合集| 韩国一区二区三区| 欧美三级电影一区| 国产精品美女久久久久久| 丝瓜av网站精品一区二区 | 久久人人97超碰com| 亚洲日本中文字幕区| 久久99久久99小草精品免视看| 91麻豆国产福利在线观看| 精品国内片67194| 一区二区三区中文字幕| 久久av资源站| 亚洲成人中文在线| 97se亚洲国产综合自在线| 精品粉嫩超白一线天av| 亚洲一二三区不卡| 99久久er热在这里只有精品15 | 国产成人自拍网| 欧美一区二区三区系列电影| 亚洲综合色在线| 成人激情小说网站| 久久日一线二线三线suv| 午夜精品久久久| 日本高清不卡一区| 自拍视频在线观看一区二区| 国产成人鲁色资源国产91色综 | 成人av网址在线观看| 精品久久久久久久久久久院品网| 午夜久久福利影院| 欧美三级资源在线| 亚洲午夜久久久久久久久电影院| 不卡在线视频中文字幕| 久久久国产精华| 国产麻豆精品theporn| 精品少妇一区二区| 蜜臀av性久久久久蜜臀aⅴ | 99精品欧美一区二区三区综合在线| 欧美成人福利视频| 麻豆成人久久精品二区三区小说| 国产精品第四页| 欧美日本一区二区三区| 亚洲综合一区二区精品导航| 欧日韩精品视频| 亚洲永久精品大片| 欧美色综合久久| 亚洲一区二区精品视频| 在线观看三级视频欧美| 亚洲成av人综合在线观看| 欧美亚洲国产怡红院影院| 亚洲国产日韩精品| 欧美日韩精品免费观看视频| 婷婷国产在线综合| 日韩免费福利电影在线观看| 蜜桃久久久久久| 久久综合九色综合久久久精品综合| 麻豆91小视频| 国产欧美一区二区三区沐欲 | 天天综合色天天综合色h| 欧美日韩三级一区二区| 日本伊人精品一区二区三区观看方式| 欧美一级片在线看| 国产精品一区在线观看你懂的| 国产精品人成在线观看免费| 色呦呦一区二区三区| 日本不卡视频一二三区| 国产精品丝袜91| 欧美日韩一区二区三区四区| 久久se精品一区精品二区| 中文字幕一区二区三区在线观看| 欧美三级欧美一级| 激情深爱一区二区| 18涩涩午夜精品.www| 欧美日高清视频| 成人丝袜18视频在线观看| 亚洲成a人v欧美综合天堂下载 | 亚洲国产精品久久一线不卡| 69久久99精品久久久久婷婷 | 亚洲色欲色欲www| 欧美精品粉嫩高潮一区二区| 懂色av一区二区三区蜜臀| 亚洲曰韩产成在线| 国产欧美日本一区视频| 欧美人狂配大交3d怪物一区 | 亚洲成av人片在线观看无码| 国产日韩欧美在线一区| 欧美伊人精品成人久久综合97| 国产日韩欧美高清在线| 欧美久久一二区| 91免费在线视频观看| 久久精品99国产精品| 亚洲午夜私人影院| 亚洲免费av在线| 亚洲国产精品精华液ab| 欧美大片一区二区| 欧美丰满高潮xxxx喷水动漫| 97精品国产露脸对白| 国产精品一区二区在线观看网站| 日韩欧美一区在线| 欧美日韩亚洲丝袜制服| eeuss鲁片一区二区三区在线看| 国内精品久久久久影院薰衣草| 一区二区三区电影在线播| 国产精品少妇自拍| 久久精品一区二区三区四区| 日韩欧美国产一区二区在线播放| 欧美揉bbbbb揉bbbbb| 91在线国产观看| 亚洲美女视频在线| 中文字幕在线观看一区| 亚洲国产成人私人影院tom| 久久久久亚洲蜜桃| 国产麻豆91精品| 国产一区免费电影| 国产精品一区二区三区网站| 精品一区二区在线看| 秋霞av亚洲一区二区三| 秋霞国产午夜精品免费视频| 全国精品久久少妇| 奇米色一区二区| 免费看日韩a级影片| 免费成人性网站| 琪琪一区二区三区| 蜜桃av噜噜一区| 麻豆精品精品国产自在97香蕉| 日本不卡一二三| 精品一区二区影视| 免费在线观看视频一区| 久88久久88久久久| 国产一区在线不卡| 国产一区二区精品久久| 中文字幕字幕中文在线中不卡视频| 国产日韩欧美一区二区三区乱码| 国产午夜一区二区三区| 国产精品欧美经典| 亚洲丝袜制服诱惑| 亚洲成av人片在线观看| 日本成人超碰在线观看| 国产一区二区三区蝌蚪| 成人黄色一级视频| 日本丶国产丶欧美色综合| 欧美美女黄视频| 国产精品一区二区在线观看网站| 成人免费看的视频| 在线观看国产日韩| 欧美精品视频www在线观看| 精品国产一区二区亚洲人成毛片| 国产三级欧美三级| 亚洲图片欧美激情| 亚洲图片欧美色图| 国产综合一区二区| 91香蕉视频在线| 日韩一级二级三级| 国产精品天美传媒| 日韩成人av影视| 欧美mv日韩mv| 欧美精品一区二区不卡| 国产精品伦一区二区三级视频| 亚洲黄色小视频| 免费不卡在线视频| av在线不卡免费看| 欧美一区二区免费观在线| 国产免费成人在线视频| 一区二区三区中文在线观看| 免费在线一区观看| 99在线热播精品免费| 欧美亚洲一区三区| 精品国产乱码久久久久久影片| 一区视频在线播放| 久久 天天综合| 欧美三级在线视频| 国产精品毛片久久久久久| 美腿丝袜亚洲三区| 91福利社在线观看| 日本一区二区免费在线观看视频| 男人操女人的视频在线观看欧美| 一本大道av伊人久久综合| 日韩视频国产视频|