201145214 、發明說明: 【發明所屬之技術領域】 ,尤其是使用jPEG(J〇int 不及記錄的彩色影像旋轉之 本發明涉及一種彩色影像處理 Photographic Coding Expert Group)用於顯 方法及裝置。 【先前技術】201145214, invention description: [Technical field of the invention], in particular, the use of jPEG (J〇int is less than the recorded color image rotation, the invention relates to a color image processing Photographic Coding Expert Group) for display methods and devices. [Prior Art]
在最近受職迎的智慧财_更早Μ,影像 的影像操控賴顧歧重要的"雜。以歡_智慧型手$ 場的激烈競爭點燃對快速影像旋轉計算能力的需求甚至更夕目于 影像旋轉魏纽何雜裝置韻聽騎^或缺=^,比9^ 示器(如液晶顯示器_)及儲存裝置(如職D快閃記憶體)。影像旋 轉计弄必需考制影絲現。例如,鱗檔格式職轉計算效率且最 後用於儲存的資料大小具雜大影響^如,影像練裝置,比如 ⑽、CMOS相機模組等’娜要齡的實際圖像,並以串列的臟 或爾輸入格式(YCbCr模型通常被視為卿的位移版本)輸出影像 資訊。 —JPEG疋麟照#影像的有讎騎廣泛制的方法。縣肌g 演算法對具平輕動的色調及色彩的實際場景照片被視為最佳,所以 JPEG是最受歡迎的數位相機儲存格式。另—方面,是受歡迎的 色彩工間用於吊與JPEG相關的類比及數位影像/視訊。考慮到 人的感知’並以亮度⑺及二色度(υν)成分定義色彩空間。色度資料的 解析度被降低因子2,常稱為向下取樣,用以反映出人眼對細微的色 彩田節比精細的壳度細節較不敏感的事實。對於JpEG編碼,竹八^22 或YUV420模式(向下取樣比)一般是用來降低資料大小以儲存影像。 YUV422 即γυν(4 ·· 2 ·· 2))是在水平方向降低因子2 ,而 YUV420(亦 201145214 即YUV(4 : 2 : 0))是在水平及垂直方向降低因子2。然後,以YUV 表示的影像被分割成6x6像素的區塊。對於每個區塊,每個γ、U及 V資料都必須經歷離散餘弦轉換(DCT)。 例如,對於YUV422模式,16(水平)χ8(垂直)區塊(亦即包含二水 平相鄰8x8像素之區塊)包括二8x8 Y平面,一 8x8 U平面以及一 8x8 V 平面。對於JPEG編碼,二8x8 Y平面,一 8x8 U平面以及一 8x8 V 平面是依序以下列處理次序饋入到JPEG編碼器中:γ平面、γ平面、 U平面、V平面、Y平面、Y平面、U平面、V平面等。上述串列一 般是表示成(ΥοΥ,υνχΥοΥ,υνχΥοΥ,υν).·.串列。類似的,對於 YUV420模式’一個16(水平)χ16(垂直)區塊(亦即包含8x8像素之2x2 區塊)包括四8x8 Υ平面、二8x8 U平面以及二8x8 V平面。對於JPEG 編碼,四8x8 Y平面,二8x8 U平面以及二8x8 V平面是依序以下列 處理次序饋入到JPEG編碼器中:Y平面、γ平面、γ平面、γ平面、 U平面、V平面、Y平面、Y平面、γ平面、γ平面、υ平面、V平 面等。上述串列一般是表示成 (YoY,串列。 對於影像旋轉處理,最直接的方法是儲存影像輸入裝置所擷取的 整個圖框影像至記憶體中。然後,為顯示旋轉影像於LCD或記錄影像 至儲存裝置’所儲存的影像資料可以旋轉次序讀取。然而,該方法需 要大:!:的資料以儲存整個圖框影像。例如,美國專利第7,352,9〇4號揭 示一種區塊編碼方法及系統,能在縱方向上用預先掃描壓縮資料串對 壓縮影像的母個區塊,藉獲得輸入壓縮資料串中的起始位址而編碼並 輸出資料’使仔系統能藉在縱方向在上進行荷夫曼編碼、9〇 度旋轉鋸齒配置、量化及IDCT,而獲得90度旋轉區塊。 為降低所需έ己憶體;g,已開發出不同的方法。例如,美國專利第 7,489,823號揭示出一種使用再次進入資料組(reentry data set)以横測壓 201145214 縮資料的方法,其中壓縮龍被接收並解碼。先在HPEG、編碼階 段中收集再次進入資料組,然後在解碼期間存取。當解媽出壓縮資料 中的第-位置時’解碼的區塊結束(E0B)旗標被偵測到。再次進入資 料組具有指標,指向壓縮資料巾的第二位置,緊接在第__位置之後, 且解碼資訊讓解碼由第二位置開始。壓縮資料中的第二位存取, 且被存取之再次進人資料巾的解碼資訊侧以繼續對由第二位置的壓 % >料進行解碼。再-人進入資机是在第一 jpeg編碼階段中收集,然 後針對旋轉進行解碼。對於旋轉,再次進入資料組被解碼,然後驗 • 第二】PEG編碼/壓縮階段’以便對所需旋轉方向上的輸人影像進行編 碼。 第-圖顯示為YUV422模式錢的再次進人資訊料意圖。如第 • —圖所示,再次進人資訊包括每個Y平面、U平面及V平面編碼位元 - 串的起始位址,以及頻域中每個y平面、u平面及v平面的直流(DC) 參考值。因此,對於YUV422模式,㈣像素的影像區塊將需要記錄 四個平面的起始位址及DC參考值。相類似的,對於_42〇模式, 6x16像素的影像區塊將需要記錄六個平面的起始位址及ο。參考值。 鲁 【發明内容】 本發明已經獅以克服使用:PEG雜/賴義於顯示及記錄之 影像旋轉方法的上述缺點。本發明的主要目的係提供一種使用jpEG ^顯不及記制彩色影像旋轉之方法及裝置,崎低所需儲存之再 進入資。fl星。藉降低再次進入資訊,收集並處理再次進入資訊的記 隐體及時間可被降低’藉以加強彩色影像旋轉計算的表現。 本發明的另—目的係提供—種制〗PEG獅及賴賴於顯示 及。己錄的彩色影像旋轉之方法及裝置,讓更平滑_碼處理以方便無 抖動顯不轉移處理’以加脑示緒的賴者友善性。 201145214 為達成上述目的’本發賴供—種賴jpEG_及解魏用於顯 城記錄的純影像旋轉之方法及裝置。該方法包括以下步驟·分別 設定JPEG編碼轉TPEG解輯賴式;等射聰像資料準備 編碼,進行JPEG編碼及再次進入資訊處理;等待直到完成整個圖框 影像的壓縮;設;UPEG編碼㈣㈣模式;以及接著進行卿解碼 及再次進入資訊更新處理。為顯示影像於影像輸出裝置上,本方法包 括以下步驟:顯示處理;等待直到JPEG解碼完成;以及顯示最後影 像於,不器上。於此,完成單—圖框顯示的處理。另—方面,為記錄 • 至大量儲存裝置,本方法包括以下步驟:標準無損JPEG編碼;等待 直到JPEG編碼完成;以及儲存最後編碼㈣至大量儲存裝^此時, 完成記錄單一圖框影像的處理。 . 本發明的上述及其他目的、雜、特點及優點將由小閱讀其中 - 的詳細說明並適當的參考所附圖式而變得更好了解。 【實施方式】 以下配合圖式及元件賴對本發明之實财式做更詳細的說 明’俾使熟習該項技藝者在研讀本說明書後能據以實施。 • 帛二圖顯示依據本發明以影像為主之應用環境中使用JPEG磨縮/ 解壓縮以顯示並記錄之彩色影像旋轉裝置的示意圖。如第二圖所示, 本發明的彩色f彡像旋轉裝置2GG包括IPEG編懸201、再次進入資訊 收集模組202及JPEG解碼器203,其中JPEG編碼器201具有硬體直 流(DC)差額脈衝編碼調變(DPCM)解除控制及補零特性,而再次進入資 訊收集模組202及JPEG解碼器203具有DC DPCM解除控制及補零 跳脫特性。值彳寸注意的是,JPEG編碼器201及JPEG解碼器203都利 用DC DPCM解除機制及補零(或跳脫)特性而加強。DC DpCM解除機 制讓JPEG編碼器201儲存第一階段編碼位元串中每個γ平面、u平 201145214 面及V平面的DC值,但非卿標準中所定義的再啟動標示 RST0-RST7 (Ox職).GxFFD7)。提餘元M翁給記賴錄能的% DPCM解除機做補零(或舰)躲’將在本文巾進—步更加詳細說 明。 。In the recent wisdom of the welcoming _ _ earlier, the image manipulation of the image depends on the important " miscellaneous. The demand for fast image rotation computing power is ignited by the fierce competition of Huan _ smart hand $ field. Even more so, the image rotation, Wei Nuo, miscellaneous device, rhythm, ride, or lack of ^^, than the 9^ display (such as LCD _) and storage device (such as job D flash memory). The image rotation calculation must be made into a shadow. For example, the scale file format is computationally efficient and the size of the data used for storage is greatly affected. For example, the image training device, such as (10), CMOS camera module, etc., is the actual image of Na’s age, and is serialized. The dirty or ergo input format (the YCbCr model is usually treated as a shifted version of qing) outputs image information. - JPEG 疋麟照# The method of 雠 riding is widely used. The county muscle g algorithm is considered the best for real scene photos with flat tones and colors, so JPEG is the most popular digital camera storage format. On the other hand, it is a popular color studio for hanging JPEG-related analog and digital video/video. Considering human perception' and defining the color space with luminance (7) and dichroism (υν) components. The resolution of the chromaticity data is reduced by a factor of 2, often referred to as down-sampling, to reflect the fact that the human eye is less sensitive to subtle color field details than fine shell details. For JpEG encoding, Bamboo 8 22 or YUV420 mode (downsampling ratio) is generally used to reduce the size of the data to store images. YUV422 ie γυν(4 ·· 2 ·· 2)) is reduced by a factor of 2 in the horizontal direction, while YUV420 (also 201145214 or YUV (4 : 2 : 0)) is reduced by a factor of 2 in the horizontal and vertical directions. Then, the image represented by YUV is divided into blocks of 6x6 pixels. For each block, each gamma, U, and V data must undergo discrete cosine transform (DCT). For example, for the YUV422 mode, a 16 (horizontal) χ 8 (vertical) block (i.e., a block containing two horizontally adjacent 8x8 pixels) includes two 8x8 Y planes, an 8x8 U plane, and an 8x8 V plane. For JPEG encoding, the two 8x8 Y planes, an 8x8 U plane, and an 8x8 V plane are sequentially fed into the JPEG encoder in the following processing order: gamma plane, gamma plane, U plane, V plane, Y plane, Y plane , U plane, V plane, etc. The above series is generally expressed as (ΥοΥ, υνχΥοΥ, υνχΥοΥ, υν). Similarly, for the YUV420 mode, a 16 (horizontal) χ 16 (vertical) block (i.e., a 2x2 block containing 8x8 pixels) includes four 8x8 Υ planes, two 8x8 U planes, and two 8x8 V planes. For JPEG encoding, four 8x8 Y planes, two 8x8 U planes, and two 8x8 V planes are sequentially fed into the JPEG encoder in the following processing order: Y plane, γ plane, γ plane, γ plane, U plane, V plane , Y plane, Y plane, γ plane, γ plane, υ plane, V plane, and the like. The above series is generally expressed as (YoY, serial. For image rotation processing, the most direct method is to store the entire frame image captured by the image input device into the memory. Then, to display the rotated image on the LCD or record The image data stored in the image-to-storage device can be read in a rotated order. However, this method requires a large:!: data to store the entire image of the frame. For example, U.S. Patent No. 7,352,9,4 discloses a block code. The method and system can encode and output data in the longitudinal direction by using a pre-scanned compressed data string for the parent block of the compressed image, by obtaining the starting address in the input compressed data string, so that the system can be borrowed in the longitudinal direction. Huffman coding, 9-degree rotational sawtooth configuration, quantization and IDCT are performed on top to obtain a 90-degree rotating block. Different methods have been developed to reduce the required memory. For example, US Patent No. 7,489,823 discloses a method of using the reentry data set to cross-test the data at 201145214, where the compression dragon is received and decoded. First in the HPEG, encoding phase The collection is re-entered into the data set and then accessed during decoding. When the first position in the compressed data is decoded, the 'decoded end of block (E0B) flag is detected. Re-enter the data set with indicators, pointing Compressing the second position of the data towel, immediately after the __ position, and decoding the information to start decoding from the second position. The second bit of the compressed data is accessed, and the accessed data is decoded again. The information side continues to decode the pressure % > material from the second location. The re-enterprise entry is collected in the first jpeg encoding phase and then decoded for rotation. For rotation, the re-entry data set is decoded. Then check the second PEG encoding/compression stage to encode the input image in the desired direction of rotation. The first image shows the reintroduction of the YUV422 mode money. As shown in the figure The reintroduction information includes the starting address of each Y-plane, U-plane, and V-plane coded bit-string, and the DC (DC) reference value of each y-plane, u-plane, and v-plane in the frequency domain. Therefore, For the YUV422 mode, The image block of the pixel will need to record the start address and DC reference value of the four planes. Similarly, for the _42〇 mode, the 6x16 pixel image block will need to record the start address of the six planes. The present invention has been used to overcome the above disadvantages of the PEG miscellaneous/relying image display method for display and recording. The main object of the present invention is to provide a color that cannot be recorded using jpEG^. The method and device for image rotation, the re-entry of the required storage, fl. Star. By reducing the re-entry information, collecting and processing the re-entry information and the time can be reduced 'by enhancing the performance of color image rotation calculation Another object of the present invention is to provide a PEG lion and rely on display. The method and device for rotating the recorded color image make the smoother _ code processing to facilitate the non-jitter display and the transfer processing. 201145214 In order to achieve the above objectives, the method and apparatus for the pure image rotation used by the JpEG_ and the Wei. The method comprises the following steps: separately setting JPEG encoding to TPEG decoding Lai; separately preparing image data for encoding, performing JPEG encoding and re-entering information processing; waiting until the entire image of the frame is compressed; setting; UPEG encoding (four) (four) mode And then proceed to decode and re-enter the information update process. In order to display an image on the image output device, the method includes the following steps: display processing; waiting until the JPEG decoding is completed; and displaying the last image on the device. Here, the processing of the single-frame display is completed. On the other hand, for recording to a large number of storage devices, the method comprises the following steps: standard lossless JPEG encoding; waiting until JPEG encoding is completed; and storing the last encoding (4) to a large number of storage devices, at this time, completing the processing of recording a single frame image . The above and other objects, features, and advantages of the present invention will become apparent from [Embodiment] The following is a more detailed description of the actual financial formula of the present invention in conjunction with the drawings and the components, which can be implemented by those skilled in the art after studying this specification. • The second figure shows a schematic diagram of a color image rotating device that uses JPEG milling/decompression to display and record in an image-based application environment in accordance with the present invention. As shown in the second figure, the color image rotation device 2GG of the present invention includes an IPEG patch 201, a re-entry information collection module 202, and a JPEG decoder 203, wherein the JPEG encoder 201 has a hard direct current (DC) differential pulse. The code modulation modulation (DPCM) release control and zero padding feature, and the re-entry information collection module 202 and the JPEG decoder 203 have DC DPCM release control and zero padding characteristics. It is noted that both the JPEG encoder 201 and the JPEG decoder 203 are enhanced by the DC DPCM release mechanism and the zero padding (or tripping) feature. The DC DpCM release mechanism causes the JPEG encoder 201 to store the DC values of each gamma plane, u flat 201145214 plane, and V plane in the first stage encoded bit string, but the restart flag RST0-RST7 (Ox) defined in the non-Qing standard Job).GxFFD7). Tie Yuyuan M Weng to the record of Lai Luneng's % DPCM release machine to make up the zero (or ship) to hide in the paper will be described in more detail. .
如第二圖所示,本發明的彩色影像旋轉裝置係安置於 入裝置2K)及大量儲存記憶體裝置《間,以便對儲存至大量儲存 記憶體裝置260之前由影像人裝置21G _取之影像進行旋轉,而且 在將儲存於大量儲存記髓裝置· _影像帽示於影像輸出裝置 290上之前’安置於大量儲存記憶體裝置·及影像輸出裝置咖之 間。如第二圖所示,影像輸入裝置21〇所掏取之影像係直接或在影像 輸出線緩衝器230之前經由色彩空間轉換22()饋入影像輸出線緩衝器 230 ’然後針對本發明第一階段JpEG編碼,由具有dc DpcM解除機 制及補零特性的IPEG編碼器2〇1進行編碼。色彩空間轉換22〇包括 RGB至YCbCr色彩空間轉換22〇A及色彩向下取樣器22〇b,以便將 影像輸入裝置21〇_取之彩色影像的職格式轉換成用於本發明第 -階段JPEG編碼中的γυν格式。為顯示旋轉影像於影像輸出裳置 290 ’ JPEG編碼位元串接著由JPEG解碼器2〇5進行解碼,然後經顯 示線緩衝器27〇及顯示介面控制器28〇傳送而顯示於影像輪出裝置 290。另-方面’在經由壓縮資料緩衝器⑽及大量儲存記憶體裝置介 面控制器250儲存於大量儲存記憶體裝置26()内之前,】pEG編碼位^ 串也可由JPEG解碼$ 205進行解碼然後經第二階段JpEG編碼 (亦即JPEG編碼器201)。 处 第三圖顯示依據本發明使用JPEG壓縮/解壓縮用以顯示並記錄 彩色影像旋轉方法的流賴。該錄圖制YUV422模式當作示矿 例’且對於YUV420的說明係相類似。利用第二圖的彩色影像焚^ 置2〇〇,如第二圖所示,步驟3〇1係分別設定彩色影像旋轉裂置^ 201145214 的JPEG編碼器2〇1與JPEG解碼器2〇5的操作模式。設定jpEG編碼 器201的操作模式包括解除JPEG編碼器DpcM、設定平面輸入串成 yuw及珊位脸聰致能γ平_零。_的mpEG解碼 器205的操作模式包括解除Dc DpCM計算、設定平面輸入串成 YUVY、致HJPEG解碼H以跳躍至當γ平面完成時下—位元組的開 始。步驟302係等待直到影像資料準備編碼。當影像資料準備好時, 步驟303進行JPEG編碼及再次進入資訊處理。步驟綱係等待直到 完成整個圖框影像的壓縮。在完成圖框影像的壓縮後,步驟奶係如 下設定JPEG編碼器201的操作模式:致能JpEG編碼器DpCM、設 疋平面輸人_ YYUV、解除餘位元組的γ平面補料及設定量化值 成卜亦即無損模式。步驟3〇6進行職}解碼及再次進入資訊更新處 理。 在步驟306後’處理可採用步驟3〇7A用於顯示處理以便顯示影像 於〜像輸出置上’或制步驟3Q7b用於鮮無損】pEG編碼以記錄 大量儲存裝置。針對顯示處理分支(步驟SOM),步驟3〇7B係等待 直到JPEG解碼完成’且# ;pEG解碼完麟,最後職躺示於顯示 器’如步驟309A所示。此時,完成圖框顯示的處理。類似的,對於 己錄至^里儲存裝置(步驟3(r7B),步驟3麵係等待直到〗舰編碼完 成’且當JPEG編碼完成時,最後編碼資料被放入大量儲存袭置,如 步驟309B所示。此時,完成記錄單—圖框影像的處理。As shown in the second figure, the color image rotating device of the present invention is disposed between the device 2K) and the mass storage device to capture images from the image device 21G before being stored in the mass storage memory device 260. The rotation is performed, and is placed between the mass storage memory device and the image output device before being stored on the image storage device 290. As shown in the second figure, the image captured by the image input device 21 is fed directly or before the image output line buffer 230 via the color space conversion 22() into the image output line buffer 230' and then first for the present invention. Phase JpEG encoding, encoded by IPEG encoder 2〇1 with dc DpcM cancellation mechanism and zero padding feature. The color space conversion 22 includes an RGB to YCbCr color space conversion 22A and a color down sampler 22〇b to convert the job format of the color image input device 21〇 into a stage JPEG for use in the present invention. The γυν format in the encoding. To display the rotated image in the image output, the JPEG encoded bit string is then decoded by the JPEG decoder 2〇5, and then displayed on the image wheeling device via the display line buffer 27〇 and the display interface controller 28〇. 290. In another aspect, the pEG encoded bit string can also be decoded by JPEG decoding $205 before being stored in the mass storage memory device 26() via the compressed data buffer (10) and the mass storage memory device interface controller 250. The second stage JpEG encoding (ie JPEG encoder 201). The third figure shows the flow of JPEG compression/decompression for displaying and recording a color image rotation method in accordance with the present invention. The recording system YUV422 mode is taken as a mine example' and the description of the YUV420 is similar. The color image of the second image is burned 2〇〇. As shown in the second figure, step 3〇1 sets the JPEG encoder 2〇1 and JPEG decoder 2〇5 of the color image rotation splitting ^ 201145214 respectively. Operating mode. Setting the operation mode of the jpEG encoder 201 includes releasing the JPEG encoder DpcM, setting the plane input string into yuw, and setting the face face smart γ level_zero. The mode of operation of _ mpEG decoder 205 includes de-asserting the Dc DpCM, setting the plane input string to YUVY, and causing HJPEG decoding H to jump to the beginning of the octet when the gamma plane is complete. Step 302 waits until the image data is ready to be encoded. When the image data is ready, step 303 performs JPEG encoding and re-enters the information processing. The step outline waits until the entire frame image is compressed. After the compression of the frame image is completed, the step milk system sets the operation mode of the JPEG encoder 201 as follows: enabling the JpEG encoder DpCM, setting the plane input _ YYUV, releasing the γ plane feeding of the remaining tuple, and setting the quantization value. It is also a lossless mode. Step 3〇6 performs the job} decoding and re-enters the information update process. After the step 306, the processing can be performed by using the steps 3〇7A for display processing to display the image on the image output or the step 3Q7b for the fresh-to-destructive pEG encoding to record a large number of storage devices. For the display processing branch (step SOM), step 3〇7B waits until JPEG decoding is completed 'and #; pEG decodes the lining, and the last job is shown on the display' as shown in step 309A. At this point, the processing of the frame display is completed. Similarly, for the storage device that has been recorded to (the step 3 (r7B), the step 3 waits until the ship code is completed' and when the JPEG code is completed, the last coded data is put into a large amount of storage, as in step 309B. As shown in this case, the processing of the record sheet-frame image is completed.
石值得注意的是,如第三圖所示,為了儲存旋轉影像的標準jpEG編 碼位疋串至A量儲縣置,需要第二階段〗PEG編碼處理。第二階段 jPEG編销理是標準的】peg編碼纽。為鋪本發明第-階段JPEG ^碼處理的量化結果’量化值被設定成1,亦即,第二階段標準JPEG 處里疋對第一階段JPEG編碼結果的無損壓縮,如步驟3〇7B所示。 還值得注意暇’本發财法的主要娜是改變平面輸入串列至 201145214 JPEG編碼器及JPEG解碼器,如步驟301及步驟305所示。針對 YUV422模式’平面輸入串列是由傳統的(γ〇Υιυν) (ΥοΥ,υν) (ΥοΥ,υν)…改變成(YoUVY,) (YoUVY,) (YoUVY,)·..給第一階段編碼, 其中Y〇及Y!是可互相改變。此外’ (YoUVY,)串列對順時鐘旋轉jpeg 解碼是更加方便,而(YiUVYo)串列對逆時鐘旋轉jpeg解碼是更加 方便。類似的,對於YUV420模式,平面輸入串列是由傳統的 (YoYiY2Y3UV) (YoYiγ2γ3υν) (ΥοΥ,γ2γ3υν)..改變成(Y^UVYsY,) dYoUVY^) (AYoUVY^)…給第一階段編碼,其中丫2及γ〇是可 互相改變’而丫3及Υ,也可互相改變。此外,(Y2Y〇UYY3Yl)串列對 順時鐘旋轉JPEG解碼是更加方便’而(Yi y3uyyqy2)串對逆時鐘旋轉 JPEG解碼是更加方便。 利用上述平面輸入串列的改變,針對第一階段編碼,需要收集的 再次進入資訊被降為二開始位址。對於YUV422模式,包括在再次進 入資訊的二開始位址是YUVY串列的第一 γ平面及u平面的開始位 址。而且對於YUV420模式,包括在再次進入資訊的二開始位址是γ YUVYY φ列的第-γ平面及u平面的開始位址。以這種方式,需要 儲存再次進入資訊的記憶體被大幅的降低,且處理時間也縮短。 此外’除了降低再次進入資訊所需的記憶體以外,JpEG解碼處理 還將因編碼位元串的開始位址的時間改變而變得更為平順。對於 YUV422模式’現在有三平面被解壓縮以獲得單—8χ8像素區塊之彩 色影像的YUV值。(Y〇UVYl)串列的配置讓JpEG解碼器對γ〇υν三 平面或UVY,三平面進行解碼,以獲得單一 8χ8像素區塊之彩色影像。 對於YUV42G模式,現在有四平面被賴縮續得二8沾像素區塊之 彩色影像的yuv值。(Y2YgUVY3Yi)㈣的配置讓卿解碼器對 AYoUV四平面或υνγ3Υι四平面進行觸,像素區塊 之彩色影像。效能被改善且整體解壓縮更加有效率及平順。 201145214 如上所述,JPEG編碼器201被用Dc DPCM解除機制所加強。包 含DCDPCM解除機制,如第四圖所示,致能(γ〇υνγ丨)輸人串列的再 配置’以降低需要為編碼/壓縮計算而儲存的再次進入資訊量。如第四 圖所tf ’(YoUvy,)輸入串列被饋入具有DC DpCM解除機制的jpEG 編碼器中。對於JPEG、編碼/壓縮,DPCM被解除,且用於再次進入資 訊的DC參考值是儲存於編碼/壓縮位元串中,而無需插入jpEG定義 RESTART標示。要收集的再次進入資訊,如第四圖所示,包括γ〇平 面編碼位元_開始位址及U平面編碼位元串開始位址。 為進-步降低記錄再次進人資輯需之記隨的大小,可使用額 外的機制。第五圖顯示不儲存γ〇平面編碼位元串及U平面編碼位元 串的整個開餘址而是可使財引記,Μ及增加大小記憶體以重建開 始位址。。如第五圖所示,索引記憶體健存編碼位元串的開始位址, 而增加大小記憶體儲存γ〇平面編碼位元大小或U平面、V平面及Υ】 平面的編碼位元大小之總合。祕巾驗址數目,比如(位址G),是指 儲存該值之記舰位置的位址。例如,索引記憶體雜址G儲存8x8 編碼位元串之列1賴始位址,增加大小記憶體的位址G儲存】sty〇 平面中所有位元總數,而增加大小記憶體的位址i儲存lst U+V+Yl平 面中所有位元總數。以這種方式,%平面編碼位元_及U平面編碼 位7C串的實際開始位址可侧儲存於索引記憶體及增加大小記憶體中 的數值而重建。 第六圖顯示依據本發明旋轉YUV422模式的3祕像素彩色影像 的實例。如第六圖所示,32χ16像素彩色影像被分割成八個8沾區塊, 彩色像素底下的箭麵示彩色影像賴輸人順序。對32χΐ6彩色影像 進行90。順時鐘旋轉,以變成16χ32彩色影像,如第六圖所示。旋轉 彩色像素之上的箭頭顯示位元串的顯示順序。· 32χ16彩色像素之 201145214 上及底下剩餘的Y平面、U平面及V平面是需要進行旋轉操作處理的 所有平面。因為示範實例為YUV422模式,所以包含四平面用於每二 個相鄰區塊(亦即單一 16χ8影像)。因此,原始32χ16$色像素將分割 成四部分’分別標示成Ist、2nd、3rd及4th。 第七A-七Η圖顯示第六圖中旋轉操作的詳細處理。如第七a圖所 示’步驟701讀取具位址丨財引記憶體以獲得yd γ。平面的開始位 元位址,而步驟702針對(2,1)區塊以解碼少γ〇平面、yd ^平面、3rd ν 平面。類似的,步驟703讀取具位址4的增加記憶體以獲得3rd γ〇平 面的編碼位元串大小,而步驟704針對(2,2)區塊JpEG解碼將0γ〇 平面開始位元位址及yd γ〇平面編碼位元大小的總合寫回至索引記憶 體位址1。值得注意的是’存取索引記憶體及增加大小記憶體可同時 進行。步驟705決定3rdY()平面、3rdU平面、3rdV平面解碼是否完成; 如果是’則處理進行至步驟706 ;否則,處理回到步驟7〇2。 類似的,在第七B圖中,步驟706讀取具有位址0的索引記憶體 以獲得istY〇平面的開始位元位址,並重置JPEGHuffman解碼器,而 步驟707針對(U)區塊以解碼1st Y〇平面、Ist ϋ平面、1st v平面。類 似的,步驟708讀取具位址〇的增加記憶體以獲得γ❶平面的編碼 位元串大小,而步驟709針對(1,2)區塊JPEG解碼,將lStY〇平面開始 位元位址及1 St YQ平面編碼位元大小的總合寫回至索引記憶體位址〇。 步驟710決定Ist γ〇平面、丨《 u平面、Ist γ平面解碼是否完成;如果 是’則處理進行至步驟711 ;否則,處理回到步驟7〇7。 第七C圖顯示ydu平面'3rd V平面、平面的解碼。如第七 C圖所示’步驟711讀取具有位址1的索引記憶體以獲得3rd ϋ平面的 開始位元位址,並重置JPEG Huffinan解碼器,而步驟712針對(2,2) 區塊以解碼3rd U平面、3rd V平面、3rd Υι平面。類似的,步驟713讀 取具位址5的增加記憶體以獲得3rd U+V+Y,平面的編碼位元串大小, 12 201145214 而步驟714針對(2,3)區塊JPEG解碼,將3rd γ〇平面開始位元位址及 Β^υ+ν+Υ,-平面編碼位元大小的總合寫回至索引記憶體位址1。步驟 715決定3rd U平面、3rd V平面、3rd Υ,平面解碼是否完成;如果是, 則處理進行至步驟716 ;否則,處理回到步驟7〇2。 類似的’第七D圖的步驟716-720係用以解碼1st u平面、1st V 平面及lstY丨平面的步驟。第七E圖的步驟721 _725係用以解碼4th γ〇 平面、4thU平面及4thV平面的步驟。第七F圖的步驟726_73〇係用以 解碼2nd Y0平面、2nd U平面及2nd V平面的步驟。第七g圖的步驟 731-735係用以解碼4th U平面、4th V平面及4th Y,平面的步驟。第七 Η圖的步驟736-740係用以解碼2nd U平面、2nd V平面及2nd Y,平面 的步驟。在此省略所有的詳細說明。 如上所述,本發明的JPEG編碼器201及JPEG解碼器205也用 補零特性而加強,以提供補零位元至位元組邊界,使得再次進入資訊 的位元_的開始位址可對齊,當作位元串位元組的開始位址。當γ平 面編碼位兀串大小不正好為多個位元組時,藉補零位元至γ平面。補 零至位元組邊界能降低索引記憶體與增加大小記憶體的大小以及再次 進入資訊處理複雜度,因騎魏在是以位元組位㈣非位元位址為 主。具補零特性的JPEG解碼器將在對γ平面解碼時,雜碼跳躍至 下一位元組的開始。 因此’利料對Υ平_稱,㈣而3解已配置γ。·》 輸入串列’ YG平面及U平面的開始位址針對yuy422模式正好位於 位元組邊界。再次進人f訊將包括舰3編碼位元串的開始位元組位 址’但不包括位元位址。類似的,對於模式,利用針對% 平面及Υ|平面的補零,亦即第二及第四Υ平面,用於JPEG解碼的已0 配置抓耐端入串列,再次進入資訊也將包括臟編碼位元 串的開始位元組位址。 13 201145214 此外,為顯示旋轉影像於影像輸出裝置上,在本發明的第一階段 JPEG編碼處理之後,索引記憶體必須儲存至啟始值。索引記憶體儲存 至啟始值可藉平移處理而完成,亦即藉平移啟始值以使得儲存在位址 η的值變成位址n-1的值,而位址〇的值是被設定成〇。 雖然上述實施例中針對YUV422模式是以最佳範例γυνγ輸入 串列的順序作說明’但並不因此限制本發明之範圍,例如也可採用 YVUY輸入串列,皆可達到相同之效果。若使用YVUY,則記錄第一個 Y平面及V平面的壓縮串列開始位址。同理針對γυν42〇模式本實 施雖以最佳範例YYUVYY輸入串列的順序作說明,但也不因此限制 本發明之劍,例如也可制YYVUYY輸人㈣,亦可制相同之 效果。使用YYVUYY順序時,則記錄第一個γ平面及v平面的壓 縮串列開始位址。 雖然本發明已參考較佳實施例進行說明,但是要了解的是,本發 明並非限定於所說明的細節。其他替代及修改已經在上述說明中建 議’且其歸發生在熟知該技術領域的人士上。因此,所有這些替代 及t改都疋要被包含在如所附巾請專利範圍巾所定義的發明範圍之 内。 【圖式簡單說明】 第圖顯讀統彩色影倾射法巾麟彻模摘收集再次進 入資訊的示意圖。 圖不依據本發明以影像為主之應用環境中使用JPEG壓縮/解壓 縮_示並記錄之彩色影像旋轉裝置的示意圖。 =圖顯稀縣發贱肖;PEG雜/__ _雜記錄之彩色 〜像疑轉方法的流程圖。 第四圖顯示依據本發明 發月精包含DC DPCM失能機制及(Y〇UVYl)輸入 201145214 串列之再配1所收集之再次進入實訊的糸思圖 第五圖顯雜據本發_減存私進以訊之㈣遽體及增加尺 寸記憶體的示意圖。 第六圖顯示依據本發明旋轉YUV422模式的32xl6像素彩色影像的實 例。 第七A-七Η圖顯示第六圖中實例的旋轉操作的詳細處理 【主要元件符號說明】 200彩色影像旋轉裝置 201 JPEG編碼器 203再次進入資訊收集 205 JPEG解碼器 210影像輸入裝置 220色彩空間轉換 22〇ARGB至YCbCr色彩空間轉換 220B色彩向下取樣器 230影像輸出線緩衝器 240壓縮資料緩衝器 250大量儲存記憶體裝置介面控制器 260大量儲存記憶體裝置 270顯示線緩衝器 280顯示介面控制器 290影像輸出裝置 301〜309B步驟 701〜740步驟 15It is worth noting that, as shown in the third figure, in order to store the standard jpEG coded bits of the rotated image to the A-mount storage, a second-stage PEG encoding process is required. The second stage of jPEG editing is the standard] peg code. For the quantization result of the first-stage JPEG-code processing of the present invention, the quantization value is set to 1, that is, the lossless compression of the first-stage JPEG encoding result in the second-stage standard JPEG, as in step 3〇7B. Show. It is also worth noting that the main reason for this method is to change the plane input string to the 201145214 JPEG encoder and JPEG decoder, as shown in steps 301 and 305. For the YUV422 mode, the 'plane input string is changed from the traditional (γ〇Υιυν) (ΥοΥ,υν) (ΥοΥ,υν)... to (YoUVY,) (YoUVY,) (YoUVY,)·.. , where Y〇 and Y! are mutually changeable. In addition, the (YoUVY,) string is more convenient for clockwise rotation of jpeg decoding, while the (YiUVYo) string is more convenient for counterclockwise jpeg decoding. Similarly, for the YUV420 mode, the plane input string is encoded by the traditional (YoYiY2Y3UV) (YoYiγ2γ3υν) (ΥοΥ, γ2γ3υν).. (Y^UVYsY,) dYoUVY^) (AYoUVY^)... Among them, 丫2 and γ〇 can be changed from each other' and 丫3 and Υ can also change each other. In addition, the (Y2Y〇UYY3Yl) series is more convenient for clockwise rotation JPEG decoding and the (Yi y3uyyqy2) string is more convenient for inverse clock rotation JPEG decoding. With the above-mentioned change of the plane input string, for the first stage encoding, the re-entry information that needs to be collected is reduced to the second start address. For the YUV422 mode, the second start address included in the re-entry information is the first gamma plane of the YUVY string and the start address of the u-plane. Also for the YUV420 mode, the second start address included in the re-entry information is the start of the -γ plane and the u-plane of the γ YUVYY φ column. In this way, the memory that needs to store the re-entry information is greatly reduced, and the processing time is also shortened. In addition, in addition to reducing the memory required to re-enter the information, the JpEG decoding process will also be smoother due to the time change of the starting address of the encoded bit string. For the YUV422 mode, there are now three planes decompressed to obtain the YUV value of the color image of the single- 8 χ 8 pixel block. The (Y〇UVYl) serial configuration allows the JpEG decoder to decode the γ〇υν three-plane or UVY, three-plane to obtain a color image of a single 8χ8 pixel block. For the YUV42G mode, there are now four planes that are succumbed to the yuv value of the color image of the two-bit pixel block. (Y2YgUVY3Yi) (4) The configuration allows the Qing decoder to touch the AYoUV four plane or υνγ3Υι four planes, and the color image of the pixel block. Performance is improved and overall decompression is more efficient and smooth. 201145214 As described above, the JPEG encoder 201 is enhanced by the Dc DPCM release mechanism. The DCDPCM release mechanism is included, as shown in the fourth figure, enabling the reconfiguration of the input sequence (γ〇υνγ丨) to reduce the amount of re-entry information that needs to be stored for encoding/compression calculations. The input string of tf ' (YoUvy,) as shown in the fourth figure is fed into the jpEG encoder with the DC DpCM release mechanism. For JPEG, encoding/compression, DPCM is released, and the DC reference value for re-entering the information is stored in the encoding/compressing bit string without inserting jpEG to define the RESTART flag. The re-entry information to be collected, as shown in the fourth figure, includes the γ〇 plane coding bit_start address and the U-plane coded bit string start address. Additional mechanisms can be used to further reduce the size of the records required for further entry. The fifth figure shows that the entire open address of the γ〇 plane coded bit string and the U-plane coded bit string is not stored, but the code can be used to increase the size of the memory to reconstruct the start address. . As shown in the fifth figure, the index memory stores the start address of the encoded bit string, and the size memory stores the size of the γ〇 plane coded bit or the U-plane, the V-plane, and the coded bit size of the plane. total. The number of copies of the secret towel, such as (address G), refers to the address of the ship's location where the value is stored. For example, the index memory hash G stores the column 1 of the 8x8 encoded bit string, increases the address of the size memory G, stores the total number of all bits in the sty plane, and increases the address of the size memory. Stores the total number of all bits in the lst U+V+Yl plane. In this manner, the actual start address of the % Planar Coded Bit_ and U Plane Coded Bit 7C strings can be reconstructed by storing the values in the index memory and increasing the size memory. The sixth figure shows an example of a 3 secret pixel color image that rotates the YUV422 mode in accordance with the present invention. As shown in the sixth figure, the 32-inch 16-pixel color image is divided into eight 8-dip blocks, and the arrows under the color pixels show the color image in the order of input. Perform 90 for 32χΐ6 color images. Rotate clockwise to become a 16χ32 color image, as shown in Figure 6. The arrow above the rotated color pixel shows the order in which the bit strings are displayed. · 32χ16 color pixels 201145214 The remaining Y plane, U plane and V plane on the top and bottom are all planes that need to be rotated. Since the exemplary example is the YUV422 mode, four planes are included for every two adjacent blocks (i.e., a single 16χ8 image). Therefore, the original 32χ16$ color pixels will be divided into four parts', labeled Ist, 2nd, 3rd, and 4th, respectively. The seventh A-seventh diagram shows the detailed processing of the rotation operation in the sixth figure. As shown in Fig. 7a, step 701 reads the address memory to obtain yd γ. The start bit of the plane is located, and step 702 is for the (2, 1) block to decode the less γ〇 plane, the yd ^ plane, and the 3rd ν plane. Similarly, step 703 reads the increased memory with address 4 to obtain the encoded bit string size of the 3rd γ〇 plane, and step 704 decodes the 0γ〇 plane starting bit address for the (2, 2) block JpEG decoding. And the sum of the yd γ 〇 plane coded bit sizes is written back to the index memory address 1. It is worth noting that access to index memory and increased size memory can be performed simultaneously. Step 705 determines whether the decoding of the 3rdY() plane, the 3rdU plane, and the 3rdV plane is completed; if yes, the process proceeds to step 706; otherwise, the process returns to step 7〇2. Similarly, in Figure 7B, step 706 reads the index memory with address 0 to obtain the start bit address of the istY〇 plane, and resets the JPEGHuffman decoder, while step 707 is for the (U) block. To decode 1st Y〇 plane, Ist ϋ plane, 1st v plane. Similarly, step 708 reads the increased memory with the address 〇 to obtain the encoded bit string size of the γ❶ plane, and step 709 decodes the lStY〇 plane starting bit address for the (1, 2) block JPEG decoding and 1 The sum of the St YQ plane coded bit sizes is written back to the index memory address 〇. Step 710 determines whether the Ist γ〇 plane, 丨 u plane, and Ist γ plane decoding are completed; if yes, the process proceeds to step 711; otherwise, the process returns to step 7〇7. The seventh C diagram shows the decoding of the ydu plane '3rd V plane and plane. As shown in FIG. CC, 'Step 711 reads the index memory having address 1 to obtain the start bit address of the 3rd ϋ plane, and resets the JPEG Huffinan decoder, and step 712 is for the (2, 2) area. Block to decode 3rd U plane, 3rd V plane, 3rd Υι plane. Similarly, step 713 reads the increased memory with address 5 to obtain 3rd U+V+Y, the encoded bit string size of the plane, 12 201145214 and step 714 for JPEG decoding of the (2,3) block, 3rd The γ〇 plane start bit address and Β^υ+ν+Υ, the sum of the plane coded bit sizes are written back to the index memory address 1. Step 715 determines whether the 3rd U plane, 3rd V plane, 3rd Υ, plane decoding is completed; if yes, the process proceeds to step 716; otherwise, the process returns to step 7〇2. Steps 716-720 of a similar 'seventh D diagram are used to decode the 1st u plane, the 1st V plane, and the lstY丨 plane. Steps 721_725 of Figure 7E are steps for decoding the 4th γ〇 plane, the 4thU plane, and the 4thV plane. Step 726_73 of the seventh F diagram is a step for decoding the 2nd Y0 plane, the 2nd U plane, and the 2nd V plane. Steps of the seventh g map 731-735 is a step for decoding the 4th U plane, the 4th V plane, and the 4th Y plane. Steps 736-740 of the seventh diagram are steps for decoding the 2nd U plane, the 2nd V plane, and the 2nd Y, plane. All the detailed descriptions are omitted here. As described above, the JPEG encoder 201 and the JPEG decoder 205 of the present invention are also enhanced with a zero-padding feature to provide a zero-padded bit-to-byte boundary so that the start address of the bit__ of the re-entry information can be aligned. , as the starting address of the bit string tuple. When the γ plane coded bit string size is not exactly a plurality of bytes, the zero bit is borrowed to the γ plane. Zero-to-bit boundary can reduce the size of the index memory and increase the size of the memory and re-enter the information processing complexity, because the riding is based on the bit position (4) non-bit address. A JPEG decoder with zero-padding features will skip the gamma plane and jump to the beginning of the next tuple. Therefore, 'the material is Υ _ ,, (4) and the 3 solution has been configured γ. · The input sequence 'YG plane and the start address of the U plane are located at the byte boundary for the yuy422 mode. Re-entry will include the starting byte address of the Ship 3 encoded bit string ' but not the bit address. Similarly, for the mode, the zero padding for the % plane and the Υ| plane, that is, the second and fourth planes, the 0 configuration for JPEG decoding is blocked, and the re-entry information will also include dirty. The starting byte address of the encoded bit string. 13 201145214 Furthermore, in order to display the rotated image on the image output device, after the first stage JPEG encoding process of the present invention, the index memory must be stored to the start value. The storage of the index memory to the start value can be done by a translation process, that is, by shifting the start value so that the value stored in the address η becomes the value of the address n-1, and the value of the address 〇 is set to Hey. Although the above embodiment has been described with respect to the YUV422 mode in the order of the best example γυνγ input sequence, the scope of the present invention is not limited thereto, and for example, the YVUY input string can also be used, and the same effect can be achieved. If YVUY is used, the compressed serial start address of the first Y plane and the V plane is recorded. For the same reason, the implementation of the γυν42〇 mode is described in the order of the best example YYUVYY input string, but the sword of the present invention is not limited thereby. For example, the YYVUYY input (4) can also be made, and the same effect can be obtained. When the YYVUYY order is used, the compressed singular start address of the first gamma plane and the v plane is recorded. Although the invention has been described with reference to the preferred embodiments, it is understood that the invention is not limited to the details. Other alternatives and modifications have been suggested in the above descriptions and have occurred in persons skilled in the art. Accordingly, all such alternatives and modifications are intended to be included within the scope of the invention as defined by the appended claims. [Simple description of the figure] The figure shows the schematic diagram of the information collected again by the color shadowing method. The figure is a schematic diagram of a color image rotating apparatus using JPEG compression/decompression and recording in an image-based application environment in accordance with the present invention. = Figure shows the rare county hairpin; PEG miscellaneous / __ _ miscellaneous record color ~ Flow chart like the suspected transfer method. The fourth figure shows that according to the present invention, the DC DPCM disability mechanism and the (Y〇UVYl) input 201145214 serial reconfiguration 1 are collected and re-entered into the actual image of the fifth figure. A diagram of the reduction of private access to the (4) carcass and increased size memory. The sixth figure shows an example of a 32x16 pixel color image that rotates the YUV422 mode in accordance with the present invention. The seventh A-seventh diagram shows the detailed processing of the rotation operation of the example in the sixth figure. [Main component symbol description] 200 color image rotation device 201 JPEG encoder 203 re-enters the information collection 205 JPEG decoder 210 image input device 220 color space Convert 22〇ARGB to YCbCr color space conversion 220B color down sampler 230 image output line buffer 240 compression data buffer 250 mass storage memory device interface controller 260 mass storage memory device 270 display line buffer 280 display interface control 290 image output devices 301 to 309B, steps 701 to 740, step 15