TW502542B - Video encoding method and video encoding apparatus - Google Patents

Video encoding method and video encoding apparatus Download PDF

Info

Publication number
TW502542B
TW502542B TW89119075A TW89119075A TW502542B TW 502542 B TW502542 B TW 502542B TW 89119075 A TW89119075 A TW 89119075A TW 89119075 A TW89119075 A TW 89119075A TW 502542 B TW502542 B TW 502542B
Authority
TW
Taiwan
Prior art keywords
frame
scene
encoding
video signal
patent application
Prior art date
Application number
TW89119075A
Other languages
Chinese (zh)
Inventor
Rieko Furukawa
Takeshi Nagai
Yoshihiro Kikuchi
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Application granted granted Critical
Publication of TW502542B publication Critical patent/TW502542B/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An video encoding method and a video encoding apparatus wherein an input video signal is divided into a plurality of temporally continuous scenes each including at least one frame, statistical feature amounts are calculated for each of the scenes, encoded parameters are generated for each of the scenes based on said statistical feature amounts, and the input image signal is encoded using the encoded parameters.

Description

502542 A7 B7 年月曰a補充 五、發明説明( 發明背景 (請先閲讀背面之注意事項再填寫本頁) 本發明有關一種視頻壓縮及編碼技術,諸如透過網際 網路或類似者使用於視頻傳輸系統及視頻資料庫系統中的 Μ P E G設計,尤其本發明有關一種視頻編碼方法及視頻 編碼設備,能提供統一化之解碼視頻以用於各場景,其係 根據以場景之內容爲主之編碼參數來編碼資料以易於觀看 而不會增加資料大小。 其係用於視頻編碼之國際標準的Μ P E G設計爲一種 用於藉組合熟知之移動補償預測,離散餘弦變換,及可變 長度編碼來壓縮視頻之技術,該Μ P E G設計係詳細地描 述於例如參考例1 : “ Μ P E G ” ,電視工程師學會版, 〇h m s h a有限公司中。 :在根據Μ P E G設計之習知視頻編碼設備中,壓縮的 視頻資料係藉特定傳輸速率之傳輸線加以傳輸,或記錄在 記錄容量受限之儲存媒體上。由於此,稱爲速率控制之用 於設定諸如訊框速率及量化寬度之編碼參數及執行編碼的 速率控制之處理會使得輸出之編碼位元流可呈指定値。 經濟部智慧財產局員工消費合作社印製 在習知之速率控制中常採用一種根據相對於固定量化 寬度而編碼前一訊框之結果所產生位元之數目來確定訊框 速率之方法。 習知地,訊框速率係依據目前緩衝器容量與根據其中 所編碼位元流係暫時儲存之緩衝器的容量所預設之訊框跨 越臨限値間的差異(邊際)而確定。若緩衝器容量低於該 臨限値時,資料係以固定訊框速率來編碼;若緩衝器容量 -4- 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 502542 A7 B7502542 A7 B7 month a supplement V. Description of the invention (Background of the invention (please read the notes on the back before filling this page) The present invention relates to a video compression and encoding technology, such as the use of video transmission through the Internet or the like The system and the MPEG design in the video database system, especially the present invention relates to a video encoding method and video encoding device, which can provide a unified decoded video for each scene, which is based on the encoding parameters based on the content of the scene To encode data for easy viewing without increasing the size of the data. It is an international standard for video coding. MPEG is designed to compress video by combining well-known motion-compensated prediction, discrete cosine transform, and variable-length coding. The technology, the MPEG design is described in detail in, for example, Reference Example 1: "M PEG", Institute of Television Engineers Edition, Ohmsha Co., Ltd .: Compressed video in a conventional video encoding device designed based on MPEG. Data is transmitted via a transmission line with a specific transmission rate, or the recording capacity is limited On the storage medium. Because of this, the process called rate control for setting encoding parameters such as frame rate and quantization width, and performing rate control of the encoding will make the output bit stream of encoding can be specified. Intellectual property of the Ministry of Economic Affairs In the conventional rate control, printed by bureau employee consumer cooperatives often uses a method to determine the frame rate based on the number of bits generated from the result of encoding the previous frame relative to a fixed quantization width. Knownly, the frame rate is Determined based on the difference (margin) between the current buffer capacity and the frame span preset threshold based on the buffer capacity of the encoded bit stream temporarily stored therein. If the buffer capacity is lower than the threshold At the time, the data is encoded at a fixed frame rate; if the buffer capacity is -4- this paper size applies the Chinese National Standard (CNS) A4 specification (210X297 mm) 502542 A7 B7

經濟部智慧財產局員工消費合作社印製 五、發明説明(2) 高於臨限値時,則執行訊框跨越來降低訊框速率。 然而’具有此方法,若在前一訊框中所產生之編碼位 元的數目大時’則執行訊框跨越,直到緩衝器容量呈不大 於訊框跨越臨限値爲止。由於此,訊框與下一訊框間之距 離將呈太大,導致視訊會不利地呈不自然。 也就是說’根據習知之速率控制,訊框速率及量化寬 度在基本上係設定無關於視頻之內容。爲該理由,訊框速 率會在其上活動地移動物體之視訊中的場景上變低。此外 ’由於不適用之量化寬度,畫面會失真,因而會不利地發 現到難以視覺地辨識該畫面。 同時’亦熟知有一種根據稱爲雙路編碼法技術之速率 控制方法’此技術係描述於例如參考例2 ··日本專利未審 :查申請案公告號碼第1 〇 — 3 3 6 6 7 5號中。如參考例 2中所示’視頻檔案係編碼兩次,該視頻檔案之整個特徵 係藉第一編碼法來分析,第二編碼法則根據分析結果藉設 定適當之編碼參數加以執行,以及傳輸或記錄第二編碼之 結果所得之編碼位元流。然而,該兩路編碼法具有如上述 該等之相同問題’因爲編碼參數係習知地,基本地設定無 關於視頻內容。 如上述,在習知之視頻編碼設備中,當執行速率控制 時’諸如訊框速率及量化寬度之編碼參數係設定無關於視 頻之內容。由於此,該訊框速率會突然地降低於其上活動 地移動物體之視頻中的場景上,而該物體之移動會呈不自 然。同時,由於不適用之量化寬度,視頻會失真。所以, 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) _5 - (請先閲讀背面之注意事項再填寫本頁)Printed by the Employees' Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs. 5. Description of the invention (2) When the threshold is higher than the threshold, a frame span is performed to reduce the frame rate. However, with this method, if the number of encoded bits generated in the previous frame is large, frame span is performed until the buffer capacity is not larger than the frame crossing threshold. Because of this, the distance between the frame and the next frame will be too large, causing the video to be unnaturally unnatural. That is, according to the conventional rate control, the frame rate and quantization width are basically set to have no content about the video. For this reason, the frame rate becomes slower in the scene in a video on which a moving object is moving. In addition, because the quantization width is not applicable, the picture is distorted, and it is disadvantageously found that it is difficult to visually recognize the picture. At the same time, 'there is also a rate control method based on a technique known as a two-way coding method'. This technology is described in, for example, Reference Example 2. Japanese Patent Unexamined: Check Application Publication No. 10- 3 3 6 6 7 5 No. As shown in Reference Example 2, the video file is encoded twice. The entire characteristics of the video file are analyzed by the first encoding method, and the second encoding method is executed by setting appropriate encoding parameters according to the analysis result, and transmitted or recorded. The encoded bit stream obtained as a result of the second encoding. However, the two-pass encoding method has the same problems as described above 'because the encoding parameters are conventionally set, and the basic setting is not related to the video content. As described above, in the conventional video encoding device, when performing rate control, encoding parameters such as frame rate and quantization width are set without regard to video. Because of this, the frame rate will suddenly decrease to the scene in the video of the moving object on it, and the movement of the object will be unnatural. At the same time, the video will be distorted due to the unsuitable quantization width. Therefore, the size of this paper applies the Chinese National Standard (CNS) A4 specification (210X297 mm) _5-(Please read the precautions on the back before filling this page)

502542 A7 B7 年月 「修正 俩 五、發明説明(3) 習知視頻編碼設備具有其中畫面品質之劣化會趨於顯著之 缺點。 (請先閲讀背面之注意事項再填寫本頁) 發明槪述 碼方法及視 之畫面品質 儲存媒體上 速率處或以 之量化寬度 位元之數目 編碼參數係 便獲得細微 設備,用以 之複數個暫 各場景,以 入之視頻信 場景之輸入 算,例如所 量之大小及 視頻信號及 因此,本發明之目的在於提供一種視頻編 頻編碼設備,能編碼具有適用於視頻場景內容 的視頻而維持指定値之編碼位元速率。 若壓縮之視頻資料記錄於受限儲存容量之 或透過網際網路予以下載時,重要地係在訊框 固定資料大小的條件上盡可能多地適用於場景 來有效率地編碼資料。爲此理由,因爲所產生 並非一直相關於場景之內容,故所企望的是, 根據場景上物體之移動及場景之內容而定,以 的畫面。 經濟部智慧財產局員工消費合作社印製 本發明提供一種視頻編碼方法及視頻編碼 晝分輸入之視頻信號爲各藉至少一訊框所建構 時連續的場景,計算統計上之特性數量以用於 及利用於各場景,以及利用編碼參數來編碼輸 號。 此處,統計上之特性數量藉總計存在於各 信號各訊框中移動向量之大小及分佈而加以計 編碼之參數包含至少訊框速率及量化寬度。 除了總計存在於各場景之各訊框中移動向 分佈當作統計上之特性數量外,當取得輸入之 -6- 本紙張尺度適用中國國家標準(CNS ) A4規格(210 X 297公釐) 502542 A7 B7502542 A7 B7, "Amendment V. Description of the Invention (3) The conventional video coding equipment has the disadvantage that the deterioration of the picture quality tends to be significant. (Please read the precautions on the back before filling this page) Invention Code Method and the number of quantized width bit encoding parameters at or on the video quality storage medium are obtained by the micro device, which are used for a plurality of temporary scenes, based on the input of the video message scene, such as the amount Therefore, the purpose of the present invention is to provide a video frequency coding encoding device capable of encoding a video having content suitable for video scenes while maintaining a specified bit rate of encoding. If the compressed video data is recorded to be limited When storing or downloading via the Internet, it is important to apply the scene as much as possible on the fixed data size of the frame to efficiently encode the data. For this reason, because the generated is not always relevant to the scene The content, so the hope is that according to the movement of objects on the scene and the content of the scene, Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economics The present invention provides a video encoding method and a video encoding daytime input video signal which is a continuous scene constructed by at least one frame each, and the number of statistical characteristics is calculated for use in And used in various scenes, and encoding parameters to encode the input number. Here, the number of statistical characteristics is calculated by totalizing the size and distribution of the motion vector existing in each frame of each signal, and the parameters that are encoded include at least the frame rate In addition to the total distribution of the moving direction distribution in each frame of each scene as a statistical characteristic quantity, when obtaining the input of -6- this paper size applies the Chinese National Standard (CNS) A4 specification (210 X 297 Mm) 502542 A7 B7

%%%修正I 五、發明説明(4) (請先閲讀背面之注意事項再填寫本頁) 視訊中物體之移動時,可從移動向量之大小及分佈及根據 所使用攝影機之移動來分類訊框爲諸形式,藉此根據該等 訊框之形式來分類場景,且可就該等場景之分類來產生編 碼參數。 若以巨集區塊爲單元之量化寬度產生爲編碼參數時, 在將編碼之訊框的巨集區塊中之一巨集區塊的量化寬度會 具有亮度變化相異於毗鄰巨集區塊之亮度變化不小於預定 値且其中存在物體邊緣之巨集區塊的量化寬度相較於其他 巨集區塊之量化寬度可製成相當地小。 根據本發明,在此方式中,使用於編碼輸入視頻信號 之編碼參數係根據用於各場景之輸入視頻信號所計算之統 計特性數量來產生以用於各場景,藉此可防止訊框速率免 於當物體之移動或攝影機之移動啓動時降低,及防止所解 碼之視頻的目視品質劣化。 經濟部智慧財產局員工消費合作社印製 進一步地,根據視頻中之物體移動,攝影機移動及類 以者的視頻特性數量係反射於根據其會改變訊框速率或改 變量化寬度以用於各巨集區塊的編碼參數上,藉此可取得 統一用於各場景之具有相同數目之所產生位元的良好解碼 視頻。 此外,本發明可應用於視頻編碼設備以用於兩次或多 次地編碼相同視頻檔案之輸入視頻信號,亦即,根據用於 各場景之輸入視頻信號所計算之統計特性數量,輸入視頻 信號利用用於各場景所產生之第一編碼參數來解碼以確定 是否第一編碼法之結果所產生之碼串所產生的位元數目超 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) -7 - 502542 A7 B7 9k\27修正 年月曰π 、 補无 五、發明説明(5) 過或低於位元的目標數目,該第一編碼參數根據確定之結 果作修正’藉此提供第二編碼參數,該第二編碼參數係利 用弟一編碼爹數而執行於輸入視頻信號,藉此產生碼串, 而該碼串係輸出爲編碼之輸出。 例如可發現到,雖然一直監看著所產生位元之數目, 但會修正如上述所產生之編碼參數,且重複兩次或多次之 編碼’藉此可貫現㈣獲得良好解碼視訊及不大於位元目標 數目之資料大小的編碼法。 本發明之額外目的及優點將敘述於隨後的說明書中, 且在某些部分將呈明顯於該說明或可藉實施本發明而習得 ,本發明之該等目的及優點可利用下文所特定指出之手段 及組合予以實現及取得。 圖式簡單說明 結合於部分規格中及建構該等規格,且一起與上述大 致說明及下文較佳實施例之詳細說明來描繪本發明目前較 佳實施例的附圖,作用爲解說本發明之原理。 第1圖係方塊圖,顯示根據本發明一實施例中之視頻 編碼設備之結構; 第2圖顯示根據場景內容之視頻編碼的實例,用於描 述該實施例之輪廓; 第3圖係流程圖,顯不該實施例中之編碼處理程序; 第4圖係流程圖,顯示該實施例中用於場景畫分之處 理程序; I---------批衣----^--、玎------^ (請先閱讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 本紙張尺度適用中國國家標準(CNS ) Α4規格(210Χ297公釐) -8- 502542 A7 B7 ,V〗修正 铜无 五、發明説明(6) 第5圖係解說圖,用於確定作成該實施例中場景晝分 之場景限定的確定操作; (請先閲讀背面之注意事項再填寫本頁) 第6圖係解說圖,用於該實施例中快閃訊框之確定操 作; 第7圖係解說圖,用於根據該實施例中之移動向量的 訊框形成分類; 第8圖係解說圖,用於確定該實施例中飛蚊雜訊傾向 於發生之微塊; 第9圖係解說圖,用於確定該實施例中邊緣存在之微 塊;以及 第1 0圖顯示採用其中儲存用於執行根據本發明視頻 編碼之程式的記錄媒體之電腦設備。 元件對照表 1 〇 〇 :輸入之視頻信號 經濟部智慧財產局員工消費合作社印製 10:編碼器部 11:訊框記憶體 1 0 1 :視頻信號 1 2 :減法器 19:移動補償預測器 1 〇 9 預測信號 102:預測誤差信號 1 3 :離散餘弦變換器 1 4 :量化器 -9- 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 502542 瞽^12 7修正 A7 B7 年月日/ 補充 五、發明説明(1) 103:DCT係數資料 2 0 :可變長度編碼器 (請先閱讀背面之注意事項再填寫本頁) 1 5 :解量化器 1 0 5 :所解量化之D C T係數資料 1 6 :反餘弦變換器 1 0 6 :輸出 1 7 :加法器 1 0 7 :局部解碼信號 18:視頻記憶體 110:預測模式/移動向量資訊 1 0 4 :所量化之D C T係數資料 1 1 1 :可變長度碼之碼流(編碼位元流) 3 1 :視頻特性計算器 3 2 :編碼參數產生器 3 3 :編碼位元數目確定部 3 4 :編碼參數修正器 1 3 0 :視頻特性量 經濟部智慧財產局員工消費合作社印製 131:編碼參數 2 1 :緩衝器 133:所產生位元之數目 1 3 4 :.目標位元數目 1 3 6 :所修正之編碼參數 2 0 0 :編碼之輸出 210:個人電腦 -10- 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 502542 Α7 Β7Modification of %%% I V. Description of the invention (4) (Please read the precautions on the back before filling in this page) When moving the object in the video, you can classify the information from the size and distribution of the motion vector and according to the movement of the camera used The frames are in various forms, whereby scenes are classified according to the form of the frames, and encoding parameters may be generated based on the classification of the scenes. If a quantization width using a macro block as a unit is generated as an encoding parameter, the quantization width of one of the macro blocks in the macro block of the encoded frame will have a brightness change different from that of an adjacent macro block. The quantization width of the macroblock whose brightness change is not less than a predetermined value and the edge of the object is relatively small compared with the quantization width of other macroblocks. According to the present invention, in this manner, the encoding parameters used to encode the input video signal are generated for each scene based on the number of statistical characteristics calculated for the input video signal for each scene, thereby preventing the frame rate from being exempted. Reduce when the movement of the object or the movement of the camera is activated, and prevent the visual quality of the decoded video from deteriorating. Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs. Further, according to the movement of objects in the video, the number of camera movements and similar video characteristics are reflected in the frame rate or the quantization width for each macro. With respect to the coding parameters of the block, a good decoded video with the same number of generated bits uniformly used in each scene can be obtained. In addition, the present invention can be applied to a video encoding device for encoding an input video signal of the same video file two or more times, that is, an input video signal based on the number of statistical characteristics calculated based on the input video signal used for each scene. The first encoding parameter generated for each scene is used to decode to determine whether the number of bits generated by the code string generated by the result of the first encoding method exceeds the paper size. The Chinese National Standard (CNS) A4 specification (210X297) (Centi) -7-502542 A7 B7 9k \ 27 amended year and month π, complemented by five, the description of the invention (5) the number of targets over or below the bit, the first encoding parameter is modified according to the determined results' A second encoding parameter is provided. The second encoding parameter is performed on the input video signal by using the first encoding number, thereby generating a code string, and the code string is output as a coded output. For example, it can be found that although the number of generated bits has been monitored, the encoding parameters generated as described above will be modified, and the encoding is repeated two or more times, thereby achieving good decoding video and no Encoding method for data size larger than the number of bit targets. Additional objects and advantages of the present invention will be described in the following description, and in some parts will be apparent from the description or can be learned by implementing the present invention, and these objects and advantages of the present invention can be utilized as specified below Means and combinations to achieve and obtain. The drawings are briefly explained in combination with some specifications and constructing these specifications, and together with the above general description and the detailed description of the preferred embodiments below, the drawings depicting the present preferred embodiments of the present invention are used to explain the principle of the present invention. . Fig. 1 is a block diagram showing the structure of a video encoding device according to an embodiment of the present invention; Fig. 2 is an example of video encoding according to scene content for describing the outline of the embodiment; Fig. 3 is a flowchart Shows the encoding processing program in this embodiment; Figure 4 is a flowchart showing the processing program used for scene drawing in this embodiment; I --------- batch clothes ^^ -、 玎 ------ ^ (Please read the precautions on the back before filling out this page) Printed by the Intellectual Property Bureau Staff Consumer Cooperatives of the Ministry of Economic Affairs This paper is printed in accordance with China National Standard (CNS) Α4 specification (210 × 297 mm) ) -8- 502542 A7 B7, V〗 Corrected copper no. 5. Description of the invention (6) Figure 5 is an explanatory diagram used to determine the determination of the daytime and daylight limit in this embodiment; (Please read the back first Please note this page to fill in this page) Figure 6 is an explanatory diagram used to determine the flash frame in this embodiment; Figure 7 is an explanatory diagram used to form a frame based on the motion vector in this embodiment Classification; Figure 8 is an explanatory diagram for determining the noise inclination of flying mosquitoes in this embodiment. Fig. 9 is an illustration of microblocks; Fig. 9 is an explanatory diagram for determining the existence of microblocks at the edges in this embodiment; and Fig. 10 shows the use of a recording medium storing therein a program for performing a video encoding according to the present invention. Computer equipment. Component comparison table 1 00: Input video signal Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 10: Encoder 11: Frame memory 1 0 1: Video signal 1 2: Subtractor 19: Motion compensation predictor 1 〇9 Prediction signal 102: Prediction error signal 1 3: Discrete cosine transformer 1 4: Quantizer-9- This paper size applies Chinese National Standard (CNS) A4 specification (210X297 mm) 502542 瞽 ^ 12 7 Amend A7 B7 years Month / Supplement V. Explanation of the invention (1) 103: DCT coefficient data 2 0: Variable length encoder (please read the precautions on the back before filling this page) 1 5: Dequantizer 1 0 5: Dequantized Data of DCT coefficients 16: Inverse cosine transformer 1 0 6: Output 1 7: Adder 1 0 7: Local decoded signal 18: Video memory 110: Prediction mode / motion vector information 1 0 4: Quantized DCT coefficient Data 1 1 1: Variable length code stream (encoded bit stream) 3 1: Video characteristics calculator 3 2: Encoding parameter generator 3 3: Encoding bit number determining unit 3 4: Encoding parameter corrector 1 3 0: Printed by the Consumer Property Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs 131: Encoding parameter 2 1: Buffer 133: Number of generated bits 1 3 4: Number of target bits 1 3 6: Corrected encoding parameter 2 0 0: Output of encoding 210: Personal computer -10- Paper size applies to Chinese National Standard (CNS) A4 (210X297 mm) 502542 Α7 Β7

五、發明説明(8)V. Description of the invention (8)

2 1 1 : C P U (讀先閲讀背面之注意事項再填寫本頁) 212:主記憶體 213:顯示器 214:HDD/IF 215:硬碟 216: CD — ROM驅動器 217 - CD-ROM 2 1 8 : P C卡片 219:PC卡片讀取器 發明詳細說明 本發明之實施例將參照附圖說明於下文中。 經濟部智慧財產局員工消費合作社印製 第Ί圖係方塊圖,顯示根據本發明一實施例中之視頻 編碼設備之結構。如該圖中所示,輸入視頻信號1 〇 〇係 藉諸如能重複地重現相同信號之數位式v T R或D V D系 統之視頻記錄/重現設備所重現之視頻信號,該信號 1 0 0係輸入至編碼器部1 0之內。在此實施例中,該編 碼器1 0在結構上係相同於根據Μ P E G設計之視頻編碼 設備。 在編碼器部1 0之中,選取自輸入視頻信號1 0 0之 將編碼訊框的視頻信號首先儲存於訊框記憶體1 1之中, 讀取自訊框記憶體1 1之將編碼訊框的視頻信號輸入至減 法器1 2及移動補償預測器1 9之內,該移動補償預測器 1 9含有移動向量偵測器於其內而藉完成移動補償預測來 本紙張尺度適用中國國家標準(CNS ) Α4規格(210X297公釐) -11 - 502542 A7 B7 年月日a ^ 補充 一— '................ - 五、發明説明(9) 產生預測信號1 0 9。 (請先閱讀背面之注意事項再填寫本頁) 有三種形式之圖像當作將編碼之訊框,亦即,I圖像 ,P圖像及B圖像。若將編碼之訊框爲I圖像時,移動補 償預測器1 9並不偵測向量而輸出0當作預測信號1 0 9 ;若將編碼之訊框爲P圖像或B圖像時,預測器1 9會偵 測來自將編碼訊框之視頻信號1 0 1之各巨集區塊的移動 向量及產生預測信號1 0 9。 移動向量係以將編碼訊框之視頻信號1 0 1與由已編 碼且儲存在視頻記憶體1 8中之訊框的局部解碼信號所組 成之參考圖像信號間之巨集區塊爲單元予以偵測。特定地 ,會偵測出具有與將編碼訊框之圖像信號1 0 1的巨集區 塊最高相關之參考圖像信號的巨集區塊,藉此偵測出指示 從參考圖像信號之巨集區塊之視頻信號1 〇 1的巨集區塊 已移動之資訊當作移動向量。 經濟部智慧財產局員工消費合作社印製 移動補償預測器1 9利用此移動向量來完成參考圖像 信號之移動補償,及產生預測信號1 〇 9,亦即,實際上 該移動補償預測器1 9選取較佳之預測模式自訊框間預測 模式與其中編碼將編碼訊框之視頻信號1 〇 1的訊框內編 碼模式(其中預測信號=〇 ),及產生相對應於所選取預 測模式之預測信號1 〇 9。 減法器1 2會取得將編碼訊框之視頻信號1 〇 1與來 自移動補償預測器1 9之預測信號1 0 9間之差異及產生 預測誤差信號1 〇 2,此預測誤差信號1 0 2係藉離散餘 弦變換器1 3以某一大小之塊爲單位而接受離散餘弦變換 本紙張尺度適用中國國家標準(CNS ) A4規格(210X 297公釐) -12 - 502542 91· m修正 A7 B7 I # 日:μ 士 、 補无 五、發明説明(1)3 (D C Τ ),藉離散餘弦變換所獲得之D C Τ係數資料 1 0 3係由量化器1 4加以量化,由該量化器1 4所量化 (請先閱讀背面之注意事項再填寫本頁) 之D C Τ係數資料1 〇 3分支爲兩部分,亦即,一係輸入 於可變長度編碼器2 0之內而另一則藉解量化器1 5予以 解量化,進一步地,所解量化之D C Τ係數資料1 〇 5藉 反餘弦變換器1 6而接受反離散餘弦變換(反D C Τ )。 來自反離散餘弦變換器1 6之輸出1 0 6藉加法器 1 7而添加於預測信號1 〇 9,藉此提供局部解碼信號 1 0 7且儲存於視頻記憶體1 8作爲參考圖像信號,儲存 在視頻記憶體1 8中之參考圖像信號藉移動補償預測器 1 9予以讀取及執行移動補償訊框間預測。 指示移動補償預測模式及移動向量之預測模式/移動 向量資訊1 1 0亦輸出自移動補償預測器1 9及輸入至可 變長度編碼器2 0之內,可變長度編碼器2 0執行可變長 度編碼法於所量化之D C Τ係數資料1 〇 4及預測模式/ 移動向量資訊1 1 0,及輸出所獲得之可變長度碼之碼流 (將在下文中稱爲“編碼之位元流” )1 1 1 ,該編碼之 經濟部智慧財產局員工消費合作社印製 位元流1 1 1暫時地儲存於緩衝器2 1之中。 在此實施例中,相同的視頻檔案,亦即,諸如電影之 相同內容的輸入視頻信號係根據上述基本操作而編碼兩次 。進一步地,.在此實施例中,提供了視頻特性計算器3 1 ,編碼參數產生器3 2,編碼位元數目確定部3 3及編碼 參數修正器3 4。在第一次編碼期間,會計算視頻特性數 量且根據所計算之視頻特性數量來設定編碼參數;在第二 13 本紙張尺度適用中國國家標準(CNS ) Α4規格(210Χ297公釐) 502542 舛· I 27赛π: 年月ω?Τ;Γ 補允 經濟部智慧財產局員工消費合作社印製 (請先閱讀背面之注意事項再填寫本頁) 五、發明説明(1> 次編碼期間,則會確定編碼 元的數目,且根據所產生之 數。 也就是說,在第一次編 係在輸入到訊框記憶體1 1 3 1之內。在該計算器3 1 量(將在下文中稱爲“視頻 予以詳述之視頻特性數量1 入視頻信號1 0 0之個別訊 而獲得之統計特性數量。爲 有在亮度中突然改變之訊框 之兩連續訊框間之相異値, 定的超前訊框。稍後,移動 ,亮度及色度之變化,以及 1 0 0以用於各訊框,及將 獲得各場景之特性數量的代 〇 藉此所計算之用於各場 資訊會輸入到編碼參數產生 3 2產生編碼參數以執行編 器1 2 0中之編碼位元流1 用者所指定之大小。藉施加 予以描述之編碼參數產生方 此處所取得之編碼參數1 3 位元流1 1 1所產生之編碼位 編碼位元的數目供修正編碼參 碼期間,來源視頻信號1 0 0 內之前輸入至視頻特性計算器 中,係計算視頻之統計特性數 特性數量”),例如將在稍後 3 0藉總計至少個別場景之輸 框中之移動向量的大小及分布 計算視頻特性數量1 3 0,具 係偵測自輸入視頻信號1 〇 〇 所偵測之訊框係設定爲場景限 向量之數目,其分佈,其大小 類以物會計算自輸入視頻信號 它們平均以用於各場景,藉此 表値當作視頻特性數量1 3 0 景之視頻特性數量1 3 0上的 器3 2之內,編碼參數產生器 碼,使得產生於可變長度編碼 1 1之資料大小可呈不大於使 視頻特性數量1 3 0於稍後將 程式會產生編碼參數1 3 1 , 1係訊框速率F R及量化寬度 -14- 本紙張尺度適用中國國家標準(CNS ) Α4規格(210X297公釐) 502542 A7 B7 铜尤 五、發明説明(作 Q P 〇 (請先閲讀背面之注意事項再填寫本頁) 在第一次編碼中,將編碼之訊框的視頻信號1 0 1根 據該編碼參數產生器3 2所產生之訊框速率F R之値而選 取自輸入之視頻信號1 0 0,且儲存於訊框記憶體1 1之 中,若此訊框爲I圖像,諸如在場景限定處之圖像時,則 不執行移動向量之偵測而執行訊框內編碼;若其係P圖像 或B圖像時,則根據移動補償預測來執行訊框間編碼。 此外,在訊框內編碼及訊框間編碼之任一場景中,輸 出自離散餘弦變換器1 3之D C T係數資料1 0 3會藉量 化器1 4根據由編碼參數產生器3 2所產生以用於各場景 之量化寬度Q P予以量化,所量化之D C T係數資料 1 0 4及預測模式/移動向量資訊1 1 0則藉方才所述之 可變長度編碼器2 0加以編碼而與量化寬度Q P上之資訊 結合而輸出至緩衝器2 1當作編碼位元流。 當第一編碼結束時,編碼位元數目確定部3 3會確定 儲存於緩衝器2 1中之編碼位元流1 1 1所產生位元 1 3 3的數目。根據該確定結果,由編碼參數產生器3 2 所產生之編碼參數會藉編碼參數修正器3 4予以修正。 經濟部智慧財產局員工消費合作社印製 也就是說,若編碼位元數目確定部3 3確定所產生位 元1 3 3之數目與由使用者所指定之位元目標數目間之差 異超過臨限値時,編碼參數修正器3 4會修正編碼參數使 得所產生位元之數目133更接近目標位元數目134 ; 第二編碼係根據修正之編碼參數1 3 6來執行,若所產生 位元之數目1 3 3與目標位元數目1 3 4間之差異呈不大 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) -15 - 502542 A7 B7 91· 27 修正 年月Q,、二、 猶无 五、發明説明(作 (請先閲讀背面之注意事項再填寫本頁) 於臨限値以作爲該第二編碼之結果時,則緩衝器2 1中所 儲存之編碼位元流會輸出當作編碼輸出2 0 0,該編碼輸 出2 0 0係供給到傳輸線或儲存於儲存媒體之中。 在此實施例之視頻編碼設備中,藉上述視頻特性數量 計算器3 1所計算之視頻特性數量1 3 0係一指示各場景 上之圖像之移動有多活動性及該圖像有多細微之値’此數 量係反應於該編碼參數產生器3 2所產生之編碼參數 1 3 1上或反應於編碼參數修正器3 4所修正之編碼參數 1 3 6上,而接著執行編碼。 結果,如第2圖中所示,編碼可根據適用於各場景之 內容的編碼參數(訊框速率及量化寬度)予以執行,亦即 ,在具有較少移動之場景(j )之上,在個別訊框中之巨 集區塊之中,訊框速率係設定低而量化寬度會改變以獲得 1 相當細微的視頻,藉此可防止目視注意力趨於付出之諸如 物體或附加對白之地區中視頻之劣化。 經濟部智慧財產局員工消費合作社印製 相反地,在具有活動性移動之場景(j + 1 )上,會 增加視頻速率及量化寬度,藉此取得具有相當地自然之移 動的解碼視頻。若增加量化寬度時,解碼之視頻會呈更粗 糙,然而該視頻之粗糙度在具有活動性移動之場景上並未 如此顯著,故可予以忽視。 將利用第3圖中所示之流程圖來描述此實施例中之視 頻編碼設備的處理程序。 首先,輸入視頻信號1 0 0 (在步驟S 1 1中)及計 算如上述之各場景視頻之統計特性數量的視頻特性數量( 16 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 502542 A7 B7 91. a. jr 補充 五、發明説明(你 (請先閲讀背面之注意事項再填寫本頁) 在步驟s 1 2中),此視頻特性數量計算步驟S 1 2含有 三個處理,亦即,場景晝分,特性數量計算及場景分類於 此實施例中。 接著,產生編碼參數(在步驟S 1 3中),此編碼參 數產生步驟S 1 3含有四個處理,亦即,訊框速率計算, 量化寬度計算,訊框速率調整及量化寬度設定以用於各巨 集區塊。 之後,視頻信號根據所產生之編碼參數編碼(在步驟 S14中)’此編碼步驟S14之處理相同於方才在上文 所述者。 當第一編碼結束於編碼步驟S 1 4中之時,編碼位元 數目之確定,亦即,關於是否所產生位元數目與目標位元 數目間之差異不大於臨限値之確定會完成(在步驟SJ 5 中)。 經濟部智慧財產局員工消費合作社印製 若編碼位元數目計算步驟S 1 5之確定結果顯示所產 生位元數目與目標位元數目間之差異超過臨限値時,則修 正編碼參數以使所產生位元數目與目標位元數目間之差異 變窄(在步驟S16中)。在步驟S16中,執行第二編 碼。 若編碼位元數目計算步驟S 1 5之確定結果顯示所產 生位元數目與目標位元數目間之差異不大於臨限値時,則 輸出編碼步驟S 1 4中所獲得之編碼位元流以作爲編碼輸 出資料(在步驟S 1 7中)。因此,可只執行編碼法一次 或兩次或多次。 -17- 本紙張尺度適用中國國家標準(CNS ) A4規格(21〇X297公釐) 502542 A7 B7 年月 五、發明説明(作 (請先閱讀背面之注意事項再填寫本頁) 接著,將更詳細地給定說明於此實施例之特徵元件: 視頻特性計算器3 1 ’編碼參數產生器3 2,編碼位元數 目確定部3 3及編碼參數修正器3 4之處理。 視頻特性計算器3 1首先晝分視頻信號爲場景,計算 特性數量,以及最後分類場景,如下文所述。 場景書分 輸入視頻信號1 0 0係根據除了諸如閃光燈所變白之 訊框及雜訊訊框外之毗鄰訊框間之差異而畫分爲複數個場 景,此處例如變白訊框表示新聞節目上之會晤場景,此訊 框具有諸如閃光(頻閃閃光)發出之瞬間突然增加亮度, 雜訊訊框則表示其中圖像由於攝影機之振動或類似者而大 大地劣化之訊框。當參閱第4圖之流程圖以及第5及6圖 時,將描述該場景畫分之具體實例。 經濟部智慧財產局員工消費合作社印製 首先,計算第i個訊框與第(i + 1 )個訊框間亮度 中之差異値(下文中稱爲“訊框間差異”在步驟 S 2 1中),比較訊框間之差異與使用者所預部之某一臨 限値Thre (在步驟S 2 2中),若比較結果顯示訊框間差 異低於臨限値Thre時,則視i爲i = i + 1 (在步驟 S 2 3中)而處理回到步驟S 2 1。 若第i個訊框與第(i + 1 )個訊框間之差異不小於 臨限値Thre時,則計算第(i + 1 )個訊框與第(i + 2 )個訊框間差異(在步驟S 2 4中),如步驟S 2 2之例 中’此差異係與臨限値Thre相比較(在步驟S 2 5中)。 -18- 本紙張尺度適用中國國家標準(CNS ) Α4規格(210Χ297公釐) 502542 A7 B7 五、發明説明(伯 (請先閲讀背面之注意事項再填寫本頁) 若在步驟S 2 5中之比較結果顯示該差異不小於臨限 値Thre,亦即,若第i個訊框與第(i + 1 )個訊框間之 差異及第(i + 1 )個訊框與第(i + 2 )個訊框間之差 異兩者均不小於臨限値Thre時,則判斷第i個訊框與第( i + 1 )個訊框屬於不同場景且第(i + 1 )個訊框界定 場景,亦即,設定第i個訊框爲場景之結束訊框而設定第 (i + ]_ )個通框爲場景之超則訊框。 相反地,若在步驟S 2 5中之比較結果顯示訊框間差 異低於臨限値Thre,亦即,若第i個訊框與第(i + 1 ) 個訊框間之差異及第(i + 1 )個訊框與第(i + 2 )個 訊框間之差異兩者均低於臨限値Thre時,則判斷爲例如第 6圖中所示之第(i + 1 )個訊框係由於閃光燈而爲變白 訊框(或雜訊訊框),第i ,(i + Ι)及(i+2)個 訊框屬於相同場景,而第(i + 1 )個訊框並非界定場景 者,且視i爲i = i + 2 (在步驟S 2 6中),接著,該 處理回到步驟S21。 經濟部智慧財產局員工消費合作社印製 同樣地,有關具有許多由於閃光燈而變白之訊框的圖 像及類似者,當有k個連續閃光訊框時,可採用下列方法 以防止誤判變白之訊框爲界定場景之訊框。 亦即,若第i個訊框與第(i + 1 ) ,( i + 2 ), .........(i + k )個訊框間差異分別地不小於臨限値Thre 時’且第i個訊框與第(i + k + 1 )個訊框間差異不小 於臨限値Thre時,則判斷第i個訊框與第(i + 1 )個訊 框屬於不同場景而第(i +丨)個訊框爲界定場景之訊框 -19- 本紙張尺度適用中國國家標準(CNS ) Α4規格(210X 297公釐) 502542 A7 B7 91, α. ώΊ-{άι τρ 年月日bn 彌兄 五、發明説明(你 〇 同時,若第i個訊框與第(i + 1 ) ,( i + 2 ), (請先閲讀背面之注意事項再填寫本頁) .........(i + k )個訊框間差異分別地不小於臨限値Thre 時’且第i個訊框與第(i + k + 1 )個訊框間差異低於 臨限値Thre時,則判斷第(i + 1 ) ,( i + 2 )....... …,(i + k )與(i + k + 1 )個訊框爲變白訊框或雜 訊訊框而第i ..........( i + k ) ,( i + k + 1 )個訊 框屬於相同場景,所以,並不視第(i + 1 )個訊框爲界 定場景。 \較佳地,使用者可預先地確定及設定是否如上述之連 續的變白訊框或雜訊訊框爲涉及界定場景之訊框。 特性數暈計算 : 經濟部智慧財產局員工消贤合作社印製 接著,計算諸如其中移動向量存在(移動向量之數目 不爲零(0))之訊框中之巨集區塊數目,移動向量之大 小平均値,及亮度及色度之變化的視頻特性數量以用於輸 入視頻信號1 0 0之所有訊框,此處之特性數量只計算用 於除了已確定在上述場景畫分中當作界定場景之訊框,閃 光訊框及雜訊訊框之訊框外的訊框;進一步地,該特性數 量係平均以用於場景晝分所確定之場景,而設定該平均値 爲各場景之特性數量的代表値。 場景分類 在此實施例中,下文之場景分類係利用除了上述場景 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) -20 - 502542 A7 B7 91· 6· 27 年月Η ί;.正補充 五、發明説明(作 畫分及特性數量計算之外的移動向量予以執行。 (請先閲讀背面之注意事項再填寫本頁) 在計算個別訊框之移動向量之後,會獲得移動向量之 分佈,及分類諸場景。特定地,計算一訊框中之移動向量 的分佈且檢查各訊框屬於第7A,7B,7C,7D或 7 E圖中所示之何種形式。 第7 A圖:移動向量幾乎不存在訊框中(其中移動向 量之數目不爲零(0 )之巨集區塊的數目不大於Mm i η )〇 第7 Β圖:在相同方向中及相同大小的移動向量係分 佈於整個圖像平面上(其中移動向量呈現之巨集區塊數目 並不小於M m a X且大小及方向二者均涵蓋於若干範圍內 )。 第7 C圖:移動向量僅出現於訊框中之特定部分中( 其中移動向量出現之巨集區塊位置集中於某些部分)。 第7 D圖:移動向量係放射狀地分佈於訊框中。 第7 E圖:在訊框中之移動向量的數目大而移動向量 之方向並不均句。 經濟部智慧財產局員工消費合作社印製 弟7 A至7 E圖中所7^之場景係密切地相關於當取得 輸入視頻信號1 0 0或物體之移動於所捕獲之圖像中之時 所使用之攝影機之移動,也就是說,在第7 A圖之場景中 ,攝影機及物體係靜止的,在第7 B圖之場景中,攝影機 作成平移,在第7 C圖之場景中,物體係移動於靜止之背 景中,在第7D圖之場景中,攝影機正在變焦距中,在第 7 E圖之場景中,攝影機與物體二者在移動中。 -21 - 本紙張尺度適用中國國家標準(CNS ) Α4規格(210Χ297公釐) 502542 A7 B7 Λ ,修正 五、發明説明(Φ 接著,在執行有關各訊框屬於上述第7 A ’ 7 B ’ ----受.-- (請先閲讀背面之注意事項再填寫本頁) 7 C,7 D或7 E圖中所示之何種式形之分類後’其訊框 係如上述地分類之場景根據該等訊框之形式來分類’亦即 ,確定個別訊框屬於第7A,7B,7C,7D或7E圖 中所示之何種形式訊框。利用場景分類之確定結果(建構 各場景之訊框形式)及如上述所計算之特性數量’編碼參 數產生器3 2會確定訊框速率及量化寬度而作爲如下文之 用於各場景之編碼參數。 編碼參數產生器3 2會依序地計算訊框速率及量化寬 度,如下文所示,且修正所計算之訊框速率及量化寬度。 此外,編碼參數產生器3 2會執行用以改變各巨集區塊之 量化寬度之處理。 訊框速率計笪 經濟部智慧財產局員工消費合作社印製 首先,編碼參數產生器3 2確定訊框速率,假設特性 計算器3 1計算移動向量之代表値爲方才所述之用於各場 景之特性數量之代表値,例如第j個場景之移動向量之代 表値Μ V n u m _ j係有關如下一方程式中所示之具有移 動於場景上之巨集區塊的平均數目,亦即,假如其中移動 向量的數目不爲零(〇)之巨集區塊數目爲MVnum_ (i )時,則代表値Μ V n u m _ ( j )係表示如下: (Μ V n u m _ j )=(第(j )個場景中所含之所 有訊框之MVnum(i)的平均値)x (常數乘數)··· ......(1 ) 本紙張尺度適用中國國家標準(CNS ) A4規格(210X 297公釐) -22 - 502542 .:1 Λ., 一t广 A7 B7 j / 捕无 五、發明説明(2)0 利用第(j )個場景之移動向量代表値Μ V n u m _ j ’則第〗個場景之訊框速率F R ( j )可使用下一方程 式來計算: (請先閲讀背面之注意事項再填寫本頁) FR ( j ) = axMVnum _ j + b + w _ FR··· ......(2 ) 在方程式(2 )中,及上j系用於使用者所指定之位 元速率或資料大小之係數,以及w — F R爲將於稍後描述 之權値參數。 s亥方程式(2 )意指若在場景上之移動向量代表値 Μ V n u m 一 j大時,亦即,移動更活化時,則設定訊框 .速率更高。 在訊框或其密度中之移動向量大小的絕對總和可使用 來取代訊框中之移動向量以作爲移動向量代表値 Μ V n u m _ j 〇 量化寬度計算 經濟部智慧財產局員工消費合作社印製 在如上述地計算各場景之訊框速率之後,計算量化寬 度以用於各場景。如訊框速率F R ( j )之場景中,用於 第(j )場景之量化寬度QP ( j )係藉下一方程式予以 計算而利用該場景上之移動向量代表値Μ V n u m _ j : QP (j) = cxMVnum _ j+d+w _ QP … ......(3 ) 在方程式(3 )之中,i及1係用於使用者所指定之 位元速率或資料大小之係數,以及w Q P係將於稍後描 -23- 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 502542 A7 B7 91. 6. 21 年月日 補充 五、發明説明(2)1 述之權値參數。 該方程式(3 )意指若移動向量代表値MV n um_ j較高時,則設定量化寬度Q P ( j )更大,亦即,該量 化寬度在具有活化移動之場景上係更大。相反地,該量化 寬度係設定更小在具有較少活化移動之場景上,藉此使圖 像更淸晰。 經濟部智慧財產局員工消費合作社印製 訊框速率及量化竄度之修正 在如上述地計算各場景之訊框速率 權値參數w _ F R及w _ Q P分別地添 及(3 ),以及訊框速率及量化寬度利 算器3 1中之“場景分類”之處理所獲 (建構各場景之訊框形式)予以修正。 也就是說,若場景分類結果相對應 乎不存在於訊框中之第7 A圖之場景, 度會降低(權値參數w_FR及w_Q 若相對應於第7 B圖之場景時,訊框速 加使得攝影機之移動不會呈現不自然而 權値參數w_F R及w— Q P二者均增 之場景中,若移動物體之移動,亦即, 大時,則修正訊框速率(權値參數w _ 7 D圖之場景中,雖然攝影機變焦,但 ,量化寬度設定大而訊框速率則盡可能 二者均增加); F R ( j )之後, 加於方程式(2 ) 用視頻特性數量計 得的場景分類結果 於其中 訊框速 P二者 率會盡 量化寬 加); 移動向 F R增 呈較少 大地增 在第7 移動向量幾 率及量化寬 均增加); 可能大地增 度會增加( 在第7 C圖 量之大小係 加);在第 注意於物體 加(權値參 E圖之場景 (請先閱讀背面之注意事項再填寫本頁) 本紙張尺度適用中.國國家操準(CNS ) A4規格(210乂297公釐) 24- 502542 年月hj A7 B7 ίκ Zl -r V .省·, 、 補无 五、發明説明(本 中,訊框速率及量化寬度二者均增加(權値參數w _ F R 及W — Q P二者均增加。 藉分別地添加所設定之權値參數w — F R及w — Q P 於方程式(2 )及(3 ),會修正訊框速率及量化寬度。 在第5圖中所示之編碼處理(步驟S 1 1至S 1 5 ) 程序中,若使用者界定改變量化寬度以用於各巨集區塊時 ’已確定易於產生飛蚊雜訊於訊框中之巨集區塊或已確定 具有諸如對白字符之強烈邊緣的量化寬度係設定比其他巨 集區塊之量化寬度更小,藉此部分地改善圖像品質。 此處,將描述一種藉方程式(5)進一步地修正用於 (請先閲讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 各該4個巨集區塊,若 化之區塊係相互毗鄰且 發生,亦即,若單調紋 ,則飛蚊雜訊易於發生。 具有小亮度變化之區塊 則前者區塊之量化寬度 之量化寬度QP ( j ) 發生之區塊的量化寬度 大,藉此會預防所產生 量之寬度Q P ( j )的方法。至於將編碼 區塊係進一步地畫分爲4個區塊且亮度變 各場景所獲得之 之訊框,各巨集 化係計算以用於 塊及具有小的變 則飛蚊雜訊易於 雜紋理之區塊時 考慮此,若 變化之區塊時, 產生爲編碼參數 定飛蚊雜訊不易 度Q P ( j )·更 具有大的變化之區 量化寬度係大時, 理之區塊毗鄰於複 毗鄰於具有大亮度 設定小於如上述之 。相反地,其中確 係設定比該量化寬 位元之數目的增加 例如,假設在第j個訊框之第(m )個巨集區塊具有 4個小區塊,在此例中,如第8圖中所示,若有小區塊滿 -25 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 502542 Α7 Β72 1 1: CPU (Read the precautions on the back before filling this page) 212: Main memory 213: Display 214: HDD / IF 215: Hard disk 216: CD — ROM drive 217-CD-ROM 2 1 8: PC Card 219: PC Card Reader Detailed Description of the Invention Embodiments of the present invention will be described below with reference to the drawings. Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs. The first diagram is a block diagram showing the structure of a video encoding device according to an embodiment of the present invention. As shown in the figure, the input video signal 100 is a video signal reproduced by a video recording / reproducing device such as a digital v TR or DVD system capable of repeatedly reproducing the same signal. The signal 1 0 0 Input to the encoder section 10. In this embodiment, the encoder 10 is structurally the same as a video encoding device designed based on MPG. In the encoder section 10, the video signal of the encoded frame selected from the input video signal 100 is first stored in the frame memory 11 and the encoded signal read from the frame memory 11 is read. The video signal of the frame is input into the subtractor 12 and the motion compensation predictor 19, which contains a motion vector detector therein. By completing the motion compensation prediction, the Chinese standard is applied to this paper scale. (CNS) Α4 specification (210X297 mm) -11-502542 A7 B7 year a day a ^ Supplement I-'......-V. Description of the invention (9) Produced Prediction signal 1 0 9. (Please read the notes on the back before filling out this page) There are three types of images that are used as frames for encoding, that is, I images, P images, and B images. If the coded frame is an I picture, the motion-compensated predictor 19 does not detect the vector and outputs 0 as the prediction signal 1 0 9; if the coded frame is a P picture or a B picture, The predictor 19 will detect the motion vector from each macroblock of the video signal 1 0 1 of the encoded frame and generate a prediction signal 1 0 9. The motion vector is based on a macro block between the video signal 1 0 1 of the encoded frame and the reference image signal composed of the locally decoded signal of the frame that has been encoded and stored in the video memory 18. Detect. Specifically, a macro block having a reference image signal having the highest correlation with the macro block of the image signal of the encoded frame 1 0 1 is detected, thereby detecting an instruction from the reference image signal. Video signal of macro block 101 The information that the macro block has been moved is regarded as a movement vector. The Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs printed a motion compensation predictor 19 to use this motion vector to complete the motion compensation of the reference image signal and generate a prediction signal 1 09, that is, the motion compensation predictor 19 actually Select a better prediction mode from the inter-frame prediction mode and the intra-frame encoding mode (where the prediction signal = 0) of the video signal 1 01 to be encoded, and generate a prediction signal corresponding to the selected prediction mode 1 〇9. The subtractor 12 will obtain the difference between the video signal 1 〇1 of the encoded frame and the prediction signal 1 0 9 from the motion-compensated predictor 19 and generate a prediction error signal 1 〇2. This prediction error signal 1 0 2 is The discrete cosine converter is used to accept the discrete cosine transform in units of a certain size. The paper size applies the Chinese National Standard (CNS) A4 specification (210X 297 mm) -12-502542 91 · m amendment A7 B7 I # Day: μ person, no more than five, invention description (1) 3 (DC T), the DC T coefficient data obtained by discrete cosine transform 1 0 3 is quantized by the quantizer 1 4 by the quantizer 14 The quantization (please read the notes on the back and then fill out this page) of the DC T coefficient data 1 03 is divided into two parts, that is, one is input into the variable-length encoder 20 and the other is de-quantizer 15 is dequantized, and further, the dequantized DC T coefficient data 1 05 receives an inverse discrete cosine transform (inverse DC T) by using an inverse cosine transformer 16. The output 10 from the inverse discrete cosine transformer 16 is added to the prediction signal 10 by the adder 17, thereby providing a locally decoded signal 107 and stored in the video memory 18 as a reference image signal. The reference image signal stored in the video memory 18 is read by the motion-compensated predictor 19 and the motion-compensated inter-frame prediction is performed. Indication of motion compensation prediction mode and motion vector prediction mode / motion vector information 1 1 0 is also output from the motion compensation predictor 19 and input to the variable length encoder 2 0, and the variable length encoder 2 0 performs variable The length encoding method outputs the code stream of the variable length code obtained from the quantized DC T coefficient data 1 04 and the prediction mode / motion vector information 1 10 (to be referred to as "encoded bit stream" hereinafter). ) 1 1 1, the coded bit stream 1 1 1 printed by the employee's consumer cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs is temporarily stored in the buffer 2 1. In this embodiment, the same video file, that is, the input video signal of the same content such as a movie is encoded twice according to the basic operation described above. Further, in this embodiment, a video characteristic calculator 3 1, an encoding parameter generator 32, an encoding bit number determining section 33, and an encoding parameter corrector 34 are provided. During the first encoding, the number of video characteristics is calculated and the encoding parameters are set according to the calculated number of video characteristics. In the second 13th paper standard, the Chinese National Standard (CNS) A4 specification (210 × 297 mm) 502542 舛 · I 27 π: Year ω? Τ; Γ Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs (please read the precautions on the back before filling out this page) 5. Description of the invention (1 > The number of code elements, and according to the number generated. That is, in the first series, it is inputted into the frame memory 1 1 3 1. In this calculator, 3 1 (which will be referred to as " The number of video characteristics detailed in the video 1 The number of statistical characteristics obtained by entering the individual signals of the video signal 1 0 0. The difference is between two consecutive frames with frames that suddenly change in brightness. Later, the movement, changes in brightness and chroma, and 100 are used for each frame, and the number of characteristics of each scene will be obtained. The calculated information for each field will be input to the code. Parameter generation 3 2 Generate encoding parameters to execute the encoding bit stream 1 in the editor 1 2 0 The size specified by the user. By applying the encoding parameter described by the encoding parameter generator obtained here 1 3 bit stream 1 1 1 generated The number of encoding bits is used to modify the encoding parameter during the input of the source video signal to the video characteristics calculator within 1 0 0, which is used to calculate the statistical characteristics of the video. ”) For example, it will be 3 0 later. Calculate the number of video characteristics by totaling the size and distribution of the motion vector in the input frame of at least individual scenes. 1 3 0, which is detected from the input video signal 1 0 0. The detected frame is set to the number of scene limit vectors. Its distribution, its size, etc. are calculated from the input video signals and they are averaged for each scene, so that the table is regarded as the number of video characteristics 1 3 0 within the number of video characteristics 1 3 0 3, The encoding parameter generator code, so that the data size generated from the variable-length encoding 1 1 can be no larger than the number of video features 1 3 0. The program will generate encoding parameters 1 3 1 at a later time. 1 is the frame rate FR and amount. Width -14- This paper size applies Chinese National Standard (CNS) A4 specification (210X297 mm) 502542 A7 B7 Copper in particular V. Invention description (for QP 〇 (Please read the notes on the back before filling this page) In one encoding, the video signal 1 0 of the encoded frame is selected from the input video signal 1 0 0 according to the frame rate FR generated by the encoding parameter generator 3 2 and stored in the frame memory. In Body 11 if the frame is an I picture, such as an image at a scene limit, the in-frame encoding is performed without detecting the motion vector; if it is a P picture or a B picture , The inter-frame coding is performed according to the motion compensation prediction. In addition, in any scene of intra-frame coding and inter-frame coding, the DCT coefficient data 1 0 3 output from the discrete cosine transformer 13 will be generated by the quantizer 1 4 according to the encoding parameter generator 3 2. The quantization width QP used for each scene is quantized. The quantized DCT coefficient data 1 0 4 and the prediction mode / moving vector information 1 1 0 are encoded by the variable-length encoder 20 described in the previous paragraph and quantized width QP. The above information is combined and output to the buffer 21 as an encoded bit stream. When the first encoding is completed, the encoding bit number determining section 33 determines the number of bits 1 3 3 generated from the encoded bit stream 1 1 1 stored in the buffer 21. According to the determination result, the encoding parameters generated by the encoding parameter generator 32 are corrected by the encoding parameter modifier 34. Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs. That is, if the number of coded bit determining unit 3 3 determines that the number of generated bits 1 3 3 and the number of bit targets specified by the user exceed the threshold In a short time, the encoding parameter modifier 34 will modify the encoding parameters so that the number of generated bits 133 is closer to the number of target bits 134; the second encoding is performed according to the modified encoding parameters 1 36. The difference between the number 1 3 3 and the number of target bits 1 3 4 is not large. The paper size applies the Chinese National Standard (CNS) A4 specification (210X297 mm) -15-502542 A7 B7 91 · 27 Amend the year and month Q ,, II. Nothing V. Description of the invention (for (please read the notes on the back before filling this page) When the threshold is used as the result of the second encoding, the encoded bit stream stored in the buffer 21 The output will be regarded as the coded output 200, which is supplied to the transmission line or stored in the storage medium. In the video encoding device of this embodiment, it is calculated by the above-mentioned video characteristic quantity calculator 31. Number of video features 1 3 0 is an indication of how active the image moves on each scene and how subtle the image is. This number is reflected on the encoding parameter 1 3 1 generated by the encoding parameter generator 3 2 or Respond to the encoding parameters modified by the encoding parameter modifier 34, and then perform encoding. As a result, as shown in Figure 2, the encoding can be based on the encoding parameters (frame rate and Quantization width) is performed, that is, on a scene (j) with less movement, among macro blocks in individual frames, the frame rate is set low and the quantization width is changed to obtain 1 equivalent Subtle videos to prevent deterioration of video in areas where visual attention tends to pay, such as objects or additional dialogue. Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs, in contrast, in scenes with active movement (j + 1), the video rate and quantization width will be increased to obtain a decoded video with a fairly natural movement. If the quantization width is increased, the decoded video will be rougher, but the roughness of the video It is not so prominent in the scene with active movement, so it can be ignored. The flowchart shown in Figure 3 will be used to describe the processing procedure of the video encoding device in this embodiment. First, the input video signal 1 0 0 (in step S 1 1) and the number of video characteristics to calculate the number of statistical characteristics of each scene video as described above (16 This paper size applies the Chinese National Standard (CNS) A4 specification (210X297 mm) 502542 A7 B7 91. a jr Supplement V. Description of the invention (you (please read the notes on the back before filling this page) in step s 1 2), this video feature quantity calculation step S 1 2 contains three processes, that is, the scene is daylight The feature quantity calculation and scene classification are in this embodiment. Next, encoding parameters are generated (in step S 1 3). This encoding parameter generation step S 1 3 contains four processes, that is, frame rate calculation, quantization width calculation, frame rate adjustment, and quantization width setting for Macro blocks. After that, the video signal is coded according to the generated coding parameters (in step S14). The processing of this coding step S14 is the same as that described above. When the first encoding ends in the encoding step S 1 4, the determination of the number of encoding bits, that is, the determination as to whether the difference between the number of generated bits and the number of target bits is not greater than the threshold value will be completed ( In step SJ 5). Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs. If the result of the determination of the number of coded bits S 1 5 shows that the difference between the number of generated bits and the number of target bits exceeds the threshold, then the coding parameters are modified so that all The difference between the number of generated bits and the number of target bits becomes narrower (in step S16). In step S16, the second encoding is performed. If the result of the determination of the number of encoding bits S 1 5 shows that the difference between the number of generated bits and the number of target bits is not greater than the threshold, then the encoded bit stream obtained in the encoding step S 1 4 is output to The data is output as code (in step S 1 7). Therefore, the encoding method can be performed only once or twice or more. -17- This paper size is in accordance with Chinese National Standard (CNS) A4 specification (21 × 297 mm) 502542 A7 B7 5th, invention description (for (please read the precautions on the back before filling this page) Then, we will change The characteristic elements described in this embodiment are given in detail: the processing of the video characteristic calculator 3 1 ′ encoding parameter generator 3 2, the number of encoding bit determination sections 3 3, and the encoding parameter corrector 34 4. Video characteristics calculator 3 1 First the daytime video signal is the scene, calculate the number of characteristics, and finally classify the scene, as described below. The scene book divides the input video signal 1 0 0 according to the other than the frame and noise frame such as the flash whitening. Adjacent to the differences between the frames, the picture is divided into multiple scenes. Here, for example, a white frame represents a meeting scene on a news program. This frame has a sudden increase in brightness such as the flash (strobe light) when it is emitted. The frame indicates a frame in which the image is greatly deteriorated due to the vibration of the camera or the like. When referring to the flowchart in FIG. 4 and FIGS. 5 and 6, the specific actuality of the scene will be described. Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs First, calculate the difference in brightness between the i-th frame and the (i + 1) -th frame 値 (hereinafter referred to as "difference between frames" in step S 2 1), compare the difference between frames with a threshold 値 Thre preset by the user (in step S 2 2), if the comparison shows that the difference between frames is lower than the threshold 値 Thre, then i is i = i + 1 (in step S 2 3) and the process returns to step S 2 1. If the difference between the i-th frame and the (i + 1) -th frame is not less than the threshold 値 Thre , Then calculate the difference between the (i + 1) th frame and the (i + 2) th frame (in step S 2 4), as in the example of step S 2 2 'this difference is related to the threshold 値 Thre Compare (in step S 2 5). -18- This paper size applies the Chinese National Standard (CNS) A4 specification (210 × 297 mm) 502542 A7 B7 V. Description of the invention (Bo (please read the precautions on the back before filling in) (This page) If the comparison result in step S 2 5 shows that the difference is not less than the threshold 値 Thre, that is, if the difference between the i-th frame and the (i + 1) -th frame And the difference between the (i + 1) frame and the (i + 2) frame is not less than the threshold 値 Thre, it is judged that the i frame and the (i + 1) frame The frames belong to different scenes and the (i + 1) frame defines the scene, that is, the i frame is set as the end frame of the scene and the (i +] _) pass frame is set as the super message of the scene. Conversely, if the comparison result in step S 2 5 shows that the difference between the frames is lower than the threshold 値 Thre, that is, if the difference between the i-th frame and the (i + 1) -th frame and When the difference between the (i + 1) th frame and the (i + 2) th frame are both lower than the threshold 値 Thre, it is determined that the (i + 1) Each frame is a white frame (or noise frame) due to the flash. The i, (i + Ι) and (i + 2) frames belong to the same scene, and the (i + 1) frame The frame is not a person who defines a scene, and i is regarded as i = i + 2 (in step S 2 6), and then the process returns to step S21. Printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs. Similarly, for images with many frames that have turned white due to flash and the like, when there are k consecutive flash frames, the following methods can be used to prevent misjudgment to turn white The frame is the frame that defines the scene. That is, if the difference between the i-th frame and the (i + 1), (i + 2), ... (i + k) frames is not less than the threshold 値 Thre Time 'and the difference between the i-th frame and the (i + k + 1) frame is not less than the threshold 値 Thre, it is judged that the i-th frame and the (i + 1) frame belong to different scenes The (i + 丨) frame is the frame that defines the scene-19- This paper size applies the Chinese National Standard (CNS) A4 specification (210X 297 mm) 502542 A7 B7 91, α. ΏΊ- {άι τρ Year Month and day bn Brother V. Invention description (you 〇 At the same time, if the i frame and (i + 1), (i + 2), please read the precautions on the back before filling this page) ... ... the difference between (i + k) frames is not less than the threshold 时 Thre 'and the difference between the i frame and (i + k + 1) frame is below the threshold When 値 Thre, it is judged that the (i + 1), (i + 2) ........., (i + k) and (i + k + 1) frames are white frames or miscellaneous frames. Frame (i + k), (i + k + 1) frames belong to the same scene, so the (i + 1) frame is not considered To define the scene. \ Preferably, the user can pre-determine and set whether the continuous whitening frame or noise frame as described above is the frame related to the defined scene. Characteristic number halo calculation: Intellectual Property Bureau of the Ministry of Economic Affairs Printed by the employee co-operative cooperative. Next, calculate the number of macroblocks in the frame where the motion vector exists (the number of motion vectors is not zero (0)), the average size of the motion vector, and the luminance and chrominance. The number of changed video characteristics is used for all frames of the input video signal 1 0 0, and the number of characteristics here is only calculated for the frames, flash frames, and noise except those that have been determined to define the scene in the above scene points. The frame outside the frame of the message frame; further, the number of characteristics is averaged for the scene determined by the daytime of the scene, and the average is set as the representative number of characteristics of each scene. Scene classification is implemented here In the example, the following scene classification uses the paper standard in addition to the above scenes to apply the Chinese National Standard (CNS) A4 specification (210X297 mm) -20-502542 A7 B7 91 · 6 · 27 months Η 正; Fifth, the description of the invention (movement vectors other than drawing points and calculation of the number of characteristics will be implemented. (Please read the precautions on the back before filling this page) After calculating the motion vectors of individual frames, you will get the distribution of the motion vectors And classify the scenes. Specifically, calculate the distribution of the motion vectors in a frame and check whether each frame belongs to the form shown in Figure 7A, 7B, 7C, 7D, or 7E. Figure 7A: There is almost no motion vector in the frame (where the number of macroblocks is not zero (0), the number of macroblocks is not greater than Mm i η). Figure 7B: in the same direction and the same The size of the motion vector is distributed over the entire image plane (where the number of macro blocks represented by the motion vector is not less than M ma X and both the size and direction are covered within a certain range). Figure 7C: The motion vector appears only in a specific part of the frame (where the location of the macroblock where the motion vector appears is concentrated in some parts). Figure 7D: Motion vectors are distributed radially in the frame. Figure 7E: The number of motion vectors in the frame is large and the directions of the motion vectors are not uniform. The scenes printed in Figures 7 A to 7 E by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs are closely related to the situation when the input video signal 1 0 0 is obtained or the object is moved in the captured image The movement of the used camera, that is, in the scene of Fig. 7 A, the camera and the object system are stationary. In the scene of Fig. 7 B, the camera is translated, and in the scene of Fig. 7 C, the object system Moving in a stationary background. In the scene in Figure 7D, the camera is zooming. In the scene in Figure 7E, both the camera and the object are moving. -21-This paper size applies the Chinese National Standard (CNS) A4 specification (210 × 297 mm) 502542 A7 B7 Λ, amendment V. Description of the invention (Φ Then, the relevant frames in the implementation belong to the above 7 A '7 B'- --- Receive .-- (Please read the precautions on the back before filling out this page) 7 C, 7 D or 7 E What type of classification is shown in the figure below? The frame is classified as above Scenes are classified according to the form of these frames', that is, determine which individual frames belong to the form of frames shown in Figures 7A, 7B, 7C, 7D, or 7E. Use the determination results of scene classification to construct each scene Frame format) and the number of characteristics calculated as above. The encoding parameter generator 32 will determine the frame rate and quantization width as the encoding parameters for each scene as follows. The encoding parameter generator 32 will sequentially The frame rate and quantization width are calculated as shown below, and the calculated frame rate and quantization width are modified. In addition, the encoding parameter generator 32 performs a process for changing the quantization width of each macro block. Frame rate meter: Intellectual property of the Ministry of Economic Affairs Printed by the employee consumer cooperative. First, the coding parameter generator 3 2 determines the frame rate. It is assumed that the characteristic calculator 3 1 calculates the representative of the motion vector 値 as the representative of the number of characteristics used in each scenario, such as the jth one. The representative MV V num _ j of the scene is related to the average number of macroblocks that have moved on the scene as shown in the following formula, that is, if the number of movement vectors therein is not zero (0) When the number of macroblocks is MVnum_ (i), it means that 値 M V num _ (j) is expressed as follows: (Μ V num _ j) = (of all frames included in the (j) scene) MVnum (i) average 値) x (constant multiplier) ...... (1) This paper size applies Chinese National Standard (CNS) A4 specification (210X 297 mm) -22-502542 .: 1 Λ., A wide A7 B7 j / capture no 5. Description of the invention (2) 0 Use the motion vector of the (j) scene to represent 値 V V num _ j 'then the frame rate FR of the scene j) can be calculated using the following formula: (Please read the notes on the back before filling this page) FR (j) = axMVnum _ j + b + w _ FR ··· ...... (2) In equation (2), and j are the coefficients for the bit rate or data size specified by the user, and w — FR is a weight parameter which will be described later. S Hai equation (2) means that if the motion vector on the scene represents 値 V V num-j is large, that is, when the movement is more active, the frame is set. Higher rates. The absolute sum of the size of the motion vector in the frame or its density can be used instead of the motion vector in the frame to represent the motion vector as 値 V V num _ j 〇 Quantitative width calculation After calculating the frame rate of each scene as described above, the quantization width is calculated for each scene. For example, in a scene with a frame rate FR (j), the quantization width QP (j) for the (j) scene is calculated by the next formula and the motion vector on the scene is used to represent 値 V V num _ j: QP (j) = cxMVnum _ j + d + w _ QP ...... (3) In equation (3), i and 1 are the coefficients for the bit rate or data size specified by the user , And w QP system will be described later. 23- This paper size applies the Chinese National Standard (CNS) A4 specification (210X297 mm) 502542 A7 B7 91. 6. Supplementary description on May 21, 2010 (2) 1 The right parameters described. The equation (3) means that if the motion vector represents that 値 MV n um_ j is high, the quantization width Q P (j) is set to be larger, that is, the quantization width is larger in a scene with active movement. In contrast, the quantization width is set smaller for scenes with less active movement, thereby making the image sharper. The correction of the frame rate and the quantization of the frame printed by the Consumer Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs was calculated by adding the frame rate weight parameters w_FR and w_QP of each scene as described above (3), and the information The frame rate and quantization width calculator 31 obtained by processing the "scene classification" (the frame form for constructing each scene) is corrected. In other words, if the scene classification result corresponds to the scene in Figure 7 A that does not exist in the frame, the degree will decrease (when the weight parameters w_FR and w_Q correspond to the scene in Figure 7 B, the frame speed In addition, in the scene where the camera movement does not appear unnatural and the weight parameters w_F R and w- QP both increase, if the moving object moves, that is, when it is large, the frame rate is modified (the weight parameter w _ 7 In the scene of D image, although the camera is zoomed, the quantization width is set large and the frame rate is increased as much as possible; after FR (j), it is added to equation (2). The scene classification results are as follows: the frame rate P will be as wide as possible; the direction of movement to FR will be less and the ground will increase. At the 7th, the probability of moving vectors and the quantization width will increase); 7 The size of the C figure is added); Attention must be paid to the object (the scene of the right figure in the E figure (please read the precautions on the back before filling this page). This paper is applicable. National Standards (CNS) A4 size (210 乂 297mm) 24- 50 2542 hj A7 B7 ίκ Zl -r V .Province ·, , Bu Wu Wu, Description of the invention (in this case, both the frame rate and the quantization width are increased (the weight parameters w _ FR and W — QP are both Add. By adding the set weight parameters w — FR and w — QP to equations (2) and (3) respectively, the frame rate and quantization width will be modified. The encoding process shown in Figure 5 (steps) S 1 1 to S 1 5) In the procedure, if the user defines that the quantization width is changed to be used for each macro block, the macro block that has been determined to be prone to generate mosquito noise in the frame or has been determined to have The quantization width of the strong edges of the white characters is set to be smaller than the quantization width of other macro blocks, thereby partially improving the image quality. Here, a further modification using equation (5) will be described (please first Read the notes on the back and fill in this page) The Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs printed each of the four macro blocks. If the blocks are adjacent to each other and occur, that is, if the monotonous pattern, the mosquito Noise is prone to occur. Blocks with small brightness changes The quantization width QP (j) of the former block has a large quantization width, which will prevent the generated amount of width QP (j). As for the coding block system, it is further divided into 4 The frame obtained by each block and the brightness changes for each scene. Each macro is calculated to be used for the block and the block with small changes and the mosquito noise is prone to texture. Consider this. When the encoding parameter is fixed, the mosquito noise difficulty level QP (j). The quantization width of a region with a large change is large. The logical block is adjacent to the complex and has a large brightness setting smaller than that described above. On the contrary, it is indeed set to increase the number of bits wider than the quantization width. For example, suppose that the (m) th macro block in the j-th frame has 4 small blocks. In this example, as in the 8th block, As shown in the figure, if there is a small block full of -25, the paper size is applicable to the Chinese National Standard (CNS) A4 specification (210X297 mm) 502542 Α7 Β7

五、發明説明(本 足於下列組合時: 區塊k之亮度變化>MBVai.Thre,以及 (請先閲讀背面之注意事項再填寫本頁) 毗鄰於區塊k之區塊亮度變化< MBVarThre.......(4 ),則確定該第(m )個區塊爲其中飛蚊雜訊易於發生之 巨集區塊,用於此一其中飛蚊雜訊易於發生之巨集區塊, 其量化寬度Q P ( j ) _ m係如下式地設定於低: QP (j)_m = QP (j)-ql ......... ( 5 ) 另一方面,用於其中確定飛蚊雜訊易於發生之巨集區 塊,其量化寬度係如下式地增加,藉此預防所產生位元之 數目增加: Q P ( j )—(其中雜訊較少發生之Μ B ) = Q P ( j ) + Q 2 ………(6 ) 經濟部智慧財產局員工消費合作社印製 在方程式(4 ) 1中,MBVarThre爲使用者所界定之臨 限値,在方程式(5 )中之符號Q 1及方程式(6 )中之 Q 2係正數且它們均分別地滿足Q P ( j ) _ Q 1 > (最小 量化寬度)以及QP ( j ) +q2<(最大量化寬度)。至 於上述如第7 B圖中所示之分類爲其上攝影機完成平移之 場景及如第7 D圖中所示之分類爲其上攝影機正變焦之場 景的場景,因爲其由於攝影機移動而呈現付出較少之視覺 注視於物體,故Q 1及q 2設定爲低;至於其中移動部分 集中於某一區之場景,因其呈現付出較多之視覺注視於圖 像中之物體,故q 1及Q 2設定爲高。 至於其中諸如字符之邊緣存在之巨集區塊,量化寬度 係設定小,藉此使字符部分更淸晰。特定地,如第9圖中 本紙張尺度適用中國國家標準(CNS ) Α4規格(210X297公釐) -26 - 502542 A7 B7 9i· I 27 年月Η 修 補充 五、發明説明(本 所示,邊緣加強濾波法係執行於訊框上之亮度資料以便查 驗各巨集區塊之具有高梯度密度値之像素,總計具有高梯 度密度値之像素的位置,藉此判斷具有高梯度之部分集中 之像素的巨集區塊係其中邊緣存在之巨集區塊,然後根據 該方程式(5 )設定該巨集區塊之量化寬度爲小且根據方 程式(6 )設定其他巨集區塊之量化寬度爲大。 編碼器部1 0執行相同於根據Μ P E G設計之習知視 頻編碼設備之處理。在此實施例中,第一編碼法係根據方 才在上文中所述之編碼參數產生器3 1所產生之編碼參數 予以執行,在該例中,所畫分之個別場景係在固定訊框速 率處且以固定之量化寬度遭受到基本地編碼,也就是說, 關於第(j )個場景,第一訊框(j _開始)直到最後訊 框(j _結束)係在訊框速率F R ( j )處且以量化寬度 Q P ( j )加以編碼。 然而,若該編碼參數產生器3 1執行處理以用於改變 如方才在上文中所述之各巨集區塊的量化寬度時,則編碼 法係以分別設定用於各巨集區塊之量化寬度來執行,即使 是在相同訊框中。 編碼位元數目確定部3 3比較從編碼器部1 〇所輸出 之編碼位元流1 1 1之所產生位元數目1 3 3與上述之目 標位元數目1 3 4,若所產生位元數目1 3 3與目標位元 數目1 3 4間之差異超過臨限値時,則編碼位元數目確定 部3 3會發出命令至編碼參數修正器3 4以修正該編碼參 數,在修正該編碼參數之後,編碼器部1 〇藉未圖示之系 本紙張尺度適用中.國國家標準(CNS ) A4規格(210X297公釐) -27 - " (讀先閱讀背面之注意事項再填寫本頁) 裝· 訂 經濟部智慧財產局員工消費合作社印製 502542 A7 B7 91· ti 27 年月曰 正補充 五、發明説明(Φ 統控制部加以控制以執行第二編碼法;若所產生位元 1 3 3數目並未大於目標位元1 3 4數目時,則其間差異 不會大於臨限値而該等數目會更接近於合理範圍,然後結 束第二編碼法而儲存於緩衝器2 1中之編碼位元流會供應 爲編碼輸出資料到傳輸線或儲存媒介。 該編碼參數修正器3 4修正編碼參數以回應於編碼位 元數目確定部3 3,例如若所產生位元1 3 3數目比目標 位元1 3 4數目更高時,則降低整個訊框速率,降低量化 寬度或設定所給定於量化寬度之梯度大,給定該量化寬度 之梯度易於根據訊框中巨集區塊位置諸如,設定訊框中之 中心區塊之量化寬度大及設定周邊巨集區塊之量化寬度小 來微分該量化寬度。 編碼參數之修正係藉添加權値w _ r e f F R及w _ r e f Q P於分別由編碼參數產生器3 1所產生之訊框速 率F R ( j )及量化寬度Q p ( j )而予以實現,所修正 之訊框速率F R ’ ( j )及量化寬度Q P ’ ( j )則表示 如下: FR,(j) = FR(j) + w —refFR......... ( 7 ),及 QP,⑴= QP(j) + wjefQP......... ( 8 ) 在此方式中,編碼器部1 0藉所修正之訊框速率 F R ’ ( j )及量化寬度Q P ’ ( j )而執行第二編碼法 〇 即使在結束第二編碼法之後,若殘留有關於超出臨P艮 値之此一差異於所產生位元1 3 3數目與目標位元i 3 4 本紙張尺度適用中周國家標準(CNS ) A4規格(210X297公釐) -28 - ----------券-- (請先閲讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製V. Description of the invention (this is for the following combinations: brightness change of block k> MBVai.Thre, and (please read the precautions on the back before filling this page) brightness change of the block adjacent to block k < MBVarThre ....... (4), then determine the (m) block as a macro block in which mosquito noise is prone to be used for this macro block in which mosquito noise is prone to occur A block whose quantization width QP (j) _ m is set to low as follows: QP (j) _m = QP (j) -ql ......... (5) On the other hand, it is used for Among them, it is determined that the mosquito noise is prone to occur in the macro block, and its quantization width is increased as follows, thereby preventing the number of generated bits from increasing: QP (j) — (M B where noise is less likely to occur) = QP (j) + Q 2 ……… (6) The consumer cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs is printed in Equation (4) 1, MBVarThre is the threshold defined by the user, and in Equation (5) Symbol Q 1 and Q 2 in equation (6) are positive numbers and they both satisfy QP (j) _ Q 1 > (minimum quantization width) and QP (j) + q2 < (maximum quantization width) As for the above-mentioned scenes as shown in Figure 7B, which are classified as the scene where the camera is panned, and as shown in Figure 7D, which are classified as the scenes where the camera is being zoomed, because Q1 and q2 are set to be low when the visual attention is paid to the object. As for the scene in which the moving part is concentrated in a certain area, because the visual attention paid to the object in the image, q 1 and Q 2 are set to high. For macro blocks such as the edges of characters, the quantization width is set small to make the character part clearer. Specifically, as shown in Figure 9, this paper scale applies to China Standard (CNS) Α4 specification (210X297 mm) -26-502542 A7 B7 9i · I 27th month, repair and supplement V. Description of the invention (In this case, the edge-enhancement filtering method is based on the brightness data on the frame for inspection Pixels with high gradient density in each macro block total the positions of pixels with high gradient density 总计, thereby judging that a macro block with pixels in a partial concentration with a high gradient is a giant with edges Set the block, and then set the quantization width of the macro block to be small according to the equation (5) and set the quantization width of other macro blocks to be large according to the equation (6). The encoder section 10 performs the same as according to M The processing of the conventional video encoding equipment designed by PEG. In this embodiment, the first encoding method is executed according to the encoding parameters generated by the encoding parameter generator 31 described above. In this example, all The individual scenes that are scored are at a fixed frame rate and suffer from basic encoding with a fixed quantization width, that is, for the (j) scene, the first frame (j_start) through the last frame ( j_end) is encoded at the frame rate FR (j) and with a quantization width QP (j). However, if the encoding parameter generator 31 performs processing for changing the quantization width of each macro block as described above, the encoding method is to set the quantization for each macro block separately. Width, even in the same frame. The number of encoding bits determining unit 3 3 compares the number of generated bits 1 3 1 of the encoded bit stream 1 1 1 output from the encoder unit 10 with the above-mentioned target number of bits 1 3 4. When the difference between the number 1 3 3 and the number of target bits 1 3 4 exceeds the threshold, the encoding bit number determination section 33 will issue a command to the encoding parameter modifier 34 to modify the encoding parameter, and then modify the encoding. After the parameters, the encoder section 10 is not applicable to the paper size. The national standard (CNS) A4 specification (210X297 mm) -27-" (Read the precautions on the back before filling in this page ) Printed and printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs, printed 502542 A7 B7 91 · ti, dated 27th year, supplemented by V. Invention Description (Φ Controlled by the Ministry of Control to implement the second encoding method; if bit 1 is generated When the number of 3 3 is not greater than the number of target bits 1 3 4, the difference between them will not be greater than the threshold, and the numbers will be closer to a reasonable range, and then the second encoding method is ended and stored in the buffer 2 1 The encoded bit stream is supplied as encoded output data Transmission line or storage medium. The encoding parameter corrector 34 modifies the encoding parameters in response to the encoding bit number determining section 33. For example, if the number of generated bits 1 3 3 is higher than the number of target bits 1 3 4 Reduce the overall frame rate, reduce the quantization width or set the gradient given to the quantization width. The gradient given the quantization width is easy to set according to the position of the macro block in the frame. The width is large and the quantization width of the surrounding macro block is set small to differentiate the quantization width. The correction of the encoding parameters is based on the information generated by the encoding parameter generator 3 1 by adding the weights w_ref FR and w_ref QP. The frame rate FR (j) and the quantization width Q p (j) are implemented. The modified frame rate FR ′ (j) and the quantization width QP ′ (j) are expressed as follows: FR, (j) = FR (j ) + w —refFR ......... (7), and QP, ⑴ = QP (j) + wjefQP ......... (8) In this mode, the encoder section 1 0 The second encoding method is performed with the modified frame rate FR '(j) and quantization width QP' (j). After finishing the second encoding method, if there is any difference between the number of generated bits 1 3 3 and the target bit i 3 4 if the remaining excess is exceeded, this paper size applies the Zhongzhou National Standard (CNS) A4 specification ( 210X297 mm) -28----------- coupons-(Please read the notes on the back before filling out this page) Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs

502542 A7 B7 9重· t之 年月502542 A7 B7 9t

五、發明説明(本 參數之間時,則重複第3圖中所示之步驟S 1 4至S 1 6 中之處理而修正權値W_refFR及wjefQP。當所產生位元 (請先閲讀背面之注意事項再填寫本頁) 1 3 3數目最後呈不大於目標位元13 4數目且以幾近合. 理之範圍接近於該數目時,則結束該編碼且輸出所編碼之 輸出資料2 0 0。 - 在上述實施例中,已給定執行兩次編碼之例的說明, 本發明亦可應用於其中一視頻檔案之視頻信號僅編碼一次 之一'般視頻編碼裝置中。 第1 0圖顯示一種採用其中儲存用以執行視頻編碼之 程式的儲存媒體之電腦設備。如第1 〇圖中所示,個人電 腦2 1 0包含C P U 2 1 1,主記憶體2 1 2,顯示器 213,HDD/IF214,硬碟 215 及 CD — R Ο Μ驅動器2 1 6。儲存用以執行本發明視頻編碼之程 式於其中之CD — R〇M2 1 7係安裝於CD — ROM驅 動器2 1 5之內,若該程式係透過CD -ROM驅動器 2 1 6而讀取自C D - R Ο Μ 2 1 7且傳送至主記憶體 經濟部智慧財產局員工消費合作社印製 2 1 2時’ C P u 2 1 1會執行該程式,亦即,根據第3 及4圖之流程圖來執行視頻編碼。 若使用P C卡2 1 8爲儲存媒體時,則藉配置於個人 電腦2 1 0中之P c卡讀取器2 1 9來讀取視頻編碼程式 進入主記憶體中,而C P U 2 1 1則根據該程式來執行視 頻編碼。 如i:述’根據本發明,輸入視頻信號係畫分爲暫時連 續之場景,各場景由至少一訊框所構成,計算統計特性數 本紙張尺度適用中國國家檬準(CNS ) A4規格(210X297公釐〉 -29 - 502542 91. β- 27 •仏. υ *-. 五、發明説明(本 量以用於各場景,根據該等統計特性數量來產生編碼參數 以用於各場景。藉此,訊框速率在例如具有活化移動之場 景上係設定高而使物體之移動平順,而在對白字符(重疊 字符)之邊緣周邊之易於在視頻中引人注目之量化寬度則 設定低,使圖像更淸晰。 因此,相較於取圖像中少量之物體移動及攝影機移動 之習知視頻編碼設備,本發明可獲得統一化之解碼圖像以 用於各場景。所以,本發明可獲得良好的圖像改善效應而 保持所編碼之位元速率於根據傳輸線的傳輸速率,儲存媒 體之容量或類似物所指定之値。 額外之優點及修飾將立即發生於該等熟練於本項技藝 者,因此,本發明在其較廣泛之觀點中並未受限於本文中 所顯示及所描述之特定細節及代表性實施例。因此,可作 成不同之修正而不會背離如附錄申請專利範圍及其等效者 所界定之一般發明觀念之精神或範疇。 (請先閲讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 -30 - 本紙張尺度適用中國國家標準(CNS ) A4規格(210Χ297公釐)V. Description of the invention (When between this parameter, repeat the processing in steps S 1 4 to S 1 6 shown in Figure 3 and modify the rights 値 W_refFR and wjefQP. When the generated bits (please read the back Please fill in this page again) 1 3 3 The number finally shows no more than the target bit 13 4 and the number is close. When the range of the logic is close to the number, the encoding is ended and the encoded output data is output 2 0 0 -In the above embodiment, a description has been given of an example of performing encoding twice. The present invention can also be applied to a video encoding device in which a video signal of a video file is encoded only once. Figure 10 shows A computer device using a storage medium in which a program for executing video encoding is stored. As shown in FIG. 10, the personal computer 2 1 0 includes a CPU 2 1 1, a main memory 2 1 2, a display 213, and an HDD / IF214, hard disk 215, and CD-ROM driver 2 1 6. The CD-ROM2 1 7 in which the program for executing the video encoding of the present invention is stored is installed in the CD-ROM driver 2 1 5 if The program is read from C through the CD-ROM drive 2 1 6 D-R Ο Μ 2 1 7 and sent to the Intellectual Property Bureau of the Ministry of Economic Affairs, the Intellectual Property Bureau employee consumer cooperative printed 2 1 2 'CP u 2 1 1 will execute the program, that is, according to the flow chart of Figures 3 and 4 Figure to perform video encoding. If the PC card 2 1 8 is used as the storage medium, then the PC card reader 2 19 configured in the personal computer 2 10 is used to read the video encoding program into the main memory. The CPU 2 1 1 performs video encoding according to the program. As described in the following: According to the present invention, the input video signal is divided into temporarily continuous scenes, and each scene is composed of at least one frame, and the statistical characteristics are calculated. Paper size is applicable to China National Standard for Standards (CNS) A4 (210X297 mm) -29-502542 91. β- 27 • *. Υ *-. V. Description of the invention (This quantity is for each scene, according to these statistics The number of characteristics is used to generate coding parameters for each scene. By this, the frame rate is set high on a scene with activated movement, for example, to smooth the movement of the object, and it is easy to move around the edges of the dialog characters (overlapping characters). Striking quantization width in video The setting is low to make the image clearer. Therefore, compared with the conventional video encoding device that takes a small amount of object movement and camera movement in the image, the present invention can obtain a unified decoded image for each scene. So The present invention can obtain a good image improvement effect while maintaining the encoded bit rate as specified by the transmission rate of the transmission line, the capacity of the storage medium, or the like. Additional advantages and modifications will immediately occur to these skilled As such, the present invention is, in its broader aspects, not limited to the specific details and representative embodiments shown and described herein. Therefore, different amendments can be made without departing from the spirit or scope of the general concept of invention as defined by the scope of the appended patent application and its equivalent. (Please read the precautions on the back before filling out this page) Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs -30-This paper size applies to China National Standard (CNS) A4 (210 × 297 mm)

Claims (1)

502542 Α8 Β8 C8 D8 姻尤 經濟部智慧財產局員工消費合作社印製 ^、申請專利範圍 1 1 · 一種視頻編碼方法,包含下列步驟: 畫分輸入之視頻信號爲複數個暫時連續之場景’各場 景含有至少一訊框; 對每個場景計算統計特性數量; 根據該等統計特性數量來對每個場景產生編碼參數; 以及 利用所編碼參數來編碼輸入之視頻信號。 2 ·如申請專利範圍第1項之視頻編碼方法,其中計 算統計特性數量之步驟包含計算含有其中移動向量存在之 訊框中之巨集區塊數目,移動向量之平均大小,以及亮度 及色度之變化之視頻特性數量以用於各場景之所有訊框。 3 ·如申請專利範圍第1項之視頻編碼方法,其中計 算統計特性數量之步驟包含平均各場景之特性數量以取得 平均値,以及確定該平均値爲每個場景之特性數量之代表 値,使用該代表値爲該等統計特性數量値。 4 ·如申請專利範圍第1項之視頻編碼方法,其中計 算統計特性數量之步驟包含分類該等複數個場景爲移動向 量幾乎不存在於該訊框中之第一場景,在相同方向中及具 相同大小之移動向量係分佈於整個圖像平面上之第二場景 ,移動向量係出現在訊框中之特定部分上之第三場景,移 動向量放射地分佈於訊框中之第四場景,以及許多移動向 量存在及移動向量之方向不均勻之第五場景的步驟,以及 分別地計算相對應於該第一至第五場景之特性數量之步驟 (請先閎讀背面之注意事項再填寫本頁) 訂 本紙張尺度適用中國國家標準(CNS ) Α4規格(210 X 297公釐) -31 - 502542 9!· 6.502542 Α8 Β8 C8 D8 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs, and the scope of patent application 1 1 · A video encoding method, including the following steps: The input video signal is divided into a plurality of temporarily continuous scenes' Contain at least one frame; calculate the number of statistical characteristics for each scene; generate encoding parameters for each scene according to the number of statistical characteristics; and use the encoded parameters to encode the input video signal. 2 · The video coding method according to item 1 of the scope of patent application, wherein the step of calculating the number of statistical characteristics includes calculating the number of macroblocks in the frame containing the motion vector, the average size of the motion vector, and the brightness and chrominance The number of changed video characteristics is used for all frames in each scene. 3. If the video coding method of item 1 of the scope of patent application, wherein the step of calculating the number of statistical characteristics includes averaging the number of characteristics of each scene to obtain an average value, and determining the average value as a representative value of the number of characteristics of each scene, use The representative is the number of such statistical characteristics. 4. If the video coding method of item 1 of the scope of patent application, wherein the step of calculating the number of statistical characteristics includes classifying the plurality of scenes as the first scene in which the motion vector hardly exists in the frame, the Motion vectors of the same size are distributed in the second scene across the entire image plane, motion vectors are the third scene appearing on a specific part of the frame, and motion vectors are radially distributed in the fourth scene in the frame, and Many steps of the fifth scene where the motion vector exists and the direction of the movement vector is uneven, and the steps of separately calculating the number of characteristics corresponding to the first to fifth scenes (please read the precautions on the back before filling this page) ) The size of the paper used in the edition is in accordance with the Chinese National Standard (CNS) A4 (210 X 297 mm) -31-502542 9! · 6. 六、申請專利範圍 2 5 .如申請專利範圍第1項之視頻編碼方法,其中計 算統計特性數量之步驟包含以來自輸入視頻信號之訊框間 之差異來偵測具有在亮度上陡峭改變之特定訊框,而設定 該特定訊框爲定界限場景上之超前訊框;計算含有移動向 量數目,其分佈’其大小’及亮度及色度之變化之特性數 量;平均各場景之特性數量來取得平均値;以及確定該平 均値爲各場景之特性數量之代表値’使用該代表値爲統計 特性數量。 6 .如申請專利範圍第1項之視頻編碼方法,其中計 算統計特性數量之步驟包含場景畫分步驟,其中若第i個 訊框與第(i + Ι)個,(i+2)個至(i+k)個訊 框間之訊框間差異値分別地不小於臨限値,以及第i個訊 :框與第(i + k + 1 )個訊框間之訊框間差異値不小於該 臨限値時,則確定該第i個訊框及該第(i + 1 )個訊框 屬於不同場景而該第(i + 1 )個訊框係定界限場景之訊 框;以及若第i個訊框與第(i + 1 ).個,(i + 2 )個 至(i + k )個訊框間之訊框間差異値分別地不小於臨限 値,以及第i個訊框與第(i + k + 1 )個訊框間之訊框 間差異値小於該臨限値時,則確定該第i個訊框與該第( i + 1 )個訊框屬於相同場景而該第(i + 1 )個訊框並 非定界限場景之訊框。 7 ·如申請專利範圍第1項之視頻編碼方法,其中產 生編碼參數之步驟包含根據該等視頻特性數量來確定訊框 速率及量化寬度;以及利用所確定之訊框大小及量化階梯 本紙張尺度適用中國國家標準(CNS ) A4規格(21〇X29<7公釐) (請先聞讀背面之注意事項再填寫本頁) C. 訂 經濟部智慧財產局員工消費合作社印製 -32- 5025426. The scope of patent application 25. The video coding method according to item 1 of the scope of patent application, wherein the step of calculating the number of statistical characteristics includes detecting the difference between the frames from the input video signal to detect a specific change with a sharp change in brightness. Frame, and the specific frame is set as a leading frame on a defined scene; the number of characteristics including the number of motion vectors, its distribution 'its size', and changes in brightness and chroma are calculated; the number of characteristics of each scene is averaged to obtain An average frame; and determine that the average frame is a representative of the number of characteristics of each scene; use the representative frame as the statistical characteristic number. 6. The video coding method according to item 1 of the scope of patent application, wherein the step of calculating the number of statistical characteristics includes a scene drawing sub-step, wherein if the i-th frame and the (i + Ι), (i + 2) to The frame-to-frame difference between (i + k) frames (respectively not less than the threshold), and the frame-to-frame difference between frame (i + k + 1) and frame (i + k + 1) When it is less than the threshold threshold, it is determined that the i-th frame and the (i + 1) -th frame belong to different scenes and the (i + 1) -th frame is a frame of a defined scene; and The difference between the i-th frame and the (i + 1) .th frame, (i + 2) to (i + k) -th frame, respectively, is not less than the threshold, and the i-th frame When the difference between the frame and the (i + k + 1) frame is smaller than the threshold, it is determined that the i frame and the (i + 1) frame belong to the same scene and The (i + 1) frame is not a frame of a definitive scene. 7 · The video coding method according to item 1 of the patent application scope, wherein the step of generating coding parameters includes determining a frame rate and a quantization width based on the number of these video characteristics; and using the determined frame size and quantization step paper size Applicable to China National Standard (CNS) A4 specification (21 × 29 < 7 mm) (Please read the notes on the back before filling out this page) C. Order printed by the Intellectual Property Bureau Employee Consumer Cooperative of the Ministry of Economic Affairs-32- 502542 經濟部智慧財產局員工消費合作社印製 A8 B8 C8 D8 六、申請專利範圍 3 大小爲該等編碼參數。 8 .如申請專利範圍第1項之視頻編碼方法,其中編 碼輸入信號之步驟含有根據產生編碼參數之步驟中每產生 之訊框速率來選擇將編碼訊框自該輸入視頻信號/之步驟, 若將編碼訊框係I圖像來定界限場景,則不執行移動向量 偵測而是執行訊框內編碼;以及若將編碼訊框係P圖像及 B圖像之一時,則根據移動補償預測來執行訊框內編碼。 9 ·如申請專利範圍第1項之視頻編碼方法,其中編 碼步驟包含根據編碼參數所執行之第一編碼及根據所編碼 參數來執行之第二編碼,當該第一編碼結束時,會確定所 產生位元數目相對於目標位元數目之超過或短少,編碼參 數係根據確定結果來修正,以及當所產生位元數目與目標 位元數目間之差異呈不大於臨限値而當作第二編碼之結果 時,則輸出所編碼之輸出資料。 1 〇 ·如申請專利範圍第1項之視頻編碼方法,其中 產生編碼參數之步驟包含計算訊框速率,計算量化寬度, 調整訊框速率及設定量化寬度以用於各巨集區塊。 1 1 . 一種視頻編碼方法,包含下列步驟: 第一步驟,畫分輸入之視頻信號爲複數個暫時連續之 場景,各場景含有至少一訊框; 第二步驟,計算統計特性數量以用於各該等場景’該 統計特性數量之計算係總計每個場景中之存在於每個訊框 之輸入視頻信號之移動向量之至少其大小以及分佈; 第三步驟,根據該第二步驟中所計算之統計特性數量 本紙張尺度適用中國國家標準(CNS ) A4規格(210 X 297公釐) -33 - (請先閲讀背面之注意事項再填寫本頁)Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs A8 B8 C8 D8 VI. Scope of patent application 3 The size is these coding parameters. 8. The video encoding method according to item 1 of the scope of patent application, wherein the step of encoding the input signal includes a step of selecting the encoding frame from the input video signal according to each frame rate generated in the step of generating the encoding parameters, if If the encoding frame is an I-picture to determine the limit scene, the motion vector detection is not performed but the in-frame encoding is performed; and if the encoding frame is one of the P-picture and the B-picture, the motion compensation prediction is used. To perform in-frame encoding. 9 · If the video coding method according to item 1 of the patent application scope, wherein the coding step includes the first coding performed according to the coding parameters and the second coding performed according to the coding parameters, when the first coding ends, The number of generated bits is more or less than the number of target bits. The coding parameters are modified according to the determination result. When the difference between the number of generated bits and the number of target bits is not greater than the threshold, it is regarded as the second. When the result is encoded, the encoded output data is output. 1 〇 The video coding method according to item 1 of the scope of patent application, wherein the steps of generating the coding parameters include calculating the frame rate, calculating the quantization width, adjusting the frame rate, and setting the quantization width for each macro block. 1 1. A video encoding method includes the following steps: The first step is to divide the input video signal into a plurality of temporarily continuous scenes, and each scene contains at least one frame; the second step is to calculate the number of statistical characteristics for each For these scenes, the number of statistical characteristics is calculated by summing at least the size and distribution of the motion vectors of the input video signals present in each frame in each scene; the third step is based on the calculated in the second step The number of statistical characteristics This paper size applies Chinese National Standard (CNS) A4 specification (210 X 297 mm) -33-(Please read the precautions on the back before filling this page) 502542502542 A8 B8 C8 D8 六、申請專利範圍 4 來產生第一編碼參數以用於各場景; (請先閲讀背面之注意事項再填寫本頁) 第四步驟’利用第一編碼參數來編碼輸入之視頻信號 以產生碼串; 第五步驟,確定該第四步驟中所產生碼串之所產生位 元數目相對於目標位元數目之超過或短少; 第六步驟,根據第五步驟中確定出係爲超過或短少之 結果來修正第一編碼參數以取得第二編碼參數; 第七步驟,利用該第二編碼參數來編碼輸入之視頻信 號以產生碼串;以及 第八步驟,輸出該第七步驟中所產生之碼串當作編碼 之輸出資料。 1 2 . —種視頻編碼設備,包含: 特性數量計算部,建構以晝分輸入之視頻信號爲複數 個暫時連續之場景,各場景由至少一訊框所構成,.且計算 各場景之統計特性數量; 編碼參數產生部,根據該特性數暈計算部所計算之該 等統計特性數量來產生編碼參數以用於各該等場景;以及 經濟部智慧財產局員工消費合作社印製 編碼部,建構以利用該等編碼參數來編碼該輸入之視 頻信號。 1 3 ·如申請專利範圍第1 2項之視頻編碼設備,其 中該特性數量計算部含有一部,該部係建構以總計將設定 爲該等統計特性數量之存在於各場景之輸入視頻信號之各 訊框中的移動向量之至少大小及分佈。 1 4 .如申請專利範圍第1 2項之視頻編碼設備,其 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) 502542 A8 B8 C8 D8 91. 2? 年 λ 一 ill .•補充 六、申請專利範圍 5 中該編碼參數產生部含有產生器,該產生器係建構以產生 至少訊框速率及量化寬度以作爲編碼參數。 1 5 _如申請專利範圍第1 2項之視頻編碼設備,其 中該特性數量計算部含有一部,該部係建構以總計將設定 爲該等統計特性數量之存在於輸入視頻信號各訊框中之移 動向量之至少大小及分佈;以及一部,該部係建構當取得 輸入視頻信號及視頻中之物體移動時根據所使用之攝影機 之移動而從移動向量之大小及分佈來分類諸訊框爲諸形式 ,藉此根據該等訊框之形式來分類複數之場景;以及 該編碼參數產生部含有一部,該部係建構以根據該等 場景之分類來產生編碼參數。 1 6 · —種視頻編碼設備,包含: 特性數量計算部,建構以畫分輸入之視頻信號爲複數 個暫時連續之場景,各場景由至少一訊框所構成,且計算 各場景之統計特性數量; 編碼參數產生部,根據該特性數暈計算部所計算之該 等統計特性數量來產生每個場景之第一編碼參數; 編碼部,經建構以利用該第一編碼參數或利用係修正 自該第一編碼參數之第二編碼參數(兩者之一)來編碼該 輸入之視頻信號,藉此產生碼串; 確定部,建構以確定當編碼部根據第一編碼參數來編 碼該輸入視頻信號時所產生之碼串產生位元之數目相對於 目年示位兀數目之超過或短少; 編碼參數修正部,建構以根據該確定部之確定結果來 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) (請先閱讀背面之注意事項再填寫本頁) 钉 經濟部智慧財產局員工消費合作社印製 -35- 502542 年 Α8 Β8 C8 D8 六、申請專利範圍 β 6 修正第一編碼參數,用以取得第二編碼參數;以及 (請先閲讀背面之注意事項再填寫本頁) 輸出部,建構以輸出當該編碼部根據該等第二編碼參 數來編碼該輸入之視頻信號時所產生之碼串當作編碼之輸 出。 1 7 .如申請專利範圍第1 6項之視頻編碼設備,其 中該特性數量計算部含有一部,該部係建構以總計將設定 爲該等統計特性數量之存在於各場景之輸入視頻信號之各 訊框中的移動向量之至少大小及分佈。 1 8 ·如申請專利範圍第1 6項之視頻編碼設備,其 中該編碼參數產生部含有一部,該部係建構以產生至少訊 框速率及量化寬度以作爲編碼參數。 1 9 .如申請專利範圍第1 6項之視頻編碼設備,其 中該特性數量計算部含有一部,該部係建構以總計將設定 爲該等統計特性數量之存在於輸入視頻信號各訊框中之移 動向量之至少大小及分佈;以及一部,該部係建構當取得 輸入視頻信號及視頻中之物體移動時根據所使用之攝影機 之移動而從移動向量之大小及分佈來分類諸訊框爲諸形式 經濟部智慧財產局員工消費合作社印製 ,藉此根據該等訊框之形式來分類複數之場景;以及 該編碼參數產生部含有一部,該部係建構以根據該等 場景之分類來產生編碼參數。 2 〇 .如申請專利範圍第1 6項之視頻編碼設備,其 中該編碼參數產生部包含一部,該部係建構使該編碼部所 編碼之訊框中之巨集區塊中的一巨集區塊之量化寬度具有 亮度變化相異於毗鄰巨集區塊之亮度變化不少於預定値, 本紙張尺度適用中國國家標準(CNS ) Α4規格(210Χ297公釐) 502542A8 B8 C8 D8 6. Apply for patent scope 4 to generate the first encoding parameter for each scene; (Please read the precautions on the back before filling this page) Step 4 'Use the first encoding parameter to encode the input video signal To generate a code string; in a fifth step, determining whether the number of generated bits of the code string generated in the fourth step is more or less than the number of target bits; in the sixth step, it is determined that the number of bits exceeds the Or a short result to modify the first encoding parameter to obtain the second encoding parameter; a seventh step, using the second encoding parameter to encode the input video signal to generate a code string; and an eighth step, outputting the information in the seventh step The generated code string is used as the encoded output data. 1 2. A video encoding device, including: a feature quantity calculation section, which constructs a plurality of temporarily continuous scenes using a video signal input by daytime, each scene is composed of at least one frame, and calculates the statistical characteristics of each scene Quantity; the encoding parameter generation unit generates encoding parameters for each of these scenarios based on the number of statistical characteristics calculated by the characteristic data halo calculation unit; and the printing department of the employee's consumer cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs constructs The encoding parameters are used to encode the input video signal. 1 3 · If the video coding device according to item 12 of the patent application scope, wherein the characteristic quantity calculation section includes a section, the section is constructed to total the input video signals in each scene that will be set to the number of these statistical characteristics. At least the size and distribution of motion vectors in each frame. 1 4. If the video coding device in the scope of patent application No. 12 is applied, the paper size of this paper applies the Chinese National Standard (CNS) A4 specification (210X297 mm) 502542 A8 B8 C8 D8 91. 2? Year λ a ill. • Supplement 6. In the patent application scope 5, the encoding parameter generating section includes a generator configured to generate at least a frame rate and a quantization width as encoding parameters. 1 5 _If the video coding device of item No. 12 of the scope of patent application, the characteristic quantity calculation section includes a section, which is constructed to total the number of characteristics that are set to these statistical characteristics in the input video signal frame At least the size and distribution of the motion vector; and a part that classifies the frames from the size and distribution of the motion vector based on the movement of the camera used when the input video signal and the object in the video are moved Various forms to classify plural scenes according to the form of the frames; and the encoding parameter generation section includes a section configured to generate encoding parameters according to the classification of the scenes. 1 6 · —A video encoding device, including: a feature quantity calculation section, which constructs a plurality of temporarily continuous scenes based on the video signal input by the score, each scene is composed of at least one frame, and calculates the number of statistical features of each scene A coding parameter generating unit that generates a first coding parameter for each scene based on the number of statistical characteristics calculated by the characteristic number halo calculation unit; the coding unit is constructed to use the first coding parameter or to modify the A second encoding parameter (one of the two) of the first encoding parameter to encode the input video signal, thereby generating a code string; a determining unit configured to determine when the encoding unit encodes the input video signal according to the first encoding parameter The number of bits generated by the generated code string is more or less than the number of displayed bits in the year; the coding parameter correction section is constructed to apply the Chinese National Standard (CNS) A4 specification to this paper standard according to the determination result of the determination section (210X297 mm) (Please read the precautions on the back before filling out this page) Nailed by the Consumers ’Cooperative of the Intellectual Property Bureau of the Ministry of Economic Affairs -35- 502542 A8 B8 C8 D8 VI. Patent application scope β 6 Modify the first encoding parameter to obtain the second encoding parameter; and (Please read the precautions on the back before filling this page) The output section is constructed to The output is a code string generated when the encoding section encodes the input video signal according to the second encoding parameters. 17. If the video coding device according to item 16 of the patent application scope, wherein the characteristic quantity calculation section includes a section, the section is constructed to total the input video signals of each scene that will be set as the number of statistical characteristics in each scene. At least the size and distribution of motion vectors in each frame. 18 · For a video encoding device according to item 16 of the patent application scope, wherein the encoding parameter generating section includes a section which is constructed to generate at least a frame rate and a quantization width as encoding parameters. 19. If the video encoding device according to item 16 of the patent application scope, wherein the characteristic quantity calculation section includes a section, the section is constructed to total the number of the statistical characteristics that are set to exist in each frame of the input video signal. At least the size and distribution of the motion vector; and a part that classifies the frames from the size and distribution of the motion vector based on the movement of the camera used when the input video signal and the object in the video are moved Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economics in various forms to classify plural scenes based on the form of these frames; and the encoding parameter generation section contains a section that is constructed to classify the scenes based on the classification Generate encoding parameters. 2 〇. The video coding device according to item 16 of the patent application scope, wherein the coding parameter generating section includes a section which constructs a macro in a macro block of a frame encoded by the coding section. The quantized width of the block has a brightness change that is different from the brightness change of the adjacent macro block not less than the predetermined value. This paper size applies the Chinese National Standard (CNS) A4 specification (210 × 297 mm) 502542 經濟部智慧財產局員工消費合作社印製 !9i ^ C8 I D8 L____六、申請專利範圍 7 且其中物體邊緣存在之巨集區塊的量寬度比其他巨集區塊 之量化寬度更小。 2 1 · —種儲存程式之記錄媒體,包含 指令,用於指示電腦畫分輸入之視頻信號爲複數個暫 時連續之場景,.各場景含有至少一訊框,且計算各場景之 統計特性數量,該統計特性數量之計算係藉由總計每個場 景中之存在於每個訊框之輸入視頻信號之移動向量之至少 其大小以及分佈; 指令,用於指示該電腦根據該等統計特性數量來產生 編碼參數以用於各該等場景;以及 指令,用於指示該電腦利用該等編碼參數來編碼該輸 入之視頻信號。 22.—種儲存程式之記錄媒體,包含: 第一指令,用於指示電腦畫分輸入之視頻信號爲複數 個暫時連續之場景,各場景具有至少一訊框,且計算各場 景之統計特性數量,該統計特性數量之計算係藉由總計每 個場景中之存在於每個訊框之輸入視頻信號之移動向量之 至少其大小以及分佈; 第二指令,用於指示該電腦根據該等所計算之統計特 性數量來產生第一編碼參數以用於各該等場景; 第三指令,用於指示該電腦利用該等第一編碼參數來 編碼該輸入之視頻信號,及產生碼串; 第四指令,用於指示該電腦確定該碼串之所產生位元 數目相對於目標位元數目之超過或短少; (請先聞讀背面之注意事項再填寫本頁) 訂- 本紙張尺度適用中國國家標準(CNS ) A4規格(210X297公釐) -37- r 1 r .·/* .'··· S·'" « Λ t« - 一’-⑽ 5 91· 6* 27 年 Λ μ 502542 A8 B8 C8 D8 六、申請專利範圍 8 第五指令,用於指示該電腦根據該第四指令之電腦確 定結果來修正該等第一編碼參數,及產生第二編碼參數; 第六指令,用於指示該電腦利用該等第二編碼參數來 編碼該輸入之視頻信號,及產生碼串;以及 第七指令,.用於指示該電腦輸出根據該第六指令之藉 該電腦所產生之碼串當作編碼之輸出資料。 (請先閲讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 本紙張尺度適用中國國家標準(CNS ) Α4規格(210Χ297公釐) -38-Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs! 9i ^ C8 I D8 L____ Sixth, the scope of the patent application 7 and the macroblocks existing at the edge of the object are smaller than the quantitative widths of other macroblocks. 2 1 · — A recording medium for storing programs, including instructions for instructing the computer to input video signals into a plurality of temporarily continuous scenes. Each scene contains at least one frame, and the number of statistical characteristics of each scene is calculated. The number of statistical characteristics is calculated by summing at least the size and distribution of the motion vector of the input video signal that exists in each frame in each scene; instructions for instructing the computer to generate according to the number of statistical characteristics Encoding parameters for each of these scenarios; and instructions for instructing the computer to encode the input video signal using the encoding parameters. 22.—A recording medium for storing programs, including: a first instruction for instructing a computer to input video signals into a plurality of temporarily continuous scenes, each scene having at least one frame, and calculating the number of statistical characteristics of each scene The calculation of the number of statistical characteristics is performed by summing at least the size and distribution of the motion vector of the input video signal that exists in each frame in each scene; the second instruction is used to instruct the computer to calculate according to these calculations Generate a first encoding parameter for each of these scenarios based on the number of statistical characteristics; a third instruction for instructing the computer to use the first encoding parameter to encode the input video signal and generate a code string; a fourth instruction , Used to instruct the computer to determine whether the number of bits generated by the code string is more or less than the number of target bits; (please read the precautions on the back before filling this page) Order-This paper size applies Chinese national standards (CNS) A4 specification (210X297 mm) -37- r 1 r. · / *. '··· S ·' " «Λ t«-One'-⑽ 5 91 · 6 * 27 years Λ μ 502542 A8 B8 C8 D8 6. The scope of patent application 8 The fifth instruction is used to instruct the computer to modify the first encoding parameters and generate the second encoding parameters according to the computer determination result of the fourth instruction; the sixth instruction is used to instruct the computer to use The second encoding parameters to encode the input video signal and generate a code string; and a seventh instruction to instruct the computer to output the code string generated by the computer according to the sixth instruction as the encoded output data. (Please read the precautions on the back before filling out this page) Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs This paper applies the Chinese National Standard (CNS) Α4 specification (210 × 297 mm) -38-
TW89119075A 1999-06-07 2000-09-16 Video encoding method and video encoding apparatus TW502542B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15948199A JP2000350211A (en) 1999-06-07 1999-06-07 Method and device for encoding moving picture

Publications (1)

Publication Number Publication Date
TW502542B true TW502542B (en) 2002-09-11

Family

ID=15694723

Family Applications (1)

Application Number Title Priority Date Filing Date
TW89119075A TW502542B (en) 1999-06-07 2000-09-16 Video encoding method and video encoding apparatus

Country Status (2)

Country Link
JP (1) JP2000350211A (en)
TW (1) TW502542B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7881375B2 (en) 2002-11-25 2011-02-01 Panasonic Corporation Field/frame adaptive coding and decoding method with field/frame index and apparatus for performing the same

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6765964B1 (en) 2000-12-06 2004-07-20 Realnetworks, Inc. System and method for intracoding video data
JP3866538B2 (en) 2001-06-29 2007-01-10 株式会社東芝 Video coding method and apparatus
CN101232618B (en) * 2002-04-23 2013-03-27 诺基亚有限公司 Method and device for indicating quantizer parameters in a video coding system
JP4586328B2 (en) * 2002-12-11 2010-11-24 ソニー株式会社 Information processing system, information processing apparatus and method, recording medium, and program
JP4778343B2 (en) * 2006-03-28 2011-09-21 Necカシオモバイルコミュニケーションズ株式会社 Terminal and program having video imaging function
JP5111128B2 (en) * 2008-01-22 2012-12-26 キヤノン株式会社 Encoding apparatus, encoding apparatus control method, and computer program
JP5256803B2 (en) 2008-03-19 2013-08-07 株式会社メガチップス Transcoder
JP5039976B2 (en) * 2008-03-24 2012-10-03 株式会社メガチップス Transcoder
US9654792B2 (en) 2009-07-03 2017-05-16 Intel Corporation Methods and systems for motion vector derivation at a video decoder
US8462852B2 (en) * 2009-10-20 2013-06-11 Intel Corporation Methods and apparatus for adaptively choosing a search range for motion estimation
US8917769B2 (en) 2009-07-03 2014-12-23 Intel Corporation Methods and systems to estimate motion based on reconstructed reference frames at a video decoder
JP5583992B2 (en) 2010-03-09 2014-09-03 パナソニック株式会社 Signal processing device
WO2012083487A1 (en) 2010-12-21 2012-06-28 Intel Corporation System and method for enhanced dmvd processing
US10356405B2 (en) * 2013-11-04 2019-07-16 Integrated Device Technology, Inc. Methods and apparatuses for multi-pass adaptive quantization
CN110149517B (en) * 2018-05-14 2022-08-23 腾讯科技(深圳)有限公司 Video processing method and device, electronic equipment and computer storage medium

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7881375B2 (en) 2002-11-25 2011-02-01 Panasonic Corporation Field/frame adaptive coding and decoding method with field/frame index and apparatus for performing the same
US7995651B2 (en) 2002-11-25 2011-08-09 Panasonic Corporation Field/frame adaptive coding and decoding method with field/frame index and apparatus for performing the same
US8155188B2 (en) 2002-11-25 2012-04-10 Panasonic Corporation Field/frame adaptive decoding with field/frame index
US8483275B2 (en) 2002-11-25 2013-07-09 Panasonic Corporation Field/frame adaptive decoding with field/frame index
US9124862B2 (en) 2002-11-25 2015-09-01 Godo Kaisha Ip Bridge 1 Field/frame adaptive decoding with field/frame index
US9681136B2 (en) 2002-11-25 2017-06-13 Godo Kaisha Ip Bridge 1 Adaptive field/frame coding of B-frame with field/frame index
US9686552B2 (en) 2002-11-25 2017-06-20 Godo Kaisha Ip Bridge 1 Adaptive field/frame decoding of B-frame with field/frame index
US9712841B2 (en) 2002-11-25 2017-07-18 Godo Kaisha Ip Bridge 1 Field/frame adaptive decoding with field/frame index
US9998751B2 (en) 2002-11-25 2018-06-12 Godo Kaisha Ip Bridge 1 Field/frame adaptive decoding of B-frame with field/frame index
US10091522B2 (en) 2002-11-25 2018-10-02 Godo Kaisha Ip Bridge 1 Field/frame adaptive decoding with field/frame index
US10097852B2 (en) 2002-11-25 2018-10-09 Godo Kaisha Ip Bridge 1 Field/frame adaptive decoding with field/frame index
US10412405B2 (en) 2002-11-25 2019-09-10 Godo Kaisha Ip Bridge 1 Field/frame adaptive decoding with field/frame index

Also Published As

Publication number Publication date
JP2000350211A (en) 2000-12-15

Similar Documents

Publication Publication Date Title
US7180945B2 (en) Video encoding system calculating statistical video feature amounts
TW502542B (en) Video encoding method and video encoding apparatus
US7023914B2 (en) Video encoding apparatus and method
US7215831B2 (en) Video enhancement using multiple frame techniques
US7805016B2 (en) Decoding apparatus and decoding method
KR100987365B1 (en) Selecting key frames from video frames
JP2877768B2 (en) Loop Filtering Method for Blocking Effect and Ringing Noise Reduction of Motion Compensated Video
US7542623B2 (en) Image processing apparatus and method, and computer program and computer-readable storage medium
TWI436286B (en) Method and apparatus for decoding image
US20100295922A1 (en) Coding Mode Selection For Block-Based Encoding
US20060072673A1 (en) Decoding variable coded resolution video with native range/resolution post-processing operation
EP1407611B1 (en) Track for improved video compression
JPH1155672A (en) Dynamic image coder, dynamic image decoder, dynamic image coding method and dynamic image decoding method
JPH10136385A (en) Luminance change compensation method for moving image, moving image coder, moving image decoder, recording medium recording moving image coding or decoder program and recording medium recording coded moving image data
WO2006046550A1 (en) Image encoding method and device, image decoding method, and device
JP3551666B2 (en) Moving picture coding method and moving picture coding apparatus
Xiao et al. Weighted rate-distortion optimization for screen content coding
JP6426648B2 (en) Moving picture predictive decoding method and moving picture predictive decoding apparatus
JP2002238060A (en) Image-coding method, image coder, program and recording medium
JP2006005659A (en) Device and method for image encoding
JP2008283599A (en) Method, apparatus and program for encoding parameter selection, and recording medium for the program
KR100390167B1 (en) Video encoding method and video encoding apparatus
JPH1023421A (en) Moving picture processing method
JP4749508B2 (en) Image decoding method
JPWO2020008858A1 (en) Video coding device, video coding method, program

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent
MM4A Annulment or lapse of patent due to non-payment of fees