WO2009097810A1 - A method and device for image entropy encoding and entropy decoding - Google Patents

A method and device for image entropy encoding and entropy decoding Download PDF

Info

Publication number
WO2009097810A1
WO2009097810A1 PCT/CN2009/070299 CN2009070299W WO2009097810A1 WO 2009097810 A1 WO2009097810 A1 WO 2009097810A1 CN 2009070299 W CN2009070299 W CN 2009070299W WO 2009097810 A1 WO2009097810 A1 WO 2009097810A1
Authority
WO
WIPO (PCT)
Prior art keywords
code table
entropy
block
parameter
coding
Prior art date
Application number
PCT/CN2009/070299
Other languages
French (fr)
Chinese (zh)
Inventor
Yun He
Yunfei Wang
Xunan Mao
Xiaozhen Zheng
Jianhua Zheng
Original Assignee
Huawei Technologies Co., Ltd.
Tsinghua University
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 Huawei Technologies Co., Ltd., Tsinghua University filed Critical Huawei Technologies Co., Ltd.
Publication of WO2009097810A1 publication Critical patent/WO2009097810A1/en

Links

Classifications

    • 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
    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Definitions

  • a transform technique is needed to transform an image, image content and information in an area into a specific area, so as to effectively compress the corresponding content in the video compression algorithm.
  • an image or an area in the image may be divided into a plurality of small blocks or sub-regions (referred to as sub-blocks, which may also be referred to as image blocks), and then the sub-blocks are transformed in units.
  • the size of the sub-block may be, but is not limited to, 4x4 or 8x8, and the corresponding 4 and 8 are in units of image pixels.
  • a 16x16 image block is usually used as a codec processing unit, and this unit becomes a macroblock. It is also possible for a macroblock to be further divided into sub-blocks of smaller size. In the prior art, sub-blocks and macroblocks may be collectively referred to as image blocks.
  • a specific area may be divided according to different sub-block sizes, and then different transform processing is performed for different size sub-blocks, which is called an adaptive block size transform technique.
  • the transformation referred to herein refers to a data processing method having certain mathematical characteristics, such as DCT (Discrete Cosine Transform), wavelet transform, integer transform, and the like. These transforms are typically represented in matrix form in video and image code decoding.
  • some macroblocks may use one transform mode separately, and the transform mode refers to transform and transform corresponding codec processing methods, for example, a size of 16x16. All sub-blocks in the macroblock are divided into 8x8 sizes, and all sub-blocks adopt 8x8 transform and encoding and decoding techniques corresponding to the transform (ie, adopt a transform mode). At the same time, sub-blocks in some macroblocks can use different transform modes. For example: If a 16x16 macroblock contains 4x4, 4x8, 8x4, and 8x8 sub-block types, you can use 4x4, 4x8, 8x4 and Each of 8x8 corresponds to a transformation mode.
  • VLC Very Length Codi
  • VLD Variable Length Coding
  • variable length coding When variable length coding is used in the video codec standard, a set of code tables is set for the coding elements, and the code table is divided according to the coding elements, the coding image luminance component elements, the image chrominance component elements, the interframe coding, and the intra coding.
  • the coding element refers to a run and a quantized coefficient value (level) generated in the encoding process, where run is a coefficient of a value other than 0 before the non-zero coefficient in the image block scan in the encoding or decoding process.
  • the number, level is the numerical value of the quantized coefficient. In variable length coding run and level appear as a pair of data.
  • transform coefficient in variable length coding trans_coefficient
  • the value will be specified within a certain range. If the trans-coefficient value cannot be determined due to the level or run value being too large during encoding, Bay
  • the encoding system will according to the values of trans_coeff icient and escape_level_diff (if any) and whether the current coding element is an image block luminance component element or an image block chrominance component element. And determining whether the code table used by the next coding element is determined by factors such as an inter coding element, an intra coding element, etc. If the current picture block coding ends, the coding system writes a block after the last coding element of the current picture block is encoded. End flag (E 0B), the value of E0B is determined by the current code table.
  • the run and level pairs corresponding to trans_coeff icient and escape_level_diff are looked up in the corresponding code table based on the trans_coeff icient and escape_level_di ff (if present) values parsed from the code stream.
  • the decoding system will according to the values of trans_coeff icient and escape_le vel_diff (if any) and whether the current decoding element is an image block luminance component element, an image block chrominance component element, and whether it is an inter-coded element or an intra-coded element. The factors determine the code table used by the next decoded element. If the syntax element parsed by the decoding system is the corresponding value of E0B in the current code table, it indicates that the decoding of the current image block ends, that is, the decoding for the next image block needs to be started.
  • the code table can be used as follows: First, 8x8 blocks are segmented into 4x4 data blocks by sampling; For the obtained 4 4x4 data blocks, respectively, using a code table corresponding to 4x4 blocks for encoding or decoding operations.
  • the data block obtained by the 4x4 transform (that is, 4x4 blocks) can be coded by: a plurality of 4x4 blocks are serially converted into 8x8 data blocks; For the obtained 8x8 block, the corresponding 8x8 block corresponding code table can be used for encoding or decoding operation.
  • Embodiments of the present invention provide a method and an apparatus for image entropy coding and entropy decoding, so as to reduce the occupation of storage resources and improve coding and decoding efficiency.
  • An image entropy coding method comprising:
  • the entropy coding code table parameter corresponding to the second block transformation is obtained by the mapping, and the second block transformation image block data is entropy encoded by using the entropy coding code table parameter.
  • An entropy decoding method including:
  • the entropy decoding code table parameter corresponding to the second block transformation is obtained by the mapping, and the entropy decoding is performed on the second block transformation image block data by using the entropy decoding code table parameter.
  • An entropy coding device comprising:
  • a first storage unit configured to store an entropy coded code table corresponding to the first type of block transformation
  • a first code table processing unit configured to perform mapping processing according to the entropy coding code table corresponding to the first type of block transformation saved by the first storage unit, to obtain an entropy coding code table parameter corresponding to the second block transformation;
  • a coding unit configured to perform entropy coding operation on data of the second block-transformed image block by using an entropy coded code table parameter corresponding to the second block transform obtained by the first code table processing unit.
  • An entropy coding device comprising:
  • a second storage unit configured to save the entropy decoding code table corresponding to the first type of block transformation
  • a second code table processing unit configured to perform an entropy decoding code table corresponding to the first type of block transformation saved by the second storage unit Mapping obtains an entropy decoding code table parameter corresponding to the second block transform
  • a decoding unit configured to perform an entropy decoding operation on data of the second block-transformed image block by using an entropy encoding code table parameter corresponding to the second block transform obtained by the second code table processing unit.
  • FIG. 1 is a schematic diagram of a processing procedure according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an entropy encoding apparatus according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an entropy decoding apparatus according to an embodiment of the present invention. Mode for Carrying Out the Invention
  • a code table corresponding to another block transform may be obtained according to the mapping process.
  • the corresponding processing process may include:
  • Step 1 When it is required to obtain a code table corresponding to another block transformation, obtain a code table corresponding to the saved first type of block transformation;
  • Step 2 After obtaining the code table corresponding to the saved first block transform, the code table corresponding to the first block transform (or the code table corresponding to the first block transform) may be converted according to the processing rule. deal with;
  • Step 3 The code table after the conversion process is used as a code table corresponding to the second block transform (or a code table corresponding to the second block transform).
  • steps 2 and 3 can be implemented: obtaining an entropy coding code table parameter or an entropy decoding code table parameter corresponding to the second block transformation according to the entropy coding code table or the entropy decoding code table mapping process corresponding to the first block transformation. .
  • the corresponding first block transform and the second block transform are transforms of different block sizes, and the corresponding different block sizes may be 4x16, 16x4, 16x8, 8x16, 8x8, 8x4, 4x8 or 4x4, and so on.
  • the corresponding entropy coding code table parameter or entropy decoding code table parameter includes at least one of the following: an intra-brightness coding code table number and type under variable length coding, an inter-frame brightness coding code table number and type, Intraframe Chroma coding code table number and type, inter-frame chroma coding code table number and type, run run, quantized coefficient value level, transform coefficient trans_coefficient, transition coefficient difference escape_level_diff and increasing image block end flag E0B;
  • the data of the corresponding image block may include the value of the run run and the value of the quantized coefficient value level.
  • the corresponding mapping process may be specifically determined according to the statistical characteristics of the corresponding second block transform. Specifically, after analyzing the distribution law of the data after different transform processing, a corresponding mapping processing manner is set on the code table corresponding to the data obtained by the certain transformation, so that the saved one block transform code table can be processed after being processed. Another block transformation corresponds to the data distribution law.
  • the corresponding mapping process may be a rule for adjusting the jump order between code tables, or may be a rule for adjusting elements in the code table.
  • the method may include:
  • the jump parameter corresponding to the second block transform may be pre-stored, or the corresponding current code sequence or the coded image or the coded stripe corresponding to the coded strip may be determined according to the current coding sequence or the coding characteristics of the coded picture or the coded slice.
  • the jump order of the code table in the code table corresponding to the corresponding first block transform can be adjusted, and the jump order is adjusted.
  • the code table is used as an entropy coding table parameter corresponding to the second block transformation to perform an entropy coding operation of the image under the second block transformation.
  • the corresponding hop parameter may be determined according to the statistic characteristic of the corresponding second block transform.
  • the code table corresponding to the second block transform may be obtained according to the statistic characteristic of the second block transform, and according to the Corresponding relationship between the code table corresponding to the two block transforms and the code table corresponding to the first block transform determines a corresponding jump parameter.
  • the corresponding jump parameter may be the code table number after the jump, or may be the difference between the code table number after the jump and the current code table number; the corresponding code sequence or
  • the encoding characteristics of the encoded image or the encoded strip may include: a mathematical statistical characteristic value of a sequence or an image or a stripe of a pixel value, a residual value, a pixel value or a residual value, or a pixel value of a sequence or an image or a stripe The mathematical statistical characteristic value of the residual value.
  • the jump parameter corresponding to the second block transform may also be pre-stored, and the corresponding current decoded sequence or decoded image may also be obtained from the encoded code stream according to the current decoded sequence or the decoded image or the decoded slice.
  • decoding a jump parameter corresponding to the strip, and further determining, according to the obtained jump parameter, and the code table corresponding to the first type of block transform, an entropy decoding code table parameter corresponding to the second type of block transform Entropy decoding operations are performed on the decoded sequence or decoded image or decoded slice of the current second block transformed image.
  • mapping process is performed by using the rules of the elements in the adjustment code table, it may include:
  • mapping parameters corresponding to the second block transform determines a mapping parameter corresponding to the current current coded sequence or the coded image or the coded stripe; and the code table corresponding to the first type of block transform may be adjusted according to the mapping parameter corresponding to the corresponding second block transform
  • the element value in the obtained entropy coding code table parameter corresponding to the second block transformation is performed to facilitate the entropy coding operation of the image under the second block transformation.
  • the corresponding mapping parameter may be specifically determined according to the statistical characteristic of the second block transformation.
  • the code table corresponding to the second block transformation may be obtained according to the statistical characteristic of the second block transformation, and according to the second Corresponding relationship between the element value included in the code table corresponding to the block transform and the element value included in the code table corresponding to the corresponding first block transform determines a corresponding mapping parameter.
  • the coding characteristics of the corresponding code sequence or the coded image or the coded slice may include: a mathematical value of the pixel value, the residual value, the pixel value or the residual value of the sequence or the image or the slice, or a sequence or an image Or the mathematical statistical characteristic value of the pixel value and residual value of the strip.
  • the mapping parameter corresponding to the corresponding second block transform may also be saved in advance, or the current decoded sequence or the decoded image or the decoded strip may be obtained from the encoded code stream according to the current decoded sequence or the decoded image or the decoded slice.
  • mapping parameters and adjusting data elements in the entropy decoding code table corresponding to the first type of block transformation according to the mapping parameters, and using the adjustment result as the entropy decoding code table parameter corresponding to the second block transformation (ie, according to the acquired
  • the mapping parameter and the code table corresponding to the first type of block transform determine a code table corresponding to the corresponding second block transform to perform entropy decoding on the decoded sequence or the decoded image or the decoded slice of the current second block transformed image.
  • the data element corresponding to the second block transform received from the entropy encoded code stream may be adjusted according to the mapping parameter, and according to the adjusted data element value and the entropy decoding code corresponding to the first type of block transform
  • the table obtains an entropy decoding code table parameter corresponding to the second block transform to perform an entropy decoding operation.
  • the above-mentioned jump parameter for indicating the jump order rule between the code tables or the mapping parameter for indicating the element mapping processing mode in the code table may be reserved in the entropy coding and entropy decoding system in advance.
  • the entropy coding end may also update the inter-code table jump order rule or the element processing rule in the code table according to the entropy coding sequence or the characteristics of the image or the stripe, and write the above rule into the sequence, image or strip isentropic coding information, So that the decoding end obtains the corresponding processing rule; corresponding corresponding decoding parameters or mapping parameters can be parsed from the coding elements such as sequences, images or strips in the code stream.
  • the foregoing embodiment of the present invention may be specifically used to perform entropy coding operation on any one or more of the following current encoded data:
  • the current entropy encoded data is an image luminance component
  • the current entropy encoded data is inter-entropy encoded data.
  • the foregoing embodiment of the present invention may be specifically used to perform an entropy decoding operation on any one or more of the following entropy decoded data:
  • the current entropy decoded data is an image luminance component
  • the current entropy decoded data is an image chrominance component
  • the current entropy decoded data is intra-entropy encoded data
  • the current entropy decoded data is inter-entropy encoded data.
  • the rule for adjusting the jump order between the code tables is used as the conversion rule, that is, the corresponding code table is obtained by the implementation of the code table jump.
  • the 4x4 block obtained after 4x4 transform has a steeper data distribution than the 8x8 block, and encodes or decodes 4x4 using Vx and VLD code tables corresponding to 8x8 blocks.
  • the data distribution law of the 4x4 block can be adapted by changing the condition of the code table jump.
  • the image block of 4x4 transform (encoding end) or 4x4 inverse transform (decoding end) is called 4x4 transform block;
  • the image block of 8x8 transform (encoding end) or 8x8 inverse transform (code end) is called 8x8 transform block.
  • the corresponding 8x8 block has a total of 19 code tables corresponding to the VLC and VLD code tables, which may specifically include:
  • the jump rule of the code table is sequentially increased by one, that is, when the encoding element satisfies certain conditions, the code table is switched to be adjacent to the current code table serial number but The table whose sequence number is one year old, for example, is switched from VLC5_Intra to VLC6_Intra.
  • the code table jump rule adapted to the 4x4 block is used to select and apply each code table to adapt to the data of the 4x4 block.
  • Cloth law Considering that the corresponding data variation range of the 4x4 block data is usually larger than that of the 8x8 block, the code table jump mode that can be used can be as shown in Table 3:
  • VLC4_ Chroma N/A In the above three jump tables, when the current element is encoded or decoded using a certain code table, if the current coded or decoded element satisfies a predetermined condition, the code table jump of the next coded or decoded element is used. Go to the code table corresponding to the current code table and jump to the determined code table, specifically to jump to the current code table sequence value plus the corresponding jump value. For example, when inter-frame coding and decoding of a luma block, the current encoding or decoding element uses a VLC3_Inter code table in each code table corresponding to the luma block inter-frame coding (ie, each code table in Table 2).
  • the sequence number of the VLC3_Inter code table is 3
  • the value of the code table after the jump is 5, that is, the sequence number of the code table after the jump is 5
  • the code table used by the corresponding next coded or decoded element will jump to the VLC5_Inter code table with a sequence number of 5.
  • the pre-encoded or decoded element uses the VLC6_Intra or VLC6_Inter or VL C4_Chr 0 ma code table, it is the last code table under the current coding condition (for example, luma block intra-frame coding). Therefore, the jump parameter value is not available, and is set to N/A; that is, the sum of the jump parameter value of the code table and the current code table serial number cannot exceed the sequence number value of the last code table under the current encoding or decoding condition; otherwise, It will not be possible to determine the code table to be used after the jump.
  • each jump parameter value is determined according to the distribution law of the data of the 4x4 block. If it is necessary to obtain a code table of other kinds of block transforms, the corresponding jump parameters need to be set according to the law of issuance of the data of the block transform.
  • the jump table may be pre-stored in the encoding and decoding system, or the jump table may be updated at the encoding end according to the current coding sequence, the characteristics of the image, the stripe, and the content, and the updated jump table is stored in the sequence header or image. Head or strip in the head.
  • the decoder then extracts the updated jump table from the sequence header or image header or slice header in the code stream for decoding the current sequence or image or strip.
  • the encoding end maps the elements in the entropy encoding code table to obtain the entropy encoding parameters corresponding to the second block transformation; and the decoding end maps the image block data using the second block transformation according to the mapping rule. And decoding the mapped data by using an entropy decoding code table corresponding to the first type of block transform.
  • the entropy coding and entropy decoding code tables corresponding to the second transform are respectively generated at the entropy coding and the entropy decoding end according to the foregoing mapping rule, to encode and decode the image data of the second transform using the second transform.
  • the elements in the corresponding code table include: index value, r m, level , E0B.
  • the index value in the code table in this embodiment is trans_coefficient. If the current encoding uses 4x4 and 8x8 two transforms. Since there are a total of 64 pixel values to be encoded in the 8x8 transform, the r m and level pairs may have up to 64 pairs; while in the 4x4 transform, there are a total of 16 pixel values to be encoded, and the run and level pairs may have up to 16 pairs.
  • the value of E0B is related to the logarithm of the nm and level pairs under the encoding conditions corresponding to the current code table.
  • E0B If, in the statistical sense, the run and 1 eve 1 pairs have more logarithms under the current encoding condition, the value of E0B will be set to a larger value, otherwise E0B is a smaller value. Since the 4x4 transform block itself has fewer elements to be coded than the 8x8 transform block, when encoding a 4x4 transform block, its corresponding E0B value should be smaller than the E0B value corresponding to the 8x8 transform block, otherwise the coding efficiency will be reduced.
  • the value of E0B should not be too large when encoding the 4x4 transform block using the code table. Therefore, in the original code table, the value corresponding to E0B is M, and the code table using 8x8 transform is used.
  • the corresponding EOB value in the code table can be converted into a smaller value ⁇ and the index value of N to M-1 in the original code table is incremented by 1 when encoding the 4x4 transform block data, but The corresponding run and level are unchanged for the data. That is, the index values corresponding to the original run and level pairs are converted from N to M-1 to ⁇ 1 to 3 ⁇ 41.
  • the index value is at N+1. Between M, the index value is decremented by 1; if the index value is equal to N, the index value is assigned 3 ⁇ 41. After the above operation, the converted index value is searched in the current code table to obtain the corresponding run and level pairs.
  • the conversion relationship between the corresponding index value and the encoded or decoded element can be obtained according to the statistical characteristics of the data. For example, in the VLC and VLD code tables, if the E0B value is 8, statistically meaning the last encoded or decoded image block has 7 run value and level value pairs under the current encoding or decoding conditions.
  • the value corresponding to the code table E0B can be converted to '0', that is, when the 4x4 transform block is encoded, the E0B value is changed from '8' to 0, and the value is ' 0' is written in the code stream. If the 4x4 transform block is decoded, if the value is '0', the value is converted to '8'.
  • the element is E0B, and the current image block is decoded. .
  • the E0B value can be mapped to 0 when encoding or decoding the 4x4 transformed 4x4 image block data, and the value is (the index value of ⁇ 7 is sequentially mapped to Guang 8, whose corresponding run value and level value remain unchanged, as shown in the following table, where Table 4 is the relationship between the E0B value and the index and run and level in the VLC3_Intra code table of the original 8x8 image block. 5 is the relationship between the E0B value in the code table of the 4x4 image block after the mapping process, and the index value such as run and level data:
  • mapping operation When decoding, if the current block is a 4x4 transform block, the mapping operation is as follows: If trans_coeff icient is between 1 and the corresponding value of E0B in CurrentVLCTable (inclusive), Bay 1 Jtrans-coeff icient is decremented by 1; if trans-coefficient is equal to 0 , J3 ⁇ 4iJtrans_coeff icient assigns the value of EOB in Curr entVLCTab 1 e.
  • the code table corresponding to the image block of the desired size can be obtained by converting the elements in the saved code table by the above mapping conversion method, and the code table is obtained by a certain processing rule without being stored in the coding and In the decoding system, system resources are effectively saved.
  • mapping rule of the code table element under the different transforms may be pre-stored in the encoding and decoding system, and the mapping rule may be updated according to the current coding sequence, the image, the characteristics and the content of the stripe, and the updated mapping rule may be updated at the encoding end.
  • the decoder Stored in the sequence header or image header or strip header.
  • the decoder then extracts the updated mapping rules from the sequence header or header or slice header in the code stream for decoding the current sequence or image or strip.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • An embodiment of the present invention further provides an entropy coding apparatus, and the specific implementation structure is as shown in FIG. 2, and may include the following processing units:
  • a first storage unit 21, configured to store an entropy coded code table corresponding to the first type of block transformation
  • the first code table processing unit 22 is configured to perform mapping processing according to the entropy coded code table corresponding to the first type of block transform saved by the first storage unit 21, to obtain an entropy coded code corresponding to the second block transform.
  • the mapping processing that may be adopted by the first code table processing unit 22 includes any one of the following implementation manners: manner 1: performing a mapping operation according to a jump parameter used to determine a code table sequence number after the jump, where The jump parameter is the code table number after the jump, or the jump parameter is the difference between the code table number after the jump and the current code sequence number;
  • Manner 2 adjusting an element value in the entropy coding code table corresponding to the first type of block transformation according to a mapping parameter corresponding to the second block transformation, and obtaining an entropy coding code table parameter corresponding to the second block transformation;
  • an encoding unit 23 configured to perform entropy encoding operation on data of the second block-transformed image block by using an entropy encoding code table parameter corresponding to the second block transform obtained by the first code table processing unit 22;
  • the coding unit is configured to perform an entropy coding operation on the data of the current or next image block of the second block transform adopting the second transform process according to the entropy code table parameter corresponding to the second block transform.
  • the device may further include a first jump parameter obtaining unit 24, configured to acquire a preset jump parameter, or may be used to obtain a current encoded sequence or a coded image or a coded strip.
  • the jump parameter determined by the characteristic is encoded, and the coding unit is notified to write the jump parameter into the encoded code stream.
  • the device may further include a first mapping parameter acquiring unit 25, configured to acquire a preset mapping parameter; or may be used to acquire encoding characteristics according to the current encoding sequence or the encoded image or the encoded stripe. Determining a mapping parameter of the current coding sequence or the encoded image or the encoded slice, and notifying the coding unit to write the mapping parameter into the code stream.
  • the embodiment of the present invention further provides an entropy decoding device, and the specific implementation structure thereof is as shown in FIG. 3, and may include the following processing units:
  • a second storage unit 31 configured to store an entropy decoding code table corresponding to the first type of block transformation
  • a second code table processing unit 32 configured to obtain an entropy decoding code table parameter corresponding to the second block transform according to the entropy decoding code table mapping corresponding to the first type of block transformation saved by the second storage unit 31;
  • the processing of the mapping adopted by the second code table processing unit may include any of the following methods:
  • Manner 1 The mapping operation is performed according to the jump parameter used to determine the sequence number of the code table after the jump, where the jump parameter is the code table number after the jump, or the jump parameter is a jump The difference between the subsequent code table serial number and the current code serial number;
  • Manner 2 adjusting the data element corresponding to the second block transformation according to the mapping parameter, and according to the adjusted number Obtaining an entropy decoding code table parameter corresponding to the second block transformation according to the element value and the entropy decoding code table corresponding to the first type of block transformation; or, adjusting the entropy decoding code table corresponding to the first type of block transformation according to the mapping parameter In the data element, the adjustment result is used as the entropy decoding code table parameter corresponding to the second block transformation;
  • the decoding unit 33 is configured to perform an entropy decoding operation on the data of the second block-transformed image block by using the entropy encoding code table parameter corresponding to the second block transform obtained by the second code table processing unit 32.
  • the decoding unit is configured to perform an entropy encoding operation on the current or next image of the second block transform using the second transform processing according to the entropy decoding code table parameter corresponding to the second block transform.
  • the device may further include a second jump parameter obtaining unit 34, configured to acquire a preset jump parameter; or, configured to receive from the current decoded sequence or the decoded image or the decoded stripe.
  • the mapping parameter of the current decoded sequence or decoded image or decoded strip obtained in the encoded code stream.
  • the apparatus may further include: a second mapping parameter acquiring unit 35, configured to acquire a preset mapping parameter; or, configured to receive the encoded code stream according to the current decoding sequence or the decoded image or the decoded stripe.
  • the mapping parameter of the current decoded sequence or decoded image or decoded strip obtained in .
  • the implementation of the embodiment of the present invention can obtain a suitable code table according to the statistical characteristics of the image block of the current size, thereby effectively reducing the entropy caused by the ABT (Adapt Block Transform) technology. Encoding code table overhead.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

A method and device for image entropy encoding and entropy decoding are provided, which includes: according to an entropy encoding and decoding code table corresponding to the block transformation of the first type, acquiring the parameters of an entropy encoding and decoding code table corresponding to the block transformation of the second type by mapping, and using the parameters of the entropy encoding and decoding code table to perform the entropy encoding and decoding on the image block data of the block transformation of the second type. In the embodiments of present invention, as only storing the code table corresponding to the blocktransformation of the first type, and acquiring the code table corresponding to the block transformation of the second type by a conversion processing of the stored code table corresponding to the block transformation of the first type, it can be achieved to reuse the code table in different transformation modes on condition of occupying less storage resource, and the efficiency of the entropy encoding or entropy decoding can be ensured.

Description

一种图像熵编码、 熵解码的方法及装置 本申请要求于 2008年 01月 31日提交中国专利局、 申请号为 200810009057. 2、 发 明名称为 "一种图像熵编码、 熵解码的方法及装置"的中国专利申请的优先权, 其全部 内容通过弓 I用结合在本申请中。 技术领域 本发明涉及编解码技术领域, 尤其涉及一种图像熵编码、 熵解码的方法及装置。 发明背景 在视频和图像编解码过程中是, 为减小视频和图像数据在传输或存储时的数据量, 通常需要采用相应的压缩编解码技术。在视频和图像压缩编码过程中需要采用变换技术 将一副图像、一个区域中的图像内容及信息经变换后集中于某一特定区域, 以便在视频 压缩算法对相应内容进行有效的压缩。具体可以将一幅图像或图像中的一个区域被划分 成若干小块或子区域(称为子块, 亦可称之为图像块), 之后再子块为单位进行变换。 其中, 子块的大小可以但不限于为 4x4或 8x8等, 相应的 4和 8均以图像像素为单位。 在视频和图像编码解码中通常以 16x16的图像块为一个编解码处理单元,这个单元成为 宏块。一个宏块还有可能会进一步划分成若干尺寸更小的子块, 在现有文献中, 子块和 宏块可以统称为图像块。  Method and device for image entropy coding and entropy decoding The present application claims to be submitted to the Chinese Patent Office on January 31, 2008, and the application number is 200810009057. 2. The invention name is "an image entropy coding, entropy decoding method and device" The priority of the Chinese Patent Application, the entire contents of which is incorporated herein by reference. TECHNICAL FIELD The present invention relates to the field of codec technologies, and in particular, to a method and an apparatus for image entropy coding and entropy decoding. BACKGROUND OF THE INVENTION In the video and image encoding and decoding process, in order to reduce the amount of data when video and image data are transmitted or stored, it is usually necessary to adopt a corresponding compression codec technique. In the video and image compression coding process, a transform technique is needed to transform an image, image content and information in an area into a specific area, so as to effectively compress the corresponding content in the video compression algorithm. Specifically, an image or an area in the image may be divided into a plurality of small blocks or sub-regions (referred to as sub-blocks, which may also be referred to as image blocks), and then the sub-blocks are transformed in units. The size of the sub-block may be, but is not limited to, 4x4 or 8x8, and the corresponding 4 and 8 are in units of image pixels. In video and image coding and decoding, a 16x16 image block is usually used as a codec processing unit, and this unit becomes a macroblock. It is also possible for a macroblock to be further divided into sub-blocks of smaller size. In the prior art, sub-blocks and macroblocks may be collectively referred to as image blocks.
在进行子块划分过程中,具体可以将一个特定区域分别按照不同的子块大小进行划 分, 然后针对不同大小的子块进行不同的变换处理, 称为自适应块大小的变换技术。这 里所说的变换是指具有一定数学特性的数据处理方法,例如 DCT (离散余弦变换)、小波 变换、 整数变换等。 在视频和图像编码解码中这些变换通常以矩阵形式表示。  In the process of sub-block partitioning, a specific area may be divided according to different sub-block sizes, and then different transform processing is performed for different size sub-blocks, which is called an adaptive block size transform technique. The transformation referred to herein refers to a data processing method having certain mathematical characteristics, such as DCT (Discrete Cosine Transform), wavelet transform, integer transform, and the like. These transforms are typically represented in matrix form in video and image code decoding.
在自适应块尺寸变换技术中存在多种变换模式时,部分宏块可以单独使用一种变换 模式,所述的变换模式是指变换及变换相应的编解码处理方式,例如,一个大小为 16x16 的宏块中所有子块都划分成 8x8大小,并且所有子块均采用 8x8的变换及与变换相应的 编码及解码技术(即采用一种变换模式)。 同时, 部分宏块中的子块可以使用不同的变 换模式, 例如: 在一个 16x16的宏块中若含有 4x4、 4x8、 8x4及 8x8几种子块类型, 则 可以分别使用 4x4、 4x8、 8x4及 8x8各自对应的变换模式。  When there are multiple transform modes in the adaptive block size transform technology, some macroblocks may use one transform mode separately, and the transform mode refers to transform and transform corresponding codec processing methods, for example, a size of 16x16. All sub-blocks in the macroblock are divided into 8x8 sizes, and all sub-blocks adopt 8x8 transform and encoding and decoding techniques corresponding to the transform (ie, adopt a transform mode). At the same time, sub-blocks in some macroblocks can use different transform modes. For example: If a 16x16 macroblock contains 4x4, 4x8, 8x4, and 8x8 sub-block types, you can use 4x4, 4x8, 8x4 and Each of 8x8 corresponds to a transformation mode.
其中, 若数据块采用不同的变换, 则将使得经过不同变换处理后的数据的分布规律 会也不相同, 为此, 在对经过不同变换之后的数据块进行 VLC (Variable Length Codi ng, 变长编码)和 VLD (Variable Length Coding, 变长解码))过程中, 需要根据数据 块的分布规律(即统计特性)分别采用相适应的码表进行编码或解码操作。 If the data block adopts different transforms, the distribution law of the data after different transform processing will be different. For this reason, VLC (Variable Length Codi) is performed on the data blocks after different transforms. In the process of ng, variable length coding, and VLD (Variable Length Coding), it is necessary to use an adaptive code table for encoding or decoding operations according to the distribution rule of the data block (ie, statistical characteristics).
在视频编解码标准中使用变长编码时会为编码元素设置一套码表,码表根据编码元 素为编码图像亮度分量元素、 图像色度分量元素、 帧间编码、 帧内编码进行划分。 该编 码元素是指编码过程中产生的游程(run)和量化系数值(level ), 其中, run是指在编 码或解码过程中在图像块扫描中一个非 0系数前值为 0的系数的个数, level是指量化 系数的数值大小。 在变长编码中 run和 level以一对数据的形式出现。  When variable length coding is used in the video codec standard, a set of code tables is set for the coding elements, and the code table is divided according to the coding elements, the coding image luminance component elements, the image chrominance component elements, the interframe coding, and the intra coding. The coding element refers to a run and a quantized coefficient value (level) generated in the encoding process, where run is a coefficient of a value other than 0 before the non-zero coefficient in the image block scan in the encoding or decoding process. The number, level is the numerical value of the quantized coefficient. In variable length coding run and level appear as a pair of data.
在变长编码中, 编码端得到一对 run和 level之后, 在码表中根据 run和 level的 数值查找到相应的索引值, 该索引值称为变换系数(trans—coefficient 在变长编码 中 trans_coefficient值会规定在一定范围内,若因编码时 level或 run值过大而没法 确定 trans—coefficient值, 贝 |J还会使用转逸系数差值 ( escape_level_diff ), escape _level_diff通常是在 trans_coeff icient与 run和 level对之间没法建立联系时使用。 在编码过程中,编码系统会根据 trans_coeff icient和 escape_level_diff (如果存在) 的值以及当前编码元素是否为图像块亮度分量元素、图像块色度分量元素以及是否为帧 间编码元素、帧内编码元素等因素确定下一编码元素所使用的码表。如果当前图像块编 码结束,编码系统会在当前图像块最后一个编码元素编码完毕后写入一个块结束标志(E 0B), E0B的值由当前码表决定。  In variable length coding, after the encoder obtains a pair of run and level, the corresponding index value is found in the code table according to the run and level values. The index value is called transform coefficient (trans-coefficient in variable length coding trans_coefficient The value will be specified within a certain range. If the trans-coefficient value cannot be determined due to the level or run value being too large during encoding, Bay|J will also use the transition coefficient difference (escape_level_diff), and escape_level_diff is usually in trans_coeff icient The run and level pairs cannot be used when establishing a connection. In the encoding process, the encoding system will according to the values of trans_coeff icient and escape_level_diff (if any) and whether the current coding element is an image block luminance component element or an image block chrominance component element. And determining whether the code table used by the next coding element is determined by factors such as an inter coding element, an intra coding element, etc. If the current picture block coding ends, the coding system writes a block after the last coding element of the current picture block is encoded. End flag (E 0B), the value of E0B is determined by the current code table.
在变长解码中, 根据从码流中解析得到的 trans_coeff icient和 escape_level_di ff (如果存在)值在相应的码表中查找 trans_coeff icient和 escape_level_diff对应 的 run和 level对。 在解码过程中, 解码系统会根据 trans_coeff icient和 escape_le vel_diff (如果存在) 的值以及当前解码元素是否为图像块亮度分量元素、 图像块色度 分量元素以及是否为帧间编码元素、帧内编码元素等因素确定下一解码元素所使用的码 表。如果解码系统解析得到的语法元素为当前码表中 E0B的对应值, 则表示当前图像块 解码结束, 即需要开始针对下一图像块的解码。  In variable length decoding, the run and level pairs corresponding to trans_coeff icient and escape_level_diff are looked up in the corresponding code table based on the trans_coeff icient and escape_level_di ff (if present) values parsed from the code stream. During the decoding process, the decoding system will according to the values of trans_coeff icient and escape_le vel_diff (if any) and whether the current decoding element is an image block luminance component element, an image block chrominance component element, and whether it is an inter-coded element or an intra-coded element. The factors determine the code table used by the next decoded element. If the syntax element parsed by the decoding system is the corresponding value of E0B in the current code table, it indicates that the decoding of the current image block ends, that is, the decoding for the next image block needs to be started.
通常, 为节省编码器和解码器的内存占用资源, 通常仅设置一种变换后的数据块对 应的码表, 对于其他尺寸的数据块则可以经过相应的变换, 之后再采用设置的相应码表 进行编码或解码操作。  Generally, in order to save memory resources of the encoder and the decoder, generally only one code table corresponding to the transformed data block is set, and for other sizes of data blocks, the corresponding code table can be transformed, and then the corresponding code table is set. Perform encoding or decoding operations.
以 4x4块和 8x8块为例, 在编码或解码操作过程中, 相应的选择使用码表的实现方 案具体可以为以下两种:  Taking 4x4 blocks and 8x8 blocks as an example, in the process of encoding or decoding, the corresponding implementation scheme of using the code table may be specifically as follows:
方案一 假设当前只有 4x4块对应的码表, 则对于经 8x8变换之后的数据块(即 8x8块), 其使用码表的方式可以为: 首先, 将 8x8块采用采样的方式分割成 4x4数据块; 之后, 对于获得的 4个 4x4数据块分别使用 4x4块对应的码表进行编码或解码操作。 Option One Assuming that there is only a code table corresponding to 4x4 blocks, for a data block after 8x8 transformation (ie, 8x8 blocks), the code table can be used as follows: First, 8x8 blocks are segmented into 4x4 data blocks by sampling; For the obtained 4 4x4 data blocks, respectively, using a code table corresponding to 4x4 blocks for encoding or decoding operations.
方案二  Option II
假设当前只有 8x8块对应的码表,则对于经过 4x4变换后得到的数据块 (即 4x4块), 其使用码表的方式可以为: 将多个 4x4块以一定方式串成 8x8数据块; 之后, 针对获得 的 8x8块则可以采用相应的 8x8块对应的码表进行编码或解码操作。  Assuming that there is only a code table corresponding to 8x8 blocks, the data block obtained by the 4x4 transform (that is, 4x4 blocks) can be coded by: a plurality of 4x4 blocks are serially converted into 8x8 data blocks; For the obtained 8x8 block, the corresponding 8x8 block corresponding code table can be used for encoding or decoding operation.
在实现本发明过程中, 发明人发现, 在上述现有技术中, 无论是将将 8x8块分割后 采用相应码表的实现方案, 还是将 4x4块串成 8x8块后采用相应码表的实现方案, 其均 存在当前采用的码表无法很好地适应相应尺寸的数据块的数据分布规律的问题,进而降 低了相应的编解码效率。 发明内容 本发明的实施例提供了一种图像熵编码、熵解码的方法及装置, 以降低存储资源的 占用, 并可以提高编解码效率。  In the process of implementing the present invention, the inventors have found that in the above prior art, whether the implementation of the corresponding code table is to be used after dividing 8x8 blocks, or the implementation of the corresponding code table after 4x4 blocks are serialized into 8x8 blocks. Both of them have the problem that the currently used code table cannot adapt well to the data distribution rule of the data block of the corresponding size, thereby reducing the corresponding codec efficiency. SUMMARY OF THE INVENTION Embodiments of the present invention provide a method and an apparatus for image entropy coding and entropy decoding, so as to reduce the occupation of storage resources and improve coding and decoding efficiency.
一种图像熵编码方法, 包括:  An image entropy coding method, comprising:
根据第一种块变换对应的熵编码码表,映射获得第二种块变换对应的熵编码码表参 数, 利用所述熵编码码表参数对第二种块变换图像块数据进行熵编码。  According to the entropy coding code table corresponding to the first block transformation, the entropy coding code table parameter corresponding to the second block transformation is obtained by the mapping, and the second block transformation image block data is entropy encoded by using the entropy coding code table parameter.
一种熵解码方法, 包括:  An entropy decoding method, including:
根据第一种块变换对应的熵解码码表,映射获得第二种块变换对应的熵解码码表参 数, 利用所述熵解码码表参数对第二种块变换下图像块数据进行熵解码。  According to the entropy decoding code table corresponding to the first block transformation, the entropy decoding code table parameter corresponding to the second block transformation is obtained by the mapping, and the entropy decoding is performed on the second block transformation image block data by using the entropy decoding code table parameter.
一种熵编码装置, 包括:  An entropy coding device, comprising:
第一存储单元, 用于保存的第一种块变换对应的熵编码码表;  a first storage unit, configured to store an entropy coded code table corresponding to the first type of block transformation;
第一码表处理单元,用于根据对所述第一存储单元保存的第一种块变换对应的熵编 码码表进行映射处理, 获得第二种块变换对应的熵编码码表参数;  a first code table processing unit, configured to perform mapping processing according to the entropy coding code table corresponding to the first type of block transformation saved by the first storage unit, to obtain an entropy coding code table parameter corresponding to the second block transformation;
编码单元,用于使用所述第一码表处理单元获得的第二种块变换对应的熵编码码表 参数对第二种块变换的图像块的数据进行熵编码操作。  And a coding unit, configured to perform entropy coding operation on data of the second block-transformed image block by using an entropy coded code table parameter corresponding to the second block transform obtained by the first code table processing unit.
一种熵编码装置, 包括:  An entropy coding device, comprising:
第二存储单元, 用于保存的第一种块变换对应的熵解码码表;  a second storage unit, configured to save the entropy decoding code table corresponding to the first type of block transformation;
第二码表处理单元,用于根据第二存储单元保存的第一种块变换对应的熵解码码表 映射获得第二种块变换对应的熵解码码表参数; a second code table processing unit, configured to perform an entropy decoding code table corresponding to the first type of block transformation saved by the second storage unit Mapping obtains an entropy decoding code table parameter corresponding to the second block transform;
解码单元,用于使用所述第二码表处理单元获得的第二种块变换对应的熵编码码表 参数对第二种块变换的图像块的数据进行熵解码操作。  And a decoding unit, configured to perform an entropy decoding operation on data of the second block-transformed image block by using an entropy encoding code table parameter corresponding to the second block transform obtained by the second code table processing unit.
由上述本发明的实施例提供的技术方案可以看出, 本发明实施例中, 由于采用了仅 保存第一种块变换对应的码表, 而对于第二种块变换对应的码表, 则是根据保存的第一 种块变换对应的码表转换处理获得, 因此, 其可以使得在占用较少的存储资源的条件下 (仅需要存储第一种块变换对应的码表)实现不同变换模式下的码表的复用, 并且保证 熵编码或熵解码效率。 附图简要说明 图 1为本发明实施例提供的处理过程示意图;  It can be seen from the technical solutions provided by the foregoing embodiments of the present invention that, in the embodiment of the present invention, since only the code table corresponding to the first block transform is saved, and the code table corresponding to the second block transform is used, Obtaining according to the code table conversion process corresponding to the saved first block transform, so that it can be implemented in different transform modes under the condition of occupying less storage resources (only need to store the code table corresponding to the first block transform) The multiplexing of the code tables and guarantees entropy coding or entropy decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic diagram of a processing procedure according to an embodiment of the present invention;
图 2为本发明实施例提供的熵编码装置的结构示意图;  2 is a schematic structural diagram of an entropy encoding apparatus according to an embodiment of the present invention;
图 3为本发明实施例提供的熵解码装置的结构示意图。 实施本发明的方式 本发明实施例中, 在仅保存一种块变换对应的码表的情况下, 可以根据映射处理获 得相应的另一种块变换对应的码表。  FIG. 3 is a schematic structural diagram of an entropy decoding apparatus according to an embodiment of the present invention. Mode for Carrying Out the Invention In the embodiment of the present invention, in a case where only one code table corresponding to one block transform is saved, a code table corresponding to another block transform may be obtained according to the mapping process.
如图 1所示, 相应的处理过程可以包括:  As shown in FIG. 1, the corresponding processing process may include:
步骤 1, 在需要获取另一种块变换对应的码表时, 获取保存的第一种块变换对应的 码表;  Step 1: When it is required to obtain a code table corresponding to another block transformation, obtain a code table corresponding to the saved first type of block transformation;
步骤 2, 在获取保存的第一种块变换对应的码表后, 便可以根据处理规则对所述第 一块变换对应的码表(或称为第一种块变换对应的码表)进行转换处理;  Step 2: After obtaining the code table corresponding to the saved first block transform, the code table corresponding to the first block transform (or the code table corresponding to the first block transform) may be converted according to the processing rule. deal with;
步骤 3, 将转换处理后的码表作为第二块变换对应的码表 (或称为第二种块变换对 应的码表) 。  Step 3: The code table after the conversion process is used as a code table corresponding to the second block transform (or a code table corresponding to the second block transform).
即通过上述步骤 2、 3可以实现: 根据所述第一种块变换对应的熵编码码表或熵解码 码表映射处理获得第二种块变换对应的熵编码码表参数或熵解码码表参数。  That is, the foregoing steps 2 and 3 can be implemented: obtaining an entropy coding code table parameter or an entropy decoding code table parameter corresponding to the second block transformation according to the entropy coding code table or the entropy decoding code table mapping process corresponding to the first block transformation. .
相应的第一种块变换和第二种块变换为不同块尺寸下的变换,相应的不同块尺寸可 以为 4x16、 16x4、 16x8、 8x16、 8x8、 8x4、 4x8或 4x4, 等等。  The corresponding first block transform and the second block transform are transforms of different block sizes, and the corresponding different block sizes may be 4x16, 16x4, 16x8, 8x16, 8x8, 8x4, 4x8 or 4x4, and so on.
在上述处理过程中, 相应的熵编码码表参数或熵解码码表参数包括以下至少一项: 变长编码下的帧内亮度编码码表序号和类型, 帧间亮度编码码表序号和类型, 帧内 色度编码码表序号和类型,帧间色度编码码表序号和类型,游程 run,量化系数值 level , 变换系数 trans_coefficient, 转逸系数差值 escape_level_diff和增加图像块结束标 志 E0B; In the above processing, the corresponding entropy coding code table parameter or entropy decoding code table parameter includes at least one of the following: an intra-brightness coding code table number and type under variable length coding, an inter-frame brightness coding code table number and type, Intraframe Chroma coding code table number and type, inter-frame chroma coding code table number and type, run run, quantized coefficient value level, transform coefficient trans_coefficient, transition coefficient difference escape_level_diff and increasing image block end flag E0B;
相应的图像块的数据可以包括游程 run的值和量化系数值 level的值。  The data of the corresponding image block may include the value of the run run and the value of the quantized coefficient value level.
其中, 相应的映射处理具体可以为根据相应的第二种块变换的统计特性确定。具体 可以在分析经过不同变换处理之后数据的分布规律,对经过某一种变换获得的数据对应 的码表设置相应的映射处理方式, 以使得将保存的一种块变换码表经处理后能够符合另 一种块变换对应的数据分布规律。  The corresponding mapping process may be specifically determined according to the statistical characteristics of the corresponding second block transform. Specifically, after analyzing the distribution law of the data after different transform processing, a corresponding mapping processing manner is set on the code table corresponding to the data obtained by the certain transformation, so that the saved one block transform code table can be processed after being processed. Another block transformation corresponds to the data distribution law.
在上述实现方案中, 相应的映射处理可为调整码表间跳转顺序的规则, 或者, 也可 以为调整码表中元素的规则。  In the above implementation, the corresponding mapping process may be a rule for adjusting the jump order between code tables, or may be a rule for adjusting elements in the code table.
若采用调整码表间跳转顺序的规则进行映射处理时, 则可以包括:  If the mapping process is performed by using the rules of the order of the jump order between the code tables, the method may include:
在编码端, 可以预先保存第二种块变换对应的跳转参数, 也可以根据当前编码序列 或编码图像或编码条带的编码特性确定相应的当前编码序列或编码图像或编码条带对 应的跳转参数; 这样, 可以根据保存的第二种块变换对应的跳转参数对相应的第一种块 变换对应的码表中的码表的跳转顺序进行调整,并将调整跳转顺序后的码表作为第二种 块变换对应的熵编码码表参数以进行第二种块变换下的图像的熵编码操作。其中, 相应 的跳转参数具体可以为根据相应的第二种块变换的统计特性确定; 例如, 可以根据第二 种块变换的统计特性获得第二种块变换对应的码表,并根据该第二种块变换对应的码表 与第一种块变换对应的码表之间的对应关系确定相应的跳转参数。  On the encoding end, the jump parameter corresponding to the second block transform may be pre-stored, or the corresponding current code sequence or the coded image or the coded stripe corresponding to the coded strip may be determined according to the current coding sequence or the coding characteristics of the coded picture or the coded slice. In this way, according to the saved jump parameter corresponding to the second block transform, the jump order of the code table in the code table corresponding to the corresponding first block transform can be adjusted, and the jump order is adjusted. The code table is used as an entropy coding table parameter corresponding to the second block transformation to perform an entropy coding operation of the image under the second block transformation. The corresponding hop parameter may be determined according to the statistic characteristic of the corresponding second block transform. For example, the code table corresponding to the second block transform may be obtained according to the statistic characteristic of the second block transform, and according to the Corresponding relationship between the code table corresponding to the two block transforms and the code table corresponding to the first block transform determines a corresponding jump parameter.
在上述处理过程中, 相应的跳转参数可以为跳转后的码表序号, 或者, 也可以为跳 转后的码表序号与当前的码表序号之间的差值;相应的编码序列或编码图像或编码条带 的编码特性可以包括: 序列或图像或条带的像素值、 残差值、像素值或残差值的数学统 计特征值, 或者, 序列或图像或条带的像素值和残差值的数学统计特征值。  In the above process, the corresponding jump parameter may be the code table number after the jump, or may be the difference between the code table number after the jump and the current code table number; the corresponding code sequence or The encoding characteristics of the encoded image or the encoded strip may include: a mathematical statistical characteristic value of a sequence or an image or a stripe of a pixel value, a residual value, a pixel value or a residual value, or a pixel value of a sequence or an image or a stripe The mathematical statistical characteristic value of the residual value.
对应的, 在解码端, 同样可以预先保存第二种块变换对应的跳转参数, 也可以根据 当前解码序列或解码图像或解码条带从编码码流中获取确定相应的当前解码序列或解 码图像或解码条带对应的跳转参数, 进而根据获取的所述跳转参数, 以及第一种块变换 对应的码表, 确定相应的第二种块变换对应的熵解码码表参数, 以用于对当前第二种块 变换的图像的解码序列或解码图像或解码条带进行熵解码操作。  Correspondingly, at the decoding end, the jump parameter corresponding to the second block transform may also be pre-stored, and the corresponding current decoded sequence or decoded image may also be obtained from the encoded code stream according to the current decoded sequence or the decoded image or the decoded slice. Or decoding a jump parameter corresponding to the strip, and further determining, according to the obtained jump parameter, and the code table corresponding to the first type of block transform, an entropy decoding code table parameter corresponding to the second type of block transform, Entropy decoding operations are performed on the decoded sequence or decoded image or decoded slice of the current second block transformed image.
若采用调整码表中元素的规则进行映射处理时, 则可以包括:  If the mapping process is performed by using the rules of the elements in the adjustment code table, it may include:
在编码端, 预先保存第二种块变换对应的映射参数, 或者, 根据当前编码序列或编 码图像或编码条带编码特性确定相应的当前编码序列或编码图像或编码条带对应的映 射参数;并可以根据相应的第二种块变换对应的映射参数调整第一种块变换对应的码表 中的元素值, 获得第二种块变换对应的熵编码码表参数, 以便于进行第二种块变换下的 图像的熵编码操作。其中, 相应的映射参数具体可以为根据第二种块变换的统计特性确 定; 具体地, 可以根据第二种块变换的统计特性获得第二种块变换对应的码表, 并根据 该第二种块变换对应的码表包含的元素值与相应的第一种块变换对应的码表包含的元 素值之间的对应关系确定相应的映射参数。其中, 相应的编码序列或编码图像或编码条 带的编码特性可以包括: 序列或图像或条带的像素值、 残差值、像素值或残差值的数学 统计特征值, 或者, 序列或图像或条带的像素值和残差值的数学统计特征值。 At the encoding end, pre-save the mapping parameters corresponding to the second block transform, or according to the current coding sequence or The code image or the coded stripe coding characteristic determines a mapping parameter corresponding to the current current coded sequence or the coded image or the coded stripe; and the code table corresponding to the first type of block transform may be adjusted according to the mapping parameter corresponding to the corresponding second block transform The element value in the obtained entropy coding code table parameter corresponding to the second block transformation is performed to facilitate the entropy coding operation of the image under the second block transformation. The corresponding mapping parameter may be specifically determined according to the statistical characteristic of the second block transformation. Specifically, the code table corresponding to the second block transformation may be obtained according to the statistical characteristic of the second block transformation, and according to the second Corresponding relationship between the element value included in the code table corresponding to the block transform and the element value included in the code table corresponding to the corresponding first block transform determines a corresponding mapping parameter. The coding characteristics of the corresponding code sequence or the coded image or the coded slice may include: a mathematical value of the pixel value, the residual value, the pixel value or the residual value of the sequence or the image or the slice, or a sequence or an image Or the mathematical statistical characteristic value of the pixel value and residual value of the strip.
对应的, 在解码端, 同样可以预先保存相应第二种块变换对应的映射参数, 或者, 根据当前解码序列或解码图像或解码条带从编码码流中获取当前解码序列或解码图像 或解码条带对应的映射参数,并根据映射参数调整所述第一种块变换对应的熵解码码表 中的数据元素, 将调整结果作为第二种块变换对应的熵解码码表参数(即根据获取的映 射参数及第一种块变换对应的码表确定相应的第二种块变换对应的码表), 以对当前第 二种块变换下图像的解码序列或解码图像或解码条带进行熵解码。或者, 在解码端, 还 可以根据映射参数调整从熵编码码流中接收到的第二种块变换对应的数据元素,并根据 调整后的数据元素值及第一种块变换对应的熵解码码表获得第二种块变换对应的熵解 码码表参数, 以进行熵解码操作。  Correspondingly, at the decoding end, the mapping parameter corresponding to the corresponding second block transform may also be saved in advance, or the current decoded sequence or the decoded image or the decoded strip may be obtained from the encoded code stream according to the current decoded sequence or the decoded image or the decoded slice. Corresponding mapping parameters, and adjusting data elements in the entropy decoding code table corresponding to the first type of block transformation according to the mapping parameters, and using the adjustment result as the entropy decoding code table parameter corresponding to the second block transformation (ie, according to the acquired The mapping parameter and the code table corresponding to the first type of block transform determine a code table corresponding to the corresponding second block transform to perform entropy decoding on the decoded sequence or the decoded image or the decoded slice of the current second block transformed image. Or, at the decoding end, the data element corresponding to the second block transform received from the entropy encoded code stream may be adjusted according to the mapping parameter, and according to the adjusted data element value and the entropy decoding code corresponding to the first type of block transform The table obtains an entropy decoding code table parameter corresponding to the second block transform to perform an entropy decoding operation.
也就是说,上述用于指示码表间跳转顺序规则的跳转参数或者用于指示码表中元素 映射处理方式的映射参数可以预先保留在熵编码和熵解码系统中。也可以在熵编码端根 据熵编码序列或图像或条带的特性更新码表间跳转顺序规则或码表中元素处理规则,将 上述规则写入序列、 图像或条带等熵编码信息中, 以便于解码端获取相应的处理规则; 对应的在解码端可以从码流中序列、图像或条带等编码元素中解析得到相应的跳转参数 或映射参数。  That is to say, the above-mentioned jump parameter for indicating the jump order rule between the code tables or the mapping parameter for indicating the element mapping processing mode in the code table may be reserved in the entropy coding and entropy decoding system in advance. The entropy coding end may also update the inter-code table jump order rule or the element processing rule in the code table according to the entropy coding sequence or the characteristics of the image or the stripe, and write the above rule into the sequence, image or strip isentropic coding information, So that the decoding end obtains the corresponding processing rule; corresponding corresponding decoding parameters or mapping parameters can be parsed from the coding elements such as sequences, images or strips in the code stream.
在熵编码过程中,上述本发明实施例具体可以用于对以下任意一项或多项当前编码 数据进行熵编码操作:  In the entropy coding process, the foregoing embodiment of the present invention may be specifically used to perform entropy coding operation on any one or more of the following current encoded data:
( 1 ) 当前熵编码数据为图像亮度分量;  (1) the current entropy encoded data is an image luminance component;
( 2 ) 当前熵编码数据为图像色度分量;  (2) the current entropy encoded data is an image chrominance component;
( 3 ) 当前熵编码数据为帧内熵编码数据;  (3) the current entropy encoded data is intra-entropy encoded data;
(4) 当前熵编码数据为帧间熵编码数据。 在熵解码过程中,上述本发明实施例具体可以用于对以下任意一项或多项当前熵解 码数据进行熵解码操作: (4) The current entropy encoded data is inter-entropy encoded data. In the entropy decoding process, the foregoing embodiment of the present invention may be specifically used to perform an entropy decoding operation on any one or more of the following entropy decoded data:
( 1 ) 当前熵解码数据为图像亮度分量;  (1) the current entropy decoded data is an image luminance component;
(2) 当前熵解码数据为图像色度分量;  (2) The current entropy decoded data is an image chrominance component;
( 3) 当前熵解码数据为帧内熵编码数据;  (3) The current entropy decoded data is intra-entropy encoded data;
(4) 当前熵解码数据为帧间熵编码数据。  (4) The current entropy decoded data is inter-entropy encoded data.
为便于对本发明实施例的理解,下面将以具体的应用实例对本发明实施例的实现过 程进行详细说明。  To facilitate the understanding of the embodiments of the present invention, the implementation process of the embodiments of the present invention will be described in detail below with reference to specific application examples.
具体实施例一  Specific embodiment 1
在该实施例中, 采用调整码表间跳转顺序的规则作为转换规, 即采用码表跳转的实 现方式获得相应的码表。  In this embodiment, the rule for adjusting the jump order between the code tables is used as the conversion rule, that is, the corresponding code table is obtained by the implementation of the code table jump.
假设经过变换后的块包括 4x4块和 8x8块, 通常, 4x4变换后获得的 4x4块的数据分布 比 8x8块的数据分布更为陡峭, 在使用 8x8块对应的 VLC和 VLD码表编码或解码 4x4块时, 则可以通过改变码表跳转的条件的方式, 以适应 4x4块的数据分布规律。在这里经 4x4变 换(编码端) 或 4x4反变换(解码端) 的图像块称为 4x4变换块; 经 8x8变换 (编码端) 或 8x8反变换(码端) 的图像块称为 8x8变换块。  Assuming that the transformed block includes 4x4 blocks and 8x8 blocks, generally, the 4x4 block obtained after 4x4 transform has a steeper data distribution than the 8x8 block, and encodes or decodes 4x4 using Vx and VLD code tables corresponding to 8x8 blocks. In the case of a block, the data distribution law of the 4x4 block can be adapted by changing the condition of the code table jump. Here, the image block of 4x4 transform (encoding end) or 4x4 inverse transform (decoding end) is called 4x4 transform block; the image block of 8x8 transform (encoding end) or 8x8 inverse transform (code end) is called 8x8 transform block.
假设, 在熵编码或熵解码过程中, 相应的 8x8块对应 VLC和 VLD码表共有 19张码表, 具体可以包括:  It is assumed that, in the process of entropy coding or entropy decoding, the corresponding 8x8 block has a total of 19 code tables corresponding to the VLC and VLD code tables, which may specifically include:
( 1 )亮度块帧内编码码表 7张, 计为: VLCO_Intra, VLCl_Intra, VLC2_Intra, VL C3_Intra, VLC4_Intra, VLC5_Intra, VLC6_Intra; (1) 7 blocks of intra-coded code table of luminance block, calculated as: VLCO_Intra, VLCl_Intra, VLC2_Intra, VL C3_Intra, VLC4_Intra, VLC5_Intra, VLC6_Intra ;
(2)亮度块帧间编码 7张, 计为: VLCO_Inter, VLCl_Inter, VLC2_Inter, VLC3—I nter, VLC4_Inter, VLC5_Inter, VLC6_Inter; (2) 7 blocks of luminance block interframe, which are counted as: VLCO_Inter, VLCl_Inter, VLC2_Inter, VLC3-I nter, VLC4_Inter, VLC5_Inter, VLC6_Inter ;
( 3)色度块编码码表 5张, 计为: VLCO_Chroma, VLCl_Chroma, VLC2_Chroma, VLC 3_Chroma, VLC4_Chroma。  (3) 5 pieces of chroma block coding code table, calculated as: VLCO_Chroma, VLCl_Chroma, VLC2_Chroma, VLC 3_Chroma, VLC4_Chroma.
其中, 在利用上述各表对 8x8数据块进行 VLC编码或 VLD解码时, 码表的跳转规则是 依次增一,即当编码元素满足一定条件时码表会切换到与当前码表序号紧邻但序号值大 一的表, 例如, 由 VLC5_Intra切换到 VLC6_Intra等。  When the Vx encoding or the VLD decoding is performed on the 8x8 data block by using the foregoing tables, the jump rule of the code table is sequentially increased by one, that is, when the encoding element satisfies certain conditions, the code table is switched to be adjacent to the current code table serial number but The table whose sequence number is one year old, for example, is switched from VLC5_Intra to VLC6_Intra.
当利用上述各表对 4x4变换后的数据块(BP4x4块)进行 VLC编码或 VLD解码时, 则由 于 4x4块的数据的分布规律与经过 8x8变换获得的 8x8块的数据的分布规律不一致, 则可 以采用与 4x4块相适应的码表跳转规则进行各码表的选择应用, 以适应 4x4块的数据的分 布规律。考虑到通常情况下 4x4块的数据的分布规律中相应的数据变化幅度要较 8x8块更 大一些, 故其能够采用的码表跳转方式可以为如表广表 3所示: When the 4x4 transformed data block (BP4x4 block) is subjected to VLC coding or VLD decoding by using the above tables, since the distribution law of the 4x4 block data is inconsistent with the distribution rule of the 8x8 block data obtained by the 8x8 transform, The code table jump rule adapted to the 4x4 block is used to select and apply each code table to adapt to the data of the 4x4 block. Cloth law. Considering that the corresponding data variation range of the 4x4 block data is usually larger than that of the 8x8 block, the code table jump mode that can be used can be as shown in Table 3:
表 1  Table 1
码表 跳转参数值 Code table jump parameter value
VLC0— Intra Ml  VLC0— Intra Ml
VLC1_ Intra M2  VLC1_ Intra M2
VLC2_ Intra M3  VLC2_ Intra M3
VLC3_ Intra M4  VLC3_ Intra M4
VLC4_ Intra M5  VLC4_ Intra M5
VLC5_ Intra 1  VLC5_ Intra 1
VLC6_ Intra N/A  VLC6_ Intra N/A
码表 跳转参数值 Code table jump parameter value
VLC0_ Inter Nl  VLC0_ Inter Nl
VLC1_ Inter N2  VLC1_ Inter N2
VLC2_ Inter N3  VLC2_ Inter N3
VLC3_ Inter N4  VLC3_ Inter N4
VLC4_ Inter N5  VLC4_ Inter N5
VLC5_ Inter 1  VLC5_ Inter 1
VLC6_ Inter N/A 表 3  VLC6_ Inter N/A Table 3
码表 跳转参数值 Code table jump parameter value
VLC0_ Chroma LI  VLC0_ Chroma LI
VLC1_ Chroma L2  VLC1_ Chroma L2
VLC2_ Chroma L3  VLC2_ Chroma L3
VLC3_ Chroma 1  VLC3_ Chroma 1
VLC4_ Chroma N/A 在上述三张跳转表中, 在当前元素使用某一码表编码或解码时, 若当前编码或解码 元素满足预定条件时,则下一编码或解码元素所使用码表跳转至根据当前码表对应的跳 转至确定的码表, 具体为跳转到当前码表序号值加上对应的跳转值之和指向的码表。例 如, 对亮度块进行帧间编解码时, 当前编码或解码元素使用的是亮度块帧间编码对应的 各码表(即表 2中的各码表) 中的 VLC3_Inter码表, 此时, 若跳转参数 N4的值为 2, 则在 当前编码或解码元素满足预定条件时, 则由于 VLC3_Inter码表的序号为 3, 再将上 N4值, 则跳转后的码表的序号为 5, 即相应的下一编码或解码元素所使用的码表将跳转至序号 值为 5的 VLC5_Inter码表。  VLC4_ Chroma N/A In the above three jump tables, when the current element is encoded or decoded using a certain code table, if the current coded or decoded element satisfies a predetermined condition, the code table jump of the next coded or decoded element is used. Go to the code table corresponding to the current code table and jump to the determined code table, specifically to jump to the current code table sequence value plus the corresponding jump value. For example, when inter-frame coding and decoding of a luma block, the current encoding or decoding element uses a VLC3_Inter code table in each code table corresponding to the luma block inter-frame coding (ie, each code table in Table 2). If the value of the jump parameter N4 is 2, if the current encoding or decoding element satisfies the predetermined condition, then the sequence number of the VLC3_Inter code table is 3, and the value of the code table after the jump is 5, that is, the sequence number of the code table after the jump is 5 The code table used by the corresponding next coded or decoded element will jump to the VLC5_Inter code table with a sequence number of 5.
在上述三张跳转表中,若前编码或解码元素使用的是 VLC5_Intra或 VLC5_Inter或 VL C3_Chr0ma码表时, 则由于其为当前编码条件 (例如亮度块帧内编码) 下的倒数第二张 码表, 下一编码或解码元素所能够使用的码表仅能是最后一张码表, 故相应的跳转参数 值设置为 1。 In the above three jump tables, if the pre-encoded or decoded element uses VLC5_Intra or VLC5_Inter or VL When the C3_Chr 0 ma code table is used, since it is the penultimate code table under the current coding condition (for example, luma block intraframe coding), the code table that can be used by the next coding or decoding element can only be the last code. Table, so the corresponding jump parameter value is set to 1.
在上述三张跳转表中,若前编码或解码元素使用的是 VLC6_Intra或 VLC6_Inter或 VL C4_Chr0ma码表时由于其为当前编码条件(例如亮度块帧内编码)下的最后一张码表, 故跳转参数值不可得, 并设置为 N/A; 即码表的跳转参数值与当前码表序号之和不能超 过当前编码或解码条件下最后一张码表的序号值,否则,将无法确定跳转后采用的码表。 In the above three jump tables, if the pre-encoded or decoded element uses the VLC6_Intra or VLC6_Inter or VL C4_Chr 0 ma code table, it is the last code table under the current coding condition (for example, luma block intra-frame coding). Therefore, the jump parameter value is not available, and is set to N/A; that is, the sum of the jump parameter value of the code table and the current code table serial number cannot exceed the sequence number value of the last code table under the current encoding or decoding condition; otherwise, It will not be possible to determine the code table to be used after the jump.
在上述三张跳转表中, 各个跳转参数值根据 4x4块的数据的分布规律确定。 若需要 获得其他种块变换的码表,则相应的跳转参数需要根据该种块变换的数据的颁布规律进 行设置。  In the above three jump tables, each jump parameter value is determined according to the distribution law of the data of the 4x4 block. If it is necessary to obtain a code table of other kinds of block transforms, the corresponding jump parameters need to be set according to the law of issuance of the data of the block transform.
上述跳转表可预先存储于编码与解码系统中, 亦可在编码端根据当前编码序列、 图 像、条带的特性和内容更新跳转表并将更新后的跳转表存储于序列头或图像头或条带头 中。解码端则从码流中的序列头或图像头或条带头中提取更新后的跳转表用于解码当前 序列或图像或条带。  The jump table may be pre-stored in the encoding and decoding system, or the jump table may be updated at the encoding end according to the current coding sequence, the characteristics of the image, the stripe, and the content, and the updated jump table is stored in the sequence header or image. Head or strip in the head. The decoder then extracts the updated jump table from the sequence header or image header or slice header in the code stream for decoding the current sequence or image or strip.
具体实施例二  Specific embodiment 2
在该实施例中, 编码端对熵编码码表中的元素进行映射, 获得第二种块变换对应的 熵编码参数; 解码端, 根据映射规则对使用第二种块变换的图像块数据进行映射, 使用 第一种块变换对应的熵解码码表解码所述映射后的数据。本发明实施例中亦可根据上述 映射规则在分别在熵编码和熵解码端生成第二变换对应的熵编码和熵解码码表, 以编码 和解码使用第二变换的图像块数据。  In this embodiment, the encoding end maps the elements in the entropy encoding code table to obtain the entropy encoding parameters corresponding to the second block transformation; and the decoding end maps the image block data using the second block transformation according to the mapping rule. And decoding the mapped data by using an entropy decoding code table corresponding to the first type of block transform. In the embodiment of the present invention, the entropy coding and entropy decoding code tables corresponding to the second transform are respectively generated at the entropy coding and the entropy decoding end according to the foregoing mapping rule, to encode and decode the image data of the second transform using the second transform.
以 VLC编码和 VLD解码码表为例, 相应的码表中的元素包括: 索引值、 r m、 level , E0B。 在此实施例中码表中的索引值为 trans_coefficient。 若当前编码中使用了 4x4和 8x8两种变换。 由于在 8x8变换中总共有 64个像素值待编码, 其 r m和 level对最多可能有 64对; 而在 4x4变换中总共有 16个像素值待编码, 其 run和 level对最多可能有 16对。 通 常情况下 E0B的值与当前码表所对应编码条件下 nm和 level对的对数有关系。 如果在统 计意义下当前编码条件下 run和 1 eve 1对的对数较多,则 E0B的值会设为一个较大的数值, 否则 E0B为一个较小值。 由于 4x4变换块本身待编码元素就比 8x8变换块少, 故编码 4x4变 换块时, 其所对应的 E0B值应比 8x8变换块所对应的 E0B值小, 否则会降低编码效率。  Taking VLC encoding and VLD decoding code table as an example, the elements in the corresponding code table include: index value, r m, level , E0B. The index value in the code table in this embodiment is trans_coefficient. If the current encoding uses 4x4 and 8x8 two transforms. Since there are a total of 64 pixel values to be encoded in the 8x8 transform, the r m and level pairs may have up to 64 pairs; while in the 4x4 transform, there are a total of 16 pixel values to be encoded, and the run and level pairs may have up to 16 pairs. In general, the value of E0B is related to the logarithm of the nm and level pairs under the encoding conditions corresponding to the current code table. If, in the statistical sense, the run and 1 eve 1 pairs have more logarithms under the current encoding condition, the value of E0B will be set to a larger value, otherwise E0B is a smaller value. Since the 4x4 transform block itself has fewer elements to be coded than the 8x8 transform block, when encoding a 4x4 transform block, its corresponding E0B value should be smaller than the E0B value corresponding to the 8x8 transform block, otherwise the coding efficiency will be reduced.
综上所述, 若当前编码系统保存的是基于 8x8的码表, 在使用该码表编码 4x4变换块 时 E0B的值不宜设的太大。 因此, 在原先码表中 E0B对应的值为 M, 在使用 8x8变换的码表 编码 4x4变换块时码表中对应的 EOB值可转换为一个较小值^ 而原先码表中为 N到 M-1的 索引值在编码 4x4变换块数据时其值依次加 1, 但其所对应的 run和 level对数据不变。 即 原先 run和 level对所对应的索引值由 N到 M-1转换至 ^1到¾1。 这样, 在编码 4x4变换块数 据时由于 E0B的比特开销大幅减少, 从而可以为编码 4x4变换块带来较为理想的编码增 在解码端则在解码 4x4变换块数据时, 如果索引值在 N+1到 M之间, 则索引值减 1 ; 如 果索引值等于 N, 则索引值赋值为¾1。经上述操作后再将转换后的索引值在当前码表中查 找得到对应的 run和 level对。 In summary, if the current encoding system saves an 8x8-based code table, the value of E0B should not be too large when encoding the 4x4 transform block using the code table. Therefore, in the original code table, the value corresponding to E0B is M, and the code table using 8x8 transform is used. When encoding a 4x4 transform block, the corresponding EOB value in the code table can be converted into a smaller value ^ and the index value of N to M-1 in the original code table is incremented by 1 when encoding the 4x4 transform block data, but The corresponding run and level are unchanged for the data. That is, the index values corresponding to the original run and level pairs are converted from N to M-1 to ^1 to 3⁄41. In this way, when the 4x4 transform block data is encoded, since the bit overhead of the E0B is greatly reduced, it is possible to bring an ideal encoding increase for the encoded 4x4 transform block, and when decoding the 4x4 transform block data at the decoding end, if the index value is at N+1. Between M, the index value is decremented by 1; if the index value is equal to N, the index value is assigned 3⁄41. After the above operation, the converted index value is searched in the current code table to obtain the corresponding run and level pairs.
在上述处理过程中,相应的索引值与编码或解码元素的转换关系可以依据数据统计 特性得到。 例如, 在 VLC和 VLD码表中, 若 E0B值为 8, 则在当前编码或解码条件下统计意 义上一个编码或解码图像块有 7个 run值和 level值对。 在编码 4x4变换后的 4x4图像块数 据时,则可以将该码表 E0B对应的值转换为 '0',即在编码该 4x4变换块时让 E0B值由 '8' 更改为 0, 将数值 '0' 写入码流中, 解码该 4x4变换块时若解析得到数值为 '0' 的元素, 则将其值转换为 '8' , 根据当前码表可知此元素为 E0B, 当前图像块解码结束。  In the above processing, the conversion relationship between the corresponding index value and the encoded or decoded element can be obtained according to the statistical characteristics of the data. For example, in the VLC and VLD code tables, if the E0B value is 8, statistically meaning the last encoded or decoded image block has 7 run value and level value pairs under the current encoding or decoding conditions. When encoding the 4x4 image block data after the 4x4 transform, the value corresponding to the code table E0B can be converted to '0', that is, when the 4x4 transform block is encoded, the E0B value is changed from '8' to 0, and the value is ' 0' is written in the code stream. If the 4x4 transform block is decoded, if the value is '0', the value is converted to '8'. According to the current code table, the element is E0B, and the current image block is decoded. .
假设实施例一的 VLC3_Intra码表 E0B所对应值为 8, 则在编码或解码经 4x4变换后的 4x4图像块数据时可将 E0B值映射为 0, 而数值为 (Γ7的索引值则依次映射至广 8, 其所对 应的 run值和 level值保持不变, 参照下表所示, 其中, 表 4为原始的 8x8图像块的 VLC3_Intra码表中 E0B值、 索引值与 run和 level的关系, 表 5则为映射处理之后的 4x4图 像块的码表中的 E0B值、 索引值如 run和 level数据之间的关系:  Assuming that the VLC3_Intra code table E0B of the first embodiment has a value of 8, the E0B value can be mapped to 0 when encoding or decoding the 4x4 transformed 4x4 image block data, and the value is (the index value of Γ7 is sequentially mapped to Guang 8, whose corresponding run value and level value remain unchanged, as shown in the following table, where Table 4 is the relationship between the E0B value and the index and run and level in the VLC3_Intra code table of the original 8x8 image block. 5 is the relationship between the E0B value in the code table of the 4x4 image block after the mapping process, and the index value such as run and level data:
表 4  Table 4
Figure imgf000012_0001
Figure imgf000012_0001
Run EOB Level > 0 1 2 3 4 5 6 7 8 9 10 11 12 Run EOB Level > 0 1 2 3 4 5 6 7 8 9 10 11 12
0  0
0 0 3 5 9 11 17 21 25 33 39 45 55 0 0 3 5 9 11 17 21 25 33 39 45 55
1 7 13 19 29 35 47 1 7 13 19 29 35 47
2 15 27 41 57  2 15 27 41 57
3 23 37 53  3 23 37 53
4 31 51  4 31 51
5 43  5 43
6 49 上述针对 VLC3_Intra码表 E0B值的转换方式可以扩展到实施例中其余 18张码表。 即 设 CurrentVLCTable代表当前码表, trans_coeff icient为所述索引值。如果当前编码块 是 4x4变换块, 则把 CurrentVLCTable中的 E0B值转换为 '0' , 当编码 E0B时将数值 '0' 写入码流中; Curr entVLCTab 1 e中 trans_coef f i c i ent为 0到 Curr entVLCTab 1 e中 EOB对应 值 -1所对应的编码元素写码流时其值依次加 1。解码时, 如果当前块是 4x4变换块, 先进 行映射操作如下: 如果 trans_coeff icient在 1到 CurrentVLCTable中的 E0B对应值(含) 之间,贝1 Jtrans—coeff icient减 1 ;如果 trans—coefficient等于 0, J¾iJtrans_coeff icient 赋值为 Curr entVLCTab 1 e中的 EOB的值。 6 49 The above conversion method for the ELC value of the VLC3_Intra code table can be extended to the remaining 18 code tables in the embodiment. That is, CurrentVLCTable represents the current code table, and trans_coeff icient is the index value. If the current coding block is a 4x4 transform block, the E0B value in CurrentVLCTable is converted to '0', and the value '0' is written into the code stream when E0B is encoded; in Curr entVLCTab 1 e, trans_coef fici ent is 0 to Curr entVLCTab The value of the coded element corresponding to the EOB corresponding value -1 in 1 e is increased by one. When decoding, if the current block is a 4x4 transform block, the mapping operation is as follows: If trans_coeff icient is between 1 and the corresponding value of E0B in CurrentVLCTable (inclusive), Bay 1 Jtrans-coeff icient is decremented by 1; if trans-coefficient is equal to 0 , J3⁄4iJtrans_coeff icient assigns the value of EOB in Curr entVLCTab 1 e.
可以看出,通过上述映射转换方式对保存的码表中的元素进行转换后便可以获得期 望的尺寸的图像块对应的码表,并且该码表是通过一定处理规则获得而无需存储于编码 和解码系统之中, 有效节省了系统资源。  It can be seen that the code table corresponding to the image block of the desired size can be obtained by converting the elements in the saved code table by the above mapping conversion method, and the code table is obtained by a certain processing rule without being stored in the coding and In the decoding system, system resources are effectively saved.
上述不同变换下码表元素的映射规则可预先存储于编码与解码系统中,亦可在编码 端根据当前编码序列、 图像、条带的特性和内容更新所述映射规则并将更新后的映射规 则存储于序列头或图像头或条带头中。解码端则从码流中的序列头或图像头或条带头中 提取更新后的映射规则用于解码当前序列或图像或条带。  The mapping rule of the code table element under the different transforms may be pre-stored in the encoding and decoding system, and the mapping rule may be updated according to the current coding sequence, the image, the characteristics and the content of the stripe, and the updated mapping rule may be updated at the encoding end. Stored in the sequence header or image header or strip header. The decoder then extracts the updated mapping rules from the sequence header or header or slice header in the code stream for decoding the current sequence or image or strip.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通 过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质 中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中, 所述的存储介质可 为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM)或随机存储记忆体(Random Access Memory, RAM)等。 本发明实施例还提供了一种熵编码装置, 其具体实现结构如图 2所示, 可以包括以 下处理单元:  A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium, the program In execution, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM). An embodiment of the present invention further provides an entropy coding apparatus, and the specific implementation structure is as shown in FIG. 2, and may include the following processing units:
( 1 )第一存储单元 21, 用于保存的第一种块变换对应的熵编码码表; (2) 第一码表处理单元 22, 用于根据对所述第一存储单元 21保存的第一种块变换 对应的熵编码码表进行映射处理, 获得第二种块变换对应的熵编码码表参数; (1) a first storage unit 21, configured to store an entropy coded code table corresponding to the first type of block transformation; (2) The first code table processing unit 22 is configured to perform mapping processing according to the entropy coded code table corresponding to the first type of block transform saved by the first storage unit 21, to obtain an entropy coded code corresponding to the second block transform. Table parameter
其中, 该第一码表处理单元 22具体可以采用的映射处理包括以下任意一种实现方 式- 方式一: 根据用于确定跳转后的码表序号的跳转参数进行映射操作, 其中, 所述的 跳转参数为跳转后的码表序号, 或者, 所述的跳转参数为跳转后的码表序号与当前的码 序号之间的差值;  The mapping processing that may be adopted by the first code table processing unit 22 includes any one of the following implementation manners: manner 1: performing a mapping operation according to a jump parameter used to determine a code table sequence number after the jump, where The jump parameter is the code table number after the jump, or the jump parameter is the difference between the code table number after the jump and the current code sequence number;
方式二:根据第二种块变换对应的映射参数调整所述第一种块变换对应的熵编码码 表中的元素值, 获得第二种块变换对应的熵编码码表参数;  Manner 2: adjusting an element value in the entropy coding code table corresponding to the first type of block transformation according to a mapping parameter corresponding to the second block transformation, and obtaining an entropy coding code table parameter corresponding to the second block transformation;
( 3) 编码单元 23, 用于使用所述第一码表处理单元 22获得的第二种块变换对应的 熵编码码表参数对第二种块变换的图像块的数据进行熵编码操作;  (3) an encoding unit 23, configured to perform entropy encoding operation on data of the second block-transformed image block by using an entropy encoding code table parameter corresponding to the second block transform obtained by the first code table processing unit 22;
该所述编码单元用于根据所述第二种块变换对应的熵编码码表参数对当前或下一 个使采用第二变换处理的第二种块变换的图像块的数据进行熵编码操作。  The coding unit is configured to perform an entropy coding operation on the data of the current or next image block of the second block transform adopting the second transform process according to the entropy code table parameter corresponding to the second block transform.
可选地, 在该装置中还可以包括第一跳转参数获取单元 24, 用于获取预先设定的跳 转参数; 或者, 也可以用于获取根据当前编码序列或编码图像或编码条带的编码特性确 定的跳转参数, 并通知编码单元将所述跳转参数写入编码码流中。  Optionally, the device may further include a first jump parameter obtaining unit 24, configured to acquire a preset jump parameter, or may be used to obtain a current encoded sequence or a coded image or a coded strip. The jump parameter determined by the characteristic is encoded, and the coding unit is notified to write the jump parameter into the encoded code stream.
可选地, 该装置中还可以包括第一括映射参数获取单元 25, 用于获取预先设定的映 射参数; 或者, 也可以用于获取根据当前编码序列或编码图像或编码条带的编码特性确 定的当前编码序列或编码图像或编码条带的映射参数,并通知编码单元将所述映射参数 写入码流中。  Optionally, the device may further include a first mapping parameter acquiring unit 25, configured to acquire a preset mapping parameter; or may be used to acquire encoding characteristics according to the current encoding sequence or the encoded image or the encoded stripe. Determining a mapping parameter of the current coding sequence or the encoded image or the encoded slice, and notifying the coding unit to write the mapping parameter into the code stream.
本发明实施例还提供了一种熵解码装置, 其具体实现结构如图 3所示, 可以包括以 下处理单元:  The embodiment of the present invention further provides an entropy decoding device, and the specific implementation structure thereof is as shown in FIG. 3, and may include the following processing units:
( 1 )第二存储单元 31, 用于保存的第一种块变换对应的熵解码码表;  (1) a second storage unit 31, configured to store an entropy decoding code table corresponding to the first type of block transformation;
(2) 第二码表处理单元 32, 用于根据第二存储单元 31保存的第一种块变换对应的 熵解码码表映射获得第二种块变换对应的熵解码码表参数;  (2) a second code table processing unit 32, configured to obtain an entropy decoding code table parameter corresponding to the second block transform according to the entropy decoding code table mapping corresponding to the first type of block transformation saved by the second storage unit 31;
该第二码表处理单元采用的映射的处理可以包括以下任一方式:  The processing of the mapping adopted by the second code table processing unit may include any of the following methods:
方式一: 根据用于确定跳转后的码表序号的跳转参数进行映射操作, 其中, 所述的 跳转参数为跳转后的码表序号, 或者, 所述的跳转参数为跳转后的码表序号与当前的码 序号之间的差值;  Manner 1: The mapping operation is performed according to the jump parameter used to determine the sequence number of the code table after the jump, where the jump parameter is the code table number after the jump, or the jump parameter is a jump The difference between the subsequent code table serial number and the current code serial number;
方式二: 根据映射参数调整所述第二种块变换对应的数据元素, 并根据调整后的数 据元素值及第一种块变换对应的熵解码码表获得第二种块变换对应的熵解码码表参数; 或者, 也可以根据映射参数调整所述第一种块变换对应的熵解码码表中的数据元素, 将 调整结果作为第二种块变换对应的熵解码码表参数; Manner 2: adjusting the data element corresponding to the second block transformation according to the mapping parameter, and according to the adjusted number Obtaining an entropy decoding code table parameter corresponding to the second block transformation according to the element value and the entropy decoding code table corresponding to the first type of block transformation; or, adjusting the entropy decoding code table corresponding to the first type of block transformation according to the mapping parameter In the data element, the adjustment result is used as the entropy decoding code table parameter corresponding to the second block transformation;
( 3)解码单元 33, 用于使用所述第二码表处理单元 32获得的第二种块变换对应的 熵编码码表参数对第二种块变换的图像块的数据进行熵解码操作。  (3) The decoding unit 33 is configured to perform an entropy decoding operation on the data of the second block-transformed image block by using the entropy encoding code table parameter corresponding to the second block transform obtained by the second code table processing unit 32.
该解码单元用于根据所述第二种块变换对应的熵解码码表参数对当前或下一个使 采用第二变换处理的第二种块变换下的图像进行熵编码操作。  The decoding unit is configured to perform an entropy encoding operation on the current or next image of the second block transform using the second transform processing according to the entropy decoding code table parameter corresponding to the second block transform.
可选地, 在该装置中还可以包括第二跳转参数获取单元 34, 用于获取预先设定的跳 转参数; 或者, 用于根据当前解码序列或解码图像或解码条带从接收到的编码码流中获 取的当前解码序列或解码图像或解码条带的映射参数。  Optionally, the device may further include a second jump parameter obtaining unit 34, configured to acquire a preset jump parameter; or, configured to receive from the current decoded sequence or the decoded image or the decoded stripe. The mapping parameter of the current decoded sequence or decoded image or decoded strip obtained in the encoded code stream.
可选地, 在该装置还可以包括第二映射参数获取单元 35, 用于获取预先设定的映射 参数; 或者, 用于根据当前解码序列或解码图像或解码条带从接收到的编码码流中获取 的当前解码序列或解码图像或解码条带的映射参数。 综上所述,本发明实施例的实现可以根据当前尺寸的图像块的数据统计特性获得适 合的码表, 进而有效减少因 ABT (Adapt Block Transform, 自适应种块变换)技术而带 来的熵编码码表开销。而且, 本发明实施例中仅需要保存某一尺寸的图像块对应的码表 便可以获得其他尺寸的图像块的码表, 因而可以有效降低硬件资源的占用, 同时还可以 兼顾提高相应的编解码效率。 以上所述, 仅为本发明较佳的具体实施方式, 但本发明的保护范围并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到的变化或替 换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应该以权利要求的保 护范围为准。  Optionally, the apparatus may further include: a second mapping parameter acquiring unit 35, configured to acquire a preset mapping parameter; or, configured to receive the encoded code stream according to the current decoding sequence or the decoded image or the decoded stripe. The mapping parameter of the current decoded sequence or decoded image or decoded strip obtained in . In summary, the implementation of the embodiment of the present invention can obtain a suitable code table according to the statistical characteristics of the image block of the current size, thereby effectively reducing the entropy caused by the ABT (Adapt Block Transform) technology. Encoding code table overhead. Moreover, in the embodiment of the present invention, only the code table corresponding to the image block of a certain size needs to be saved, and the code table of the image block of other sizes can be obtained, thereby effectively reducing the occupation of hardware resources, and simultaneously improving the corresponding codec. effectiveness. The above is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or within the technical scope disclosed by the present invention. Alternatives are intended to be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

权利要求 Rights request
1、 一种图像熵编码方法, 其特征在于, 包括:  An image entropy coding method, comprising:
根据第一种块变换对应的熵编码码表,映射获得第二种块变换对应的熵编码码表参 数, 利用所述熵编码码表参数对第二种块变换图像块数据进行熵编码。  According to the entropy coding code table corresponding to the first block transformation, the entropy coding code table parameter corresponding to the second block transformation is obtained by the mapping, and the second block transformation image block data is entropy encoded by using the entropy coding code table parameter.
2、根据权利要求 1所述的方法, 其特征在于, 所述映射的处理包括根据用于确定熵 编码码表跳转后的码表序号的跳转参数进行映射操作,且所述的跳转参数为熵编码码表 跳转后的码表序号, 或者, 所述的跳转参数为熵编码码表跳转后的码表序号与当前的码 序号之间的差值。  The method according to claim 1, wherein the processing of the mapping comprises performing a mapping operation according to a jump parameter for determining a code table number after the entropy coded code table jump, and the jump The parameter is the code table number after the entropy code table jump, or the jump parameter is the difference between the code table number after the entropy code table jump and the current code sequence number.
3、根据权利要求 2所述的方法, 其特征在于, 利用所述熵编码码表参数对第二种块 变换图像块数据进行熵编码的步骤包括:  The method according to claim 2, wherein the step of entropy encoding the second block transformed image block data by using the entropy encoding code table parameter comprises:
在根据熵编码码表跳转的码表序号在所述第一块变换对应的熵编码码表中确定所 述第二块变换对应的熵编码码表后,根据所述第二块变换对应的熵编码码表对当前或者 下一个第二种块变换的图像块的数据进行熵编码。  Determining, according to the code table number of the entropy coded code table, the entropy coded code table corresponding to the second block transform in the entropy coded code table corresponding to the first block transform, corresponding to the second block transform The entropy coded code table entropy encodes the data of the current or next second block transformed image block.
4、根据权利要求 2所述的方法, 其特征在于, 在获得所述熵编码码表跳转后的码表 序号的过程中还包括:  The method according to claim 2, further comprising: in the process of obtaining the code table serial number after the entropy coded code table jumps:
若当前的码表序号对应的码表为当前编码条件下的倒数第二张码表,则熵编码码表 跳转后的码表序号为当前编码条件下的最后一张码表对应的码表序号;  If the code table corresponding to the current code table number is the penultimate code table under the current coding condition, the code table number after the jump of the entropy code table is the code table corresponding to the last code table under the current coding condition. Serial number
或者,  Or,
若当前的码表序号对应的码表为当前编码条件下最后一张码表,则不进行熵编码码 表跳转操作。  If the code table corresponding to the current code table number is the last code table under the current coding condition, the entropy code table jump operation is not performed.
5、 根据权利要求 2所述的方法, 其特征在于, 所述跳转参数为预先设定; 或者, 根 据当前编码序列或编码图像或编码条带的编码特性确定所述跳转参数,并将所述跳转参 数写入编码码流中。  The method according to claim 2, wherein the jump parameter is preset; or, the jump parameter is determined according to a current coding sequence or a coding characteristic of a coded image or a coded slice, and The jump parameters are written into the encoded code stream.
6、 根据权利要求 1所述的方法, 其特征在于, 所述映射的处理包括:  The method according to claim 1, wherein the processing of the mapping comprises:
根据映射参数调整所述第一种块变换对应的熵编码码表中的元素值,获得映射后的 第二种块变换对应的熵编码码表参数。  Adjusting an element value in the entropy coding code table corresponding to the first type of block transformation according to the mapping parameter, and obtaining an entropy coding code table parameter corresponding to the second type of block transformation.
7、根据权利要求 6所述的方法, 其特征在于, 所述调整所述第一种块变换对应的熵 编码码表中的元素值的步骤包括;  The method according to claim 6, wherein the step of adjusting an element value in the entropy coded code table corresponding to the first type of block transformation comprises:
对第一种块变换对应的熵编码码表中的预定数值范围内的元素值进行映射调整处 理。 A mapping adjustment process is performed on an element value within a predetermined numerical range in the entropy coded code table corresponding to the first block transform.
8、根据权利要求 6所述方法, 其特征在于, 所述调整所述第一种块变换对应的熵编 码码表中的元素值的过程包括: The method according to claim 6, wherein the process of adjusting element values in the entropy coding code table corresponding to the first type of block transformation comprises:
若码表中的元素值为当前图像块结束标记, 则将该元素值 M映射至 N, M和 N分别为一 整数值, 且将 N与 M-1之间的元素值加 1, 并保持元素值与码表中其他元素之间的索引关 系不变。  If the element value in the code table is the current image block end mark, the element value M is mapped to N, M and N are respectively an integer value, and the element value between N and M-1 is incremented by 1 and kept. The index relationship between the element value and other elements in the code table does not change.
9、 根据权利要求 6所述的方法, 其特征在于, 所述映射参数为预先设定; 或者, 根 据当前编码序列或编码图像或编码条带的编码特性确定当前编码序列或编码图像或编 码条带的映射参数, 并将所述映射参数写入码流中。  The method according to claim 6, wherein the mapping parameter is preset; or determining a current coding sequence or a coded image or a coding strip according to a coding sequence of a current coding sequence or a coded image or a coded slice With the mapping parameters, and write the mapping parameters into the code stream.
10、根据权利要求 5或 9所述的方法, 其特征在于, 所述编码序列或编码图像或编码 条带的编码特性包括: 序列或图像或条带的像素值、 残差值、像素值或残差值的数学统 计特征值, 或者, 序列或图像或条带的像素值和残差值的数学统计特征值。  The method according to claim 5 or 9, wherein the coding characteristics of the coded sequence or the coded picture or the coded slice comprise: a pixel value of a sequence or an image or a slice, a residual value, a pixel value or The mathematical statistical feature value of the residual value, or the mathematical statistical feature value of the pixel value and residual value of the sequence or image or strip.
11、根据权利要求 1至 9任一项所述的方法,其特征在于,所述熵编码码表参数包括: 变长编码下的帧内亮度编码码表序号和类型, 帧间亮度编码码表序号和类型, 帧内色度 编码码表序号和类型, 帧间色度编码码表序号和类型, 游程 run, 量化系数值 level , 变 换系数 trans_coefficient,转逸系数差值 escape_level_diff和图像块结束标志 E0B中 的至少一项; 所述图像块的数据包括游程 run的值和量化系数值 level的值。  The method according to any one of claims 1 to 9, wherein the entropy coding code table parameter comprises: an intra-luminance coding code table number and type under variable length coding, and an inter-frame luminance coding code table. Sequence number and type, intra chroma coding code table number and type, interframe chroma coding code table number and type, run run, quantized coefficient value level, transform coefficient trans_coefficient, transition coefficient difference escape_level_diff and image block end flag E0B At least one of the data blocks; the data of the image block includes a value of a run run and a value of a quantized coefficient value level.
12、 一种熵解码方法, 其特征在于, 包括:  12. An entropy decoding method, comprising:
根据第一种块变换对应的熵解码码表,映射获得第二种块变换对应的熵解码码表参 数, 利用所述熵解码码表参数对第二种块变换下图像块数据进行熵解码。  According to the entropy decoding code table corresponding to the first block transformation, the entropy decoding code table parameter corresponding to the second block transformation is obtained by the mapping, and the entropy decoding is performed on the second block transformation image block data by using the entropy decoding code table parameter.
13、根据权利要求 12所述的方法, 其特征在于, 所述映射的处理包括根据用于确定 熵解码码表跳转后的码表序号的跳转参数进行映射操作,且所述的跳转参数为熵解码码 表跳转后的码表序号, 或者, 所述的跳转参数为熵解码码表跳转后的码表序号与当前的 码序号之间的差值。  The method according to claim 12, wherein the processing of the mapping comprises performing a mapping operation according to a jump parameter for determining a code table number after the entropy decoding code table jump, and the jump The parameter is the code table number after the entropy decoding code table jumps, or the jump parameter is the difference between the code table number after the entropy decoding code table jump and the current code sequence number.
14、根据权利要求 13所述的方法, 其特征在于, 利用所述熵解码码表参数对第二种 块变换下图像块数据进行熵解码的步骤包括:  The method according to claim 13, wherein the step of entropy decoding the image data of the second block transform using the entropy decoding code table parameter comprises:
在根据熵解码码表跳转后的码表序号在所述第一块变换对应的熵解码码表中确定 所述第二块变换对应的熵解码码表后,根据所述第二块变换对应的熵解码码表对当前或 者下一个使用第二种块变换的图像块的数据进行熵解码。  After determining the entropy decoding code table corresponding to the second block transformation in the entropy decoding code table corresponding to the first block transformation according to the code table sequence number after the entropy decoding code table jump, corresponding to the second block transformation The entropy decoding code table entropy decodes the data of the current or next image block using the second block transform.
15、根据权利要求 13所述的方法, 其特征在于, 在获得所述熵解码码表跳转后的码 表序号的过程中还包括: 若当前的码表序号对应的码表为当前解码条件下的倒数第二张码表,则熵解码码表 跳转后的码表序号为当前解码条件下的最后一张码表对应的码表序号; The method according to claim 13, wherein, in the process of obtaining the code table sequence number after the entropy decoding code table jumps, the method further includes: If the code table corresponding to the current code table number is the penultimate code table under the current decoding condition, the code table number after the entropy decoding code table jump is the code table corresponding to the last code table under the current decoding condition. Serial number
或者,  Or,
若当前的码表序号对应的码表为当前解码条件下最后一张码表,则不进行熵解码码 表跳转。  If the code table corresponding to the current code table number is the last code table under the current decoding condition, the entropy decoding code table jump is not performed.
16、 根据权利要求 13所述的方法, 其特征在于, 所述跳转参数为预先设定; 或者, 根据当前解码序列或解码图像或解码条带从接收到的编码码流中解析获得。  The method according to claim 13, wherein the jump parameter is preset; or is obtained by parsing from the received coded stream according to a current decoded sequence or a decoded image or a decoded slice.
17、 根据权利要求 12所述的方法, 其特征在于, 所述映射的处理包括:  17. The method according to claim 12, wherein the processing of the mapping comprises:
根据映射参数调整所述第二种块变换对应的数据元素,并根据调整后的数据元素值 及第一种块变换对应的熵解码码表获得第二种块变换对应的熵解码码表参数;  And adjusting a data element corresponding to the second block transformation according to the mapping parameter, and obtaining an entropy decoding code table parameter corresponding to the second block transformation according to the adjusted data element value and the entropy decoding code table corresponding to the first type of block transformation;
或者,  Or,
根据映射参数调整所述第一种块变换对应的熵解码码表中的数据元素,将调整结果 作为第二种块变换对应的熵解码码表参数。  And adjusting, according to the mapping parameter, the data element in the entropy decoding code table corresponding to the first type of block transformation, and using the adjustment result as the entropy decoding code table parameter corresponding to the second block transformation.
18、 根据权利要求 17所述的方法, 其特征在于, 所述数据元素值的调整包括; 对预 定数值范围内的元素值进行映射调整处理。  18. The method according to claim 17, wherein the adjusting of the data element value comprises: performing mapping adjustment processing on the element value in the predetermined value range.
19、根据权利要求 17所述方法, 其特征在于, 所述利用所述熵解码码表参数对第二 种块变换下图像块数据进行熵解码的过程包括:  The method according to claim 17, wherein the process of entropy decoding the image block data of the second block transform by using the entropy decoding code table parameter comprises:
若从码流中解析获得数据元素值为 N, 则所述数据元素值映射为当前熵解码码表中 图像块结束标记的值 M, 将码流中数据元素值为 N+1与 M之间的数据元素值减 1, 并保持数 据元素值与当前熵解码码表中其他元素之间的索引关系不变, N和 M为一整数值。  If the data element value obtained by parsing from the code stream is N, the data element value is mapped to the value M of the image block end tag in the current entropy decoding code table, and the data element value in the code stream is between N+1 and M. The value of the data element is decremented by 1, and the index relationship between the data element value and other elements in the current entropy decoding code table is kept unchanged, and N and M are an integer value.
20、根据权利要求 17所述方法, 其特征在于, 所述利用所述映射参数调整所述第二 种块变换对应的数据元素的过程包括:  The method according to claim 17, wherein the process of adjusting the data element corresponding to the second type of block transformation by using the mapping parameter comprises:
所述映射参数为 N和M, N和 M为一整数值;  The mapping parameters are N and M, and N and M are an integer value;
若从码流中解析获得数据元素值为 N, 则所述数据元素值映射为当前熵解码码表中 值 M, 将码流中数据元素值为 N+1与 M之间的数据元素值减 1, 并保持数据元素值与当前熵 解码码表中其他元素之间的索引关系不变。  If the data element value obtained by parsing from the code stream is N, the data element value is mapped to the value M in the current entropy decoding code table, and the data element value in the code stream is subtracted from the data element value between N+1 and M. 1, and keep the index relationship between the data element value and other elements in the current entropy decoding code table unchanged.
21、 根据权利要求 20所述的方法, 其特征在于, 所述的当前熵解码码表中值为 M的 数据元素为图像块结束标记。  The method according to claim 20, wherein the data element having a value of M in the current entropy decoding code table is an image block end tag.
22、 根据权利要求 17所述的方法, 其特征在于, 所述映射参数为预先设定; 或者, 根据当前解码序列或解码图像或解码条带从接收到的编码码流中解析获得。 The method according to claim 17, wherein the mapping parameter is preset; or is obtained by parsing from the received encoded code stream according to a current decoding sequence or a decoded image or a decoding slice.
23、根据权利要求 12至 22任一项所述的方法, 其特征在于, 所述熵解码码表参数包 括: 变长解码下的帧内亮度解码码表序号和类型, 帧间亮度解码码表序号和类型, 帧内 色度解码码表序号和类型,帧间色度解码码表序号和类型,游程 run,量化系数值 level , 变换系数 trans_coefficient,转逸系数差值 escape_level_diff和图像块结束标志 E0B 中的至少一项; 所述图像块的数据包括游程 run的值和量化系数值 level的值。 The method according to any one of claims 12 to 22, wherein the entropy decoding code table parameter comprises: an intra-brightness decoding code table number and type under variable length decoding, and an inter-frame brightness decoding code table. Sequence number and type, intra-frame chroma decoding code table number and type, inter-frame chroma decoding code table number and type, run length, quantized coefficient value level, transform coefficient trans_coefficient, transition coefficient difference escape_level_diff and image block end flag E0B At least one of the data blocks; the data of the image block includes a value of a run run and a value of a quantized coefficient value level.
24、 一种熵编码装置, 其特征在于, 包括:  24. An entropy encoding apparatus, comprising:
第一存储单元, 用于保存的第一种块变换对应的熵编码码表;  a first storage unit, configured to store an entropy coded code table corresponding to the first type of block transformation;
第一码表处理单元,用于根据对所述第一存储单元保存的第一种块变换对应的熵编 码码表进行映射处理, 获得第二种块变换对应的熵编码码表参数;  a first code table processing unit, configured to perform mapping processing according to the entropy coding code table corresponding to the first type of block transformation saved by the first storage unit, to obtain an entropy coding code table parameter corresponding to the second block transformation;
编码单元,用于使用所述第一码表处理单元获得的第二种块变换对应的熵编码码表 参数对第二种块变换的图像块的数据进行熵编码操作。  And a coding unit, configured to perform entropy coding operation on data of the second block-transformed image block by using an entropy coded code table parameter corresponding to the second block transform obtained by the first code table processing unit.
25、根据权利要求 24所述的装置, 其特征在于, 所述第一码表处理单元采用的映射 处理包括根据用于确定跳转后的码表序号的跳转参数进行映射操作, 其中, 所述的跳转 参数为跳转后的码表序号, 或者, 所述的跳转参数为跳转后的码表序号与当前的码序号 之间的差值;且所述编码单元用于根据所述第二种块变换对应的熵编码码表参数对当前 或下一个使采用第二变换处理的第二种块变换的图像块的数据进行熵编码操作。  The device according to claim 24, wherein the mapping process adopted by the first code table processing unit comprises performing a mapping operation according to a jump parameter for determining a code table number after the jump, where The jump parameter is a code table number after the jump, or the jump parameter is a difference between the code table number after the jump and the current code sequence; and the coding unit is used according to the The entropy coding code table parameter corresponding to the second block transformation performs an entropy coding operation on the current or next data of the image block of the second block transformation using the second transformation process.
26、根据权利要求 25所述的装置, 其特征在于, 该装置还包括第一跳转参数获取单 元, 用于获取预先设定的跳转参数; 或者, 用于获取根据当前编码序列或编码图像或编 码条带的编码特性确定的跳转参数, 并通知编码单元将所述跳转参数写入编码码流中。  The device according to claim 25, further comprising: a first jump parameter obtaining unit, configured to acquire a preset jump parameter; or, configured to acquire, according to the current code sequence or the coded image Or encoding a jump parameter determined by the coding characteristics of the stripe, and notifying the coding unit to write the jump parameter into the encoded code stream.
27、根据权利要求 24所述的装置, 其特征在于, 所述第一码表处理单元采用的映射 处理包括:根据第二种块变换对应的映射参数调整所述第一种块变换对应的熵编码码表 中的元素值, 获得第二种块变换对应的熵编码码表参数; 且所述编码单元用于根据调整 获得的第二种块变换对应的熵编码码表参数对当前或下一个的第二种块变换的图像块 的数据进行熵编码操作。  The device according to claim 24, wherein the mapping process adopted by the first code table processing unit comprises: adjusting an entropy corresponding to the first type of block transformation according to a mapping parameter corresponding to the second block transformation Encoding the element value in the code table, obtaining an entropy coding code table parameter corresponding to the second block transformation; and the coding unit is configured to use the entropy coding code table parameter corresponding to the second block transformation obtained according to the adjustment to the current or next The data of the second block-transformed image block is subjected to an entropy encoding operation.
28、根据权利要求 27所述的装置, 其特征在于, 该装置还包括第一括映射参数获取 单元, 用于获取预先设定的映射参数; 或者, 用于获取根据当前编码序列或编码图像或 编码条带的编码特性确定的当前编码序列或编码图像或编码条带的映射参数,并通知编 码单元将所述映射参数写入码流中。  The device according to claim 27, further comprising: a first mapping parameter acquiring unit, configured to acquire a preset mapping parameter; or, configured to acquire, according to a current coding sequence or a coded image or Encoding the current coding sequence or the coding parameter of the coded picture or the coded slice determined by the coding characteristics of the slice, and notifying the coding unit to write the mapping parameter into the code stream.
29、 一种熵编码装置, 其特征在于, 包括:  29. An entropy encoding apparatus, comprising:
第二存储单元, 用于保存的第一种块变换对应的熵解码码表; 第二码表处理单元,用于根据第二存储单元保存的第一种块变换对应的熵解码码表 映射获得第二种块变换对应的熵解码码表参数; a second storage unit, configured to save the entropy decoding code table corresponding to the first type of block transformation; a second code table processing unit, configured to obtain an entropy decoding code table parameter corresponding to the second block transformation according to the entropy decoding code table mapping corresponding to the first type of block transformation saved by the second storage unit;
解码单元,用于使用所述第二码表处理单元获得的第二种块变换对应的熵编码码表 参数对第二种块变换的图像块的数据进行熵解码操作。  And a decoding unit, configured to perform an entropy decoding operation on data of the second block-transformed image block by using an entropy encoding code table parameter corresponding to the second block transform obtained by the second code table processing unit.
30、根据权利要求 29所述的装置, 其特征在于, 所述第二码表处理单元采用的映射 的处理包括根据用于确定跳转后的码表序号的跳转参数进行映射操作, 其中, 所述的跳 转参数为跳转后的码表序号, 或者, 所述的跳转参数为跳转后的码表序号与当前的码序 号之间的差值;且所述解码单元用于根据所述第二种块变换对应的熵编码码表参数对当 前或下一个采用第二变换处理的第二种块变换下的图像进行熵编码操作。  The device according to claim 29, wherein the processing of the mapping adopted by the second code table processing unit comprises performing a mapping operation according to a jump parameter for determining a code table number after the jump, wherein The jump parameter is a code table number after the jump, or the jump parameter is a difference between the code table number after the jump and the current code sequence; and the decoding unit is used according to The entropy coding code table parameter corresponding to the second block transformation performs an entropy coding operation on the current or next image of the second block transformation using the second transformation process.
31、根据权利要求 29所述的装置, 其特征在于, 该装置还包括第二跳转参数获取单 元, 用于获取预先设定的跳转参数; 或者, 用于根据当前解码序列或解码图像或解码条 带从接收到的编码码流中获取的当前解码序列或解码图像或解码条带的映射参数。  The device according to claim 29, further comprising: a second jump parameter obtaining unit, configured to acquire a preset jump parameter; or, configured to use the current decoded sequence or the decoded image or Decoding the mapping parameters of the current decoded sequence or decoded image or decoded strip obtained from the received encoded code stream.
32、根据权利要求 29所述的装置, 其特征在于, 所述第二码表处理单元采用的映射 的处理包括: 根据映射参数调整所述第二种块变换对应的数据元素, 并根据调整后的数 据元素值及第一种块变换对应的熵解码码表获得第二种块变换对应的熵解码码表参数; 或者, 根据映射参数调整所述第一种块变换对应的熵解码码表中的数据元素, 将调整结 果作为第二种块变换对应的熵解码码表参数;且所述解码单元用于根据调整获得的第二 种块变换对应的熵解码码表参数对当前或下一个采用第二变换处理的第二种块变换的 图像块的数据进行熵解码操作。  The device according to claim 29, wherein the processing of the mapping adopted by the second code table processing unit comprises: adjusting a data element corresponding to the second block transformation according to the mapping parameter, and adjusting according to the Obtaining an entropy decoding code table parameter corresponding to the second block transformation according to the data element value and the entropy decoding code table corresponding to the first type of block transformation; or adjusting the entropy decoding code table corresponding to the first type of block transformation according to the mapping parameter Data element, the adjustment result is used as the entropy decoding code table parameter corresponding to the second block transformation; and the decoding unit is configured to use the entropy decoding code table parameter corresponding to the second block transformation obtained according to the adjustment for the current or next The data of the second block-transformed image block of the second transform process performs an entropy decoding operation.
33、根据权利要求 32所述的装置, 其特征在于, 该装置还包括第二映射参数获取单 元, 用于获取预先设定的映射参数; 或者, 用于根据当前解码序列或解码图像或解码条 带从接收到的编码码流中获取的当前解码序列或解码图像或解码条带的映射参数。  The device according to claim 32, further comprising: a second mapping parameter acquiring unit, configured to acquire a preset mapping parameter; or, configured to use the current decoding sequence or the decoded image or the decoding strip A mapping parameter of the current decoded sequence or decoded image or decoded strip obtained from the received encoded code stream.
PCT/CN2009/070299 2008-01-31 2009-01-23 A method and device for image entropy encoding and entropy decoding WO2009097810A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 200810009057 CN101500159B (en) 2008-01-31 2008-01-31 Method and apparatus for image entropy encoding, entropy decoding
CN200810009057.2 2008-01-31

Publications (1)

Publication Number Publication Date
WO2009097810A1 true WO2009097810A1 (en) 2009-08-13

Family

ID=40947004

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/070299 WO2009097810A1 (en) 2008-01-31 2009-01-23 A method and device for image entropy encoding and entropy decoding

Country Status (2)

Country Link
CN (1) CN101500159B (en)
WO (1) WO2009097810A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3550840A1 (en) * 2012-01-20 2019-10-09 Sony Corporation Complexity reduction of significance map coding
CN103414897B (en) * 2013-07-31 2016-05-18 北京蛙视通信技术股份有限公司 To method and the device of the decoding of video image entropy
CN103841405B (en) * 2014-03-21 2016-07-06 华为技术有限公司 The decoding method of depth image and coding and decoding device
CN105094978B (en) * 2014-05-15 2020-02-28 研祥智能科技股份有限公司 Voice processing device and method
EP3349454A1 (en) 2017-01-11 2018-07-18 Thomson Licensing Method and device for coding a block of video data, method and device for decoding a block of video data

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6646578B1 (en) * 2002-11-22 2003-11-11 Ub Video Inc. Context adaptive variable length decoding system and method
CN1589023A (en) * 2004-08-06 2005-03-02 联合信源数字音视频技术(北京)有限公司 Coding and decoding method and device for multiple coded list lengthening based on context
CN1976468A (en) * 2002-04-15 2007-06-06 松下电器产业株式会社 Image coding method and device
CN101035287A (en) * 2002-04-19 2007-09-12 松下电器产业株式会社 Variable length decoding method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6795584B2 (en) * 2002-10-03 2004-09-21 Nokia Corporation Context-based adaptive variable length coding for adaptive block transforms
WO2005115007A1 (en) * 2004-05-20 2005-12-01 Multivia Co., Ltd. Systems and methods of encoding moving pictures for mobile communication terminals

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1976468A (en) * 2002-04-15 2007-06-06 松下电器产业株式会社 Image coding method and device
CN101035287A (en) * 2002-04-19 2007-09-12 松下电器产业株式会社 Variable length decoding method and device
US6646578B1 (en) * 2002-11-22 2003-11-11 Ub Video Inc. Context adaptive variable length decoding system and method
CN1589023A (en) * 2004-08-06 2005-03-02 联合信源数字音视频技术(北京)有限公司 Coding and decoding method and device for multiple coded list lengthening based on context

Also Published As

Publication number Publication date
CN101500159B (en) 2012-01-11
CN101500159A (en) 2009-08-05

Similar Documents

Publication Publication Date Title
RU2765300C1 (en) Method for encoding and decoding of images, encoding and decoding device and corresponding computer programs
RU2736421C1 (en) Method of encoding and decoding images and encoding and decoding device
CN108028919B (en) Video or image coding and decoding method and device
KR101157058B1 (en) Encoding apparatus and encoding method
JP5204269B2 (en) Method and apparatus for video codec quantization
KR101227667B1 (en) Piecewise processing of overlap smoothing and in-loop deblocking
JP6088141B2 (en) Method and apparatus for performing adaptive mode video encoding and decoding
US20100195715A1 (en) Method and apparatus for adaptive frame prediction
KR20240112965A (en) Methods and apparatus for video encoding and decoding binary sets using adaptive tree selection
JP2008529412A (en) Scratch pad for storing intermediate loop filter data
WO2022078163A1 (en) Video decoding method, video encoding method, and related device
WO2009097810A1 (en) A method and device for image entropy encoding and entropy decoding
JP2006517362A (en) Video encoding
CN110958451A (en) Video coding method and electronic equipment
WO2023272533A1 (en) Encoding and decoding method, encoder, decoder, and storage medium
JP2004253826A (en) Adaptive macroblock scanning method for video and image compression
TW202341739A (en) Image decoding methods, image coding method, and devices thereof
JP2020184702A (en) Decoding device and method for controlling decoding device
JP2009510822A (en) Encoding / decoding method and apparatus for improving video error concealment
TWI829424B (en) Decoding method, encoding method and apparatus
KR101173305B1 (en) Scalar Quantization Algorithm for Video Coding
WO2020136987A1 (en) Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, and video decoding program
WO2005067301A1 (en) Joint encoding/decoding method of maximum macroblock type and coded block pattern

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09709206

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09709206

Country of ref document: EP

Kind code of ref document: A1