TWI426465B - Method and apparatus of color image rotation for display and recording using jpeg - Google Patents

Method and apparatus of color image rotation for display and recording using jpeg Download PDF

Info

Publication number
TWI426465B
TWI426465B TW99118406A TW99118406A TWI426465B TW I426465 B TWI426465 B TW I426465B TW 99118406 A TW99118406 A TW 99118406A TW 99118406 A TW99118406 A TW 99118406A TW I426465 B TWI426465 B TW I426465B
Authority
TW
Taiwan
Prior art keywords
plane
jpeg
image
mode
input string
Prior art date
Application number
TW99118406A
Other languages
Chinese (zh)
Other versions
TW201145214A (en
Inventor
Wen Lung Huang
Original Assignee
V R Thchnology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by V R Thchnology Co Ltd filed Critical V R Thchnology Co Ltd
Priority to TW99118406A priority Critical patent/TWI426465B/en
Publication of TW201145214A publication Critical patent/TW201145214A/en
Application granted granted Critical
Publication of TWI426465B publication Critical patent/TWI426465B/en

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

使用JPEG用於顯示及記錄的彩色影像旋轉之方法及裝置Method and apparatus for rotating color image using JPEG for display and recording

本發明涉及一種彩色影像處理,尤其是使用JPEG(Joint Photographic Coding Expert Group)用於顯示及記錄的彩色影像旋轉之方法及裝置。The present invention relates to a color image processing, and more particularly to a method and apparatus for color image rotation for display and recording using JPEG (Joint Photographic Coding Expert Group).

在最近受到歡迎的智慧型手機的更早以前,影像旋轉對用於電腦的影像操控軟體應用是很重要的必需功能。大受歡迎的智慧型手機市場的激烈競爭點燃對快速影像旋轉計算能力的需求,甚至更多。目前,影像旋轉功能是任何影像裝置或周邊裝置所不可或缺的部分,比如顯示器(如液晶顯示器(LCD))及儲存裝置(如NAND快閃記憶體)。影像旋轉計算必需考慮到影像表現。例如,影像檔格式對旋轉計算效率且最後用於儲存的資料大小具有很大影響。例如,影像擷取裝置,比如CCD、CMOS相機模組等,掃描要擷取的實際圖像,並以串列的RGB或YUV輸入格式(YCbCr模型通常被視為YUV的位移版本)輸出影像資訊。Earlier in the recent popular smartphones, image rotation was an essential feature for image manipulation software applications for computers. The fierce competition in the popular smartphone market has ignited even more demand for fast image rotation computing capabilities. Currently, image rotation is an integral part of any imaging device or peripheral device, such as displays (such as liquid crystal displays (LCDs)) and storage devices (such as NAND flash memory). Image rotation calculations must take into account image performance. For example, the image file format has a large impact on the efficiency of the rotation calculation and the size of the data that is ultimately used for storage. For example, image capture devices, such as CCD, CMOS camera modules, etc., scan the actual image to be captured and output image information in a serial RGB or YUV input format (the YCbCr model is generally considered a displacement version of YUV). .

JPEG是用於照片影像的有損壓縮所廣泛使用的方法。因為JPEG演算法對具平滑變動的色調及色彩的實際場景照片被視為最佳,所以JPEG是最受歡迎的數位相機儲存格式。另一方面,YUV是受歡迎的色彩空間,用於常與JPEG相關的類比及數位影像/視訊。YUV考慮到人的感知,並以亮度(Y)及二色度(UV)成分定義色彩空間。色度資料的解析度被降低因子2,常稱為向下取樣,用以反映出人眼對細微的色彩細節比精細的亮度細節較不敏感的事實。對於JPEG編碼,YUV422或YUV420模式(向下取樣比)一般是用來降低資料大小以儲存影像。YUV422(亦即YUV(4:2:2))是在水平方向降低因子2,而YUV420(亦即YUV(4:2:0))是在水平及垂直方向降低因子2。然後,以YUV表示的影像被分割成6x6像素的區塊。對於每個區塊,每個Y、U及V資料都必須經歷離散餘弦轉換(DCT)。JPEG is a widely used method for lossy compression of photo images. Because JPEG algorithms are considered the best for actual scene photos with smoothly varying tones and colors, JPEG is the most popular digital camera storage format. On the other hand, YUV is a popular color space for analog and digital video/video that is often associated with JPEG. YUV takes into account human perception and defines the color space in terms of luminance (Y) and dichroism (UV) components. The resolution of the chrominance 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 details than fine-grained detail. For JPEG encoding, the YUV422 or YUV420 mode (down-sampling ratio) is typically used to reduce the size of the data to store the image. YUV422 (i.e., YUV (4:2:2)) is reduced by a factor of 2 in the horizontal direction, while YUV420 (i.e., 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 Y, U, and V data must undergo discrete cosine transform (DCT).

例如,對於YUV422模式,16(水平)x8(垂直)區塊(亦即包含二水平相鄰8x8像素之區塊)包括二8x8 Y平面,一8x8 U平面以及一8x8 V平面。對於JPEG編碼,二8x8 Y平面,一8x8 U平面以及一8x8 V平面是依序以下列處理次序饋入到JPEG編碼器中:Y平面、Y平面、U平面、V平面、Y平面、Y平面、U平面、V平面等。上述串列一般是表示成(Y0 Y1 UV)(Y0 Y1 UV)(Y0 Y1 UV)...串列。類似的,對於YUV420模式,一個16(水平)x16(垂直)區塊(亦即包含8x8像素之2x2區塊)包括四8x8 Y平面、二8x8 U平面以及二8x8 V平面。對於JPEG編碼,四8x8 Y平面,二8x8 U平面以及二8x8 V平面是依序以下列處理次序饋入到JPEG編碼器中:Y平面、Y平面、Y平面、Y平面、U平面、V平面、Y平面、Y平面、Y平面、Y平面、U平面、V平面等。上述串列一般是表示成(Y0 Y1 Y2 Y3 UV)(Y0 Y1 Y2 Y3 UV)(Y0 Y1 Y2 Y3 UV)...串列。For example, for the YUV422 mode, a 16 (horizontal) x8 (vertical) block (ie, 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, 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: Y plane, Y plane, U plane, V plane, Y plane, Y plane , U plane, V plane, etc. The above series is generally represented as a series of (Y 0 Y 1 UV) (Y 0 Y 1 UV) (Y 0 Y 1 UV). Similarly, for the YUV420 mode, a 16 (horizontal) x16 (vertical) block (ie, a 2x2 block containing 8x8 pixels) includes four 8x8 Y 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, Y plane, Y plane, Y plane, U plane, V plane , Y plane, Y plane, Y plane, Y plane, U plane, V plane, and the like. The above series is generally represented as a series of (Y 0 Y 1 Y 2 Y 3 UV) (Y 0 Y 1 Y 2 Y 3 UV) (Y 0 Y 1 Y 2 Y 3 UV).

對於影像旋轉處理,最直接的方法是儲存影像輸入裝置所擷取的整個圖框影像至記憶體中。然後,為顯示旋轉影像於LCD或記錄影像至儲存裝置,所儲存的影像資料可以旋轉次序讀取。然而,該方法需要大量的資料以儲存整個圖框影像。例如,美國專利第7,352,904號揭示一種區塊編碼方法及系統,能在縱方向上用預先掃描壓縮資料串對壓縮影像的每個區塊,藉獲得輸入壓縮資料串中的起始位址而編碼並輸出資料,使得系統能藉在縱方向在上進行荷夫曼(Huffman)編碼、90度旋轉鋸齒配置、量化及IDCT,而獲得90度旋轉區塊。For image rotation processing, the most straightforward method is to store the entire frame image captured by the image input device into the memory. Then, in order to display the rotated image on the LCD or record the image to the storage device, the stored image data can be read in a rotating order. However, this method requires a large amount of data to store the entire frame image. For example, U.S. Patent No. 7,352,904 discloses a block encoding method and system capable of encoding a block of a compressed image in a vertical direction by pre-scanning a compressed data string to obtain a starting address in the input compressed data string. The data is output so that the system can obtain a 90-degree rotating block by performing Huffman coding, 90-degree rotational sawtooth configuration, quantization, and IDCT in the vertical direction.

為降低所需記憶體量,已開發出不同的方法。例如,美國專利第7,489,823號揭示出一種使用再次進入資料組(reentry data set)以偵測壓縮資料的方法,其中壓縮資料被接收並解碼。先在第一JPEG編碼階段中收集再次進入資料組,然後在解碼期間存取。當解碼出壓縮資料中的第一位置時,解碼的區塊結束(EOB)旗標被偵測到。再次進入資料組具有指標,指向壓縮資料中的第二位置,緊接在第一位置之後,且解碼資訊讓解碼由第二位置開始。壓縮資料中的第二位置被存取,且被存取之再次進入資料中的解碼資訊係用以繼續對由第二位置的壓縮資料進行解碼。再次進入資訊是在第一JPEG編碼階段中收集,然後針對旋轉進行解碼。對於旋轉,再次進入資料組被解碼,然後用於第二JPEG編碼/壓縮階段,以便對所需旋轉方向上的輸入影像進行編碼。Different methods have been developed to reduce the amount of memory required. For example, U.S. Patent No. 7,489,823 discloses a method of using a reentry data set to detect compressed data, wherein the compressed data is received and decoded. The data set is again entered in the first JPEG encoding phase and then accessed during decoding. The decoded end of block (EOB) flag is detected when the first position in the compressed data is decoded. Re-entering the data set has an indicator pointing to the second position in the compressed data, immediately after the first position, and decoding the information to cause the decoding to start from the second position. The second location in the compressed data is accessed, and the decoded information that is accessed again into the data is used to continue decoding the compressed data from the second location. Re-entry information is collected in the first JPEG encoding phase and then decoded for rotation. For rotation, the re-entry data set is decoded and then used in the second JPEG encoding/compression phase to encode the input image in the desired direction of rotation.

第一圖顯示為YUV422模式收集的再次進入資訊的示意圖。如第一圖所示,再次進入資訊包括每個Y平面、U平面及V平面編碼位元串的起始位址,以及頻域中每個Y平面、U平面及V平面的直流(DC)參考值。因此,對於YUV422模式,16x8像素的影像區塊將需要記錄四個平面的起始位址及DC參考值。相類似的,對於YUV420模式,16x16像素的影像區塊將需要記錄六個平面的起始位址及DC參考值。The first figure shows a schematic of the re-entry information collected for the YUV422 mode. As shown in the first figure, the re-entry information includes the start address of each Y-plane, U-plane, and V-plane coded bit string, and the direct current (DC) of each Y-plane, U-plane, and V-plane in the frequency domain. Reference. Therefore, for the YUV422 mode, a 16x8 pixel image block will need to record the start address and DC reference value of the four planes. Similarly, for the YUV420 mode, a 16x16 pixel image block will need to record the start address and DC reference value of the six planes.

本發明已經被用以克服使用JPEG壓縮/解壓縮用於顯示及記錄之影像旋轉方法的上述缺點。本發明的主要目的係提供一種使用JPEG用於顯示及記錄的彩色影像旋轉之方法及裝置,以降低所需儲存之再次進入資訊量。藉降低再次進入資訊,收集並處理再次進入資訊的記憶體及時間可被降低,藉以加強彩色影像旋轉計算的表現。The present invention has been used to overcome the above disadvantages of using JPEG to compress/decompress image rotation methods for display and recording. SUMMARY OF THE INVENTION A primary object of the present invention is to provide a method and apparatus for color image rotation for display and recording using JPEG to reduce the amount of re-entry information required for storage. By reducing the re-entry information, the memory and time for collecting and processing the re-entry information can be reduced, thereby enhancing the performance of the color image rotation calculation.

本發明的另一目的係提供一種使用JPEG壓縮及解壓縮用於顯示及記錄的彩色影像旋轉之方法及裝置,讓更平滑的解碼處理以方便無抖動顯示轉移處理,以加強顯示系統的使用者友善性。Another object of the present invention is to provide a method and apparatus for compressing and decompressing color images for display and recording using JPEG, to enable smoother decoding processing to facilitate jitter-free display transfer processing, and to enhance the user of the display system. Friendly.

為達成上述目的,本發明提供一種使用JPEG壓縮及解壓縮用於顯示及記錄的彩色影像旋轉之方法及裝置。該方法包括以下步驟:分別設定JPEG編碼器與JPEG解碼器的操作模式;等待直到影像資料準備編碼;進行JPEG編碼及再次進入資訊處理;等待直到完成整個圖框影像的壓縮;設定JPEG編碼器的操作模式;以及接著進行JPEG解碼及再次進入資訊更新處理。為顯示影像於影像輸出裝置上,本方法包括以下步驟:顯示處理;等待直到JPEG解碼完成;以及顯示最後影像於顯示器上。於此,完成單一圖框顯示的處理。另一方面,為記錄至大量儲存裝置,本方法包括以下步驟:標準無損JPEG編碼;等待直到JPEG編碼完成;以及儲存最後編碼資料至大量儲存裝置。此時,完成記錄單一圖框影像的處理。To achieve the above object, the present invention provides a method and apparatus for compressing and decompressing color images for display and recording using JPEG compression. The method comprises the steps of: respectively setting an operation mode of the JPEG encoder and the JPEG decoder; waiting until the image data is ready to be encoded; performing JPEG encoding and re-entering the information processing; waiting until the compression of the entire frame image is completed; setting the JPEG encoder The mode of operation; and then JPEG decoding and re-entry information update processing. To display an image on the image output device, the method includes the steps of: displaying the process; waiting until the JPEG decoding is completed; and displaying the last image on the display. 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 includes the following steps: standard lossless JPEG encoding; waiting until JPEG encoding is completed; and storing the last encoded data to a large number of storage devices. At this point, the processing of recording a single frame image is completed.

本發明的上述及其他目的、特性、特點及優點將由小心閱讀其中的詳細說明並適當的參考所附圖式而變得更好了解。The above and other objects, features, aspects and advantages of the present invention will become apparent from the <RTIgt;

以下配合圖式及元件符號對本發明之實施方式做更詳細的說明,俾使熟習該項技藝者在研讀本說明書後能據以實施。The embodiments of the present invention will be described in more detail below with reference to the drawings and the <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt;

第二圖顯示依據本發明以影像為主之應用環境中使用JPEG壓縮/解壓縮以顯示並記錄之彩色影像旋轉裝置的示意圖。如第二圖所示,本發明的彩色影像旋轉裝置200包括JPEG編碼器201、再次進入資訊收集模組202及JPEG解碼器203,其中JPEG編碼器201具有硬體直流(DC)差額脈衝編碼調變(DPCM)解除控制及補零特性,而再次進入資訊收集模組202及JPEG解碼器203具有DC DPCM解除控制及補零跳脫特性。值得注意的是,JPEG編碼器201及JPEG解碼器203都利用DC DPCM解除機制及補零(或跳脫)特性而加強。DC DPCM解除機制讓JPEG編碼器201儲存第一階段編碼位元串中每個Y平面、U平面及V平面的DC值,但非JPEG標準中所定義的再啟動標示RST0-RST7(0xFFD0-0xFFD7)。提供位元組邊界給記憶體及性能的DC DPCM解除機制及補零(或跳脫)特性,將在本文中進一步更加詳細說明。The second figure shows a schematic diagram of a color image rotating device that uses JPEG compression/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 rotating device 200 of the present invention includes a JPEG encoder 201, a re-entry information collecting module 202, and a JPEG decoder 203, wherein the JPEG encoder 201 has a hardware direct current (DC) differential pulse code modulation. The DPCM de-control and zero-padding features, and the re-entry into the information collection module 202 and the JPEG decoder 203 have DC DPCM release control and zero-padding characteristics. It is to be 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 of the Y-plane, U-plane, and V-plane in the first-stage encoded bit string, but the restart flag RST0-RST7 (0xFFD0-0xFFD7) defined in the non-JPEG standard. ). The DC DPCM cancellation mechanism and zero padding (or tripping) characteristics that provide byte boundaries to memory and performance are described in further detail herein.

如第二圖所示,本發明的彩色影像旋轉裝置200係安置於影像輸入裝置210及大量儲存記憶體裝置260之間,以便對儲存至大量儲存記憶體裝置260之前由影像入裝置210所擷取之影像進行旋轉,而且在將儲存於大量儲存記憶體裝置260內的影像中顯示於影像輸出裝置290上之前,安置於大量儲存記憶體裝置260及影像輸出裝置290之間。如第二圖所示,影像輸入裝置210所擷取之影像係直接或在影像輸出線緩衝器230之前經由色彩空間轉換220饋入影像輸出線緩衝器230,然後針對本發明第一階段JPEG編碼,由具有DC DPCM解除機制及補零特性的JPEG編碼器201進行編碼。色彩空間轉換220包括RGB至YCbCr色彩空間轉換220A及色彩向下取樣器220B,以便將影像輸入裝置210所擷取之彩色影像的RGB格式轉換成用於本發明第一階段JPEG編碼中的YUV格式。為顯示旋轉影像於影像輸出裝置290,JPEG編碼位元串接著由JPEG解碼器205進行解碼,然後經顯示線緩衝器270及顯示介面控制器280傳送而顯示於影像輸出裝置290。另一方面,在經由壓縮資料緩衝器240及大量儲存記憶體裝置介面控制器250儲存於大量儲存記憶體裝置260內之前,JPEG編碼位元串也可由JPEG解碼器205進行解碼然後經第二階段JPEG編碼處理(亦即JPEG編碼器201)。As shown in the second figure, the color image rotating device 200 of the present invention is disposed between the image input device 210 and the mass storage memory device 260 so as to be smashed by the image input device 210 before being stored in the mass storage memory device 260. The image is rotated and placed between the mass storage memory device 260 and the image output device 290 before being displayed on the image output device 290 in the image stored in the plurality of memory devices 260. As shown in the second figure, the image captured by the image input device 210 is fed into the image output line buffer 230 via color space conversion 220 directly or before the image output line buffer 230, and then JPEG encoded for the first stage of the present invention. The encoding is performed by the JPEG encoder 201 having the DC DPCM release mechanism and the zero-padding characteristic. The color space conversion 220 includes an RGB to YCbCr color space conversion 220A and a color down sampler 220B for converting the RGB format of the color image captured by the image input device 210 into the YUV format for use in the first stage JPEG encoding of the present invention. . To display the rotated image on the video output device 290, the JPEG encoded bit string is then decoded by the JPEG decoder 205, and then transmitted to the video output device 290 via the display line buffer 270 and the display interface controller 280. On the other hand, before being stored in the mass storage memory device 260 via the compressed data buffer 240 and the mass storage memory device interface controller 250, the JPEG encoded bit string can also be decoded by the JPEG decoder 205 and then passed through the second stage. JPEG encoding processing (i.e., JPEG encoder 201).

第三圖顯示依據本發明使用JPEG壓縮/解壓縮用以顯示並記錄之彩色影像旋轉方法的流程圖。該流程圖使用YUV422模式當作示範實例,且對於YUV420的說明係相類似。利用第二圖的彩色影像旋轉裝置200,如第三圖所示,步驟301係分別設定彩色影像旋轉裝置200的JPEG編碼器201與JPEG解碼器205的操作模式。設定JPEG編碼器201的操作模式包括解除JPEG編碼器DPCM、設定平面輸入串成YUVY及針對位元組對齊致能Y平面補零。類似的,設定JPEG解碼器205的操作模式包括解除DC DPCM計算、設定平面輸入串成YUVY、致能JPEG解碼器以跳躍至當Y平面完成時下一位元組的開始。步驟302係等待直到影像資料準備編碼。當影像資料準備好時,步驟303進行JPEG編碼及再次進入資訊處理。步驟304係等待直到完成整個圖框影像的壓縮。在完成圖框影像的壓縮後,步驟305係如下設定JPEG編碼器201的操作模式:致能JPEG編碼器DPCM、設定平面輸入串YYUV、解除用於位元組的Y平面補零以及設定量化值成1,亦即無損模式。步驟306進行JPEG解碼及再次進入資訊更新處理。The third figure shows a flow chart of a method of color image rotation for displaying and recording using JPEG compression/decompression in accordance with the present invention. This flowchart uses the YUV422 mode as an example and the description of the YUV420 is similar. With the color image rotating device 200 of the second drawing, as shown in the third figure, step 301 sets the operation modes of the JPEG encoder 201 and the JPEG decoder 205 of the color image rotating device 200, respectively. Setting the operation mode of the JPEG encoder 201 includes releasing the JPEG encoder DPCM, setting the plane input string to YUVY, and enabling the Y-plane padding for the byte alignment. Similarly, setting the mode of operation of JPEG decoder 205 includes de-DC DPCM calculation, setting the plane input string to YUVY, enabling the JPEG decoder to jump to the beginning of the next tuple when the Y-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. Step 304 waits until the compression of the entire frame image is completed. After the compression of the frame image is completed, step 305 sets the operation mode of the JPEG encoder 201 as follows: enabling the JPEG encoder DPCM, setting the plane input string YYUV, releasing the Y-plane zero pad for the byte, and setting the quantization value. Into 1, which is the lossless mode. Step 306 performs JPEG decoding and re-enters the information update process.

在步驟306後,處理可採用步驟307A用於顯示處理以便顯示影像於影像輸出裝置上,或採用步驟307B用於標準無損JPEG編碼以記錄至大量儲存裝置。針對顯示處理分支(步驟307A),步驟307B係等待直到JPEG解碼完成,且當JPEG解碼完成時,最後影像係顯示於顯示器,如步驟309A所示。此時,完成圖框顯示的處理。類似的,對於記錄至大量儲存裝置(步驟307B),步驟308B係等待直到JPEG編碼完成,且當JPEG編碼完成時,最後編碼資料被放入大量儲存裝置,如步驟309B所示。此時,完成記錄單一圖框影像的處理。After step 306, the process may employ step 307A for display processing to display images on the image output device, or step 307B for standard lossless JPEG encoding for recording to a plurality of storage devices. For the display processing branch (step 307A), step 307B waits until JPEG decoding is complete, and when JPEG decoding is complete, the last image is displayed on the display, as shown in step 309A. At this point, the processing of the frame display is completed. Similarly, for recording to a large number of storage devices (step 307B), step 308B waits until JPEG encoding is completed, and when JPEG encoding is completed, the last encoded material is placed in a plurality of storage devices, as shown in step 309B. At this point, the processing of recording a single frame image is completed.

值得注意的是,如第三圖所示,為了儲存旋轉影像的標準JPEG編碼位元串至大量儲存裝置,需要第二階段JPEG編碼處理。第二階段JPEG編碼處理是標準的JPEG編碼處理。為保持本發明第一階段JPEG編碼處理的量化結果,量化值被設定成1,亦即,第二階段標準JPEG編碼處理是對第一階段JPEG編碼結果的無損壓縮,如步驟307B所示。It is worth noting that, as shown in the third figure, in order to store the standard JPEG encoded bit string of the rotated image to a large number of storage devices, a second stage JPEG encoding process is required. The second stage JPEG encoding process is a standard JPEG encoding process. To maintain the quantized result of the first stage JPEG encoding process of the present invention, the quantized value is set to 1, that is, the second stage standard JPEG encoding process is lossless compression of the first stage JPEG encoding result, as shown in step 307B.

還值得注意的是,本發明方法的主要特點是改變平面輸入串列至JPEG編碼器及JPEG解碼器,如步驟301及步驟305所示。針對YUV422模式,平面輸入串列是由傳統的(Y0 Y1 UV)(Y0 Y1 UV)(Y0 Y1 UV)...改變成(Y0 UVY1 )(Y0 UVY1 )(Y0 UVY1 )...給第一階段編碼,其中Y0 及Y1 是可互相改變。此外,(Y0 UVY1 )串列對順時鐘旋轉JPEG解碼是更加方便,而(Y1 UVY0 )串列對逆時鐘旋轉JPEG解碼是更加方便。類似的,對於YUV420模式,平面輸入串列是由傳統的(Y0 Y1 Y2 Y3 UV)(Y0 Y1 Y2 Y3 UV)(Y0 Y1 Y2 Y3 UV)..改變成(Y2 Y0 UVY3 Y1 )(Y2 Y0 UVY3 Y1 )(Y2 Y0 UVY3 Y1 )...給第一階段編碼,其中Y2 及Y0 是可互相改變,而Y3 及Y1 也可互相改變。此外,(Y2 Y0 UVY3 Y1 )串列對順時鐘旋轉JPEG解碼是更加方便,而(Y1 Y3 UVY0 Y2 )串對逆時鐘旋轉JPEG解碼是更加方便。It is also worth noting that the main feature of the method of the present invention is to change the planar input string to the JPEG encoder and JPEG decoder, as shown in steps 301 and 305. For the YUV422 mode, the planar input string is changed from the traditional (Y 0 Y 1 UV) (Y 0 Y 1 UV) (Y 0 Y 1 UV)... to (Y 0 UVY 1 ) (Y 0 UVY 1 ) (Y 0 UVY 1 )... encodes the first stage, where Y 0 and Y 1 are mutually changeable. In addition, (Y 0 UVY 1) tandem rotation JPEG decoder is more convenient to clockwise, and (Y 1 UVY 0) is rotated counterclockwise series of JPEG decoder is more convenient. Similarly, for the YUV420 mode, the planar input string is made up of the traditional (Y 0 Y 1 Y 2 Y 3 UV) (Y 0 Y 1 Y 2 Y 3 UV) (Y 0 Y 1 Y 2 Y 3 UV).. Change to (Y 2 Y 0 UVY 3 Y 1 )(Y 2 Y 0 UVY 3 Y 1 )(Y 2 Y 0 UVY 3 Y 1 )... to encode the first stage, where Y 2 and Y 0 are mutually Change, and Y 3 and Y 1 can also change each other. In addition, the (Y 2 Y 0 UVY 3 Y 1 ) series is more convenient for clockwise rotation JPEG decoding, and the (Y 1 Y 3 UVY 0 Y 2 ) string is more convenient for inverse clock rotation JPEG decoding.

利用上述平面輸入串列的改變,針對第一階段編碼,需要收集的再次進入資訊被降為二開始位址。對於YUV422模式,包括在再次進入資訊的二開始位址是YUVY串列的第一Y平面及U平面的開始位址。而且對於YUV420模式,包括在再次進入資訊的二開始位址是YYUVYY串列的第一Y平面及U平面的開始位址。以這種方式,需要儲存再次進入資訊的記憶體被大幅的降低,且處理時間也縮短。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 Y-plane of the YUVY sequence 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 first Y-plane of the YYUVYY string and the start address of the U-plane. In this way, the memory that needs to store the re-entry information is greatly reduced, and the processing time is also shortened.

此外,除了降低再次進入資訊所需的記憶體以外,JPEG解碼處理還將因編碼位元串的開始位址的時間改變而變得更為平順。對於YUV422模式,現在有三平面被解壓縮以獲得單一8x8像素區塊之彩色影像的YUV值。(Y0 UVY1 )串列的配置讓JPEG解碼器對Y0 UV三平面或UVY1 三平面進行解碼,以獲得單一8x8像素區塊之彩色影像。對於YUV420模式,現在有四平面被解壓縮以獲得二8x8像素區塊之彩色影像的YUV值。(Y2 Y0 UVY3 Y1 )串列的配置讓JPEG解碼器對Y2 Y0 UV四平面或UVY3 Y1 四平面進行解碼,以獲得二16x8像素區塊之彩色影像。效能被改善且整體解壓縮更加有效率及平順。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 a single 8x8 pixel block. The (Y 0 UVY 1 ) tandem configuration allows the JPEG decoder to decode the Y 0 UV tri-plane or UVY 1 tri-plane to obtain a color image of a single 8x8 pixel block. For the YUV420 mode, there are now four planes decompressed to obtain the YUV value of the color image of the two 8x8 pixel blocks. The (Y 2 Y 0 UVY 3 Y 1 ) tandem configuration allows the JPEG decoder to decode the Y 2 Y 0 UV four plane or the UVY 3 Y 1 four plane to obtain a color image of two 16x8 pixel blocks. Performance is improved and overall decompression is more efficient and smooth.

如上所述,JPEG編碼器201被用DC DPCM解除機制所加強。包含DC DPCM解除機制,如第四圖所示,致能(Y0 UVY1 )輸入串列的再配置,以降低需要為編碼/壓縮計算而儲存的再次進入資訊量。如第四圖所示,(Y0 UVY1 )輸入串列被饋入具有DC DPCM解除機制的JPEG編碼器中。對於JPEG編碼/壓縮,DPCM被解除,且用於再次進入資訊的DC參考值是儲存於編碼/壓縮位元串中,而無需***JPEG定義RESTART標示。要收集的再次進入資訊,如第四圖所示,包括Y0 平面編碼位元串開始位址及U平面編碼位元串開始位址。As described above, the JPEG encoder 201 is enhanced by the DC DPCM release mechanism. A DC DPCM release mechanism is included, as shown in the fourth figure, enabling (Y 0 UVY 1 ) input string reconfiguration to reduce the amount of re-entry information that needs to be stored for encoding/compression calculations. As shown in the fourth figure, the (Y 0 UVY 1 ) input string is fed into a JPEG encoder with a DC DPCM release mechanism. For JPEG encoding/compression, DPCM is released and the DC reference value used to re-enter the information is stored in the encoding/compressing bit string without inserting a JPEG definition RESTART flag. The re-entry information to be collected, as shown in the fourth figure, includes a Y 0 plane coded bit string start address and a U-plane coded bit string start address.

為進一步降低記錄再次進入資訊所需之記憶體的大小,可使用額外的機制。第五圖顯示不儲存Y0 平面編碼位元串及U平面編碼位元串的整個開始位址而是可使用索引記憶體及增加大小記憶體以重建開始位址。。如第五圖所示,索引記憶體儲存編碼位元串的開始位址,而增加大小記憶體儲存Y0 平面編碼位元大小或U平面、V平面及Y1 平面的編碼位元大小之總合。括弧中的位址數目,比如(位址0),是指儲存該值之記憶體位置的位址。例如,索引記憶體的位址0儲存8x8編碼位元串之列1的開始位址,增加大小記憶體的位址0儲存1st Y0 平面中所有位元總數,而增加大小記憶體的位址1儲存1st U+V+Y1 平面中所有位元總數。以這種方式,Y0 平面編碼位元串及U平面編碼位元串的實際開始位址可利用儲存於索引記憶體及增加大小記憶體中的數值而重建。To further reduce the size of the memory required to record re-entry information, an additional mechanism can be used. The fifth figure shows that the entire start address of the Y 0 plane coded bit string and the U plane coded bit string is not stored, but the index memory and the size memory can be used 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 total size of the Y 0 plane coded bit size or the coded bit size of the U plane, the V plane, and the Y 1 plane. Hehe. The number of addresses in parentheses, such as (address 0), refers to the address of the memory location where the value is stored. For example, the address 0 of the index memory stores the start address of column 1 of the 8x8 encoded bit string, and the address 0 of the size memory increases the total number of all bits in the 1 st Y 0 plane, and increases the bit of the size memory. Address 1 stores the total number of all bits in the 1 st U+V+Y 1 plane. In this manner, Y 0 bit plane coding sequence and the actual start address of the U-plane coded bit sequence may be reconstructed using the index value stored in the memory and the memory size increase.

第六圖顯示依據本發明旋轉YUV422模式的32x16像素彩色影像的實例。如第六圖所示,32x16像素彩色影像被分割成八個8x8區塊,分別標示成(1,1)、(1,2)、(1,3)、(1,4)、(2,1)、(2,2)、(2,3)及(2,4)。原始彩色像素底下的箭頭顯示彩色影像資料輸入順序。對32x16彩色影像進行90°順時鐘旋轉,以變成16x32彩色影像,如第六圖所示。旋轉彩色像素之上的箭頭顯示位元串的顯示順序。原始32x16彩色像素之上及底下剩餘的Y平面、U平面及V平面是需要進行旋轉操作處理的所有平面。因為示範實例為YUV422模式,所以包含四平面用於每二個相鄰區塊(亦即單一16x8影像)。因此,原始32x16彩色像素將分割成四部分,分別標示成1st 、2nd 、3rd 及4thThe sixth figure shows an example of a 32x16 pixel color image that rotates the YUV422 mode in accordance with the present invention. As shown in the sixth figure, the 32x16 pixel color image is divided into eight 8x8 blocks, labeled (1,1), (1,2), (1,3), (1,4), (2, 1), (2, 2), (2, 3) and (2, 4). The arrows under the original color pixels show the order in which the color image data is entered. The 32x16 color image is rotated 90° clockwise to become a 16x32 color image, as shown in the sixth figure. The arrow above the rotated color pixel shows the order in which the bit strings are displayed. The remaining Y plane, U plane, and V plane above and below the original 32x16 color pixel are all planes that need to be processed by the rotation operation. Since the exemplary example is the YUV422 mode, four planes are included for every two adjacent blocks (ie, a single 16x8 image). Thus, the original 32x16 pixel color is divided into four parts, respectively marked as 1 st, 2 nd, 3 rd and 4 th.

第七A-七H圖顯示第六圖中旋轉操作的詳細處理。如第七A圖所示,步驟701讀取具位址1的索引記憶體以獲得3rd Y0 平面的開始位元位址,而步驟702針對(2,1)區塊以解碼3rd Y0 平面、3rd U平面、3rd V平面。類似的,步驟703讀取具位址4的增加記憶體以獲得3rd Y0 平面的編碼位元串大小,而步驟704針對(2,2)區塊JPEG解碼,將3rd Y0 平面開始位元位址及3rd Y0 平面編碼位元大小的總合寫回至索引記憶體位址1。值得注意的是,存取索引記憶體及增加大小記憶體可同時進行。步驟705決定3rd Y0 平面、3rd U平面、3rd V平面解碼是否完成;如果是,則處理進行至步驟706;否則,處理回到步驟702。The seventh A-seventh H diagram shows the detailed processing of the rotation operation in the sixth figure. As shown in FIG. 7A, step 701 reads the index memory with address 1 to obtain the start bit address of the 3 rd Y 0 plane, and step 702 decodes 3 rd Y for the (2, 1) block. 0 plane, 3 rd U plane, 3 rd V plane. Similarly, in step 703 with the read address memory 4 is increased to obtain a coded bit string 3 rd Y plane size 0, and step 704 for the (2,2) block a JPEG decoder, the 3 rd Y plane starts 0 address bits and 3 rd Y 0 bit plane coding of the sum of the size written back to the memory address index 1. It is worth noting that accessing the index memory and increasing the size of the memory can be performed simultaneously. Step 705 determines whether the 3 rd Y 0 plane, the 3 rd U plane, and the 3 rd V plane decoding are completed; if so, the process proceeds to step 706; otherwise, the process returns to step 702.

類似的,在第七B圖中,步驟706讀取具有位址0的索引記憶體以獲得1st Y0 平面的開始位元位址,並重置JPEG Huffman解碼器,而步驟707針對(1,1)區塊以解碼1st Y0 平面、1st U平面、1st V平面。類似的,步驟708讀取具位址0的增加記憶體以獲得1st Y0 平面的編碼位元串大小,而步驟709針對(1,2)區塊JPEG解碼,將1st Y0 平面開始位元位址及1st Y0 平面編碼位元大小的總合寫回至索引記憶體位址0。步驟710決定1st Y0 平面、1st U平面、1st V平面解碼是否完成;如果是,則處理進行至步驟711;否則,處理回到步驟707。Similarly, in Figure 7B, step 706 reads the index memory with address 0 to obtain the start bit address of the 1 st Y 0 plane, and resets the JPEG Huffman decoder, while step 707 is for (1) 1) Block to decode 1 st Y 0 plane, 1 st U plane, 1 st V plane. Similarly, step 708 reads the increased memory with address 0 to obtain the encoded bit string size of the 1 st Y 0 plane, and step 709 begins with the (1, 2) block JPEG decoding, starting with the 1 st Y 0 plane. The sum of the bit address and the size of the 1 st Y 0 plane coded bit is written back to the index memory address 0. Step 710 determines plane 1 st Y 0, 1 st U plane, 1 st V plane decoding is completed; if YES, the process proceeds to step 711; otherwise, the process returns to step 707.

第七C圖顯示3rd U平面、3rd V平面、3rd Y1 平面的解碼。如第七C圖所示,步驟711讀取具有位址1的索引記憶體以獲得3rd U平面的開始位元位址,並重置JPEG Huffman解碼器,而步驟712針對(2,2)區塊以解碼3rd U平面、3rd V平面、3rd Y1 平面。類似的,步驟713讀取具位址5的增加記憶體以獲得3rd U+V+Y1 平面的編碼位元串大小,而步驟714針對(2,3)區塊JPEG解碼,將3rd Y0 平面開始位元位址及3rd U+V+Y1 -平面編碼位元大小的總合寫回至索引記憶體位址1。步驟715決定3rd U平面、3rd V平面、3rd Y1 平面解碼是否完成;如果是,則處理進行至步驟716;否則,處理回到步驟702。The seventh C diagram shows the decoding of the 3 rd U plane, the 3 rd V plane, and the 3 rd Y 1 plane. As shown in FIG. C, step 711 reads the index memory having address 1 to obtain the start bit address of the 3 rd U plane, and resets the JPEG Huffman decoder, and step 712 is for (2, 2). The block is to decode the 3 rd U plane, the 3 rd V plane, and the 3 rd Y 1 plane. Similarly, step 713 reads the increased memory with address 5 to obtain the encoded bit string size of the 3 rd U+V+Y 1 plane, and step 714 for the (2,3) block JPEG decoding, 3 rd The sum of the Y 0 plane start bit address and the 3 rd U+V+Y 1 -plane coded bit size is written back to the index memory address 1. Step 715 determines whether the 3 rd U plane, the 3 rd V plane, and the 3 rd Y 1 plane decoding are completed; if so, the process proceeds to step 716; otherwise, the process returns to step 702.

類似的,第七D圖的步驟716-720係用以解碼1st U平面、1st V平面及1st Y1 平面的步驟。第七E圖的步驟721-725係用以解碼4th Y0 平面、4th U平面及4th V平面的步驟。第七F圖的步驟726-730係用以解碼2nd Y0 平面、2nd U平面及2nd V平面的步驟。第七G圖的步驟731-735係用以解碼4th U平面、4th V平面及4th Y1 平面的步驟。第七H圖的步驟736-740係用以解碼2nd U平面、2nd V平面及2nd Y1 平面的步驟。在此省略所有的詳細說明。Similarly, steps 716-720 of the seventh D diagram are steps for decoding the 1 st U plane, the 1 st V plane, and the 1 st Y 1 plane. Seventh Step E to Step lines 721-725 of FIG. 4 th Y 0 plane, 4 th U plane and the plane of the 4 th V decoding. Steps 726-730 of the seventh F diagram are steps for decoding the 2 nd Y 0 plane, the 2 nd U plane, and the 2 nd V plane. A seventh step G in FIG lines 731-735 to decode step 4 th U plane, 4 th V plane and the 4 th Y 1 plane. Steps 736-740 of the seventh H diagram are steps for decoding the 2 nd U plane, the 2 nd V plane, and the 2 nd Y 1 plane. All the detailed descriptions are omitted here.

如上所述,本發明的JPEG編碼器201及JPEG解碼器205也用補零特性而加強,以提供補零位元至位元組邊界,使得再次進入資訊的位元串的開始位址可對齊,當作位元串位元組的開始位址。當Y平面編碼位元串大小不正好為多個位元組時,藉補零位元至Y平面。補零至位元組邊界能降低索引記憶體與增加大小記憶體的大小以及再次進入資訊處理複雜度,因為處理現在是以位元組位址而非位元位址為主。具補零特性的JPEG解碼器將在對Y平面解碼時,讓解碼跳躍至下一位元組的開始。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 string of the re-entry information can be aligned. , as the starting address of the bit string tuple. When the Y-plane coded bit string size is not exactly a plurality of bytes, the zero bit is borrowed to the Y-plane. Zero-padding to the byte 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 processing is now dominated by the byte address rather than the bit address. A JPEG decoder with a zero-padding feature will cause the decoding to jump to the beginning of the next tuple when decoding the Y-plane.

因此,利用針對Y平面的補零,用於JPEG解碼的已配置Y0 UVY1 輸入串列,Y0 平面及U平面的開始位址針對YUV422模式正好位於位元組邊界。再次進入資訊將包括JPEG編碼位元串的開始位元組位址,但不包括位元位址。類似的,對於YUV420模式,利用針對Y0 平面及Y1 平面的補零,亦即第二及第四Y平面,用於JPEG解碼的已配置Y2 Y0 UVY3 Y1 輸入串列,再次進入資訊也將包括JPEG編碼位元串的開始位元組位址。Thus, with zero padding for the Y-plane, the configured Y 0 UVY 1 input string for JPEG decoding, the Y 0 plane and the start address of the U-plane are located exactly at the bit tuple boundary for the YUV422 mode. The re-entry message will include the starting byte address of the JPEG encoded bit string, but does not include the bit address. Similarly, for YUV420 pattern, using a plane zero padding for Y 0 and Y 1 plane, i.e., the second and fourth Y plane, configured for JPEG decoding Y 2 Y 0 UVY 3 Y 1 input series, again The incoming message will also include the starting byte address of the JPEG encoded bit string.

此外,為顯示旋轉影像於影像輸出裝置上,在本發明的第一階段JPEG編碼處理之後,索引記憶體必須儲存至啟始值。索引記憶體儲存至啟始值可藉平移處理而完成,亦即藉平移啟始值以使得儲存在位址n的值變成位址n-1的值,而位址0的值是被設定成0。Further, 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 n becomes the value of the address n-1, and the value of the address 0 is set to 0.

雖然上述實施例中針對YUV422模式是以最佳範例YUVY輸入串列的順序作說明,但並不因此限制本發明之範圍,例如也可採用YVUY輸入串列,皆可達到相同之效果。若使用YVUY,則記錄第一個Y平面及V平面的壓縮串列開始位址。同理針對YUV420模式本實施雖以最佳範例YYUVYY輸入串列的順序作說明,但也不因此限制本發明之範圍,例如也可採用YYVUYY輸入串列,亦可達到相同之效果。使用YYVUYY順序時,則記錄第一個Y平面及V平面的壓縮串列開始位址。Although the above embodiment is directed to the YUV 422 mode in the order of the best example YUVY input string, the scope of the present invention is not limited thereby. 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 YUV420 mode is described in the order of the best example YYUVYY input string, but it does not limit the scope of the present invention. For example, the YYVUYY input string can also be used, and the same effect can be achieved. When the YYVUYY order is used, the compressed serial start address of the first Y 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 description, and others will occur to those skilled in the art. Therefore, all such alternatives and modifications are intended to be included within the scope of the invention as defined in the appended claims.

200...彩色影像旋轉裝置200. . . Color image rotating device

201...JPEG編碼器201. . . JPEG encoder

203...再次進入資訊收集203. . . Re-entry information collection

205...JPEG解碼器205. . . JPEG decoder

210...影像輸入裝置210. . . Image input device

220...色彩空間轉換220. . . Color space conversion

220A...RGB至YCbCr色彩空間轉換220A. . . RGB to YCbCr color space conversion

220B...色彩向下取樣器220B. . . Color down sampler

230...影像輸出線緩衝器230. . . Image output line buffer

240...壓縮資料緩衝器240. . . Compressed data buffer

250...大量儲存記憶體裝置介面控制器250. . . Mass storage memory device interface controller

260...大量儲存記憶體裝置260. . . Mass storage memory device

270...顯示線緩衝器270. . . Display line buffer

280...顯示介面控制器280. . . Display interface controller

290...影像輸出裝置290. . . Image output device

301~309B...步驟301~309B. . . step

701~740...步驟701~740. . . step

第一圖顯示傳統彩色影像旋轉方法中用於YUV422模式所收集再次進入資訊的示意圖。The first figure shows a schematic diagram of the re-entry information collected for the YUV422 mode in the conventional color image rotation method.

第二圖顯示依據本發明以影像為主之應用環境中使用JPEG壓縮/解壓縮以顯示並記錄之彩色影像旋轉裝置的示意圖。The second figure shows a schematic diagram of a color image rotating device that uses JPEG compression/decompression to display and record in an image-based application environment in accordance with the present invention.

第三圖顯示依據本發明使用JPEG壓縮/解壓縮用以顯示並記錄之彩色影像旋轉方法的流程圖。The third figure shows a flow chart of a method of color image rotation for displaying and recording using JPEG compression/decompression in accordance with the present invention.

第四圖顯示依據本發明藉包含DC DPCM失能機制及(Y0 UVY1 )輸入串列之再配置所收集之再次進入資訊的示意圖。The fourth figure shows a schematic diagram of re-entry information collected by the DC DPCM disabling mechanism and the reconfiguration of the (Y 0 UVY 1 ) input string in accordance with the present invention.

第五圖顯示依據本發明用以儲存再次進入資訊之索引記憶體及增加尺寸記憶體的示意圖。The fifth figure shows a schematic diagram of an index memory and an increased size memory for storing re-entry information in accordance with the present invention.

第六圖顯示依據本發明旋轉YUV422模式的32x16像素彩色影像的實例。The sixth figure shows an example of a 32x16 pixel color image that rotates the YUV422 mode in accordance with the present invention.

第七A-七H圖顯示第六圖中實例的旋轉操作的詳細處理。The seventh A-seventh H diagram shows the detailed processing of the rotation operation of the example in the sixth figure.

200...彩色影像旋轉裝置200. . . Color image rotating device

201...JPEG編碼器201. . . JPEG encoder

203...再次進入資訊聚集203. . . Enter information gathering again

205...JPEG解碼器205. . . JPEG decoder

210...影像輸入裝置210. . . Image input device

220...色彩空間轉換220. . . Color space conversion

220A...RGB至YCbCr色彩空間轉換220A. . . RGB to YCbCr color space conversion

220B...色彩向下取樣器220B. . . Color down sampler

230...影像輸出線緩衝器230. . . Image output line buffer

240...壓縮資料緩衝器240. . . Compressed data buffer

250...大量儲存記憶體裝置介面控制器250. . . Mass storage memory device interface controller

260...大量儲存記憶體裝置260. . . Mass storage memory device

270...顯示線緩衝器270. . . Display line buffer

280...顯示介面控制器280. . . Display interface controller

290...影像輸出裝置290. . . Image output device

Claims (10)

一種使用JPEG壓縮/解壓縮用於顯示及記錄的彩色影像旋轉之方法,係適用於一具有一JPEG編碼器一再次進入資訊收集模組及一JPEG解碼器的裝置,該JPEG編碼器具有DC DPCM解除機制及補零特性,該JPEG解碼器具有DC DPCM解除機制及補零跳脫特性,該方法包括:分別設定該JPEG編碼器與該JPEG解碼器的操作模式;等待直到影像資料準備編碼;進行JPEG編碼及再次進入資訊處理;等待直到完成整個圖框影像的壓縮;設定該JPEG編碼器的操作模式;進行JPEG解碼及再次進入資訊更新處理;以及進行顯示/記錄處理,該顯示/記錄處理進一步包括以下步驟:用於顯示旋轉影像於影像輸出裝置上:顯示處理;等待直到JPEG解碼完成;以及顯示最後影像於該影像輸出裝置上以完成顯示單一圖框的旋轉彩色影像;以及用於記錄旋轉影像至大量儲存裝置:進行無損JPEG編碼;等待直到JPEG編碼完成;以及將最後編碼影像存入該大量儲存裝置以完成記錄單一圖框的旋轉彩色影像。A method for compressing/decompressing color image rotation for display and recording using JPEG is applicable to a device having a JPEG encoder and re-entering an information collection module and a JPEG decoder, the JPEG encoder having DC DPCM The JPEG decoder has a DC DPCM release mechanism and a zero-padding feature, the method includes: respectively setting an operation mode of the JPEG encoder and the JPEG decoder; waiting until the image data is ready to be encoded; JPEG encoding and re-entering information processing; waiting until the compression of the entire frame image is completed; setting the operation mode of the JPEG encoder; performing JPEG decoding and re-entering the information update processing; and performing display/recording processing, the display/recording processing further The method comprises the following steps: displaying a rotating image on the image output device: displaying processing; waiting until the JPEG decoding is completed; and displaying the last image on the image output device to complete the rotating color image displaying the single frame; and for recording the rotation Image to mass storage device: perform lossless JPEG encoding; wait until JPEG Completion code; and finally coded image stored in the mass storage device to complete the rotation of the color image recording in a single frame. 依據申請專利範圍第1項所述之方法,其中該分別設定該JPEG編碼器及該JPEG解碼器之操作模式的步驟進一步包括以下步驟:解除JPEG編碼器DPCM;設定平面輸入串列至該JPEG編碼器,若為YUV422模式,則該平面輸入串列設為YUVY與YVUY兩者其中一種,若為YUV 420模式,則該平面輸入串列設為YYUVYY與YYVUYY兩者其中一種;致能該JPEG編碼器Y平面補零以用於位元組對齊;解除JPEG解碼器DC DPCM計算;設定平面輸入串列至該JPEG編碼器,若為YUV422模式,則該平面輸入串列設為YUVY與YVUY兩者其中一種,且須與前述步驟中之平面輸入串列相同,若為YUV 420模式,則該平面輸入串列設為YYUVYY與YYVUYY兩者其中一種,且須與前述步驟中之平面輸入串列相同;以及在完成Y平面時致能該JPEG解碼器以跳躍至下一位元組的開始。The method of claim 1, wherein the step of respectively setting the operation mode of the JPEG encoder and the JPEG decoder further comprises the steps of: releasing the JPEG encoder DPCM; setting a plane input string to the JPEG code If the mode is YUV422, the plane input string is set to one of YUVY and YVUY. If it is YUV 420 mode, the plane input string is set to one of YYUVYY and YYVUYY; enabling the JPEG code Y plane zero padding for byte alignment; JPEG decoder DC DPCM calculation is cancelled; plane input string is set to the JPEG encoder, if YUV422 mode, the plane input string is set to both YUVY and YVUY One of them must be the same as the plane input string in the previous step. If it is YUV 420 mode, the plane input string is set to one of YYUVYY and YYVUYY, and must be the same as the plane input string in the previous step. And enabling the JPEG decoder to jump to the beginning of the next tuple when the Y plane is completed. 依據申請專利範圍第1項所述之方法,其中該設定該JPEG編碼器的步驟包括以下步驟:致能JPEG編碼器DPCM;設定平面輸入串列至該JPEG編碼器,若為YUV422模式,則該平面輸入串列設為YUVY與YVUY兩者其中一種,若為YUV 420模式,則該平面輸入串列設為YYUVYY與YYVUYY兩者其中一種;解除Y平面補零以用於位元組對齊;以及設定量化值成1以變成無損模式。The method of claim 1, wherein the step of setting the JPEG encoder comprises the steps of: enabling a JPEG encoder DPCM; setting a plane input string to the JPEG encoder, if in the YUV422 mode, The plane input string is set to one of YUVY and YVUY. If it is YUV 420 mode, the plane input string is set to one of YYUVYY and YYVUYY; the Y plane is zero-padded for byte alignment; The quantization value is set to 1 to become a lossless mode. 依據申請專利範圍第2項所述之方法,其中該解除DC DPCM的步驟進一步包括不***標準JPEG所定義之RESTART標示。The method of claim 2, wherein the step of releasing the DC DPCM further comprises not inserting a RESTART indicator as defined by the standard JPEG. 依據申請專利範圍第2項所述之方法,其中該再次進入資訊包括用於YUV422模式之該YUVY輸入串列以及用於YUV420模式之該YYUVYY輸入串列的第一個Y平面的開始位址及U平面的開始位址。The method of claim 2, wherein the re-entry information comprises the YUVY input string for the YUV422 mode and the start address of the first Y-plane of the YYUVYY input string for the YUV420 mode and The starting address of the U plane. 依據申請專利範圍第2項所述之方法,其中該再次進入資訊包括用於YUV422模式之該YVUY輸入串列以及用於YUV420模式之該YYVUYY輸入串列的第一個Y平面及V平面的壓縮串列開始位址。The method of claim 2, wherein the re-entry information comprises the YVUY input string for the YUV422 mode and the compression of the first Y-plane and the V-plane of the YYVUYY input string for the YUV420 mode. Serialize the start address. 依據申請專利範圍第5或6項所述之方法,其中該再次進入資訊係藉編碼位元串之開始位址、編碼位元串之Y平面中位元數目以及編碼位元串之U平面、V平面及Y平面中總位元數目而重建。The method of claim 5, wherein the re-entry information is based on a starting address of the encoded bit string, a number of bits in the Y-plane of the encoded bit string, and a U-plane of the encoded bit string, The total number of bits in the V plane and the Y plane is reconstructed. 一種使用JPEG壓縮/解壓縮用於顯示及記錄的彩色影像旋轉之裝置,包括:一JPEG編碼器,係具有DC DPCM解除機制及補零特性;一再次進入資訊收集模組;以及一JPEG解碼器,係具有DC DPCM解除機制及補零跳脫特性。A device for compressing/decompressing color images for display and recording using JPEG, comprising: a JPEG encoder having a DC DPCM release mechanism and zero padding feature; a re-entry information collection module; and a JPEG decoder It has DC DPCM release mechanism and zero-padding characteristics. 依據申請專利範圍第8項所述之裝置,其中該再次進入資訊收集模組進一步包括一用於儲存編碼位元串的開始位元之址的索引記憶體以及一用以儲存編碼位元串的U平面、V平面及Y平面之總位元數目的增加大小記憶體。The device of claim 8, wherein the re-entry information collection module further comprises an index memory for storing the address of the start bit of the encoded bit string and a register memory string for storing the encoded bit string. The number of total bits in the U plane, the V plane, and the Y plane is increased by the size of the memory. 依據申請專利範圍第9項所述之裝置,其中該索引記憶體可藉平移操作以儲存啟始值。The device of claim 9, wherein the index memory is operative to store a start value.
TW99118406A 2010-06-07 2010-06-07 Method and apparatus of color image rotation for display and recording using jpeg TWI426465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW99118406A TWI426465B (en) 2010-06-07 2010-06-07 Method and apparatus of color image rotation for display and recording using jpeg

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW99118406A TWI426465B (en) 2010-06-07 2010-06-07 Method and apparatus of color image rotation for display and recording using jpeg

Publications (2)

Publication Number Publication Date
TW201145214A TW201145214A (en) 2011-12-16
TWI426465B true TWI426465B (en) 2014-02-11

Family

ID=46765888

Family Applications (1)

Application Number Title Priority Date Filing Date
TW99118406A TWI426465B (en) 2010-06-07 2010-06-07 Method and apparatus of color image rotation for display and recording using jpeg

Country Status (1)

Country Link
TW (1) TWI426465B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102069857B1 (en) * 2013-02-28 2020-01-23 삼성전자주식회사 Method for rotating an original image using self-learning and apparatuses performing the method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI237996B (en) * 2004-05-12 2005-08-11 Sunplus Technology Co Ltd Method and apparatus of block decoding for longitudinal decoding/outputting
CN100477788C (en) * 2003-09-16 2009-04-08 富士通微电子株式会社 Image processing display device and method
CN100518319C (en) * 1996-12-18 2009-07-22 汤姆森消费电子有限公司 Fixed-length block data compression and decompression method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100518319C (en) * 1996-12-18 2009-07-22 汤姆森消费电子有限公司 Fixed-length block data compression and decompression method
CN100477788C (en) * 2003-09-16 2009-04-08 富士通微电子株式会社 Image processing display device and method
TWI237996B (en) * 2004-05-12 2005-08-11 Sunplus Technology Co Ltd Method and apparatus of block decoding for longitudinal decoding/outputting

Also Published As

Publication number Publication date
TW201145214A (en) 2011-12-16

Similar Documents

Publication Publication Date Title
JP4348768B2 (en) Image conversion method
JP4151684B2 (en) Encoding apparatus, encoding method, encoding program, and imaging apparatus
JP5502988B2 (en) Apparatus and method for rotating an image
TWI478585B (en) Image capturing system and method thereof
CN100463489C (en) Method and apparatus for generating thumbnail of digital image
JP4130207B2 (en) Image processing display device and image processing display method
US8558909B2 (en) Method and apparatus for generating compressed file, camera module associated therewith, and terminal including the same
TW200305830A (en) System and method for progressively transforming and coding digital data
TW200926069A (en) Methods and systems for source image encoding and methods and systems for decoding compressed images
KR20120126135A (en) Rotational transcoding for jpeg or other coding standards
US8514254B2 (en) Apparatus and method for processing digital images
JP2002016870A (en) Imaging apparatus
TWI426465B (en) Method and apparatus of color image rotation for display and recording using jpeg
US20070046792A1 (en) Image compositing
TWI286907B (en) Image processor of imaging apparatus
CN100420283C (en) Image sensor and computer system utilizing the same image sensor
US20110286663A1 (en) Method And Apparatus Of Color Image Rotation For Display And Recording Using JPEG
JP2001061067A (en) Image processing unit, its method, data processing unit and its control method
JP4288210B2 (en) Image processing apparatus, display apparatus, image processing method, and program
JP2004165733A (en) Image converter, image conversion method, and recording medium
TWI835238B (en) Image processing method and image processing device
JP2004104222A (en) Imaging unit
TWI835236B (en) Image processing method and image processing device
CN102291576B (en) Method and device for displaying and recording colored image rotation
JP5486233B2 (en) Imaging apparatus and control method thereof

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees