[go: up one dir, main page]

CN102045559A - Video decoding device and method - Google Patents

Video decoding device and method Download PDF

Info

Publication number
CN102045559A
CN102045559A CN200910308659.2A CN200910308659A CN102045559A CN 102045559 A CN102045559 A CN 102045559A CN 200910308659 A CN200910308659 A CN 200910308659A CN 102045559 A CN102045559 A CN 102045559A
Authority
CN
China
Prior art keywords
microcode
field
image data
data
tree
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN200910308659.2A
Other languages
Chinese (zh)
Other versions
CN102045559B (en
Inventor
蔡协甫
李一心
童怡新
黄圣哲
徐钧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CN200910308659.2A priority Critical patent/CN102045559B/en
Priority to US12/641,501 priority patent/US8284840B2/en
Publication of CN102045559A publication Critical patent/CN102045559A/en
Application granted granted Critical
Publication of CN102045559B publication Critical patent/CN102045559B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention provides a video decoding method, which is used for decoding image data encoded according to Huffman Tree, wherein the Huffman Tree corresponds to the corresponding decoding table. The method comprises the following steps of: receiving the image data; reading a microcode corresponding to the video compression standards of the image data, wherein the format of the microcode comprises a leaf format, a whole tree format and a unilateral tree format and the microcode of which the format is the leaf format comprises a to-be-processed data bit field and a decoding field; judging the format of the microcode; if the format of the microcode is the leaf format, reading the corresponding image data according to the to-be-processed data bit field; and decoding the image data according to the decoding field. The invention also provides a video decoding device. In the video decoding device and the video decoding method, a plurality of microcodes are loaded in a storage and the image data can be decoded by selecting the microcode corresponding to the image data, so that the decoding speed is increased and the capacity of the storage is reduced.

Description

视频解码装置及视频解码方法 Video decoding device and video decoding method

技术领域technical field

本发明涉及视频解码技术,尤其涉及一种视频解码装置及视频解码方法。The present invention relates to video decoding technology, in particular to a video decoding device and a video decoding method.

背景技术Background technique

数字电视由于高质画面、多频道能力、互动性与编辑能力等优良特征,而变得越来越重要及受欢迎。其中,对即时视频的解码是数字电视的一个重要的开发项目。霍夫曼编码是视频编码常用的一种编码方式,快速的进行霍夫曼编码的解码,便能是提高即时视频的解码的速度。Digital TV is becoming more and more important and popular due to its excellent features such as high picture quality, multi-channel capability, interactivity and editing capability. Among them, the decoding of instant video is an important development project of digital TV. Huffman coding is a commonly used coding method for video coding. Fast decoding of Huffman coding can improve the decoding speed of real-time video.

目前,霍夫曼解码的方式为在电路中,将霍夫曼树转化为多个子树。子树的划分采用完整树的方式或单边树的方式。若采用完整树的划分方式,则占用较多的视频解码装置中的存储器空间,但是解码速度较快。若采用单边树的划分方式,则占用较少的存储空间,但是解码速度较慢。Currently, the Huffman decoding method is to convert the Huffman tree into multiple subtrees in the circuit. The division of subtree adopts the way of complete tree or unilateral tree. If the complete tree division method is adopted, more memory space in the video decoding device is occupied, but the decoding speed is faster. If the unilateral tree division method is adopted, less storage space is occupied, but the decoding speed is slower.

发明内容Contents of the invention

有鉴于此,需提供一种视频解码装置,可提高解码的速度并降低视频解码装置中的存储器的空间。In view of this, it is necessary to provide a video decoding device, which can increase the decoding speed and reduce the memory space in the video decoding device.

此外,还需提供一种视频解码方法,可提高解码的速度并降低视频解码装置中的存储器的空间。In addition, it is also necessary to provide a video decoding method, which can increase the decoding speed and reduce the memory space in the video decoding device.

本发明实施方式中提供的视频解码装置用于对按照霍夫曼树进行数据编码的影像数据进行解码,其中所述霍夫曼树对应相应的解码表,包括接收模块、微码存取模块、判断模块、数据处理模块及解码模块。The video decoding device provided in the embodiment of the present invention is used to decode image data encoded according to the Huffman tree, wherein the Huffman tree corresponds to a corresponding decoding table, including a receiving module, a microcode access module, Judgment module, data processing module and decoding module.

接收模块,用于接收所述影像数据,其中,影像数据为多个霍夫曼树数据组成,且包括完整树与单边树。微码存储模块用于存储影像数据相对应的视频压缩标准的微码,其中微码是根据所述解码表按照一定的地址顺序存储的,微码的格式包括叶子、完整树及单边树,且格式为叶子的微码中包括处理数据位数的字段与解码字段。判断模块用于读取与影像数据的视频压缩标准相对应的微码,并判断微码的格式是否为叶子。数据处理模块用于根据微码中的处理数据位数的字段读取接收模块中相应影像数据。解码模块用于在微码的格式为叶子时根据微码中的解码字段对数据处理模块所读取的数据进行解码,并输出解码结果。The receiving module is used to receive the image data, wherein the image data is composed of a plurality of Huffman tree data, and includes a complete tree and a unilateral tree. The microcode storage module is used to store the microcode of the video compression standard corresponding to the image data, wherein the microcode is stored according to a certain address sequence according to the decoding table, and the format of the microcode includes leaf, complete tree and unilateral tree, And the microcode whose format is a leaf includes a field for processing data bits and a decoding field. The judging module is used for reading the microcode corresponding to the video compression standard of the image data, and judging whether the format of the microcode is a leaf. The data processing module is used to read the corresponding image data in the receiving module according to the field of processing data digits in the microcode. The decoding module is used to decode the data read by the data processing module according to the decoding field in the microcode when the format of the microcode is a leaf, and output the decoding result.

本发明实施方式中视频解码方法,用于对按照霍夫曼树进行数据编码的影像数据进行解码,其中所述霍夫曼树对应相应的解码表,所述方法包括:接收影像数据,其中影像数据为多个霍夫曼树数据组成,且包括完整树与单边树;读取与影像数据的视频压缩标准相对应的微码,其中微码是根据所述解码表按照一定的地址顺序存储的,微码的格式包括叶子、完整树及单边树,且格式为叶子的微码中包括处理数据位数的字段及解码字段;判断微码的格式;若微码的格式为叶子,则根据处理数据位数的字段读取相应影像数据;以及根据微码的解码字段对所述影像数据进行解码。The video decoding method in the embodiment of the present invention is used to decode the image data encoded according to the Huffman tree, wherein the Huffman tree corresponds to the corresponding decoding table, and the method includes: receiving the image data, wherein the image The data is composed of multiple Huffman tree data, including complete trees and unilateral trees; read the microcode corresponding to the video compression standard of the image data, wherein the microcode is stored in a certain order of addresses according to the decoding table Yes, the format of the microcode includes leaf, complete tree and unilateral tree, and the microcode whose format is a leaf includes a field for processing data digits and a decoding field; judge the format of the microcode; if the format of the microcode is a leaf, then Reading the corresponding image data according to the field of processing data bits; and decoding the image data according to the decoding field of the microcode.

上述视频解码装置及解码方法,在视频解码装置中的存储器中装载多种微码,选择影像数据相对应的微码即可对影像数据进行解码,增加了解码的速度并减少了视频解码装置中的存储器的容量。The above-mentioned video decoding device and decoding method load a variety of microcodes in the memory of the video decoding device, select the microcode corresponding to the image data to decode the image data, increase the speed of decoding and reduce the time spent in the video decoding device. capacity of the memory.

附图说明Description of drawings

图1所示为本发明视频解码装置一实施方式中的模块图。FIG. 1 is a block diagram of an embodiment of a video decoding device of the present invention.

图2所示为本发明视频解码方法一实施方式中的流程图。FIG. 2 is a flowchart of an embodiment of a video decoding method of the present invention.

具体实施方式Detailed ways

请参阅图1,所示为本发明视频解码装置10的模块图。在本实施方式中,视频解码装置10用于对按照霍夫曼树进行数据编码的影像数据进行解码,其中不同的视频压缩标准对应不同的解码表。Please refer to FIG. 1 , which is a block diagram of a video decoding device 10 of the present invention. In this embodiment, the video decoding device 10 is used to decode image data encoded according to the Huffman tree, where different video compression standards correspond to different decoding tables.

在本实施方式中,视频解码装置10包括接收模块110、微码存储模块120、判断模块130、数据处理模块140以及解码模块150。In this embodiment, the video decoding device 10 includes a receiving module 110 , a microcode storage module 120 , a judging module 130 , a data processing module 140 and a decoding module 150 .

接收模块110用于接收影像数据,在本实施方式中,影像数据为根据视频压缩标准的多个霍夫曼树数据组成。在本实施方式中,影像数据经视频解码装置10处理后由一棵霍夫曼树数据转换为多棵霍夫曼树数据,并存储在接收模块110中,其中霍夫曼树包括完整树与单边树。The receiving module 110 is used for receiving image data. In this embodiment, the image data is composed of a plurality of Huffman tree data according to the video compression standard. In this embodiment, after the image data is processed by the video decoding device 10, one Huffman tree data is converted into multiple Huffman tree data, and stored in the receiving module 110, wherein the Huffman tree includes a complete tree and Unilateral tree.

微码存储模块120用于存储微码,其中所述微码用于控制视频解码装置10对影像数据进行解码,且是根据所述视频压缩标准中的解码表按照一定的地址顺序存储的。The microcode storage module 120 is used for storing microcodes, wherein the microcodes are used to control the video decoding device 10 to decode image data, and are stored in a certain order of addresses according to the decoding table in the video compression standard.

微码由多个比特的二进制码组成,共设有三种格式,分别对应霍夫曼树的叶子、完整树及单边树。在本实施方式中,这三种格式的微码都包括从0到21的22个比特,其中,第21~20比特表示该微码所代表的格式的字段。如,若第21~20比特为“10”,则表示该微码格式为叶子,若第21~20比特为“00”时,则表示该微码格式为完整树,若第21~20比特为“01”,则表示该微码格式为单边树。The microcode is composed of multiple bits of binary code, and there are three formats in total, corresponding to the leaves of the Huffman tree, the complete tree and the one-sided tree. In this embodiment, the microcodes of the three formats all include 22 bits ranging from 0 to 21, wherein the 21st to 20th bits indicate the field of the format represented by the microcode. For example, if the 21st to 20th bits are "10", it means that the microcode format is a leaf; if the 21st to 20th bits are "00", it means that the microcode format is a complete tree; if the 21st to 20th bits If it is "01", it means that the microcode format is a unilateral tree.

请参阅表1,所示为对应霍夫曼树的叶子的微码格式的一实施方式。除了第21~20比特表示该微码所代表的格式外,表示叶子的微码还包括其他多个字段,如处理数据位数的字段、解码的字段、模式的字段、结束的字段、更换解码表的字段、预留字段等。Please refer to Table 1, which shows an embodiment of the microcode format corresponding to the leaves of the Huffman tree. In addition to the 21st to 20th bits indicating the format represented by the microcode, the microcode representing the leaf also includes other fields, such as the field for processing data digits, the decoding field, the mode field, the end field, and the replacement decoding Table fields, reserved fields, etc.

表1叶子的微码格式Table 1 Microcode format of leaves

  比特bit   21~2021~20   19~1719~17   16~516~5   4~34~3   2 2   1 1   00   字段field   格式 Format   处理数据位数Processing data bits   解码decode   模式 model   结束 Finish   更换解码表Replace the decoding table

在本实施方式中,每一个字段通过几个比特来表示,如,第19~17比特表示处理数据的位数的字段,表示接收模块110中所需处理的影像数据位数,与霍夫曼树的深度有关。第16~5比特表示解码的字段,表示对影像数据进行解码,第4~3比特表示视频压缩标准中所定义的模式的字段,不同的模块表示后续的处理所进行的计算不同,第2比特为结束的字段,表示影像数据是否已结束解码。第1比特为更换解码表的字段,表示对影像数据解码时是否需要更换解码表,第0比特为预留字段,目前为空,以备后续进一步的需要。In this embodiment, each field is represented by several bits. For example, the 19th to 17th bits represent the field of the number of digits of the processed data, which represent the number of image data digits to be processed in the receiving module 110, and Huffman related to the depth of the tree. The 16th to 5th bits represent the decoded field, which means decoding the image data, the 4th to 3rd bits represent the field of the mode defined in the video compression standard, different modules represent different calculations for subsequent processing, and the 2nd bit The end field indicates whether the video data has been decoded. The 1st bit is the field of replacing the decoding table, indicating whether the decoding table needs to be replaced when decoding the image data, and the 0th bit is a reserved field, which is currently empty for future further needs.

请参阅表2,所示为对应霍夫曼树的完整树的微码格式的一实施方式。除了第21~20比特表示该微码所代表的格式外,表示完整树的微码还包括其他多个字段,如处理数据位数的字段、深度字段及补偿值的字段。Please refer to Table 2, which shows an embodiment of the microcode format corresponding to the complete tree of the Huffman tree. In addition to the 21st to 20th bits indicating the format represented by the microcode, the microcode representing the complete tree also includes other fields, such as a field for processing data bits, a depth field, and a compensation value field.

表2完整树的微码格式Table 2 The microcode format of the complete tree

  比特bit   21~2021~20   19~1719~17   16~1416~14   13~713~7   6~06~0   字段field   格式 Format   处理数据位数Processing data bits   深度depth   补偿值Compensation value

在本实施方式中,每一个字段通过几个比特来表示,如,第19~17比特为处理数据位数的字段,表示接收模块110中所需处理的影像数据位数,与霍夫曼树的深度有关,表示第16~14比特为深度字段,表示完整树的深度值,第13~7比特为补偿值的字段,此字段中的补偿值由视频压缩标准与解码表决定,第6~0比特预留字段,目前为空。In this embodiment, each field is represented by several bits. For example, the 19th to 17th bits are fields for processing data bits, indicating the number of image data bits to be processed in the receiving module 110, and the Huffman tree It means that the 16th to 14th bits are the depth field, indicating the depth value of the complete tree, and the 13th to 7th bits are the compensation value field. The compensation value in this field is determined by the video compression standard and decoding table. 0-bit reserved field, currently empty.

请参阅表3,所示为对应霍夫曼树的单边树的微码格式的一实施方式。除了第21~20比特表示该微码所代表的格式外,表示单边树的微码还包括其他多个字段,如处理数据位数的字段、深度字段、补偿值的字段及匹配值的字段。Please refer to Table 3, which shows an implementation manner of the microcode format of the unilateral tree corresponding to the Huffman tree. In addition to the 21st to 20th bits indicating the format represented by the microcode, the microcode representing the unilateral tree also includes other fields, such as the field for processing the number of data bits, the depth field, the compensation value field, and the matching value field .

表3单边树的微码格式Table 3 Microcode format of unilateral tree

  比特bit   21~2021~20   19~1719~17   16~1416~14   13~713~7   6~06~0   字段field   格式 Format   处理数据位数Processing data bits   深度depth   补偿值Compensation value   匹配值match value

在本实施方式中,每一个字段通过几个比特来表示,如第19~17比特为处理数据位数的字段,表示接收模块110中所需处理的影像数据位数,与霍夫曼树的深度有关,第16~14比特为深度字段,表示单边树的深度值,第13~7比特表示补偿值的字段,此字段中的补偿值由视频压缩标准与解码表决定,第6~0比特表示匹配值的字段,该字段中的匹值用来与影像数据进行匹配。在本实施方式中,匹配值为一串二进制数,位数可为7位,匹配值的大小由视频压缩标准所定义。在本实施方式中,微码存储模块120中存储有支持多种视频压缩标准的微码,用户可以根据不同的视频压缩标准选取不同格式的微码。In this embodiment, each field is represented by several bits. For example, the 19th to 17th bits are fields for processing data bits, indicating the number of image data bits to be processed in the receiving module 110, and the Huffman tree Depth-related, the 16th to 14th bits are the depth field, indicating the depth value of the unilateral tree, the 13th to 7th bits are the compensation value field, the compensation value in this field is determined by the video compression standard and decoding table, the 6th to 0th Bits represent a field of matching values, which are used for matching with image data. In this embodiment, the matching value is a string of binary numbers, the number of bits may be 7, and the size of the matching value is defined by the video compression standard. In this embodiment, the microcode storage module 120 stores microcodes supporting multiple video compression standards, and users can select microcodes in different formats according to different video compression standards.

判断模块130用于从微码存储模块120读取与影像数据的视频压缩标准相对应的微码,并判断所述微码的格式。在本实施方式中,判断模块130根据微码中的格式字段来判断微码的格式。The judging module 130 is used for reading the microcode corresponding to the video compression standard of the image data from the microcode storage module 120 and judging the format of the microcode. In this embodiment, the judging module 130 judges the format of the microcode according to the format field in the microcode.

数据处理模块140根据微码的格式中的处理数据位数的字段处理相应影像数据中的数据。在本实施方式中,若微码的格式表示叶子,则所述数据处理模块140根据微码的第19~17比特中的值按顺序读取所述影像数据中的n位数据。在本实施方式中,微码的处理数据位数的字段中的值的值是由霍夫曼树的深度及解码表决定。The data processing module 140 processes the data in the corresponding image data according to the field of processing data bits in the format of the microcode. In this embodiment, if the format of the microcode indicates a leaf, the data processing module 140 sequentially reads the n-bit data in the image data according to the values in the 19th to 17th bits of the microcode. In this embodiment, the value of the value in the microcode's processing data bit field is determined by the depth of the Huffman tree and the decoding table.

解码模块150用于在所述微码的格式为叶子时对所述数据处理模块140读取的影像数据并根据微码中的解码字段进行解码,并输出解码结果。The decoding module 150 is configured to decode the image data read by the data processing module 140 according to the decoding field in the microcode when the format of the microcode is a leaf, and output the decoding result.

在本实施方式中,数据处理模块140还用于在解码模块150对影像数据解码后根据微码中的处理数据位数的字段的值删除接收模块110中已读取的影像数据。In this embodiment, the data processing module 140 is further configured to delete the image data read by the receiving module 110 according to the value of the processed data bit field in the microcode after the decoding module 150 decodes the image data.

在本实施方式中,判断模块130还用于根据结束字段判断所述影像数据是否解码结束,若所述影像数据还没完成解码,则判断模块130还用于根据更换解码表字段来判断是否需要更换解码表,若需要更换解码表,则视频解码装置10根据更换后的解码表对影像数据进行解码,直至所有影像数据完成解码。在本实施方式中,若所述微码的更换解码表字段为“1”时表示所述影像数据需要更换解码表,若所述微码的更换解码表字段为“0”时表示所述影像数据不需要更换解码表,则解码装置10按照之前的解码表继续解码。In this embodiment, the judging module 130 is also used to judge whether the decoding of the image data is completed according to the end field. If the decoding of the video data has not been completed, the judging module 130 is also used to judge whether it is necessary Replace the decoding table. If the decoding table needs to be replaced, the video decoding device 10 decodes the image data according to the replaced decoding table until all the image data are decoded. In this embodiment, if the replacement decoding table field of the microcode is "1", it indicates that the image data needs to replace the decoding table, and if the replacement decoding table field of the microcode is "0", it indicates that the video If the data does not need to change the decoding table, the decoding device 10 continues decoding according to the previous decoding table.

在本实施方式中,数据处理模块140还用于在微码的格式表示完整树时,根据微码中处理数据位数的字段读取接收模块110中所述影像数据中的n位数据。在本实施方式中,n的值与所述微码中的深度字段的值相同。In this embodiment, the data processing module 140 is also used to read the n-bit data in the image data in the receiving module 110 according to the field of processing data bits in the microcode when the format of the microcode represents a complete tree. In this embodiment, the value of n is the same as the value of the depth field in the microcode.

在本实施方式中,视频解码装置10还包括计算模块160,用于根据所述完整树的影像数据及相应的解码表确定微码中的补偿值字段的值。所述计算模块160还用于根据所述微码的地址与所述数据处理模块140所读取的影像数据的值及补偿值确定下一微码所在的地址。在本实施方式中,计算模块160计算下一微码的地址的方法是:目前微码所在的地址+补偿值+所述数据处理模块140所读取的影像数据的值=下一微码的地址。In this embodiment, the video decoding device 10 further includes a calculation module 160 for determining the value of the compensation value field in the microcode according to the image data of the complete tree and the corresponding decoding table. The calculation module 160 is also used to determine the address of the next microcode according to the address of the microcode and the value of the image data and the compensation value read by the data processing module 140 . In this embodiment, the calculation module 160 calculates the address of the next microcode as follows: the current address of the microcode+compensation value+the value of the image data read by the data processing module 140=the address of the next microcode address.

在本实施方式中,数据处理模块140还用于根据微码中处理数据位数的字段删除接收模块110中已读取的影像数据,判断模块130读取下一微码并继续判断下一微码的格式。在本实施方式中,所述数据处理模块140所删除的影像数据的位数n与微码中的深度字段的值相同。在本实施方式中,判断模块130判断微码格式为单边树时,所述数据处理模块140根据微码的处理数据位数的字段按顺序读取接收模块110中所述影像数据中的n位的数据。在本实施方式中,n的值与微码中的深度字段的值相同。In this embodiment, the data processing module 140 is also used to delete the image data that has been read in the receiving module 110 according to the field of processing data digits in the microcode, and the judging module 130 reads the next microcode and continues to judge the next microcode. code format. In this embodiment, the number of bits n of the image data deleted by the data processing module 140 is the same as the value of the depth field in the microcode. In this embodiment, when the judging module 130 judges that the microcode format is a unilateral tree, the data processing module 140 reads the n in the image data in the receiving module 110 in order according to the field of the number of processed data bits in the microcode. bits of data. In this embodiment, the value of n is the same as the value of the depth field in the microcode.

在本实施方式中,计算模块160还用于根据所述单边树的影像数据及相应的解码表确定微码中的补偿值字段中的值。In this embodiment, the calculation module 160 is further configured to determine the value in the compensation value field in the microcode according to the image data of the unilateral tree and the corresponding decoding table.

在本实施方式中,所述视频解码装置10还包括匹配模块170,用于根据微码中的深度字段与视频压缩标准对所述数据处理模块140所读取单边树影像数据进行匹配。在本实施方式中,影像数据与所述匹配值进行匹配的方法是:将影像数据与匹配值右边的N位进行匹配,从左到右判断所述单边树的影像数据与匹配值右边的N位中连续相同的位数,所述相同的位数即是匹配结果,其中,N的大小与所述单边树的深度相同。In this embodiment, the video decoding device 10 further includes a matching module 170 for matching the unilateral tree image data read by the data processing module 140 according to the depth field in the microcode and the video compression standard. In this embodiment, the method for matching the image data with the matching value is: match the image data with the N bits on the right side of the matching value, and judge the image data of the unilateral tree and the N bits on the right side of the matching value from left to right. Consecutive identical digits among the N digits are the matching result, wherein the size of N is the same as the depth of the unilateral tree.

在本实施方式中,所述计算模块160还用于根据匹配结果与微码的补偿值字段及所述微码的地址确定下一微码所在的地址。在本实施方式中,计算模块160计算下一微码的地址的方法为:目前微码所在的地址+补偿值+匹配结果=下一微码所在的地址。在本实施方式中,判断模块130根据下一微码的地址,读取下一微码,并继续判断下一微码的格式。In this embodiment, the calculation module 160 is further configured to determine the address of the next microcode according to the matching result, the compensation value field of the microcode, and the address of the microcode. In this embodiment, the calculation module 160 calculates the address of the next microcode as follows: the current address of the microcode+compensation value+matching result=the address of the next microcode. In this embodiment, the judging module 130 reads the next microcode according to the address of the next microcode, and continues to judge the format of the next microcode.

在本实施方式中,数据处理模块140还用于根据微码中处理数据位数的字段删除接收模块110中已读取的影像数据。在本实施方式中,所述数据处理模块140所删除的影像数据的位数n与微码中的深度字段的值相同。In this embodiment, the data processing module 140 is further configured to delete the image data read by the receiving module 110 according to the field of the number of processed data bits in the microcode. In this embodiment, the number of bits n of the image data deleted by the data processing module 140 is the same as the value of the depth field in the microcode.

在本发明的实施方式中,视频解码装置10通过将不同的视频压缩标准的微码存储在微码存储模块120中,当影像数据需要解码时微码存取模块120读取与所述影像数据的视频压缩标准相对应的微码,所述视频解码装置10根据所述微码对影像数据进行解码,以增加解码的速度并减少视频解码装置10中的存储器的容量。In the embodiment of the present invention, the video decoding device 10 stores microcodes of different video compression standards in the microcode storage module 120, and when the image data needs to be decoded, the microcode access module 120 reads the The video decoding device 10 decodes the image data according to the microcode corresponding to the video compression standard, so as to increase the decoding speed and reduce the capacity of the memory in the video decoding device 10 .

请参阅图2,所示为本发明视频解码方法一实施方式中的流程图。在本实施方式中,所述方法通过微码控制图1所示的视频解码装置10的各个模块相互工作来实现。Please refer to FIG. 2 , which is a flow chart of an embodiment of the video decoding method of the present invention. In this embodiment, the method is implemented by controlling the mutual operation of various modules of the video decoding device 10 shown in FIG. 1 through a microcode.

在步骤S200,接收模块110接收影像数据。在本实施方式中,影像数据为根据视频压缩标准的多个霍夫曼树数据组成。在本实施方式中,影像数据经视频解码装置10处理后由一棵霍夫曼树数据转换为多棵霍夫曼树数据,并存储在接收模块110中,其中霍夫曼树包括完整树与单边树。In step S200, the receiving module 110 receives image data. In this embodiment, the image data is composed of a plurality of Huffman tree data according to the video compression standard. In this embodiment, after the image data is processed by the video decoding device 10, one Huffman tree data is converted into multiple Huffman tree data, and stored in the receiving module 110, wherein the Huffman tree includes a complete tree and Unilateral tree.

在步骤S202,判断模块130从微码存储模块120中读取与影像数据的视频压缩标准相对应的微码,其中,微码是根据视频压缩标准中的解码表按一定的地址存储在微码存储模块120中。在本实施方式,微码的格式有三种,分别为霍夫曼树的叶子、完整树及单边树。In step S202, the judging module 130 reads the microcode corresponding to the video compression standard of the image data from the microcode storage module 120, wherein the microcode is stored in the microcode at a certain address according to the decoding table in the video compression standard storage module 120. In this embodiment, there are three formats of the microcode, which are the leaves of the Huffman tree, the complete tree and the unilateral tree.

在步骤S204,判断模块130判断微码的格式。在本实施方式,判断模块140通过判断微码的格式字段来判断微码的格式。若微码的格式字段为“10”时,则判断模块140判断所述微码的格式为叶子。In step S204, the judging module 130 judges the format of the microcode. In this embodiment, the judging module 140 judges the format of the microcode by judging the format field of the microcode. If the format field of the microcode is "10", the judging module 140 judges that the format of the microcode is a leaf.

在步骤S206,数据处理模块140根据微码的处理数据位数的字段(第19~17比特)中的值按顺序读取所述影像数据中的n位数据。In step S206 , the data processing module 140 sequentially reads the n-bit data in the image data according to the value in the field (19th-17th bits) of the processed data bits of the microcode.

在步骤S208,解码模块150根据微码的解码字段对所述影像数据进行解码。在本实施方式中,解码模式与解码表是根据相应的视频压缩标准来规定的。In step S208, the decoding module 150 decodes the image data according to the decoding field of the microcode. In this embodiment, the decoding mode and the decoding table are specified according to the corresponding video compression standard.

在步骤S210,数据处理模块140根据微码中的处理数据字段删除接收模块110中已读取的影像数据。In step S210, the data processing module 140 deletes the image data read by the receiving module 110 according to the processing data field in the microcode.

在步骤S212,判断模块130判断微码中的结束字段来确定所述影像数据是否解码结束。In step S212, the judging module 130 judges the end field in the microcode to determine whether the decoding of the image data is finished.

若没有结束,则在步骤S214,判断模块130根据微码的更换解码表字段判断所述影像数据是否需要更换解码表。If not, then in step S214, the judging module 130 judges whether the image data needs to replace the decoding table according to the replacement decoding table field of the microcode.

若已经结束,则在步骤S216,视频解码装置10更换解码表并继续对所述影像数据解码,直至所有影像数据完成解码。If it is finished, then in step S216 , the video decoding device 10 replaces the decoding table and continues to decode the image data until all the image data are decoded.

若所述影像数据不需要更换解码表,则返回步骤S204,判断模块130继续判断下一微码的格式。If the image data does not need to replace the decoding table, return to step S204, and the judging module 130 continues to judge the format of the next microcode.

若微码的格式字段为“00”时,表示所述微码格式为完整树,则在步骤S218,数据处理模块140根据微码的处理数据位数字段(第19~17比特中的值)按顺序读取所述影像数据中的n位数据。If the format field of the microcode is "00", it means that the microcode format is a complete tree, then in step S218, the data processing module 140 processes the data bit field (the value in the 19th to 17th bits) according to the microcode Read the n-bit data in the image data sequentially.

在步骤S220,计算模块160根据根据所述单边树的影像数据及相应的解码表确定微码中的补偿值字段的值。In step S220, the calculation module 160 determines the value of the compensation value field in the microcode according to the image data of the unilateral tree and the corresponding decoding table.

在步骤S222,计算模块160根据所述微码的地址与所述数据处理模块140所读取的影像数据的值及补偿值确定下一微码所在的地址。在本实施方式中,计算模块160计算下一微码的地址的方法是:目前微码所在的地址+补偿值+数据处理模块140所读取的影像数据的值=下一微码的地址。In step S222 , the calculating module 160 determines the address of the next microcode according to the address of the microcode and the value and compensation value of the image data read by the data processing module 140 . In this embodiment, the calculation module 160 calculates the address of the next microcode as follows: current address of the microcode+compensation value+value of image data read by the data processing module 140=address of the next microcode.

在步骤S224,数据处理模块140根据处理数据位数字段删除接收模块110中已读取的影像数据,判断模块130读取下一微码,并续判断下一微码的格式。In step S224, the data processing module 140 deletes the image data read by the receiving module 110 according to the processed data bit field, and the judging module 130 reads the next microcode, and continues to judge the format of the next microcode.

若微码的格式字段为“01”时,则该微码格式为单边树,则在步骤S226,数据处理模块140根据微码的处理数据位数的字段(第19~17比特中的值)按顺序读取所述影像数据中的n位的数据。If the format field of the microcode is "01", then the microcode format is a unilateral tree, then in step S226, the data processing module 140 processes the data according to the field of the microcode (the value in the 19th to 17th bits) ) sequentially read the n-bit data in the image data.

在步骤S228,计算模块160根据所述影像数据及相应的解码表确定微码的补偿值字段的值。In step S228, the calculation module 160 determines the value of the compensation value field of the microcode according to the image data and the corresponding decoding table.

在步骤S230,匹配模块170根据微码的深度字段与视频压缩标准对所述影像数据与匹配值进行匹配并输出匹配结果。在本实施方式中,单边树数据与所述匹配值进行匹配的方法是:将单边树数据与匹配值右边的N位进行匹配,从左到右判断所述影像数据与匹配值右边的N位中连续相同的位数,所述相同的位数即是匹配结果,其中,N的大小与所述单边树的深度相同。In step S230, the matching module 170 matches the image data with the matching value according to the depth field of the microcode and the video compression standard, and outputs the matching result. In this embodiment, the method for matching the unilateral tree data with the matching value is: match the unilateral tree data with the N bits on the right side of the matching value, and judge the image data and the right side of the matching value from left to right Consecutive identical digits among the N digits are the matching result, wherein the size of N is the same as the depth of the unilateral tree.

在步骤S232,计算模块160根据匹配结果与补偿值及所述微码的地址确定下一微码所在的地址。在本实施方式中,计算模块160计算下一微码的地址的方法为:目前微码所在的地址+补偿值+匹配结果=下一微码所在的地址。在本实施方式中,判断模块130根据下一微码的地址读取下一微码,并返回步骤S204继续判断下一微码的格式。In step S232, the calculation module 160 determines the address of the next microcode according to the matching result, the compensation value and the address of the microcode. In this embodiment, the calculation module 160 calculates the address of the next microcode as follows: the current address of the microcode+compensation value+matching result=the address of the next microcode. In this embodiment, the judging module 130 reads the next microcode according to the address of the next microcode, and returns to step S204 to continue judging the format of the next microcode.

在步骤S234,数据处理模块140根据微码中的处理数据位数删除接收模块110中已读取的影像数据,判断模块130读取下一微码,并继续判断下一微码的格式。In step S234, the data processing module 140 deletes the image data read by the receiving module 110 according to the number of processed data bits in the microcode, and the judging module 130 reads the next microcode, and continues to judge the format of the next microcode.

本发明实施方式所提供的视频解码器10及其解码方法,通过将影像数据转化为单边树与完整树,然后判断模块130读取微码存储模块120中的与所述影像数据的视频压缩标准相对应的微码,以及判断模块130判断所述微码的格式实现对所述影像数据的解码,本发明结合了单边树解码与完整树解码的优点,提高了解码的速度并减少了视频解码装置10中的存储器的空间。In the video decoder 10 and its decoding method provided in the embodiment of the present invention, the image data is converted into a unilateral tree and a complete tree, and then the judging module 130 reads the video compression data in the microcode storage module 120 and the image data. The microcode corresponding to the standard, and the judgment module 130 judges the format of the microcode to realize the decoding of the image data. The present invention combines the advantages of unilateral tree decoding and complete tree decoding, improves the decoding speed and reduces the memory space in the video decoding device 10 .

Claims (20)

1. a video decoder is used for the image data that carries out digital coding according to Hofman tree is decoded, and the corresponding corresponding decoding table of wherein said Hofman tree is characterized in that described video decoder comprises:
Receiver module is used to receive described image data, and wherein, described image data is that a plurality of Hofman tree data are formed, and comprises complete tree and monolateral tree;
The microcode memory module, be used to store with state the microcode of the corresponding video compression standard of image data, wherein said microcode is stored according to certain sequence of addresses according to described decoding table, the form of described microcode comprises leaf, complete tree and monolateral tree, and form is to comprise deal with data figure place field and decoding field in the microcode of leaf;
Judge module is used for reading in regular turn and the corresponding microcode of the video compression standard of image data, and judges whether the form of described microcode is leaf;
Data processing module is used for reading corresponding image data in the described receiver module according to the deal with data figure place field of described microcode; And
Decoder module is used for when the form of described microcode is leaf the decoding field according to described microcode the data that described data processing module read is decoded, and the output decoder result.
2. video decoder as claimed in claim 1 is characterized in that, described form is that the microcode of leaf also comprises pattern field, trailer field and changes the decoding table field.
3. video decoder as claimed in claim 1 is characterized in that, described form is field, depth field and the offset field that comprises the deal with data figure place in the microcode of complete tree.
4. video decoder as claimed in claim 3 is characterized in that, described data processing module also is used for form at described microcode when being complete tree reads corresponding image data according to the field of the deal with data figure place of microcode.
5. video decoder as claimed in claim 4 is characterized in that, described data processing module also is used for deleting the image data that described receiver module has read.
6. video decoder as claimed in claim 5 is characterized in that, also comprises computing module, the value of the offset field that is used for determining described microcode according to the depth field and the corresponding decoding table of described microcode.
7. video decoder as claimed in claim 6 is characterized in that, the offset field that described computing module also is used for the value of the image data that read according to the address of described microcode and described data processing module and microcode is determined the address at next microcode place.
8. video decoder as claimed in claim 1 is characterized in that, described form is field, depth field, offset field and the matching value field that comprises the deal with data figure place in the microcode of monolateral tree.
9. video decoder as claimed in claim 8 is characterized in that, described data processing module also is used for reading according to the deal with data figure place field of microcode the corresponding image data of described receiver module when the form of described microcode is monolateral tree.
10. video decoder as claimed in claim 9 is characterized in that, described data processing module also is used for deleting the image data that described receiver module has read.
11. video decoder as claimed in claim 10 is characterized in that, also comprises matching module, is used for according to the depth field and the video compression standard of described microcode described image data being mated to produce a matching result.
12. video decoder as claimed in claim 11 is characterized in that, described computing module also is used for determining according to the address of the offset field of described matching result and described microcode and described microcode the address at next microcode place.
13. a video frequency decoding method is used for the image data that carries out digital coding according to Hofman tree is decoded, the corresponding corresponding decoding table of wherein said Hofman tree is characterized in that described method comprises:
Receive described image data, wherein said image data is that a plurality of Hofman tree data are formed, and comprises complete tree and monolateral tree;
Read and the corresponding microcode of the video compression standard of described image data, wherein said microcode is to store according to certain sequence of addresses according to described decoding table, the form of described microcode comprises leaf, complete tree and monolateral tree, and form is field and the decoding field that comprises the deal with data figure place in the microcode of leaf;
Whether the form of judging described microcode is leaf;
If the form of described microcode is a leaf, then the field according to described deal with data figure place reads corresponding image data; And
Decoding field according to described microcode is decoded to described image data.
14. method as claimed in claim 13 is characterized in that, described form is that the microcode of leaf also comprises pattern field, trailer field and changes the decoding table field.
15. method as claimed in claim 14 is characterized in that, described method also comprises:
The image data that deletion has been read according to the deal with data field in the described microcode;
Judge the end of whether decoding of described image data according to trailer field;
If described image data is not finished decoding, then judge whether needs replacing decoding table according to changing the decoding table field; And
If do not need to change decoding table, then read next microcode.
16. method as claimed in claim 15 is characterized in that, described method also comprises: if described image data need be changed decoding table, then change decoding table, and continue decoding and finish until the image data decoding.
17. method as claimed in claim 13 is characterized in that, described form is field, depth field and the offset field that comprises the deal with data figure place in the microcode of complete tree.
18. method as claimed in claim 17 is characterized in that, described method also comprises:
If the form of described microcode is complete tree, read corresponding image data according to the field of the figure place of deal with data described in the described microcode;
Determine the value of the offset field of described microcode according to described image data and corresponding decoding table;
Determine the address at next microcode place according to the address at described offset and described image data and described microcode place; And
The image data that deletion has been read according to the deal with data field in the described microcode, and continue to judge next microcode.
19. method as claimed in claim 13 is characterized in that, described form is field, depth field, offset field and the matching value field that comprises the deal with data figure place in the microcode of monolateral tree.
20. method as claimed in claim 19 is characterized in that, described method also comprises:
If the form of described microcode is monolateral tree, read corresponding image data according to the field of the figure place of deal with data described in the described microcode;
Determine the value of the offset field of described microcode according to described image data and corresponding decoding table;
Depth field and video compression standard according to described microcode mate to produce a matching result described image data;
Determine the address at next microcode place according to the address of the offset field of described matching result and described microcode and described microcode; And
The image data that deletion has been read according to the deal with data field in the described microcode, and continue to judge next microcode.
CN200910308659.2A 2009-10-22 2009-10-22 Video decoding device and method Expired - Fee Related CN102045559B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN200910308659.2A CN102045559B (en) 2009-10-22 2009-10-22 Video decoding device and method
US12/641,501 US8284840B2 (en) 2009-10-22 2009-12-18 Video decoding device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910308659.2A CN102045559B (en) 2009-10-22 2009-10-22 Video decoding device and method

Publications (2)

Publication Number Publication Date
CN102045559A true CN102045559A (en) 2011-05-04
CN102045559B CN102045559B (en) 2013-03-20

Family

ID=43898422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910308659.2A Expired - Fee Related CN102045559B (en) 2009-10-22 2009-10-22 Video decoding device and method

Country Status (2)

Country Link
US (1) US8284840B2 (en)
CN (1) CN102045559B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102665074B (en) * 2012-04-10 2014-04-16 上海算芯微电子有限公司 Neighbor searching device and neighbor searching method for video coding/decoding

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796356A (en) * 1995-03-14 1998-08-18 Fujitsu Limited Data compressing apparatus, data restoring apparatus and data compressing/restoring system
US5970177A (en) * 1995-06-07 1999-10-19 America Online, Inc. Data compression using selective encoding
JP3305190B2 (en) * 1996-03-11 2002-07-22 富士通株式会社 Data compression device and data decompression device
US6246396B1 (en) * 1997-04-30 2001-06-12 Canon Kabushiki Kaisha Cached color conversion method and apparatus
US6411226B1 (en) * 2001-01-16 2002-06-25 Motorola, Inc. Huffman decoder with reduced memory size
JP2003169327A (en) * 2001-11-30 2003-06-13 Matsushita Electric Ind Co Ltd MPEG-2 video variable length decoding method in software
US7751440B2 (en) * 2003-12-04 2010-07-06 Intel Corporation Reconfigurable frame parser
US7353233B1 (en) * 2004-04-16 2008-04-01 Majesco Entertainment Company Apparatus and method for real-time decompression of data streams on limited-resource embedded devices
CN101458679B (en) * 2007-12-10 2012-01-25 辉达公司 Unification inverse discrete cosine transform (IDCT) microcode processor engine
US7872598B2 (en) * 2008-12-10 2011-01-18 Intel Corporation Accelerated decompression

Also Published As

Publication number Publication date
US20110096842A1 (en) 2011-04-28
CN102045559B (en) 2013-03-20
US8284840B2 (en) 2012-10-09

Similar Documents

Publication Publication Date Title
US8977066B2 (en) Image compression using sub-resolution images
US7411529B2 (en) Method of decoding bin values using pipeline architecture and decoding device therefor
CN105933009B (en) Data compression method and system and decompression method and system
CN102438145A (en) Lossless picture compression method based on Huffman coding
US20220005229A1 (en) Point cloud attribute encoding method and device, and point cloud attribute decoding method and devcie
CN103702133A (en) Image compression display method and image compression display device
CN104125475A (en) Multi-dimensional quantum data compressing and uncompressing method and apparatus
CN114827611B (en) Video image encoding and decoding method, apparatus and medium
CN108900196A (en) A kind of data decoding method based on lzw algorithm, device, equipment and medium
CN105099460A (en) Dictionary compression method, dictionary decompression method, and dictionary construction method
CN102045559B (en) Video decoding device and method
CN102651795B (en) Binary Sequence Compression Coding Method with Run Length Reduction
CN104682966A (en) Lossless compression method for list data
CN110191341B (en) Depth data coding method and decoding method
CN103517022A (en) Image data compression and decompression method and device
CN108184113B (en) Image compression coding method and system based on inter-image reference
CN102045558B (en) entropy decoding method
TWI384377B (en) Data encoding and decoding method
CN115865098A (en) Data Compression Method Based on Huffman Coding
US7773003B1 (en) Huffman search algorithm for AAC decoder
CN101257590B (en) Encoding, decoding method and device, display system
CN107277518B (en) CABAC decoding method
CN104918048B (en) Suitable for the entropy code context probability modeling modeling module design method of HEVC standard
CN114079774B (en) Method and device for encoding and decoding inter-frame prediction information
CN101483778B (en) Decoding method and device for decoding data bit stream

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130320

Termination date: 20131022