[go: up one dir, main page]

WO2015192340A1 - Palette-based image coding method, device and image processing device - Google Patents

Palette-based image coding method, device and image processing device Download PDF

Info

Publication number
WO2015192340A1
WO2015192340A1 PCT/CN2014/080201 CN2014080201W WO2015192340A1 WO 2015192340 A1 WO2015192340 A1 WO 2015192340A1 CN 2014080201 W CN2014080201 W CN 2014080201W WO 2015192340 A1 WO2015192340 A1 WO 2015192340A1
Authority
WO
WIPO (PCT)
Prior art keywords
palette
information
pixel index
image
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2014/080201
Other languages
French (fr)
Chinese (zh)
Inventor
朱建清
徐张磊
叶姜莉
数井君彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to PCT/CN2014/080201 priority Critical patent/WO2015192340A1/en
Publication of WO2015192340A1 publication Critical patent/WO2015192340A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/64Systems for the transmission or the storage of the colour picture signal; Details therefor, e.g. coding or decoding means therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals

Definitions

  • the present invention relates to the field of graphic image technology, and in particular, to a palette-based image encoding method, apparatus, and image processing apparatus.
  • Palette-based coding is widely used in graphic image technology (especially video coding technology).
  • a coding unit for the image area to be encoded, for example, a coding unit (CU), including a plurality of pixels having color values (for example, RGB mode, having 24 bits of true color);
  • the storage capacity of the image usually pointing the pixel to the data index of the palette.
  • the color value of each output pixel can be determined by looking up the palette with the corresponding data index.
  • the palette is a set of pixel values. For pixels whose pixel values are in the palette, only the corresponding pixel index (pixel inde X ) of the pixel value in the palette is used. Thereby, only the palette and the index corresponding to the pixels in the coding unit can be bit-stream encoded, and the bit cost of the encoding can be reduced.
  • Non-Patent Document 1 JCTVC-O0182. Xun Guo, etc, Microsoft, Major-color-based screen content coding.
  • Non-Patent Document 2 JCTVC-N0249. Liwei Guo, etc, Qualcomm, Modified Palette Mode for Screen Content Coding.
  • the information of the palette is first encoded into the bit stream, and then the pixel index is Information is programmed into the bitstream. It is necessary to program the palette size information and the value of the palette (including prediction information in some scenarios) into the bitstream.
  • Embodiments of the present invention provide an image encoding method, apparatus, and image processing apparatus. By first encoding the pixel index information into the bit stream and then grouping the palette information into the bit stream, it is possible to increase the coding compression ratio without coding the size information of the palette.
  • a palette-based image encoding method comprising:
  • the information of the palette is bitstream-encoded so that the size of the palette is determined according to the information of the pixel index at the time of decoding.
  • a palette-based image encoding apparatus comprising:
  • An information determining unit determining a color palette corresponding to the image area to be encoded, and determining a corresponding pixel index for the pixel adopting the palette mode;
  • a stream coding unit after performing bitstream coding on the information of the pixel index, performing bitstream encoding on the information of the palette, so that the size of the palette is determined according to information of the pixel index at the time of decoding .
  • a palette-based image decoding method is provided, where the image decoding method includes:
  • a palette-based image decoding apparatus comprising:
  • An index decoding unit that decodes the bitstream to obtain information of a pixel index corresponding to a pixel in a palette mode
  • a palette decoding unit determining a size of the palette according to the information of the pixel index, and Decoding the bitstream to obtain information of the palette
  • the image obtaining unit obtains an image of the image region to be encoded based on the information of the palette and the information of the pixel index.
  • an image processing apparatus including:
  • a computer readable program wherein when the program is executed in an image processing apparatus, the program causes a computer to perform a tone-based adjustment as described above in the image processing apparatus An image encoding method of a swatch, or a palette-based image decoding method as described above.
  • a storage medium storing a computer readable program, wherein the computer readable program causes a computer to perform a palette based image encoding method as described above in an image processing device Or perform a palette-based image decoding method as described above.
  • An advantageous effect of the embodiment of the present invention is that after bit stream coding is performed on the information of the pixel index, the information of the color palette is bit-stream encoded, so that the size of the color palette is determined according to the information of the pixel index at the time of decoding.
  • the coding compression ratio can be further increased to obtain a smaller bit cost.
  • FIG. 1 is a schematic flow chart of an image encoding method according to an embodiment of the present invention.
  • FIG. 2 is another schematic flowchart of an image encoding method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an encoding apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of an image decoding method according to an embodiment of the present invention.
  • FIG. 5 is another schematic flowchart of an image decoding method according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a decoding apparatus according to an embodiment of the present invention.
  • Fig. 7 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention.
  • nCbS Palette coding unit
  • nCbS * nCbS is the size of coding unit, e.g. 8x8, 16x16, 32x32, 64x64
  • Palette size numPredPreviousPalette + palette num signalled entries
  • Pixel index infomation ( ); As shown above, for example, the prediction information (previous ⁇ palette_ entry_flag[ i ]), the size of the value in the palette that needs to be explicitly expressed in addition to the prediction information (palette_num_signal_entry), toning
  • the value of the board (palette_entrie[ numPredPreviousPalette + i ] ) is programmed into the bitstream, and then the pixel information is programmed into the bitstream; this results in more information to be programmed into the bitstream.
  • Example 1 The embodiments of the present invention are described in detail below.
  • Example 1 The embodiments of the present invention are described in detail below.
  • FIG. 1 is a schematic flowchart of an image encoding method according to an embodiment of the present invention. As shown in FIG. 1, the image encoding method includes:
  • Step 101 Determine a color palette corresponding to the image area to be encoded, and determine a corresponding pixel index for the pixel adopting the palette mode;
  • Step 102 Perform bitstream encoding on the information of the pixel index, and then perform bitstream encoding on the information of the palette, so that the size of the palette is determined according to the information of the pixel index at the time of decoding.
  • the image area to be encoded may be a coding unit (CU), but the invention is not limited thereto, and may be, for example, a Large Coding Unit (LCU) or the like.
  • CU coding unit
  • LCU Large Coding Unit
  • the present invention will be described below by taking only the CU as an example.
  • step 101 determines that the palette and the pixel index can be associated with any of the methods. You can use only the palette mode, or a combination of palette mode and non-palette mode (such as escape mode).
  • the present invention is not limited thereto, and the present invention can be applied as long as a palette mode exists.
  • step 102 the information of the palette is first encoded into the bit stream, and then the information of the pixel index is encoded into the bit stream.
  • the information of the pixel index is first bit stream encoded, and then The bitstream information is then bitstream encoded. This eliminates the need to program the size information of the palette, which can increase the coding compression ratio.
  • the image encoding method may further include: performing bitstream encoding on the bitwidth information occupied by the pixel index, so that the bit width information is The information of the pixel index is decoded.
  • bit width information (index_bit_depth) occupied by the pixel index is, for example, 3 bits, and the information can be encoded into the bit stream, whereby the information of the pixel index can be accurately decoded.
  • the invention is not limited to this,
  • the bit width information occupied by the pixel index can also be agreed in advance.
  • the image encoding method may further include: determining prediction information in the palette; and performing bitstream encoding on the information of the pixel index, and then predicting information of the palette and the palette The value is bitstream encoded.
  • the value of the palette may be predicted by a value that has occurred in the previous one or several CUs, and may be represented by an identifier (e.g., previous_palette_entry_flag).
  • previous_palette_entry_flag an identifier
  • determining the size of the palette according to the information of the pixel index may specifically include: adding a maximum value of the pixel index (maxjndex) to 1 to obtain a size of the palette (palette_size).
  • FIG. 2 is another schematic flowchart of an image encoding method according to an embodiment of the present invention. As shown in FIG. 2, the image encoding method includes:
  • Step 201 Determine a color palette corresponding to an image area to be encoded.
  • Step 202 Determine a corresponding pixel index for a pixel adopting a palette mode.
  • Step 203 Determine prediction information in a palette.
  • Step 204 Perform bitstream encoding on the bit width information occupied by the pixel index.
  • Step 205 Perform bitstream encoding on the information of the pixel index, so that the size of the palette is determined according to the information of the pixel index at the time of decoding;
  • Step 206 Perform bitstream encoding on the prediction information of the palette.
  • Step 207 Perform bitstream encoding on the value of the palette.
  • the image encoding method of the embodiment may be represented by the following pseudo code:
  • Palette coding unit (nCbS) // nCbS * nCbS is the size of coding unit, e.g. 8x8, 16x16, 32x32, 64x64
  • Previous palette entry _flag[ i ] If ( revious_palette entry flag[ i ] ) ⁇
  • Palette num signalled entries palette size - numPredPreviousPalette;
  • the above pseudo code is only one embodiment of the embodiment of the present invention, but the embodiment of the present invention is not limited thereto.
  • the prediction information or the bit width information occupied by the pixel index may be used in advance, and a specific implementation manner may be determined according to actual conditions.
  • the information of the palette is bit-stream encoded so that the size of the palette is determined according to the information of the pixel index at the time of decoding. This eliminates the need to program the size information of the palette, and can further increase the coding compression ratio to obtain a smaller bit cost.
  • An embodiment of the present invention provides an image encoding apparatus based on a palette, which corresponds to the image encoding method of Embodiment 1, and the same content will not be described again.
  • FIG. 3 is a block diagram showing the structure of an encoding apparatus according to an embodiment of the present invention. It is to be noted that Figure 3 only schematically shows the components associated with the present invention, and is not shown for other components of the encoding device, reference may be made to the prior art.
  • the image encoding device 300 includes: an information determining unit 301 and a stream encoding unit 302; the information determining unit 301 determines a palette corresponding to an image region to be encoded, and determines a corresponding pixel for the palette mode. Pixel index; stream encoding unit 302 performs bitstream encoding on the information of the pixel index, and then performs bitstream encoding on the information of the palette, so that the color of the palette is determined according to the information of the pixel index at the time of decoding. small.
  • the stream coding unit 302 may be further configured to perform bitstream encoding on the bit width information occupied by the pixel index before performing bitstream encoding on the information of the pixel index, so that the bit width information is used according to the bit width information during decoding.
  • the information of the pixel index is decoded.
  • the information determining unit 301 is further configured to determine prediction information in the palette; and the stream encoding unit 302 performs bitstream encoding on the information of the pixel index, and then predicts the palette and adjusts the palette.
  • the value of the swatch is bitstream encoded.
  • the information of the palette is bit-stream encoded so that the size of the palette is determined according to the information of the pixel index at the time of decoding. This eliminates the need to program the size information of the palette, and can further increase the coding compression ratio to obtain a smaller bit cost.
  • An embodiment of the present invention provides a method for decoding an image based on a palette, which corresponds to the image encoding method of Embodiment 1, and the same content will not be described again.
  • FIG. 4 is a schematic flowchart of an image decoding method according to an embodiment of the present invention. As shown in FIG. 4, the image decoding method includes:
  • Step 401 Decode a bit stream to obtain an in-pixel index corresponding to a pixel in a palette mode.
  • Step 402 Determine a size of the color palette according to the information of the pixel index, and decode the bit stream to obtain information of the color palette.
  • Step 403 Obtain an image of the image area to be encoded based on the information of the palette and the information of the pixel index.
  • the bit stream generated by the image encoding method described in Embodiment 1 can be decoded by the decoder.
  • the size of the palette can be determined based on the information of the pixel index, whereby the image decoding of the image region to be encoded can be accurately performed even if the size information of the color palette is not included in the bit stream.
  • the image decoding method may further include: decoding the bit stream to obtain a pixel index.
  • the bit width information occupied. Thereby, the information of the pixel index can be accurately decoded based on the bit width information in the bit stream.
  • the step 402 of decoding the bitstream to obtain the information of the palette may include: In the case where the palette prediction information is not included in the bit stream, the value of the palette is obtained; or, in the case where the palette prediction information is included in the bit stream, the prediction information of the palette and the palette are obtained. Value.
  • determining the size of the color palette according to the information of the pixel index may specifically include: adding a maximum value of the pixel index to 1 to obtain a size of the color palette.
  • FIG. 5 is another schematic flowchart of an image decoding method according to an embodiment of the present invention. As shown in FIG. 5, the image decoding method includes:
  • Step 501 Decode a bitstream to obtain bit width information occupied by a pixel index.
  • Step 502 Obtain information about a pixel index corresponding to a pixel in a palette mode.
  • Step 503 Determine a size of the color palette according to the information of the pixel index.
  • Step 504 Decode the bit stream to obtain a value of the palette, or prediction information of the palette and a value of the palette;
  • Step 505 Obtain an image of the image area to be encoded based on the information of the palette and the information of the pixel index. It is to be noted that only the steps related to the present invention are given in Figs. 4 and 5, and other steps in the image decoding process can be referred to the related art. Further, the order of execution between the steps in Fig. 5 is not limited to this, and a specific manner can be determined according to actual conditions.
  • the bit stream is decoded to obtain pixel index information
  • the size of the palette is determined based on the pixel index information
  • the bit stream is decoded to obtain palette information.
  • the embodiment of the present invention provides a palette-based image decoding apparatus, which corresponds to the image decoding method of Embodiment 3, and the same content will not be described again.
  • FIG. 6 is a block diagram showing a configuration of a decoding apparatus according to an embodiment of the present invention. It is to be noted that Figure 6 only schematically shows the components associated with the present invention, and is not shown for other components of the decoding device, reference may be made to the prior art.
  • the image decoding device 600 includes an index decoding unit 601, a palette decoding unit 602, and an image obtaining unit 603; the index decoding unit 601 decodes the bit stream to obtain a pixel corresponding to the palette mode. Information of the pixel index; the palette decoding unit 602 determines the size of the palette based on the information of the pixel index, and decodes the bit stream to obtain information of the palette; the image obtaining unit 603 is based on the palette The information and the information of the pixel index obtain an image of the image area to be encoded.
  • the index decoding unit 601 may be further configured to decode the bit stream to obtain a pixel index before decoding the bit stream to obtain information of a pixel index corresponding to a pixel of the palette mode. Bit width information.
  • the palette decoding unit 602 can be configured to: obtain a value for the palette, or obtain prediction information for the palette and a value for the palette.
  • the palette decoding unit 602 can be configured to: add a maximum of 1 to the pixel index to obtain the size of the palette.
  • the bit stream is decoded to obtain pixel index information
  • the size of the palette is determined based on the pixel index information
  • the bit stream is decoded to obtain palette information.
  • An embodiment of the present invention provides an image processing apparatus, the image processing apparatus comprising: the image encoding apparatus according to Embodiment 2; and the image decoding apparatus according to Embodiment 2.
  • Fig. 7 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus 700 may include: a central processing unit (CPU) 100 and a memory 110; the memory 110 is coupled to the central processing unit 100.
  • the memory 110 can store various data; in addition, a program for information processing is stored, and the program is executed under the control of the central processing unit 100.
  • the functions of image encoding device 300 or image decoding device 600 may be integrated into central processor 100.
  • the central processing unit 100 may be configured to implement the image encoding method as described in Embodiment 1, or implement the image decoding method as described in Embodiment 3.
  • the image encoding device 300 or the image decoding device 600 may be configured separately from the central processing unit.
  • the image encoding device 300 or the image decoding device 600 may be configured as a chip connected to the central processing unit 100 through central processing. The control of the image is performed by the image encoding device 300 or the image decoding device 600.
  • the image processing apparatus 700 may further include: an input and output unit 120, a display unit 130, and the like; wherein the functions of the components are similar to those of the prior art, and details are not described herein again. It is to be noted that the image processing apparatus 700 does not necessarily have to include all the components shown in FIG. 7; further, the image processing apparatus 700 may also include components not shown in Figure 7, reference to the prior art.
  • the embodiment of the present invention further provides a computer readable program, wherein when the program is executed in an image processing apparatus, the program causes a computer to execute the palette based method described in Embodiment 1 in the image processing apparatus The image encoding method, or the palette-based image decoding method described in Embodiment 3 is performed.
  • An embodiment of the present invention further provides a storage medium storing a computer readable program, wherein the computer readable program causes a computer to execute the palette based image encoding method described in Embodiment 1 in an image processing device, or execute The palette-based image decoding method described in Embodiment 3.
  • the above apparatus and method of the present invention may be implemented by hardware, or may be implemented by hardware in combination with software.
  • the present invention relates to a computer readable program that, when executed by a logic component, enables the logic component to implement the apparatus or components described above, or to cause the logic component to implement the various methods described above Or steps.
  • the present invention also relates to a storage medium for storing the above program, such as a hard disk, a magnetic disk, an optical disk, a DVD, a flash memory, or the like.
  • One or more of the functional blocks described in the figures and/or one or more combinations of functional blocks may be implemented as a general purpose processor, digital signal processor (DSP) for performing the functions described herein. ), an application specific integrated circuit (AS), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or any suitable combination thereof.
  • DSP digital signal processor
  • AS application specific integrated circuit
  • FPGA field programmable gate array
  • One or more of the functional blocks described with respect to the figures and/or one or more combinations of functional blocks may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, multiple microprocessors One or more microprocessors in conjunction with DSP communication or any other such configuration.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Provided in an embodiment of the present invention are a palette-based image coding method, device and image processing device, the image coding method comprising: determining a palette corresponding to an image area to be coded, and determining a corresponding pixel index for pixels in palette mode; and after conducting bit stream coding on the information of the pixel index, conducting bit stream coding on the information of the palette to determine the size of the palette according to the information of the pixel index when decoding. The embodiment of the present invention further improves the coding compression ratio to obtain a smaller bit cost without compiling the information of the palette size.

Description

基于调色板的图像编码方法、 装置以及图像处理设备 技术领域  Palette-based image encoding method, device and image processing device

本发明涉及一种图形图像技术领域, 特别涉及一种基于调色板的图像编码方法、 装置以及图像处理设备。  The present invention relates to the field of graphic image technology, and in particular, to a palette-based image encoding method, apparatus, and image processing apparatus.

背景技术 Background technique

基于调色板 (Palette-based) 的编码在图形图像技术 (尤其是视频编码技术) 中 得到了广泛应用。 在编码过程中, 对于待编码图像区域, 例如一个编码单元 (CU, coding Unit), 包含多个具有色彩值 (例如采用 RGB模式, 具有 24比特的真彩色) 的像素; 为了减少用于存储位图图像的存储容量, 通常可以将像素指向调色板的数据 索引。在译码过程中, 每一输出像素的色彩值可以通过査找具有相应数据索引的调色 板来决定。  Palette-based coding is widely used in graphic image technology (especially video coding technology). In the encoding process, for the image area to be encoded, for example, a coding unit (CU), including a plurality of pixels having color values (for example, RGB mode, having 24 bits of true color); The storage capacity of the image, usually pointing the pixel to the data index of the palette. During the decoding process, the color value of each output pixel can be determined by looking up the palette with the corresponding data index.

其中, 调色板为一系列像素值 (pixel value) 的集合, 对于像素值位于调色板中 的像素, 仅需使用该像素值在调色板中对应的像素索引 (pixel indeX)。 由此可以仅将 调色板以及编码单元中的像素所对应的索引进行比特流编码,可以减少编码的比特代 价 (bit cost )。 The palette is a set of pixel values. For pixels whose pixel values are in the palette, only the corresponding pixel index (pixel inde X ) of the pixel value in the palette is used. Thereby, only the palette and the index corresponding to the pixels in the coding unit can be bit-stream encoded, and the bit cost of the encoding can be reduced.

下面列出了对于理解本发明和常规技术有益的文献, 通过引用将它们并入本文 中, 如同在本文中完全阐明了一样。  The following is a list of documents useful for understanding the present invention and conventional techniques, which are incorporated herein by reference as if fully set forth herein.

[非专利文献 1]: JCTVC-O0182. Xun Guo, etc, Microsoft, Major-color-based screen content coding.  [Non-Patent Document 1]: JCTVC-O0182. Xun Guo, etc, Microsoft, Major-color-based screen content coding.

[非专利文献 2]: JCTVC-N0249. Liwei Guo, etc, Qualcomm, Modified Palette Mode for Screen Content Coding.  [Non-Patent Document 2]: JCTVC-N0249. Liwei Guo, etc, Qualcomm, Modified Palette Mode for Screen Content Coding.

应该注意, 上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、 完整的说明, 并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发 明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。  It should be noted that the above description of the technical background is only for the purpose of facilitating the clear and complete description of the technical solutions of the present invention, and is convenient for understanding by those skilled in the art. The above technical solutions are not considered to be well known to those skilled in the art simply because these solutions are set forth in the background section of the present invention.

发明内容 Summary of the invention

目前, 在进行比特流编码时先将调色板的信息编入比特流中, 然后将像素索引的 信息编入比特流中。 其中需要将调色板的大小 (palette size) 信息和调色板的值 (某 些场景下还包括预测信息)编入比特流中。 但是发明人发现: 调色板的大小信息需要 占用较多的比特数, 不利于提高编码压缩比。 Currently, when performing bit stream encoding, the information of the palette is first encoded into the bit stream, and then the pixel index is Information is programmed into the bitstream. It is necessary to program the palette size information and the value of the palette (including prediction information in some scenarios) into the bitstream. However, the inventor found that: the size information of the palette needs to occupy a large number of bits, which is not conducive to improving the coding compression ratio.

本发明实施例提供一种图像编码方法、装置以及图像处理设备。通过先将像素索 引信息编入比特流中, 再将调色板信息编入比特流中, 可以不需要编入调色板的大小 信息, 提高编码压缩比。  Embodiments of the present invention provide an image encoding method, apparatus, and image processing apparatus. By first encoding the pixel index information into the bit stream and then grouping the palette information into the bit stream, it is possible to increase the coding compression ratio without coding the size information of the palette.

根据本发明实施例的第一个方面, 提供一种基于调色板的图像编码方法, 所述图 像编码方法包括:  According to a first aspect of the embodiments of the present invention, a palette-based image encoding method is provided, the image encoding method comprising:

确定待编码图像区域所对应的调色板,并且为采用调色板模式的像素确定对应的 像素索引;  Determining a palette corresponding to the image region to be encoded, and determining a corresponding pixel index for pixels adopting the palette mode;

对所述像素索引的信息进行比特流编码之后,再对所述调色板的信息进行比特流 编码, 使得在解码时根据所述像素索引的信息确定所述调色板的大小。  After performing bitstream encoding on the information of the pixel index, the information of the palette is bitstream-encoded so that the size of the palette is determined according to the information of the pixel index at the time of decoding.

根据本发明实施例的第二个方面, 提供一种基于调色板的图像编码装置, 所述图 像编码装置包括:  According to a second aspect of the embodiments of the present invention, a palette-based image encoding apparatus is provided, the image encoding apparatus comprising:

信息确定单元, 确定待编码图像区域所对应的调色板, 并且为采用调色板模式的 像素确定对应的像素索引;  An information determining unit, determining a color palette corresponding to the image area to be encoded, and determining a corresponding pixel index for the pixel adopting the palette mode;

流编码单元, 对所述像素索引的信息进行比特流编码之后, 再对所述调色板的信 息进行比特流编码, 使得在解码时根据所述像素索引的信息确定所述调色板的大小。  a stream coding unit, after performing bitstream coding on the information of the pixel index, performing bitstream encoding on the information of the palette, so that the size of the palette is determined according to information of the pixel index at the time of decoding .

根据本发明实施例的第三个方面, 提供一种基于调色板的图像解码方法, 所述图 像解码方法包括:  According to a third aspect of the embodiments of the present invention, a palette-based image decoding method is provided, where the image decoding method includes:

对比特流进行解码以获得采用调色板模式的像素所对应的像素索引的信息; 根据所述像素索引的信息确定所述调色板的大小,以及对所述比特流进行解码获 得所述调色板的信息;  Decoding a bitstream to obtain information of a pixel index corresponding to a pixel in a palette mode; determining a size of the palette according to information of the pixel index, and decoding the bitstream to obtain the tone Swatch information;

基于所述调色板的信息以及所述像素索引的信息获得待编码图像区域的图像。 根据本发明实施例的第四个方面, 提供一种基于调色板的图像解码装置, 所述图 像解码装置包括:  An image of the image region to be encoded is obtained based on the information of the palette and the information of the pixel index. According to a fourth aspect of the embodiments of the present invention, there is provided a palette-based image decoding apparatus, the image decoding apparatus comprising:

索引解码单元,对比特流进行解码以获得采用调色板模式的像素所对应的像素索 引的信息;  An index decoding unit that decodes the bitstream to obtain information of a pixel index corresponding to a pixel in a palette mode;

调色板解码单元, 根据所述像素索引的信息确定所述调色板的大小, 以及对所述 比特流进行解码获得所述调色板的信息; a palette decoding unit, determining a size of the palette according to the information of the pixel index, and Decoding the bitstream to obtain information of the palette;

图像获得单元,基于所述调色板的信息以及所述像素索引的信息获得待编码图像 区域的图像。  The image obtaining unit obtains an image of the image region to be encoded based on the information of the palette and the information of the pixel index.

根据本发明实施例的第五个方面, 提供一种图像处理设备, 包括:  According to a fifth aspect of the embodiments of the present invention, an image processing apparatus is provided, including:

如上所述的图像编码装置; 以及  An image encoding device as described above;

如上所述的图像解码装置。  An image decoding device as described above.

根据本发明实施例的又一个方面, 提供一种计算机可读程序, 其中当在图像处理 设备中执行所述程序时,所述程序使得计算机在所述图像处理设备中执行如上所述的 基于调色板的图像编码方法, 或者执行如上所述的基于调色板的图像解码方法。  According to still another aspect of an embodiment of the present invention, a computer readable program is provided, wherein when the program is executed in an image processing apparatus, the program causes a computer to perform a tone-based adjustment as described above in the image processing apparatus An image encoding method of a swatch, or a palette-based image decoding method as described above.

根据本发明实施例的又一个方面, 提供一种存储有计算机可读程序的存储介质, 其中所述计算机可读程序使得计算机在图像处理设备中执行如上所述的基于调色板 的图像编码方法, 或者执行如上所述的基于调色板的图像解码方法。  According to still another aspect of an embodiment of the present invention, a storage medium storing a computer readable program, wherein the computer readable program causes a computer to perform a palette based image encoding method as described above in an image processing device Or perform a palette-based image decoding method as described above.

本发明实施例的有益效果在于, 对像素索引的信息进行比特流编码之后, 再对调 色板的信息进行比特流编码, 使得在解码时根据像素索引的信息确定调色板的大小。 由此不需要编入调色板的大小信息,可以进一步提高编码压缩比来获得更小的比特代 价。  An advantageous effect of the embodiment of the present invention is that after bit stream coding is performed on the information of the pixel index, the information of the color palette is bit-stream encoded, so that the size of the color palette is determined according to the information of the pixel index at the time of decoding. Thus, it is not necessary to program the size information of the palette, and the coding compression ratio can be further increased to obtain a smaller bit cost.

参照后文的说明和附图, 详细公开了本发明的特定实施方式, 指明了本发明的原 理可以被采用的方式。应该理解, 本发明的实施方式在范围上并不因而受到限制。 在 所附权利要求的精神和条款的范围内,本发明的实施方式包括许多改变、修改和等同。  Specific embodiments of the present invention are disclosed in detail with reference to the following description and drawings, which illustrate the manner in which the principles of the invention may be employed. It should be understood that the embodiments of the invention are not limited in scope. The embodiments of the present invention include many variations, modifications, and equivalents within the spirit and scope of the appended claims.

针对一种实施方式描述和 /或示出的特征可以以相同或类似的方式在一个或更多 个其它实施方式中使用, 与其它实施方式中的特征相组合, 或替代其它实施方式中的 特征。  Features described and/or illustrated with respect to one embodiment may be used in the same or similar manner in one or more other embodiments, in combination with, or in place of, features in other embodiments. .

应该强调, 术语 "包括 /包含"在本文使用时指特征、 整件、 步骤或组件的存在, 但并不排除一个或更多个其它特征、 整件、 步骤或组件的存在或附加。 附图说明  It should be emphasized that the term "comprising" or "comprising" is used to mean the presence of a feature, component, step or component, but does not exclude the presence or addition of one or more other features, components, steps or components. DRAWINGS

参照以下的附图可以更好地理解本发明的很多方面。 附图中的部件不是成比例 绘制的, 而只是为了示出本发明的原理。 为了便于示出和描述本发明的一些部分, 附 图中对应部分可能被放大或缩小。 在本发明的一个附图或一种实施方式中描述的元素和特征可以与一个或更多个 其它附图或实施方式中示出的元素和特征相结合。 此外, 在附图中, 类似的标号表示 几个附图中对应的部件, 并可用于指示多于一种实施方式中使用的对应部件。 Many aspects of the invention can be better understood with reference to the following drawings. The components in the figures are not drawn to scale, but only to illustrate the principles of the invention. In order to facilitate the illustration and description of some parts of the invention, the corresponding parts in the figures may be enlarged or reduced. Elements and features described in one of the figures or one embodiment of the invention may be combined with elements and features illustrated in one or more other figures or embodiments. In the accompanying drawings, like reference numerals refer to the

图 1是本发明实施例的图像编码方法的一流程示意图;  1 is a schematic flow chart of an image encoding method according to an embodiment of the present invention;

图 2是本发明实施例的图像编码方法的另一流程示意图;  2 is another schematic flowchart of an image encoding method according to an embodiment of the present invention;

图 3是本发明实施例的编码装置的一构成示意图;  3 is a schematic structural diagram of an encoding apparatus according to an embodiment of the present invention;

图 4是本发明实施例的图像解码方法的一流程示意图;  4 is a schematic flowchart of an image decoding method according to an embodiment of the present invention;

图 5是本发明实施例的图像解码方法的另一流程示意图;  FIG. 5 is another schematic flowchart of an image decoding method according to an embodiment of the present invention; FIG.

图 6是本发明实施例的解码装置的一构成示意图;  6 is a schematic structural diagram of a decoding apparatus according to an embodiment of the present invention;

图 7是本发明实施例的图像处理设备的一构成示意图。  Fig. 7 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention.

具体实施方式 detailed description

参照附图, 通过下面的说明书, 本发明的前述以及其它特征将变得明显。 在说明 书和附图中, 具体公开了本发明的特定实施方式, 其表明了其中可以采用本发明的原 则的部分实施方式, 应了解的是, 本发明不限于所描述的实施方式, 相反, 本发明包 括落入所附权利要求的范围内的全部修改、 变型以及等同物。  The foregoing and other features of the invention will be apparent from the The specific embodiments of the present invention are disclosed in the specification and the drawings, which are illustrated in the embodiments of the invention The invention includes all modifications, variations and equivalents falling within the scope of the appended claims.

在目前的基于调色板的图像编码方法中, 需要先将调色板的信息编入比特流中, 然后将像素索引的信息编入比特流中。 如下是目前调色板编码的一伪代码示例: Palette coding unit (nCbS ) // nCbS * nCbS is the size of coding unit, e.g. 8x8, 16x16,32x32,64x64 In the current palette-based image encoding method, the information of the palette needs to be encoded into the bit stream, and then the information of the pixel index is compiled into the bit stream. The following is a pseudo code example of the current palette encoding: Palette coding unit (nCbS) // nCbS * nCbS is the size of coding unit, e.g. 8x8, 16x16, 32x32, 64x64

{ {

numPredPreviousPalette = 0  numPredPreviousPalette = 0

for( i = 0; i < previousPaletteSize; i++ ) {  For( i = 0; i < previousPaletteSize; i++ ) {

previous palette entry _flag[ i ]  Previous palette entry _flag[ i ]

if ( revious_palette entry flag[ i ] ) {  If ( revious_palette entry flag[ i ] ) {

numPredPreviousPalette++  numPredPreviousPalette++

}  }

}  }

palette num signalled entries  Palette num signalled entries

for( i = 0; i < palette num signalled entries; i++ )  For( i = 0; i < palette num signalled entries; i++ )

palette_entrie[ numPredPreviousPalette + i ]  Palette_entrie[ numPredPreviousPalette + i ]

palette size = numPredPreviousPalette + palette num signalled entries  Palette size = numPredPreviousPalette + palette num signalled entries

Pixel index infomation ( ); 如上所示, 需要将例如预测信息 (previous^palette— entry— flag[ i ])、 调色板中除了预 测信息外需要显式表示的值的大小 (palette— num— signalled— entries )、 调色板的值(palette— entrie[ numPredPreviousPalette + i ] ) 编入比特流中, 然后将像素索弓 I信息编入比特流中; 由此导致了更多的信息需要编入比特流。 Pixel index infomation ( ); As shown above, for example, the prediction information (previous^palette_ entry_flag[ i ]), the size of the value in the palette that needs to be explicitly expressed in addition to the prediction information (palette_num_signal_entry), toning The value of the board (palette_entrie[ numPredPreviousPalette + i ] ) is programmed into the bitstream, and then the pixel information is programmed into the bitstream; this results in more information to be programmed into the bitstream.

以下对本发明实施例进行详细说明。 实施例 1  The embodiments of the present invention are described in detail below. Example 1

本发明实施例提供一种基于调色板的图像编码方法。图 1是本发明实施例的图像 编码方法的一流程示意图, 如图 1所示, 所述图像编码方法包括:  Embodiments of the present invention provide a palette-based image encoding method. FIG. 1 is a schematic flowchart of an image encoding method according to an embodiment of the present invention. As shown in FIG. 1, the image encoding method includes:

步骤 101, 确定待编码图像区域所对应的调色板, 并且为采用调色板模式的像素 确定对应的像素索引;  Step 101: Determine a color palette corresponding to the image area to be encoded, and determine a corresponding pixel index for the pixel adopting the palette mode;

步骤 102, 对像素索引的信息进行比特流编码之后, 再对调色板的信息进行比特 流编码, 使得在解码时根据像素索引的信息确定调色板的大小。  Step 102: Perform bitstream encoding on the information of the pixel index, and then perform bitstream encoding on the information of the palette, so that the size of the palette is determined according to the information of the pixel index at the time of decoding.

在本实施例中, 待编码图像区域可以为一编码单元 (CU), 但本发明不限于此, 例如还可以是最大编码单元(LCU, Largest Coding Unit)等等。 以下仅以 CU为例对 本发明进行说明。  In this embodiment, the image area to be encoded may be a coding unit (CU), but the invention is not limited thereto, and may be, for example, a Large Coding Unit (LCU) or the like. The present invention will be described below by taking only the CU as an example.

在本实施例中, 步骤 101确定调色板和像素索引可以采用相关的任意一种方法。 可以仅采用调色板模式 (palette mode), 也可以采用调色板模式和非调色板模式 (例 如 escape mode) 结合的方式。 本发明不限于此, 只要存在调色板模式均可适用本发 明。  In this embodiment, step 101 determines that the palette and the pixel index can be associated with any of the methods. You can use only the palette mode, or a combination of palette mode and non-palette mode (such as escape mode). The present invention is not limited thereto, and the present invention can be applied as long as a palette mode exists.

在步骤 102中, 与目前先将调色板的信息编入比特流中, 然后将像素索引的信息 编入比特流中不同的是, 本实施例先对像素索引的信息进行比特流编码, 然后再对调 色板的信息进行比特流编码。 由此不需要编入调色板的大小信息, 可以提高编码压缩 比。  In step 102, the information of the palette is first encoded into the bit stream, and then the information of the pixel index is encoded into the bit stream. In this embodiment, the information of the pixel index is first bit stream encoded, and then The bitstream information is then bitstream encoded. This eliminates the need to program the size information of the palette, which can increase the coding compression ratio.

在一个实施方式中, 在对像素索引的信息进行比特流编码之前, 所述图像编码方 法还可以包括: 将像素索引所占的比特宽度信息进行比特流编码, 使得在解码时根据 比特宽度信息对像素索引的信息进行解码。  In an embodiment, before performing bitstream encoding on the information of the pixel index, the image encoding method may further include: performing bitstream encoding on the bitwidth information occupied by the pixel index, so that the bit width information is The information of the pixel index is decoded.

例如, 像素索引所占的比特宽度信息 (index_bit_depth) 例如为 3bit, 可以将该 信息编入比特流中,由此可以准确地对像素索引的信息进行解码。但本发明不限于此, 例如还可以事先约定像素索引所占的比特宽度信息。 For example, the bit width information (index_bit_depth) occupied by the pixel index is, for example, 3 bits, and the information can be encoded into the bit stream, whereby the information of the pixel index can be accurately decoded. However, the invention is not limited to this, For example, the bit width information occupied by the pixel index can also be agreed in advance.

在另一个实施方式中,所述图像编码方法还可以包括:确定调色板中的预测信息; 以及对像素索引的信息进行比特流编码之后,再对调色板的预测信息以及调色板的值 进行比特流编码。  In another embodiment, the image encoding method may further include: determining prediction information in the palette; and performing bitstream encoding on the information of the pixel index, and then predicting information of the palette and the palette The value is bitstream encoded.

在本实施例中,关于调色板的值可以由之前一个或几个 CU出现过的值进行预测, 可以通过标识 (例如 previous_palette_entry_flag) 进行表示。 关于预测信息的具体内 容可以参考相关技术。  In this embodiment, the value of the palette may be predicted by a value that has occurred in the previous one or several CUs, and may be represented by an identifier (e.g., previous_palette_entry_flag). For details on the prediction information, refer to the related art.

在本实施例中, 根据像素索引的信息确定调色板的大小, 具体可以包括: 将像素 索引的最大值 (maxjndex) 加上 1以得到调色板的大小 (palette_size)。  In this embodiment, determining the size of the palette according to the information of the pixel index may specifically include: adding a maximum value of the pixel index (maxjndex) to 1 to obtain a size of the palette (palette_size).

图 2是本发明实施例的图像编码方法的另一流程示意图, 如图 2所示, 所述图像 编码方法包括:  FIG. 2 is another schematic flowchart of an image encoding method according to an embodiment of the present invention. As shown in FIG. 2, the image encoding method includes:

步骤 201, 确定待编码图像区域所对应的调色板;  Step 201: Determine a color palette corresponding to an image area to be encoded.

步骤 202, 为采用调色板模式的像素确定对应的像素索引;  Step 202: Determine a corresponding pixel index for a pixel adopting a palette mode.

步骤 203, 确定调色板中的预测信息;  Step 203: Determine prediction information in a palette.

步骤 204, 将像素索引所占的比特宽度信息进行比特流编码;  Step 204: Perform bitstream encoding on the bit width information occupied by the pixel index.

步骤 205, 对像素索引的信息进行比特流编码, 使得在解码时根据像素索引的信 息确定调色板的大小;  Step 205: Perform bitstream encoding on the information of the pixel index, so that the size of the palette is determined according to the information of the pixel index at the time of decoding;

步骤 206, 对调色板的预测信息进行比特流编码;  Step 206: Perform bitstream encoding on the prediction information of the palette.

步骤 207, 对调色板的值进行比特流编码。  Step 207: Perform bitstream encoding on the value of the palette.

值得注意的是, 图 1和图 2中仅给出了与本发明相关的步骤, 关于图像编码过程 中的其他步骤可以参考相关技术。此外图 2中的各步骤之间的执行顺序不限于此, 可 以根据实际情况确定具体的方式。  It is to be noted that only the steps related to the present invention are given in Figs. 1 and 2, and other steps in the image encoding process can be referred to the related art. Further, the order of execution between the steps in Fig. 2 is not limited to this, and a specific manner can be determined according to actual conditions.

在本实施例中, 可以采用如下的伪代码表示本实施例的图像编码方法:  In this embodiment, the image encoding method of the embodiment may be represented by the following pseudo code:

Palette coding unit (nCbS ) // nCbS * nCbS is the size of coding unit, e.g. 8x8, 16x16,32x32,64x64Palette coding unit (nCbS) // nCbS * nCbS is the size of coding unit, e.g. 8x8, 16x16, 32x32, 64x64

{ {

index bit depth  Index bit depth

Pixel index infomation ( );  Pixel index infomation ( );

palette size = max index + 1; numPredPreviousP alette = 0  Palette size = max index + 1; numPredPreviousP alette = 0

for( i = 0; i < previousPaletteSize; i++ ) {  For( i = 0; i < previousPaletteSize; i++ ) {

previous palette entry _flag[ i ] if ( revious_palette entry flag[ i ] ) { Previous palette entry _flag[ i ] If ( revious_palette entry flag[ i ] ) {

numPredPreviousPalette++  numPredPreviousPalette++

}  }

}  }

palette num signalled entries = palette size - numPredPreviousPalette;  Palette num signalled entries = palette size - numPredPreviousPalette;

for( i = 0; i < palette num signalled entries; i++ )  For( i = 0; i < palette num signalled entries; i++ )

palette_entrie[ numPredPreviousPalette + i ]  Palette_entrie[ numPredPreviousPalette + i ]

如上所示, 例如调色板的大小为 32, palette_size=32; 对应的像素索引为 {0、 1、 2、 ··· ···、 31 }, 则每个像素索引采用 5bit即可表示, index_bit_depth=5。 由此, 与目 前方案中需要将 palette_size=32 (需要用 5bit表示) 编入比特流不同, 本发明实施例 中只需要将 index_bit_depth=5 (需要用 3bit表示 ) 编入比特流中, 由此每个 CU可以 节省 2bit。 As shown above, for example, the size of the palette is 32, palette_size=32 ; the corresponding pixel index is {0, 1, 2, ······, 31 }, then each pixel index can be represented by 5 bits. Index_bit_depth=5. Therefore, in the embodiment of the present invention, it is only necessary to encode the address_bit_depth=5 (represented by 3 bits) into the bit stream, which is required to be encoded in the bit stream. CU can save 2bit.

值得注意的是, 以上伪代码仅是本发明实施例的一种实施方式, 但本发明实施例 不限于此。 例如还可以不采用预测信息或事先约定像素索引所占的比特宽度信息等, 可以根据实际情况确定具体的实施方式。  It should be noted that the above pseudo code is only one embodiment of the embodiment of the present invention, but the embodiment of the present invention is not limited thereto. For example, the prediction information or the bit width information occupied by the pixel index may be used in advance, and a specific implementation manner may be determined according to actual conditions.

由上述实施例可知, 对像素索引的信息进行比特流编码之后, 再对调色板的信息 进行比特流编码, 使得在解码时根据像素索引的信息确定调色板的大小。 由此不需要 编入调色板的大小信息, 可以进一步提高编码压缩比来获得更小的比特代价。 实施例 2  It can be seen from the above embodiment that after bit stream coding is performed on the information of the pixel index, the information of the palette is bit-stream encoded so that the size of the palette is determined according to the information of the pixel index at the time of decoding. This eliminates the need to program the size information of the palette, and can further increase the coding compression ratio to obtain a smaller bit cost. Example 2

本发明实施例提供一种基于调色板的图像编码装置,对应于实施例 1的图像编码 方法, 相同的内容不再赘述。  An embodiment of the present invention provides an image encoding apparatus based on a palette, which corresponds to the image encoding method of Embodiment 1, and the same content will not be described again.

图 3是本发明实施例的编码装置的一构成示意图。值得注意的是, 附图 3仅示意 性示出了与本发明相关的各部件, 对于编码装置的其他部件没有示出, 可以参考现有 技术。  Fig. 3 is a block diagram showing the structure of an encoding apparatus according to an embodiment of the present invention. It is to be noted that Figure 3 only schematically shows the components associated with the present invention, and is not shown for other components of the encoding device, reference may be made to the prior art.

如图 3所示, 该图像编码装置 300包括: 信息确定单元 301和流编码单元 302; 信息确定单元 301确定待编码图像区域所对应的调色板,并且为采用调色板模式的像 素确定对应的像素索引; 流编码单元 302对像素索引的信息进行比特流编码之后, 再 对调色板的信息进行比特流编码,使得在解码时根据像素索引的信息确定调色板的大 小。 As shown in FIG. 3, the image encoding device 300 includes: an information determining unit 301 and a stream encoding unit 302; the information determining unit 301 determines a palette corresponding to an image region to be encoded, and determines a corresponding pixel for the palette mode. Pixel index; stream encoding unit 302 performs bitstream encoding on the information of the pixel index, and then performs bitstream encoding on the information of the palette, so that the color of the palette is determined according to the information of the pixel index at the time of decoding. small.

在一个实施方式中,流编码单元 302还可以用于在对像素索引的信息进行比特流 编码之前, 将像素索引所占的比特宽度信息进行比特流编码, 使得在解码时根据所述 比特宽度信息对像素索引的信息进行解码。  In an embodiment, the stream coding unit 302 may be further configured to perform bitstream encoding on the bit width information occupied by the pixel index before performing bitstream encoding on the information of the pixel index, so that the bit width information is used according to the bit width information during decoding. The information of the pixel index is decoded.

在另一个实施方式中, 信息确定单元 301还可以用于确定调色板中的预测信息; 以及流编码单元 302对像素索引的信息进行比特流编码之后,再对调色板的预测信息 以及调色板的值进行比特流编码。  In another embodiment, the information determining unit 301 is further configured to determine prediction information in the palette; and the stream encoding unit 302 performs bitstream encoding on the information of the pixel index, and then predicts the palette and adjusts the palette. The value of the swatch is bitstream encoded.

由上述实施例可知, 对像素索引的信息进行比特流编码之后, 再对调色板的信息 进行比特流编码, 使得在解码时根据像素索引的信息确定调色板的大小。 由此不需要 编入调色板的大小信息, 可以进一步提高编码压缩比来获得更小的比特代价。 实施例 3  It can be seen from the above embodiment that after bit stream coding is performed on the information of the pixel index, the information of the palette is bit-stream encoded so that the size of the palette is determined according to the information of the pixel index at the time of decoding. This eliminates the need to program the size information of the palette, and can further increase the coding compression ratio to obtain a smaller bit cost. Example 3

本发明实施例提供一种基于调色板的图像解码方法,对应于实施例 1的图像编码 方法, 相同的内容不再赘述。  An embodiment of the present invention provides a method for decoding an image based on a palette, which corresponds to the image encoding method of Embodiment 1, and the same content will not be described again.

图 4是本发明实施例的图像解码方法的一流程示意图, 如图 4所示, 所述图像解 码方法包括:  FIG. 4 is a schematic flowchart of an image decoding method according to an embodiment of the present invention. As shown in FIG. 4, the image decoding method includes:

步骤 401, 对比特流进行解码以获得采用调色板模式的像素所对应的像素索引的 in息;  Step 401: Decode a bit stream to obtain an in-pixel index corresponding to a pixel in a palette mode.

步骤 402, 根据像素索引的信息确定调色板的大小, 以及对比特流进行解码获得 调色板的信息;  Step 402: Determine a size of the color palette according to the information of the pixel index, and decode the bit stream to obtain information of the color palette.

步骤 403, 基于调色板的信息以及像素索引的信息获得待编码图像区域的图像。 在本实施例中,可以通过解码器对实施例 1所述的图像编码方法所生成的比特流 进行解码。可以根据像素索引的信息确定调色板的大小, 由此即使比特流中不包含调 色板的大小信息, 也可以准确地完成待编码图像区域的图像解码。  Step 403: Obtain an image of the image area to be encoded based on the information of the palette and the information of the pixel index. In the present embodiment, the bit stream generated by the image encoding method described in Embodiment 1 can be decoded by the decoder. The size of the palette can be determined based on the information of the pixel index, whereby the image decoding of the image region to be encoded can be accurately performed even if the size information of the color palette is not included in the bit stream.

在一个实施方式中,在步骤 401对比特流进行解码以获得采用调色板模式的像素 所对应的像素索引的信息之前, 所述图像解码方法还可以包括: 对比特流进行解码以 获得像素索引所占的比特宽度信息。 由此可以根据比特流中的比特宽度信息, 准确地 对像素索引的信息进行解码。  In an embodiment, before the bit stream is decoded in step 401 to obtain information of a pixel index corresponding to a pixel of the palette mode, the image decoding method may further include: decoding the bit stream to obtain a pixel index. The bit width information occupied. Thereby, the information of the pixel index can be accurately decoded based on the bit width information in the bit stream.

在另一个实施方式中, 步骤 402对比特流进行解码获得调色板的信息可以包括: 在比特流中没有包含调色板预测信息的情况下, 获得调色板的值; 或者, 在比特流中 包含有调色板预测信息的情况下, 获得调色板的预测信息以及调色板的值。 In another embodiment, the step 402 of decoding the bitstream to obtain the information of the palette may include: In the case where the palette prediction information is not included in the bit stream, the value of the palette is obtained; or, in the case where the palette prediction information is included in the bit stream, the prediction information of the palette and the palette are obtained. Value.

在本实施例中, 根据像素索引的信息确定调色板的大小, 具体可以包括: 将像素 索引的最大值加上 1以得到调色板的大小。  In this embodiment, determining the size of the color palette according to the information of the pixel index may specifically include: adding a maximum value of the pixel index to 1 to obtain a size of the color palette.

图 5是本发明实施例的图像解码方法的另一流程示意图, 如图 5所示, 所述图像 解码方法包括:  FIG. 5 is another schematic flowchart of an image decoding method according to an embodiment of the present invention. As shown in FIG. 5, the image decoding method includes:

步骤 501, 对比特流进行解码以获得像素索引所占的比特宽度信息;  Step 501: Decode a bitstream to obtain bit width information occupied by a pixel index.

步骤 502, 获得采用调色板模式的像素所对应的像素索引的信息;  Step 502: Obtain information about a pixel index corresponding to a pixel in a palette mode.

步骤 503, 根据像素索引的信息确定调色板的大小;  Step 503: Determine a size of the color palette according to the information of the pixel index.

步骤 504, 对比特流进行解码获得调色板的值, 或者调色板的预测信息以及调色 板的值;  Step 504: Decode the bit stream to obtain a value of the palette, or prediction information of the palette and a value of the palette;

步骤 505, 基于调色板的信息以及像素索引的信息获得待编码图像区域的图像。 值得注意的是, 图 4和图 5中仅给出了与本发明相关的步骤, 关于图像解码过程 中的其他步骤可以参考相关技术。此外图 5中的各步骤之间的执行顺序不限于此, 可 以根据实际情况确定具体的方式。  Step 505: Obtain an image of the image area to be encoded based on the information of the palette and the information of the pixel index. It is to be noted that only the steps related to the present invention are given in Figs. 4 and 5, and other steps in the image decoding process can be referred to the related art. Further, the order of execution between the steps in Fig. 5 is not limited to this, and a specific manner can be determined according to actual conditions.

由上述实施例可知, 对比特流进行解码以获得像素索引信息, 根据像素索引信息 确定调色板的大小, 以及对比特流进行解码获得调色板信息。 由此即使比特流中没有 编入调色板的大小信息, 也可以准确地完成待编码图像区域的图像解码。 实施例 4  As is apparent from the above embodiment, the bit stream is decoded to obtain pixel index information, the size of the palette is determined based on the pixel index information, and the bit stream is decoded to obtain palette information. Thereby, even if the size information of the palette is not incorporated in the bit stream, the image decoding of the image area to be encoded can be accurately performed. Example 4

本发明实施例提供一种基于调色板的图像解码装置,对应于实施例 3的图像解码 方法, 相同的内容不再赘述。  The embodiment of the present invention provides a palette-based image decoding apparatus, which corresponds to the image decoding method of Embodiment 3, and the same content will not be described again.

图 6是本发明实施例的解码装置的一构成示意图。值得注意的是, 附图 6仅示意 性示出了与本发明相关的各部件, 对于解码装置的其他部件没有示出, 可以参考现有 技术。  FIG. 6 is a block diagram showing a configuration of a decoding apparatus according to an embodiment of the present invention. It is to be noted that Figure 6 only schematically shows the components associated with the present invention, and is not shown for other components of the decoding device, reference may be made to the prior art.

如图 6所示,该图像解码装置 600包括:索引解码单元 601、调色板解码单元 602 和图像获得单元 603 ; 索引解码单元 601对比特流进行解码以获得采用调色板模式的 像素所对应的像素索引的信息;调色板解码单元 602根据像素索引的信息确定调色板 的大小, 以及对比特流进行解码获得调色板的信息; 图像获得单元 603基于调色板的 信息以及像素索引的信息获得待编码图像区域的图像。 As shown in FIG. 6, the image decoding device 600 includes an index decoding unit 601, a palette decoding unit 602, and an image obtaining unit 603; the index decoding unit 601 decodes the bit stream to obtain a pixel corresponding to the palette mode. Information of the pixel index; the palette decoding unit 602 determines the size of the palette based on the information of the pixel index, and decodes the bit stream to obtain information of the palette; the image obtaining unit 603 is based on the palette The information and the information of the pixel index obtain an image of the image area to be encoded.

在一个实施方式中,索引解码单元 601还可以用于在对比特流进行解码以获得采 用调色板模式的像素所对应的像素索引的信息之前,对比特流进行解码以获得像素索 引所占的比特宽度信息。  In an embodiment, the index decoding unit 601 may be further configured to decode the bit stream to obtain a pixel index before decoding the bit stream to obtain information of a pixel index corresponding to a pixel of the palette mode. Bit width information.

在另一个实施方式中, 调色板解码单元 602可以用于: 获得调色板的值, 或者获 得调色板的预测信息以及调色板的值。  In another embodiment, the palette decoding unit 602 can be configured to: obtain a value for the palette, or obtain prediction information for the palette and a value for the palette.

在另一个实施方式中, 调色板解码单元 602可以用于: 将像素索引的最大值加上 1以得到调色板的大小。  In another embodiment, the palette decoding unit 602 can be configured to: add a maximum of 1 to the pixel index to obtain the size of the palette.

由上述实施例可知, 对比特流进行解码以获得像素索引信息, 根据像素索引信息 确定调色板的大小, 以及对比特流进行解码获得调色板信息。 由此即使比特流中没有 编入调色板的大小信息, 也可以准确地完成待编码图像区域的图像解码。 实施例 5  As is apparent from the above embodiment, the bit stream is decoded to obtain pixel index information, the size of the palette is determined based on the pixel index information, and the bit stream is decoded to obtain palette information. Thereby, even if the size information of the palette is not incorporated in the bit stream, the image decoding of the image area to be encoded can be accurately performed. Example 5

本发明实施例提供一种图像处理设备, 所述图像处理设备包括: 如实施例 2所述 的图像编码装置; 以及如实施例 2所述的图像解码装置。  An embodiment of the present invention provides an image processing apparatus, the image processing apparatus comprising: the image encoding apparatus according to Embodiment 2; and the image decoding apparatus according to Embodiment 2.

图 7是本发明实施例的图像处理设备的一构成示意图。如图 7所示, 图像处理设 备 700可以包括: 中央处理器 (CPU) 100和存储器 110; 存储器 110耦合到中央处 理器 100。 其中该存储器 110可存储各种数据; 此外还存储信息处理的程序, 并且在 中央处理器 100的控制下执行该程序。  Fig. 7 is a block diagram showing the configuration of an image processing apparatus according to an embodiment of the present invention. As shown in FIG. 7, the image processing apparatus 700 may include: a central processing unit (CPU) 100 and a memory 110; the memory 110 is coupled to the central processing unit 100. The memory 110 can store various data; in addition, a program for information processing is stored, and the program is executed under the control of the central processing unit 100.

在一个实施方式中,图像编码装置 300或图像解码装置 600的功能可以被集成到 中央处理器 100中。其中, 中央处理器 100可以被配置为实现如实施例 1所述的图像 编码方法, 或者实现如实施例 3所述的图像解码方法。  In one embodiment, the functions of image encoding device 300 or image decoding device 600 may be integrated into central processor 100. The central processing unit 100 may be configured to implement the image encoding method as described in Embodiment 1, or implement the image decoding method as described in Embodiment 3.

在另一个实施方式中,图像编码装置 300或图像解码装置 600可以与中央处理器 分开配置, 例如可以将图像编码装置 300或图像解码装置 600配置为与中央处理器 100连接的芯片,通过中央处理器的控制来实现图像编码装置 300或图像解码装置 600 的功能。  In another embodiment, the image encoding device 300 or the image decoding device 600 may be configured separately from the central processing unit. For example, the image encoding device 300 or the image decoding device 600 may be configured as a chip connected to the central processing unit 100 through central processing. The control of the image is performed by the image encoding device 300 or the image decoding device 600.

此外, 如图 7所示, 图像处理设备 700还可以包括: 输入输出单元 120和显示单 元 130等; 其中, 上述部件的功能与现有技术类似, 此处不再赘述。 值得注意的是, 图像处理设备 700也并不是必须要包括图 7中所示的所有部件; 此外, 图像处理设备 700还可以包括图 7中没有示出的部件, 可以参考现有技术。 In addition, as shown in FIG. 7, the image processing apparatus 700 may further include: an input and output unit 120, a display unit 130, and the like; wherein the functions of the components are similar to those of the prior art, and details are not described herein again. It is to be noted that the image processing apparatus 700 does not necessarily have to include all the components shown in FIG. 7; further, the image processing apparatus 700 may also include components not shown in Figure 7, reference to the prior art.

本发明实施例还提供一种计算机可读程序,其中当在图像处理设备中执行所述程 序时,所述程序使得计算机在所述图像处理设备中执行实施例 1所述的基于调色板的 图像编码方法, 或者执行实施例 3所述的基于调色板的图像解码方法。  The embodiment of the present invention further provides a computer readable program, wherein when the program is executed in an image processing apparatus, the program causes a computer to execute the palette based method described in Embodiment 1 in the image processing apparatus The image encoding method, or the palette-based image decoding method described in Embodiment 3 is performed.

本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可 读程序使得计算机在图像处理设备中执行实施例 1 所述的基于调色板的图像编码方 法, 或者执行实施例 3所述的基于调色板的图像解码方法。  An embodiment of the present invention further provides a storage medium storing a computer readable program, wherein the computer readable program causes a computer to execute the palette based image encoding method described in Embodiment 1 in an image processing device, or execute The palette-based image decoding method described in Embodiment 3.

本发明以上的装置和方法可以由硬件实现, 也可以由硬件结合软件实现。 本发明 涉及这样的计算机可读程序, 当该程序被逻辑部件所执行时, 能够使该逻辑部件实现 上文所述的装置或构成部件, 或使该逻辑部件实现上文所述的各种方法或步骤。 本发 明还涉及用于存储以上程序的存储介质, 如硬盘、 磁盘、 光盘、 DVD、 flash存储器等。  The above apparatus and method of the present invention may be implemented by hardware, or may be implemented by hardware in combination with software. The present invention relates to a computer readable program that, when executed by a logic component, enables the logic component to implement the apparatus or components described above, or to cause the logic component to implement the various methods described above Or steps. The present invention also relates to a storage medium for storing the above program, such as a hard disk, a magnetic disk, an optical disk, a DVD, a flash memory, or the like.

针对附图中描述的功能方框中的一个或多个和 /或功能方框的一个或多个组合, 可以实现为用于执行本申请所描述功能的通用处理器、 数字信号处理器 (DSP)、 专 用集成电路 (AS )、 现场可编程门阵列 (FPGA) 或者其它可编程逻辑器件、 分立 门或者晶体管逻辑器件、 分立硬件组件或者其任意适当组合。针对附图描述的功能方 框中的一个或多个和 /或功能方框的一个或多个组合, 还可以实现为计算设备的组合, 例如, DSP和微处理器的组合、 多个微处理器、 与 DSP通信结合的一个或多个微处 理器或者任何其它这种配置。  One or more of the functional blocks described in the figures and/or one or more combinations of functional blocks may be implemented as a general purpose processor, digital signal processor (DSP) for performing the functions described herein. ), an application specific integrated circuit (AS), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or any suitable combination thereof. One or more of the functional blocks described with respect to the figures and/or one or more combinations of functional blocks may also be implemented as a combination of computing devices, eg, a combination of a DSP and a microprocessor, multiple microprocessors One or more microprocessors in conjunction with DSP communication or any other such configuration.

以上结合具体的实施方式对本发明进行了描述, 但本领域技术人员应该清楚, 这 些描述都是示例性的, 并不是对本发明保护范围的限制。 本领域技术人员可以根据本 发明的精神和原理对本发明做出各种变型和修改, 这些变型和修改也在本发明的范围 内。  The present invention has been described in connection with the specific embodiments thereof, and it should be understood by those skilled in the art that these descriptions are not intended to limit the scope of the invention. A person skilled in the art can make various modifications and changes to the invention in accordance with the spirit and the principles of the invention, which are also within the scope of the invention.

Claims

权利要求书 Claim 1、 一种基于调色板的图像编码方法, 其特征在于, 所述图像编码方法包括: 确定待编码图像区域所对应的调色板,并且为采用调色板模式的像素确定对应的 像素索引; A palette-based image encoding method, the image encoding method comprising: determining a palette corresponding to an image region to be encoded, and determining a corresponding pixel index for a pixel adopting a palette mode ; 对所述像素索引的信息进行比特流编码之后,再对所述调色板的信息进行比特流 编码, 使得在解码时根据所述像素索引的信息确定所述调色板的大小。  After performing bitstream encoding on the information of the pixel index, the information of the palette is bitstream-encoded so that the size of the palette is determined according to the information of the pixel index at the time of decoding. 2、 根据权利要求 1所述的图像编码方法, 其中, 在对所述像素索引的信息进行 比特流编码之前, 所述图像编码方法还包括:  2. The image encoding method according to claim 1, wherein the image encoding method further comprises: before performing bitstream encoding on the information of the pixel index, the image encoding method further comprises: 将所述像素索引所占的比特宽度信息进行比特流编码,使得在解码时根据所述比 特宽度信息对所述像素索引的信息进行解码。  The bit width information occupied by the pixel index is bit-stream encoded such that the information of the pixel index is decoded according to the bit width information at the time of decoding. 3、 根据权利要求 1所述的图像编码方法, 其中, 所述图像编码方法还包括: 确定所述调色板中的预测信息; 以及  3. The image encoding method according to claim 1, wherein the image encoding method further comprises: determining prediction information in the palette; 对所述像素索引的信息进行比特流编码之后,再对所述调色板的预测信息以及所 述调色板的值进行比特流编码。  After bitstream coding the information of the pixel index, the prediction information of the palette and the value of the palette are bitstream encoded. 4、 根据权利要求 1所述的图像编码方法, 其中, 根据所述像素索引的信息确定 所述调色板的大小包括: 将所述像素索引的最大值加上 1以得到所述调色板的大小。  The image encoding method according to claim 1, wherein determining the size of the palette according to the information of the pixel index comprises: adding a maximum value of the pixel index to 1 to obtain the color palette the size of. 5、 一种基于调色板的图像编码装置, 其特征在于, 所述图像编码装置包括: 信息确定单元, 确定待编码图像区域所对应的调色板, 并且为采用调色板模式的 像素确定对应的像素索引;  5. A palette-based image encoding apparatus, wherein the image encoding apparatus comprises: an information determining unit that determines a palette corresponding to an image region to be encoded, and determines a pixel using a palette mode Corresponding pixel index; 流编码单元, 对所述像素索引的信息进行比特流编码之后, 再对所述调色板的信 息进行比特流编码, 使得在解码时根据所述像素索引的信息确定所述调色板的大小。  a stream coding unit, after performing bitstream coding on the information of the pixel index, performing bitstream encoding on the information of the palette, so that the size of the palette is determined according to information of the pixel index at the time of decoding . 6、 根据权利要求 5所述的图像编码装置, 其中, 所述流编码单元还用于在对所 述像素索引的信息进行比特流编码之前,将所述像素索引所占的比特宽度信息进行比 特流编码, 使得在解码时根据所述比特宽度信息对所述像素索引的信息进行解码。  The image encoding apparatus according to claim 5, wherein the stream encoding unit is further configured to perform bit bit information occupied by the pixel index by bit before encoding the information of the pixel index. The stream is encoded such that the information of the pixel index is decoded according to the bit width information at the time of decoding. 7、 根据权利要求 5所述的图像编码装置, 其中, 信息确定单元还用于确定所述 调色板中的预测信息; 以及  7. The image encoding apparatus according to claim 5, wherein the information determining unit is further configured to determine prediction information in the palette; 所述流编码单元对所述像素索引的信息进行比特流编码之后,再对所述调色板的 预测信息以及所述调色板的值进行比特流编码。 The stream coding unit performs bitstream coding on the information of the pixel index, and then performs bitstream encoding on the prediction information of the palette and the value of the palette. 8、 根据权利要求 5所述的图像编码装置, 其中, 根据所述像素索引的信息确定 所述调色板的大小包括: 将所述像素索引的最大值加上 1以得到所述调色板的大小。 8. The image encoding apparatus according to claim 5, wherein determining the size of the palette according to the information of the pixel index comprises: adding a maximum value of the pixel index to 1 to obtain the color palette the size of. 9、 一种图像处理设备, 所述图像处理设备包括:  9. An image processing apparatus, the image processing apparatus comprising: 如权利要求 5至 8任一项所述的图像编码装置; 以及  An image encoding apparatus according to any one of claims 5 to 8; 解码装置, 对比特流进行解码以获得图像。  A decoding device that decodes the bitstream to obtain an image.
PCT/CN2014/080201 2014-06-18 2014-06-18 Palette-based image coding method, device and image processing device Ceased WO2015192340A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/080201 WO2015192340A1 (en) 2014-06-18 2014-06-18 Palette-based image coding method, device and image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/080201 WO2015192340A1 (en) 2014-06-18 2014-06-18 Palette-based image coding method, device and image processing device

Publications (1)

Publication Number Publication Date
WO2015192340A1 true WO2015192340A1 (en) 2015-12-23

Family

ID=54934695

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080201 Ceased WO2015192340A1 (en) 2014-06-18 2014-06-18 Palette-based image coding method, device and image processing device

Country Status (1)

Country Link
WO (1) WO2015192340A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107409215A (en) * 2015-01-29 2017-11-28 高通股份有限公司 Pallet mode for video coding decodes

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5732205A (en) * 1994-12-30 1998-03-24 Intel Corporation Color conversion using 4.5 bit palette
US6256415B1 (en) * 1998-06-10 2001-07-03 Seiko Epson Corporation Two row buffer image compression (TROBIC)
CN101340587A (en) * 2007-07-05 2009-01-07 联发科技股份有限公司 Method for encoding input image and method and device for playing encoded image
CN102075752A (en) * 2011-01-11 2011-05-25 北京北纬点易信息技术有限公司 Image coding method, image decoding method and device for embedded system
CN102523367A (en) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 Real-time image compression and reduction method based on plurality of palettes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5732205A (en) * 1994-12-30 1998-03-24 Intel Corporation Color conversion using 4.5 bit palette
US6256415B1 (en) * 1998-06-10 2001-07-03 Seiko Epson Corporation Two row buffer image compression (TROBIC)
CN101340587A (en) * 2007-07-05 2009-01-07 联发科技股份有限公司 Method for encoding input image and method and device for playing encoded image
CN102075752A (en) * 2011-01-11 2011-05-25 北京北纬点易信息技术有限公司 Image coding method, image decoding method and device for embedded system
CN102523367A (en) * 2011-12-29 2012-06-27 北京创想空间商务通信服务有限公司 Real-time image compression and reduction method based on plurality of palettes

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107409215A (en) * 2015-01-29 2017-11-28 高通股份有限公司 Pallet mode for video coding decodes
CN107409215B (en) * 2015-01-29 2020-01-17 高通股份有限公司 Palette Mode Coding for Video Coding

Similar Documents

Publication Publication Date Title
WO2015194187A1 (en) Harmonized palette coding
JP2019515561A5 (en)
CN109640179B (en) Video decoding control method, device and electronic device
US10841659B2 (en) Video encoding apparatus and video encoding system
CN107077827B (en) Method for performing color mapping on video signal, corresponding device and storage medium
CN117083856A (en) Enhancement processing for machine video coding
WO2017063168A1 (en) Image coding method and apparatus, and image processing device
KR102306336B1 (en) Strong intra smoothing for in rext
CN107659823B (en) A method and device for decoding intra-frame depth image blocks
JP7067655B2 (en) Image coding equipment, image decoding equipment, and image processing equipment
KR102185857B1 (en) Method and apparatus for encoding and decoding image using modification of residual block
WO2015192340A1 (en) Palette-based image coding method, device and image processing device
WO2014154074A1 (en) Methods and devices for coding and decoding depth information, and video processing and playing device
CN108765503B (en) Skin color detection method, device and terminal
WO2015188342A1 (en) Three-dimensional palette based image coding method, device and image processing apparatus
WO2017167194A1 (en) Method for improving video resolution and video quality, encoder, and decoder
US20150049800A1 (en) Estimation of entropy encoding bits in video compression
CN111669598B (en) Hybrid palette-DPCM coding for image compression
WO2015139174A1 (en) Image coding method and device and image processing device
WO2016119196A1 (en) Image coding method, apparatus, and image processing device
WO2016029419A1 (en) Image encoding method and device, and image processing device
WO2015139180A1 (en) Image coding method and device and image processing device
WO2015180139A1 (en) Image coding method and apparatus, and image processing device
WO2016029420A1 (en) Palette-based image encoding method and device, and image processing device
WO2016197317A1 (en) Copy information encoding and decoding method and apparatus, and image processing device

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: 14894965

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: 14894965

Country of ref document: EP

Kind code of ref document: A1