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

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

?? compressor.vhd

?? vhdl source for jpeg beginner
?? VHD
?? 第 1 頁 / 共 5 頁
字號:
                  Columna := (ColumnToCompress(9 downto 3) - 1) & "000";               end if;               Bloque := ColumnToCompress(1 downto 0);               StepV <= 0;               weY2 <= '0';               weCb2 <= '0';               weCr2 <= '0';               Coeficiente := 0;               Save <= '0';               IniDC := '1';                          GetPrevDC := '1';               WriteAdditionalBits <= '0';            else                        we <= '0';            LumaBlock := Bloque(1) nor Bloque(0); --it is 1 if we are dealing with luminance component            --It is necessary that Base be here so that it changes when Bloque changes in the "if" of Done in the last image's block            if Bloque = "00" then --Q Coefficients of Table 0 (luminance)               BaseH := (others => '0'); --address 0 of Huffman Luminance Table               case Compression is                  when "00" => --Low Quality                     Base := "100000000";                  when "01" => --Medium Quality                     Base := "010000000";                  when others => --10 High Quality                     Base := "000000000";               end case;            else --Q Coefficients of Table 1 (chroma)               BaseH := "010110000"; --address 0 of Huffman Chrominance Table               case Compression is                  when "00" => --Low Quality                     Base := "101000000";                  when "01" => --Medium Quality                     Base := "011000000";                  when others => --10 High Quality                     Base := "001000000";               end case;                           end if;                           case StepV is               when 0 => --with the first data to let addrXX2 load and have the data in memory                  weY2 <= '0';                  weCb2 <= '0';                  weCr2 <= '0';                  if CompressingInt = '1' and Done = '0' then --Done=0 cause in case it is a Y block (but not the fourth (the last)) coming from StepV=3                     StepV <= 1;                  else                     StepV <= 0;                  end if;                     NDe <= '0';                  RFDInt <= '0';               when 1 => --Feeding of DCT1 with 64 pixels                  if RFD = '1' then --DCT1 ready for data (RFD)                     NDe <= '1';                     ND <= NDe; --this way we delay ND one cycle to synchronize data                     if RFDInt = '0' then                        case Bloque is                           when "00" => --block Y                              DIND <= doutY(7 downto 0);                            when "01" => --block Cb                              DIND <= doutCb(7 downto 0);                            when others => --can only be block Cr                              DIND <= doutCr(7 downto 0);                         end case;                     else                        DIND <= RFDIntData; --to recover the "lost" cycle because RFD was 0 (if the DCT was such that RFD were 0 for more than a cycle it would be necessary to change this part)                        RFDInt <= '0';                     end if;                        if Columna(2 downto 0) = "111" then                        Columna := Columna(9 downto 3) & "000";                        Linea := Linea + 1;                        if Linea(2 downto 0) = "000" then --we've finished this StepV, now we'll wait for the results                           StepV <= 2; --we shall go to StepV 2 with the first column of the block                           Linea(3) := not Linea(3); --makes it rest in current block                           Primera := '1'; --to not let StepV 2 change Linea or Column in its 1st cycle because they already have adequate values                        end if;                        else                        Columna := Columna + 1;                     end if;                     else                     --to not lose the just read pixel (rememer that reads are ahead of their time!!)                     RFDInt <= '1';                     case Bloque is                        when "00" => --block Y                           RFDIntData <= doutY(7 downto 0);                         when "01" => --block Cb                           RFDIntData <= doutCb(7 downto 0);                         when others => --can only be block Cr                           RFDIntData <= doutCr(7 downto 0);                      end case;                     --ND <= '0';                  end if;                  weY2 <= '0';                  weCb2 <= '0';                  weCr2 <= '0';                  addrQ <= Base; --DC Coefficient's Q (Base + Linea*8 + Columna)                  QDC := (others => '0');               when 2 => --we receive the data, quantize it, truncate it and save them back to the buffer                  --watch out because DCT1 outputs data column-wise (feeding was row-wise)                  NDe <= '0'; --it stayed high while sending data byte                  ND <= NDe;                  case Bloque is  --needed to send the last data of the block (it is alright!!!)                     when "00" => --block Y                        DIND <= doutY(7 downto 0);                      when "01" => --block Cb                        DIND <= doutCb(7 downto 0);                      when others => --can only be block Cr                        DIND <= doutCr(7 downto 0);                   end case;                                                      if RDY = '1' then --output data ready!!                     if QDC /= 0 then                        DCTQ := MultiplierQ(DOUTD(14 downto 3), QDC);                        QDC := (others => '0');                     else                                DCTQ := MultiplierQ(DOUTD(14 downto 3), DOUTQ); --multiply the DCT coefficient times Qyx fraction's numerator                     end if;                     --if DCTQ(24) = '0' then --it is positive, let's round                        DCTQ(24 downto 14) := DCTQ(24 downto 14) + DCTQ(13); --round to nearest integer                     --end if;                        --if DCTQ(24 downto 13) = "111111111111" then --it is less or equal than -0.5, roung to 0                     --   DCTQ(24 downto 13) := "000000000000"; --or else it will be read as -1                     --end if;                     case Bloque is --the "+ DCTQ(13)" is the nearest integer round!                        when "00" => --block Y                           dinY2 <= DCTQ(24) & DCTQ(24 downto 14);-- + DCTQ(13); --we divide (shifting right) by the general Q coefficient denominator (16384) and save the quantized coefficient                           --sign-extension                           weY2 <= '1';                        when "01" => --block Cb                           dinCb2 <= DCTQ(24) & DCTQ(24 downto 14);-- + DCTQ(13); --we divide (shifting right) by the general Q coefficient denominator (16384) and save the quantized coefficient                           weCb2 <= '1';                        when others => --can only be block Cr                           dinCr2 <= DCTQ(24) & DCTQ(24 downto 14);-- + DCTQ(13); --we divide (shifting right) by the general Q coefficient denominator (16384) and save the quantized coefficient                           weCr2 <= '1';                     end case;                                                               --write column-wise                     if Linea(2 downto 0) = "111" and Primera = '0' then --have we reached this line's end?                        --Primera is used for the first cycle of StepV2 in which Columna and Linea arrive with the right value                        --so they need not be changed in order to get the correct address                        Linea := Linea(3) & "000";                        Columna := Columna + 1;                     else                        if Primera = '1' then                           Primera := '0';                        else                              Linea := Linea + 1;                           if Linea(2 downto 0) = "111" and Columna(2 downto 0) = "111" then --we have finished this StepV, now we must Huffman encode                               StepV <= 3;                           end if;                           end if;                        end if;                                          --the following code is because we must load one cycle early the addrQ so that in the                     --current cycle we can have the right Q coefficient for current Linea and Columna values                     if Linea(2 downto 0) = "110" then --have we reached the end?                        --next coeff. is Linea 0 of the Coeff. Table and Columna is current plus one                        addrQ <= Base + Columna(2 downto 0) + 2; --Base + Linea*8 + Columna --> remember coefficient table is 8x8                     else                        --next coeff is next Linea of the Coeff. Table and current Columna                        addrQ <= Base + ((Linea(2 downto 0) + 2) & "000") + Columna(2 downto 0); --Base + Linea*8 + Columna                     end if;                                       else                     --during Latency cycles we will be here waiting until RDY is 1                     --and also every X cycles when RDY becomes 0 for one cycle                     if QDC = 0 and addrQ = Base then --only happens when we enter this StepV from the previous one                        QDC := DOUTQ; --save the DC value because Q reading must be ahead by two cycles now                        addrQ <= Base + "1000"; --Base + Linea*8 + Columna (Linea=1, Columna=0)                     end if;                        weY2 <= '0';                     weCr2 <= '0';                     weCb2 <= '0';                  end if;                  when 3 =>                  weY2 <= '0';                  weCr2 <= '0';                  weCb2 <= '0';                  --Make the "pointers" Linea and Columna point to the beginning of the next block                  --must do it here because in the last cycle of StepV2, when StepV becomes 3, Linea and Columna                  --must maintain their value                  Linea := Linea(3) & "000";                  Columna := Columna + 1;                  if LumaBlock = '1' then --if we are processing the luminance block we can only save it when we have processed the 4 ones                     --that compose the 2x2 block of subsampling, there is no problem with the order of the chroma ones because these ones too                     --are saved when we have averaged four and that is controlled by the process RGB2YCbCr                     if Linea(3) = '1' and Columna(3) = '0' then --checked, it is alright (remember it points to the next block)                        StepV <= 4;                        Elemento := "00"; --process the first square (8x8 block) of the 2x2 luminance block (16x16 pixels, 2x2 squares)                        --Ready Linea and Columna to read element 00 that Huffman will receive                        Linea := (others => '0');                        Columna := (Columna(9 downto 4) - 1) & "0000";                     else --the three first squares of the 2x2 luminance block are not sent to Huffman yet (subsampling requirements)                        StepV <= 0;                        Done <= '1';                     end if;                  else                     Columna := Columna - 1;                     Columna := Columna(9 downto 3) & "000"; --it is alright, because Columna arrives already adjusted to Cb and Cr.                     StepV <= 4;                  end if;                  WriteAdditionalBits <= '0';               when 4 => --with this dummy cycle we give time to the memory to give us address 0                  --for the DC coefficient                  weY2 <= '0';                  weCr2 <= '0';                  weCb2 <= '0';                  Save <= '0'; --just in case we left it high in last step                  we <= '0';                  StepV <= 5;                 when 5 => --Linea and Columna point to the beginning of the block                  --If we change Linea and/or Columna in cycle 0 of this section, then the new address will                  --be sent to memory in cycle 1 and in cycle 2 doutX will have the asked data, so careful!!                  case Bloque is                     when "00" => --block Y                        Coef := doutY;                      when "01" => --block Cb                        Coef := doutCb;                      when others => --can only be block Cr                        Coef := doutCr;                   end case;                                    we <= '0';                     if Done = '0' then --this way it does not go to look for the DC when we change Block (upsetting FirstDC)                  if Save = '0' then                     if WriteAdditionalBits = '0' then                        if Coeficiente = 0 then                            --The previous component is read from the buffer varying Linea and Columna                           if IniDC = '1' then --we've not yet obtained the previous DC to calculate the difference                              if Linea = "0000" and Columna = "000000000" and FirstDC = '1' and GetPrevDC = '1' then --must do it this way                                 --or else the luminance, which has 4 blocks in its first Huffmanear takes DC=0 for all                                 --GetPrevDC = 1 is so that execution doesnt get here if in the previous cycle GetPrevDC became zero in the bottom "if"                                 --and put Linea and Columna to zero                                 --we are in the first block of the image, PrevDC is zero                                 if Bloque = "10" then --if we are in the last, we zero it                                    FirstDC := '0'; --because it has already been used by the three components (Y,Cb,Cr)                                 end if;                                 PrevDC := (others => '0');                                 IniDC := '0';                              else                                 if GetPrevDC = '1' then                                    ColBk := Columna; --save the values of Linea and Columna                                    LinBk := Linea;                                                                        --Must obtain the quantized DC coefficient of the last processed block                                    --as stated by specification, but actually the last block is indicated by MCU                                    if Columna(9 downto 3) = "0000000" then --first block of the row?                                       if LumaBlock = '1' then                                          if Elemento = "00" then                                             --Remember that DCTs are done when only the last line of all is left to be written in the block                                             --so the DC of the previous block has already been overwritten, that's why we use LastBlockDCY                                             PrevDC := LastBlockDCY;                                             IniDC := '0'; --this way we skip the next StepV                                          else --Elemento 10 need the DC of Elemento 01                                             Linea(3) := '0';                                                                                          Columna(3) := '1';                                          end if;                                          else --in chrominance ImgColumns has half the image's columns!                                          if Bloque = "01" then --block Cb                                             PrevDC := LastBlockDCCb;                                          else --10 = block Cr                                             PrevDC := LastBlockDCCr;                                          end if;                                          IniDC := '0';                                       end if;                                       else                         

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲二区在线视频| 91精品国产黑色紧身裤美女| 日本vs亚洲vs韩国一区三区| 国产欧美一区二区精品秋霞影院| 成人美女视频在线观看18| 亚洲va在线va天堂| 欧美国产精品专区| 日韩精品最新网址| 色八戒一区二区三区| 麻豆精品久久精品色综合| 亚洲一级二级在线| 国产欧美日韩不卡免费| 91精品在线一区二区| 99精品久久只有精品| 韩国女主播成人在线| 亚洲一区电影777| √…a在线天堂一区| 成人aaaa免费全部观看| 视频一区中文字幕国产| 99re66热这里只有精品3直播 | 亚洲欧洲国产日本综合| 欧美三级资源在线| 高清在线不卡av| 亚洲高清免费观看 | 欧美mv和日韩mv的网站| 欧美在线视频全部完| 成人禁用看黄a在线| 国产在线不卡一区| 午夜成人免费视频| 亚洲欧洲日韩一区二区三区| 久久午夜老司机| 日韩欧美成人一区二区| 在线不卡免费av| 欧美亚洲自拍偷拍| 色8久久精品久久久久久蜜| 成人高清在线视频| 丁香桃色午夜亚洲一区二区三区| 韩国女主播成人在线| 麻豆传媒一区二区三区| 日韩国产一二三区| 日韩在线一二三区| 视频一区欧美精品| 五月婷婷欧美视频| 亚洲午夜久久久久中文字幕久| 中文字幕亚洲综合久久菠萝蜜| 久久天天做天天爱综合色| 欧美精品一级二级| 欧美日韩国产中文| 欧洲精品在线观看| 色综合一区二区三区| 一本色道久久综合亚洲精品按摩| 96av麻豆蜜桃一区二区| 99免费精品视频| 国产成人精品免费在线| 国产成人综合在线观看| 成人精品视频一区二区三区尤物| 天使萌一区二区三区免费观看| 国产精品伦一区| 欧美韩日一区二区三区| 欧美色窝79yyyycom| 91久久精品国产91性色tv| 国产成人精品免费| 成人晚上爱看视频| 水野朝阳av一区二区三区| 亚洲欧美另类久久久精品 | 国产一区二区电影| 国产在线视频精品一区| 成人涩涩免费视频| 91福利国产精品| 国产亚洲一区二区在线观看| 亚洲成人动漫在线免费观看| 成人久久18免费网站麻豆| 欧美成人a∨高清免费观看| 一区二区三区免费看视频| 国产成人日日夜夜| 欧美大片在线观看一区二区| 亚洲午夜激情av| 99久久精品国产精品久久| 久久影院视频免费| 青青草国产精品亚洲专区无| 欧日韩精品视频| 中文字幕一区二区在线观看| 国产成人午夜电影网| 精品国产一区二区三区不卡| 天堂在线一区二区| 欧美在线短视频| 亚洲欧美色一区| 99精品国产热久久91蜜凸| 国产亚洲婷婷免费| 国产一区二区三区四区五区美女| 91精品国产综合久久福利| 亚洲成人动漫在线观看| 欧美中文字幕久久| 亚洲一区二区三区在线| 91美女蜜桃在线| 亚洲精品一卡二卡| 99re这里都是精品| 一色桃子久久精品亚洲| 不卡的av电影| 亚洲欧美在线视频| zzijzzij亚洲日本少妇熟睡| 国产精品视频在线看| 成人免费观看男女羞羞视频| 亚洲国产精品成人综合| 不卡区在线中文字幕| 综合激情成人伊人| 99精品一区二区三区| 樱桃国产成人精品视频| 日本高清不卡aⅴ免费网站| 亚洲美女视频一区| 91久久精品网| 亚洲成人资源在线| 欧美久久久久中文字幕| 日韩高清国产一区在线| 日韩一区二区免费视频| 理论片日本一区| 国产日韩欧美高清| 99视频一区二区| 亚洲国产精品久久艾草纯爱 | 国产精品久久久久久久久免费相片 | 亚洲精品乱码久久久久久黑人| 91在线无精精品入口| 亚洲最大色网站| 欧美三级电影在线看| 天天色天天爱天天射综合| 欧美精品乱人伦久久久久久| 免费看欧美女人艹b| 精品1区2区在线观看| 丁香婷婷综合网| 亚洲精品免费在线观看| 欧美电影在线免费观看| 国产一区在线精品| 国产精品女人毛片| 色又黄又爽网站www久久| 五月天国产精品| 2020国产精品自拍| 99久久久国产精品免费蜜臀| 香蕉av福利精品导航 | 蜜臀av亚洲一区中文字幕| 久久久久综合网| 色综合久久中文字幕| 午夜av电影一区| 久久精品一级爱片| 欧美视频在线播放| 国产毛片精品视频| 亚洲精品乱码久久久久久| 日韩视频免费观看高清完整版在线观看 | 91麻豆精品91久久久久同性| 国产一区二区三区四区五区入口 | 久久影院视频免费| 91九色最新地址| 国产专区综合网| 一区二区三区四区中文字幕| 日韩午夜在线观看| av一区二区三区| 秋霞电影网一区二区| 国产精品久久久久久久久快鸭| 欧美日韩一本到| 国产成人av网站| 亚洲成av人片观看| 欧美国产在线观看| 欧美高清视频不卡网| 大美女一区二区三区| 日本一不卡视频| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美日本一区二区| av激情亚洲男人天堂| 免费精品视频在线| 一区二区三区日韩欧美| 国产日韩亚洲欧美综合| 欧美精品日韩精品| 99久久er热在这里只有精品66| 国内精品国产成人| 日韩vs国产vs欧美| 一区二区三区欧美亚洲| 国产精品妹子av| 精品久久一区二区| 欧美一区二区三区免费在线看| 91蜜桃免费观看视频| 成人黄色av电影| 国产真实乱偷精品视频免| 日本亚洲三级在线| 夜夜精品视频一区二区| 国产人妖乱国产精品人妖| 日韩一卡二卡三卡四卡| 色一情一乱一乱一91av| 国产白丝精品91爽爽久久| 久久草av在线| 午夜在线成人av| 日韩理论片一区二区| 国产人成一区二区三区影院| 欧美在线制服丝袜| 91蜜桃网址入口| 丁香婷婷综合激情五月色| 国产精品综合视频| 国产一区免费电影| 美国一区二区三区在线播放| 一区av在线播放| 国产欧美日韩精品a在线观看| 精品国产第一区二区三区观看体验 |