WO2016197317A1 - 拷贝信息的编解码方法、装置以及图像处理设备 - Google Patents

拷贝信息的编解码方法、装置以及图像处理设备 Download PDF

Info

Publication number
WO2016197317A1
WO2016197317A1 PCT/CN2015/081049 CN2015081049W WO2016197317A1 WO 2016197317 A1 WO2016197317 A1 WO 2016197317A1 CN 2015081049 W CN2015081049 W CN 2015081049W WO 2016197317 A1 WO2016197317 A1 WO 2016197317A1
Authority
WO
WIPO (PCT)
Prior art keywords
copy
value
values
encoded
decoded
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/CN2015/081049
Other languages
English (en)
French (fr)
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/CN2015/081049 priority Critical patent/WO2016197317A1/zh
Publication of WO2016197317A1 publication Critical patent/WO2016197317A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/103Selection of coding mode or of prediction mode
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output

Definitions

  • the present invention relates to the field of graphic image technology, and in particular, to a method and device for encoding and decoding copy information, and an image processing device.
  • 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); in order to reduce the storage bits
  • the storage capacity of the image image which can usually point the pixel to the data index of the palette.
  • the color value of each output pixel can be determined by looking up a palette with a corresponding data index.
  • the palette is a set of pixel values. For pixels whose pixel values are in the palette, only the pixel index corresponding to 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 coding can be reduced.
  • an index copy run can be employed when performing bit stream encoding.
  • the palette copy type identifier (palette_run_type_flag) is COPY_LEFT_MODE, and the pixel value of one pixel is the same as the pixel value of the left pixel, the copy left mode may be used to generate the pixel index, the copy type, and The copy information of the copy value;
  • the palette copy type identifier (palette_run_type_flag) is COPY_ABOVE_MODE, in the case where the pixel value of one pixel is the same as the pixel value of the upper pixel, the copy above mode may be used to generate the copy type. And copy information of the copied value.
  • VLC variable length code
  • Embodiments of the present invention provide a codec method and apparatus for copying information, and an image processing apparatus. Even if some of the copy values are large, the bit cost of the encoding can be further reduced.
  • a method for encoding copy information includes:
  • an encoding apparatus for copying information comprising:
  • a palette determining unit that determines a palette for a pixel adopting a palette mode in an image region to be encoded
  • a copy information determining unit based on the palette, determining a pixel index, a copy type, and a copy value that the image area to be encoded needs to be encoded;
  • the bitstream encoding unit maps one or the same of the copy values into a mapping code and performs bitstream encoding on the mapping code, and performs bitstream encoding on the remaining copy values.
  • a method for decoding copy information includes:
  • mapping code corresponding to the image area to be decoded and remaining copy values based on the number of the copy values; wherein one of the copy values or the same plurality is mapped to the mapping code;
  • a copy value mapped to the mapping code is calculated based on the remaining copy value obtained.
  • a decoding apparatus for copying information the decoding apparatus include:
  • a copy type obtaining unit that obtains a copy type corresponding to an image area to be decoded from the bit stream
  • a number obtaining unit that obtains a number of pixel indexes corresponding to the image area to be decoded based on the number of pixel indexes that need to be decoded in the image area to be decoded and the copy type;
  • a copy value obtaining unit obtaining a mapping code corresponding to the image area to be decoded and remaining copy values based on the number of the copy values; wherein one of the copy values or the same plurality is mapped to the Mapping code
  • the copy value calculation unit calculates a copy value mapped to the mapping code based on the obtained remaining copy values.
  • an image processing apparatus including:
  • An image encoder that determines a palette for pixels in the image region to be encoded that adopts a palette mode; determines, based on the palette, a pixel index, a copy type, and a copy value that the image region to be encoded needs to be encoded; One or more of the copy values are mapped to a mapping code and the mapping code is bit stream encoded, and the remaining copy values are bit stream encoded;
  • An image decoder that obtains a copy type corresponding to an image region to be decoded from a bitstream; a number of pixel indexes that need to be decoded based on the image region to be decoded, and the copy type obtains an image region corresponding to the image to be decoded a number of copy values; obtaining a mapping code corresponding to the image area to be decoded and remaining copy values based on the number of the copy values; wherein one or the same of the copy values are mapped as a mapping code; calculating a copy value mapped to the mapping code based on the obtained remaining copy values.
  • a computer readable program wherein when the program is executed in an image processing apparatus, the program causes a computer to execute copy information as described above in the image processing apparatus Codec method.
  • a storage medium storing a computer readable program, wherein the computer readable program causes a computer to execute a codec method of copying information as described above in an image processing device.
  • An advantageous effect of the embodiment of the present invention is that at the encoding end, one or the same of the copy values are mapped into a mapping code, and the mapping code is bit-stream encoded, and the decoded end calculates the mapped based on the obtained information. Copy value.
  • the bit cost of the encoding can be further reduced.
  • FIG. 1 is a schematic diagram of an example of a coding unit according to an embodiment of the present invention.
  • 2 is a schematic diagram of current bitstream coding
  • FIG. 3 is a schematic flow chart of an encoding method according to Embodiment 1 of the present invention.
  • FIG. 5 is a schematic diagram of another example of a coding unit according to Embodiment 1 of the present invention.
  • FIG. 6 is another schematic flowchart of an encoding method according to Embodiment 1 of the present invention.
  • Figure 7 is a schematic diagram of an encoding apparatus according to a second embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a decoding method according to Embodiment 3 of the present invention.
  • FIG. 9 is another schematic diagram of a decoding method according to Embodiment 3 of the present invention.
  • FIG. 10 is another schematic diagram of a decoding method according to Embodiment 3 of the present invention.
  • Figure 11 is a schematic diagram of a decoding apparatus according to Embodiment 4 of the present invention.
  • Figure 12 is a block diagram showing the configuration of an image processing apparatus according to a fifth embodiment of the present invention.
  • FIG. 1 is a schematic diagram showing an example of a coding unit according to an embodiment of the present invention, showing a case of a coding unit (CU).
  • the coding unit has 8 x 8 pixels; wherein the 8 x 8 pixels have different 7 pixel values (representing different colors).
  • pixels having the same pixel value in FIG. 1 use the same symbol to represent pixel values, for example, C0, C1, ..., C6 are used to represent different pixel values.
  • Table 1 shows the palette determined by the CU shown in Fig. 1.
  • the index copy information generated according to the palette may be as shown in Table 2 below.
  • Table 2 shows the index run information of the CU shown in Fig. 1 which is formed based on the palette of Table 1.
  • bit stream encoding may be performed. For example, for Left (0, 31), pixel index 0, copy type Left (for example, represented by 0), and copy value 31 may be encoded; (3) The copy type Above (for example, indicated by 1) and the copy value of 3 can be encoded.
  • palette related information for example, palette entry related
  • palette index bitmap may be sequentially used.
  • Information such as a palette index map, is used for bitstream encoding.
  • the number of the index (number of index) is first encoded, then the pixel index (index) is encoded, and the run type and the run value are used.
  • the encoding is performed interleaved, and then pixels in a non-palette mode (e.g., escape mode) can be encoded.
  • a non-palette mode e.g., escape mode
  • the number of pixel indexes that need to be encoded (for example, 11 shown in Table 2) can be explicitly bitstream encoded (for example, as shown in FIG. 2) or implicitly derived from other information, and the copy type is already It is encoded, so that the number of copy values that need to be encoded can be derived; in turn, a copy value or the same multiple copy values can be calculated based on the obtained information.
  • FIG. 3 is a schematic flowchart of an encoding method according to an embodiment of the present invention. As shown in FIG. 3, the encoding method includes:
  • Step 301 determining a color palette for a pixel adopting a palette mode in an image region to be encoded
  • Step 302 Determine, according to the palette, a pixel index, a copy type, and a copy value that the image area to be encoded needs to be encoded;
  • Step 303 Map one or the same of the copy values into a mapping code and perform bit stream encoding on the mapping code, and perform bit stream encoding on the remaining copy values.
  • one or the same of the copy values is a maximum value of the copy values (which may be referred to as a Largest Run), and the mapping code is smaller than the maximum value and different from the The remaining copy values.
  • the present invention is not limited thereto, and other copy values may be mapped. The following is only an example of the Largest Run.
  • the number of the pixel indexes that need to be encoded in the image region to be encoded may be bit-stream encoded, and the pixel index to be encoded in the image region to be encoded and the copy type are bit-bited.
  • Stream coding may be bit-stream encoded, and the pixel index to be encoded in the image region to be encoded and the copy type are bit-bited.
  • the image area to be encoded may be a coding unit CU or a maximum coding unit LCU (Largest Coding Unit); the following uses CU as an example for description.
  • LCU Large Coding Unit
  • the embodiment of the present invention is applicable to the case of adopting the palette mode, and the embodiment of the present invention is equally applicable to the case of mixing the palette mode and the non-palette mode (for example, the ease mode).
  • bit stream encoding of the palette, the pixel index, the copy type, and the like in the image region to be encoded may be implemented by any method in the prior art, which is not limited by the present invention. How to encode the copy run is schematically illustrated below.
  • the mapping code is, for example, a relatively special one or several bits, which can be defined in advance at the encoding end and the decoding end.
  • the copy value such as the Largest Run
  • the bit code with a small bit cost is bit-stream encoded, which further reduces the bit cost.
  • FIG. 4 is another schematic flowchart of an encoding method according to an embodiment of the present invention, showing a case where image encoding is performed. As shown in FIG. 4, the encoding method includes:
  • Step 401 Determine a color palette for a pixel adopting a palette mode in an image region to be encoded
  • Step 402 Determine, according to the color palette, a pixel index, a copy type, and a copy value that the image area to be encoded needs to be encoded;
  • Step 403 encoding the color palette
  • Step 404 Perform bitstream encoding on the number of the pixel indexes that need to be encoded.
  • Step 405 Perform bitstream encoding on the pixel index that needs to be encoded.
  • Step 406 Map one or the same of the copy values to a mapping code.
  • Step 407 Perform bitstream encoding on the copy type and the copy value, where the mapping code is bitstream-encoded for one or the same of the copy values; for the remaining copy values
  • the copy value is subjected to bit stream encoding.
  • pixels in the non-palette mode can also be bitstream encoded.
  • the mapped copy value can be calculated using the following formula:
  • MR is the mapped copy value
  • the itTotal is the size of the image area to be decoded
  • MR_num is the mapped The number of copies of the value.
  • the copy values to be encoded need to be “31”, “0”, “3”, “0”, “0”, “0”. There are 15 values of "0”, “0”, “6”, “0”, “0”, “5", "0", “0”, and "4". Where the Largest Run is 31, then 31 can be mapped to, for example, MR, and then the MR is bit stream encoded. The specific value of the mapping code can be determined according to the actual situation.
  • the number of pixel indexes that need to be decoded in the image area to be decoded and each copy type can be obtained; the number of pixel indexes that need to be decoded can be explicitly obtained from decoding the bit stream, or can be obtained from other information. Derived and implicitly obtained.
  • the number of pixel indexes that need to be decoded can be obtained from the bit stream, for example, 11; correspondingly, the number of copies of the type of Left is 11.
  • the number of copies of the type of Above is four, and the decoding end can determine that the total copy value is 15.
  • the following values can be obtained from the bit stream based on the number of copy values: "MR”, "0”, “3”, “0”, “0”, “0”, “0”, “0”, “6”, “0”, “0”, “5", “0”, “0”, “4"; wherein MR is one.
  • FIG. 5 is a schematic diagram of another example of a coding unit according to an embodiment of the present invention, showing a case of another CU.
  • the palette corresponding to this CU is shown in Table 3.
  • Table 3 shows the palette determined by the CU shown in Fig. 5.
  • the index copy information generated based on the palette may be as shown in Table 4 below.
  • Table 4 shows the index run information of the CU shown in Fig. 5 formed based on the palette of Table 3.
  • the copy values to be encoded need to be six values of "23", “0”, “23”, “3”, “2”, and "7". If there are two Largest Runs of 23, then 23 can be mapped to, for example, MR, and then the MR is bit stream encoded. The specific value of the mapping code can be determined according to the actual situation.
  • the number of pixel indexes that need to be decoded can be obtained from the bit stream, for example, five; correspondingly, the number of copies of the type of Left is five.
  • the decoder can determine that the total copy value is 6. Then, each copy value and the mapping code can be obtained based on the number of copy values.
  • Table 5 schematically shows the case of the bit stream obtained by the decoding side. As shown in Table 5, the following values can be obtained from the bit stream: "MR”, “0”, “MR”, “3”, “2” ",” “7”; where MR is 2.
  • the number of copy values to be encoded in the image area to be encoded is n, after encoding the first n-1 copy values in the copy value, and not on the nth Copy the value for encoding.
  • FIG. 6 is another schematic flowchart of an encoding method according to an embodiment of the present invention, showing an image encoding process. condition. As shown in FIG. 6, the encoding method includes:
  • Step 601 Determine a color palette for a pixel adopting a palette mode in an image region to be encoded
  • Step 602 Determine, according to the color palette, a pixel index, a copy type, and a copy value that the image area to be encoded needs to be encoded;
  • Step 603 encoding the color palette
  • Step 604 Perform bitstream coding on the number of the pixel indexes that need to be encoded.
  • Step 605 Perform bitstream encoding on the pixel index that needs to be encoded.
  • Step 606 Perform bitstream encoding on the copy type and the copy value; wherein, the first n-1 copy values of the n copy values are encoded, and the nth copy value is not encoded.
  • the nth copy value is the maximum value of the copy value, the Largest Run, the Largest Run may not be encoded.
  • the value of the copy to be encoded is "0", “23”, “3”, “2”, “7”, and “23”. Only five copies of "0”, “23”, “3”, “2”, and “7” can be encoded at the encoding end.
  • the total copy value can be determined as described above as 6 and 5 copy values are obtained from the bit stream, whereby it can be determined that the last copy value is not encoded.
  • the mapping code is bit-stream encoded, and the mapped copy value is calculated based on the obtained information at the decoding end.
  • the last copy value is not bitstream encoded at the encoding end, and the last copy value is calculated at the decoding end based on the obtained information.
  • the embodiment of the present invention provides an encoding apparatus for copying information, which corresponds to the encoding method of the copy information in Embodiment 1, and the same content is not described herein again.
  • FIG. 7 is a schematic diagram of an encoding apparatus according to an embodiment of the present invention. As shown in FIG. 7, the encoding apparatus 700 includes:
  • a palette determining unit 701 which determines a palette for pixels in the image region to be encoded that adopt a palette mode
  • a copy information determining unit 702 based on the palette, determining a pixel index, a copy type, and a copy value that the image area to be encoded needs to be encoded;
  • the bitstream encoding unit 703 maps one of the copy values or the same one to a mapping code. And encoding the mapping code into a bit stream, and encoding the remaining copy values into a bit stream.
  • one or the same of the copy values is a maximum value of the copy values, and the mapping code is smaller than the maximum value and different from the remaining copy values.
  • the present invention is not limited thereto, and other copy values may be mapped.
  • bitstream encoding unit 703 is further configured to perform bitstream encoding on the number of pixel indexes that the image region to be encoded needs to be encoded.
  • bitstream encoding unit 703 is further configured to: perform bitstream encoding on the pixel index to be encoded in the image region to be encoded and the copy type.
  • bitstream encoding unit 703 is further configured to: encode the first n-1 copy values in the copy value, and not encode the nth copy value; where n is the The number of copy values that need to be encoded for the image area to be encoded.
  • the nth copy value may be the maximum value of the copy values.
  • the present invention is not limited thereto, and other copy values may be mapped.
  • the mapping code is bit-stream encoded, and the mapped copy value is calculated based on the obtained information at the decoding end.
  • the last copy value is not bitstream encoded at the encoding end, and the last copy value is calculated at the decoding end based on the obtained information.
  • An embodiment of the present invention provides a method for decoding copy information, which corresponds to the method for encoding copy information in Embodiment 1.
  • the embodiment of the present invention performs decoding correspondingly, and the same content is not described again.
  • any one of the related methods may be employed, and the present invention is not limited thereto.
  • FIG. 8 is a schematic diagram of a decoding method according to an embodiment of the present invention. As shown in FIG. 8, the decoding method includes:
  • Step 801 Obtain a copy type corresponding to an image area to be decoded from a bit stream
  • Step 802 Obtain a number of pixel indexes corresponding to the image area to be decoded based on the number of pixel indexes that need to be decoded in the image area to be decoded and the copy type.
  • Step 803 Obtain a mapping code corresponding to the image area to be decoded according to the number of the copy values, and a remaining copy value; wherein one of the copy values or the same plurality is mapped to the mapping code;
  • Step 804 calculating a copy value mapped to the mapping code based on the obtained remaining copy values.
  • one or the same of the copy values is a maximum value of the copy values, and the mapping code is smaller than the maximum value and different from the remaining copy values.
  • the present invention is not limited thereto, and other copy values may be mapped.
  • the number of pixel indexes that the image area to be decoded needs to be decoded may also be obtained from the bit stream.
  • a palette of the image region to be decoded may also be obtained from the bitstream; and a pixel index that needs to be decoded by the image region to be decoded is obtained.
  • FIG. 9 is another schematic diagram of a decoding method according to an embodiment of the present invention. As shown in FIG. 9, the decoding method includes:
  • Step 901 Obtain a color palette of an image region to be decoded from the bitstream
  • Step 902 Obtain, from the bitstream, a number of pixel indexes that need to be decoded in the image area to be decoded.
  • Step 903 Obtain, from the bitstream, a pixel index that needs to be decoded in the image area to be decoded.
  • Step 904 Obtain a copy type corresponding to an image area to be decoded from the bit stream
  • Step 905 Obtain a number of pixel indexes corresponding to the image area to be decoded based on the number of pixel indexes that need to be decoded in the image area to be decoded and the copy type;
  • Step 906 Obtain a mapping code corresponding to the image area to be decoded and remaining copy values based on the number of the copy values, where one or the same of the copy values are mapped to the mapping code ;
  • Step 907 Calculate a copy value mapped to the mapping code based on the obtained remaining copy values.
  • Step 908 decoding the image area to be decoded based on a palette, a pixel index, a copy type, and a copy value.
  • the mapped copy value may be calculated by using the following formula:
  • MR is the mapped copy value
  • the itTotal is the size of the image area to be decoded
  • MR_num is the mapped The number of copies of the value.
  • the first n-1 copy values of the copy values may be encoded at the encoding end, and the nth copy value is not encoded; wherein n is the image area to be encoded needs to be encoded The number of copies of the value.
  • the decoding end it can be determined based on the number n of copy values that need to be decoded and the number of copied values obtained. Whether the nth copy value is encoded; and calculating the nth copy value based on the obtained n-1 copy values.
  • the nth copy value may be the maximum value of the copy values.
  • the present invention is not limited thereto, and other copy values may be mapped.
  • FIG. 10 is another schematic diagram of a decoding method according to an embodiment of the present invention. As shown in FIG. 10, the decoding method includes:
  • Step 1001 Obtain a color palette of an image area to be decoded from a bit stream
  • Step 1002 Obtain, from the bitstream, the number of pixel indexes that need to be decoded in the image region to be decoded;
  • Step 1003 Obtain, from the bitstream, a pixel index that needs to be decoded in the image area to be decoded.
  • Step 1004 Obtain a copy type corresponding to an image area to be decoded from the bitstream
  • Step 1005 Obtain a number of pixel indexes corresponding to the image area to be decoded based on the number of pixel indexes that need to be decoded in the image area to be decoded and the copy type.
  • Step 1006 determining whether the current copy value is the last copy value based on the number of the copy values; if yes, executing step 1008; if not, executing step 1007;
  • Step 1007 Obtain the copy value from the bitstream; then perform step 1006 to obtain the next copy value.
  • Step 1008 calculating the last copy value based on the obtained copy value.
  • Step 1009 Decode the image area to be decoded based on a palette, a pixel index, a copy type, and a copy value.
  • the mapping code is bit-stream encoded, and the mapped copy value is calculated based on the obtained information at the decoding end.
  • the last copy value is not bitstream encoded at the encoding end, and the last copy value is calculated at the decoding end based on the obtained information.
  • the embodiment of the present invention provides a decoding apparatus for copying information, which corresponds to the decoding method of the copy information in Embodiment 3, and the same content is not described herein again.
  • FIG. 11 is a schematic diagram of a decoding apparatus according to an embodiment of the present invention. As shown in FIG. 11, the decoding apparatus 1100 includes:
  • a copy type obtaining unit 1101 obtaining a copy type corresponding to an image area to be decoded from the bit stream;
  • a copy value number obtaining unit 1102 obtaining a number of copy values corresponding to the image area to be decoded based on the number of pixel indexes that need to be decoded and the copy type of the image area to be decoded;
  • a copy value obtaining unit 1103 obtaining a mapping code corresponding to the image area to be decoded and remaining copy values based on the number of the copy values; wherein one of the copy values or the same plurality is mapped as Mapping code
  • the copy value calculation unit 1104 calculates a copy value mapped to the mapping code based on the obtained remaining copy values.
  • one or the same of the copy values is a maximum value of the copy values, and the mapping code is smaller than the maximum value and different from the remaining copy values.
  • the present invention is not limited thereto, and other copy values may be mapped.
  • the decoding apparatus 1100 may further include:
  • the index number obtaining unit 1105 obtains, from the bit stream, the number of pixel indexes that need to be decoded in the image area to be decoded.
  • the decoding apparatus 1100 may further include:
  • the pixel index obtaining unit 1107 obtains a pixel index that the image area to be decoded needs to be decoded.
  • the copy value calculation unit 1104 may calculate the mapped copy value by using the following formula:
  • MR is the mapped copy value
  • the itTotal is the size of the image area to be decoded
  • MR_num is the mapped The number of copies of the value.
  • the decoding apparatus 1100 may further include:
  • the copy value judging unit determines whether the nth copy value is based on the number n of the copy values obtained by the copy number obtaining unit 1102 and the number of copy values obtained by the copy value obtaining unit 1103. Encoding is performed; and the copy value calculation unit 1104 is further configured to: calculate the nth copy value based on the obtained n-1 copy values.
  • the nth copy value may be the maximum value of the copy values.
  • the present invention is not limited thereto, and other copy values may be mapped.
  • the mapping code is bit-stream encoded, and the mapped copy value is calculated based on the obtained information at the decoding end.
  • the last copy value is not bitstream encoded at the encoding end, and the last copy value is calculated at the decoding end based on the obtained information.
  • An embodiment of the present invention provides an image processing apparatus, including: the encoding apparatus according to Embodiment 2 and/or the decoding apparatus as described in Embodiment 4.
  • FIG. 12 is a block diagram showing the structure of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus 1200 can 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 functionality of encoding device 700 can be integrated into central processor 100.
  • the central processing unit 100 can be configured to implement the encoding method as described in Embodiment 1.
  • the functionality of the decoding device 1100 can also be integrated into the central processor 100.
  • the central processing unit 100 can be configured to implement the decoding method as described in Embodiment 3.
  • the encoding device 700 and/or the decoding device 1100 can be configured separately from the central processing unit.
  • the encoding device 700 and/or the decoding device 1100 can be configured as a chip connected to the central processing unit 100 through central processing. The control of the device implements the functions of the encoding device 700 and/or the decoding device 1100.
  • the image processing apparatus 1200 may further include: an input and output unit 120, a display unit 130, and the like; wherein the functions of the above components are similar to those of the prior art, and are not described herein again. It is to be noted that the image processing apparatus 1200 does not necessarily have to include all of the components shown in FIG. 12; in addition, the image processing apparatus 1200 may further include components not shown in FIG. 12, and reference may be made to the related art.
  • the embodiment of the present invention further provides a computer readable program, wherein when the program is executed in an image processing device, the program causes a computer to execute the encoding method as described in Embodiment 1 in the image processing device and/or Or the decoding method as described in Embodiment 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 encoding method as described in Embodiment 1 in an image processing apparatus and/or as in Embodiment 3 The decoding method described.
  • the above apparatus and method of the present invention may be implemented by hardware or 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.
  • DSP digital signal processor
  • ASIC 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

一种拷贝信息的编解码方法、装置以及图像处理设备。所述编码方法包括:为待编码图像区域中采用调色板模式的像素确定调色板;基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;以及将所述拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,并将其余拷贝值进行比特流编码。由此,即使某些拷贝值比较大,也能进一步降低编码的比特代价。

Description

拷贝信息的编解码方法、装置以及图像处理设备 技术领域
本发明涉及一种图形图像技术领域,特别涉及一种拷贝信息的编解码方法、装置以及图像处理设备。
背景技术
基于调色板(Palette-based)的编码在图形图像技术(尤其是视频编码技术)中得到了广泛应用。在编码过程中,对于待编码图像区域,例如一个编码单元(CU,coding Unit),包含多个具有色彩值(例如采用RGB模式,具有24比特的真彩色)的像素;为了减少用于存储位图图像的存储容量,通常可以将像素指向调色板的数据索引。在译码过程中,每一输出像素的色彩值可以通过查找具有相应数据索引的调色板来决定。
其中,调色板为一系列像素值(pixel value)的集合,对于像素值位于调色板中的像素,仅需使用该像素值在调色板中对应的像素索引(pixel index)。由此可以仅将调色板以及编码单元中的像素所对应的索引进行比特流编码,可以减少编码的比特代价(bit cost)。
为了进一步降低比特代价,在进行比特流编码时可以采用索引拷贝信息(index copy run)。例如,若调色板拷贝类型标识(palette_run_type_flag)为COPY_LEFT_MODE,在一像素的像素值与左边像素的像素值相同的情况下,可以采用按左拷贝(copy left)模式生成包括像素索引、拷贝类型以及拷贝值的拷贝信息;若调色板拷贝类型标识(palette_run_type_flag)为COPY_ABOVE_MODE,在一像素的像素值与上边像素的像素值相同的情况下,可以采用按上拷贝(copy above)模式生成包括拷贝类型以及拷贝值的拷贝信息。
应该注意,上面对技术背景的介绍只是为了方便对本发明的技术方案进行清楚、完整的说明,并方便本领域技术人员的理解而阐述的。不能仅仅因为这些方案在本发明的背景技术部分进行了阐述而认为上述技术方案为本领域技术人员所公知。
发明内容
但是,发明人发现,目前的拷贝值(可以称为run)采用变长码(VLC,Variable Length Code)映射后被进行比特流编码,一般更大的拷贝值被映射成更长的变长码,而更小的拷贝值被映射成更短的变长码。在某些场景下比较大的拷贝值需要很多的比特进行编码,不能进一步降低编码的比特代价。
本发明实施例提供一种拷贝信息的编解码方法、装置以及图像处理设备。即使某些拷贝值比较大,也能进一步降低编码的比特代价。
根据本发明实施例的第一个方面,提供一种拷贝信息的编码方法,所述编码方法包括:
为待编码图像区域中采用调色板模式的像素确定调色板;
基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;以及
将所述拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,并将其余拷贝值进行比特流编码。
根据本发明实施例的第二个方面,提供一种拷贝信息的编码装置,所述编码装置包括:
调色板确定单元,为待编码图像区域中采用调色板模式的像素确定调色板;
拷贝信息确定单元,基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;以及
比特流编码单元,将所述拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,并将其余拷贝值进行比特流编码。
根据本发明实施例的第三个方面,提供一种拷贝信息的解码方法,所述解码方法包括:
从比特流中获得对应于待解码图像区域的拷贝类型;
基于所述待解码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;
基于所述拷贝值的个数获得对应于所述待解码图像区域的映射码以及其余拷贝值;其中,所述拷贝值中的其中一个或者相同的多个被映射为所述映射码;
基于已获得的所述其余拷贝值计算被映射为所述映射码的拷贝值。
根据本发明实施例的第四个方面,提供一种拷贝信息的解码装置,所述解码装置 包括:
拷贝类型获得单元,从比特流中获得对应于待解码图像区域的拷贝类型;
个数获得单元,基于所述待解码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;
拷贝值获得单元,基于所述拷贝值的个数获得对应于所述待解码图像区域的映射码以及其余拷贝值;其中,所述拷贝值中的其中一个或者相同的多个被映射为所述映射码;
拷贝值计算单元,基于已获得的所述其余拷贝值计算被映射为所述映射码的拷贝值。
根据本发明实施例的第五个方面,提供一种图像处理设备,包括:
图像编码器,为待编码图像区域中采用调色板模式的像素确定调色板;基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;以及将所述拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,并将其余拷贝值进行比特流编码;
和/或
图像解码器,从比特流中获得对应于待解码图像区域的拷贝类型;基于所述待解码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;基于所述拷贝值的个数获得对应于所述待解码图像区域的映射码以及其余拷贝值;其中,所述拷贝值中的其中一个或者相同的多个被映射为所述映射码;基于已获得的所述其余拷贝值计算被映射为所述映射码的拷贝值。
根据本发明实施例的又一个方面,提供一种计算机可读程序,其中当在图像处理设备中执行所述程序时,所述程序使得计算机在所述图像处理设备中执行如上所述的拷贝信息的编解码方法。
根据本发明实施例的又一个方面,提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在图像处理设备中执行如上所述的拷贝信息的编解码方法。
本发明实施例的有益效果在于,在编码端将拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,在解码端基于已获得信息计算出被映射的拷贝值。由此,即使某些拷贝值比较大,也能进一步降低编码的比特代价。
参照后文的说明和附图,详细公开了本发明的特定实施方式,指明了本发明的原理可以被采用的方式。应该理解,本发明的实施方式在范围上并不因而受到限制。在所附权利要求的精神和条款的范围内,本发明的实施方式包括许多改变、修改和等同。
针对一种实施方式描述和/或示出的特征可以以相同或类似的方式在一个或更多个其它实施方式中使用,与其它实施方式中的特征相组合,或替代其它实施方式中的特征。
应该强调,术语“包括/包含”在本文使用时指特征、整件、步骤或组件的存在,但并不排除一个或更多个其它特征、整件、步骤或组件的存在或附加。
附图说明
参照以下的附图可以更好地理解本发明的很多方面。附图中的部件不是成比例绘制的,而只是为了示出本发明的原理。为了便于示出和描述本发明的一些部分,附图中对应部分可能被放大或缩小。
在本发明的一个附图或一种实施方式中描述的元素和特征可以与一个或更多个其它附图或实施方式中示出的元素和特征相结合。此外,在附图中,类似的标号表示几个附图中对应的部件,并可用于指示多于一种实施方式中使用的对应部件。
图1是本发明实施例的编码单元的一实例示意图;
图2是目前进行比特流编码的一示意图;
图3是本发明实施例1的编码方法的一流程示意图;
图4是本发明实施例1的编码方法的另一流程示意图;
图5是本发明实施例1的编码单元的另一实例示意图;
图6是本发明实施例1的编码方法的另一流程示意图;
图7是本发明实施例2的编码装置的一示意图;
图8是本发明实施例3的解码方法的一示意图;
图9是本发明实施例3的解码方法的另一示意图;
图10是本发明实施例3的解码方法的另一示意图;
图11是本发明实施例4的解码装置的一示意图;
图12是本发明实施例5的图像处理设备的一构成示意图。
具体实施方式
参照附图,通过下面的说明书,本发明的前述以及其它特征将变得明显。在说明书和附图中,具体公开了本发明的特定实施方式,其表明了其中可以采用本发明的原则的部分实施方式,应了解的是,本发明不限于所描述的实施方式,相反,本发明包括落入所附权利要求的范围内的全部修改、变型以及等同物。
图1是本发明实施例的编码单元的一实例示意图,示出了一个编码单元(CU)的情况。如图1所示,该编码单元具有8×8个像素;其中该8×8个像素具有不同的7个像素值(代表不同的颜色)。为简单起见,图1中具有相同像素值的像素采用同一符号来表示像素值,例如采用C0、C1、……、C6来表示不同的像素值。
表1示出了图1所示的CU所确定的调色板。
表1
像素索引 0 1 2 3 4 5 6
像素值 C0 C1 C2 C3 C4 C5 C6
当采用索引拷贝信息时,根据该调色板生成的索引拷贝信息可如下表2所示。表2示出了基于表1的调色板而形成的图1所示的CU的索引拷贝(index run)信息。
表2
Left(0,31)
Left(2,0)
Above(3)
Left(3,0)
Left(1,0)
Left(2,0)
Left(1,0)
Left(4,0)
Above(6)
Left(5,0)
Left(6,0)
Above(5)
Left(1,0)
Left(2,0)
Above(4)
如图1所示,在该CU中具有连续32个像素值为C0(调色板中对应的像素索引为0)的像素,因此形成表2中的索引拷贝信息Left(0,31);然后在该CU中具有1个像素值为C2(调色板中对应的像素索引为2)的像素,因此形成表2中的索引拷贝信息Left(2,0);然后在该CU中具有与上一行相应像素的像素值相同的4个像素(像素值分别为C0,C0,C0,C0),因此形成表2中的索引拷贝信息Above(3);……。
在生成如上的索引拷贝信息之后,可以进行比特流编码,例如对于Left(0,31),可以将其中的像素索引0,拷贝类型Left(例如用0表示)和拷贝值31进行编码;对于Above(3),可以将拷贝类型Above(例如用1表示)和拷贝值3进行编码。
图2是目前进行比特流编码的一示意图,如图2所示,在目前的SCM4.0版本中,可以先后将调色板相关信息(例如称为palette entry related)和调色板索引位图信息(例如称为palette index map)进行比特流编码。其中,对于调色板索引位图信息,先将像素索引的数目(number of index)进行编码,然后将像素索引(index)进行编码,并将拷贝类型(run type)和拷贝值(run value)交织地进行编码,然后可以对采用非调色板模式(例如escape mode)的像素进行编码。
但是,发明人发现如果按照现有技术,更小的拷贝值(例如“0”)将被映射成更短的变长码,而更大的拷贝值(例如“31”)将被映射成更长的变长码,这样需要更多的比特才能进行编码。
而目前对于需要编码的像素索引的数目(例如表2所示的11个)可以显式地进行比特流编码(例如图2所示)或者隐式地由其他信息推导出来,此外拷贝类型也已经被编码,由此可以推导出需要编码的拷贝值的个数;进而可以根据已获得的信息计算出一个拷贝值或相同的多个拷贝值。
以下对本发明实施例进行详细说明。
实施例1
本发明实施例提供一种拷贝信息的编码方法,图3是本发明实施例的编码方法的一流程示意图。如图3所示,所述编码方法包括:
步骤301,为待编码图像区域中采用调色板模式的像素确定调色板;
步骤302,基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;以及
步骤303,将所述拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,并将其余拷贝值进行比特流编码。
在本实施例中,所述拷贝值中的其中一个或者相同的多个为所述拷贝值中的最大值(可以称为Largest Run),所述映射码小于所述最大值且不同于所述其余拷贝值。本发明不限于此,也可以将其他的拷贝值进行映射。以下仅以Largest Run为例进行说明。
在本实施例中,还可以将所述待编码图像区域需要进行编码的像素索引的个数进行比特流编码,以及将所述待编码图像区域需要进行编码的像素索引以及所述拷贝类型进行比特流编码。
在本实施例中,待编码图像区域可以为一编码单元CU或最大编码单元LCU(Largest Coding Unit);以下以CU为例进行说明。本发明实施例适用于采用调色板模式的情况,对于混合使用调色板模式和非调色板模式(例如escape mode)的情况,本发明实施例同样适用。
值得注意的是,对于待编码图像区域中的调色板、像素索引以及拷贝类型等的比特流编码,可以采用现有技术中的任意一种方法实现,本发明并不对此进行限制。对于拷贝值(copy run)如何进行编码,以下进行示意性说明。
在本实施例中,映射码例如是比较特殊的一个或几个比特,可以在编码端和解码端事先定义。由此,不将拷贝值例如Largest Run进行编码,而是将比特代价较小的映射码进行比特流编码,可以进一步降低比特代价。
图4是本发明实施例的编码方法的另一流程示意图,示出了进行图像编码的情况。如图4所示,所述编码方法包括:
步骤401,为待编码图像区域中采用调色板模式的像素确定调色板;
步骤402,基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;
步骤403,将所述调色板进行编码;
步骤404,将所述需要进行编码的像素索引的个数进行比特流编码;
步骤405,将所述需要进行编码的像素索引进行比特流编码;
步骤406,将所述拷贝值中的其中一个或者相同的多个映射为映射码;
步骤407,将所述拷贝类型和拷贝值进行比特流编码;其中,对于所述拷贝值中的其中一个或者相同的多个,将所述所述映射码进行比特流编码;对于其余的拷贝值,将该拷贝值进行比特流编码。
此外,还可以将采用非调色板模式的像素进行比特流编码。
在解码端,可以采用如下公式计算所述被映射的拷贝值:
Figure PCTCN2015081049-appb-000001
其中,MR为所述被映射的拷贝值,所述itTotal为所述待解码图像区域的大小;RunVi为所述其余拷贝值,其中i=0,……,k;MR_num为所述被映射的拷贝值的个数。对于其他的信息如何进行解码,可以使用相关技术中的任意方法。
在一个例子中,以图1所示的CU为例,如表2所示,需要编码的拷贝值为“31”、“0”、“3”、“0”、“0”、“0”、“0”、“0”、“6”、“0”、“0”、“5”、“0”、“0”、“4”共15个值。其中Largest Run为31,则可以将31映射为例如MR,然后将MR进行比特流编码。关于映射码的具体值可以根据实际情况确定。
在解码端,可以获得待解码图像区域需要进行解码的像素索引的个数以及各拷贝类型;该需要进行解码的像素索引的个数可以从比特流解码而显式地获得,也可以从其他信息推导出来而隐式地获得。
例如,对于图1所示的CU,可以从比特流中获得该需要进行解码的像素索引的个数,例如为11个;对应地,拷贝类型为Left的个数为11个。此外,如表2所示,拷贝类型为Above的个数为4个,则解码端可以确定总的拷贝值为15个。
然后,可以基于拷贝值的个数从比特流中获得如下的值:“MR”、“0”、“3”、“0”、“0”、“0”、“0”、“0”、“6”、“0”、“0”、“5”、“0”、“0”、“4”;其中MR为1个。在CU为8*8像素的情况下,可以计算出MR所对应的拷贝值为:{[64-(0+1)-(3+1)-(0+1)-(0+1)-(0+1)-(0+1)-(0+1)-(6+1)-(0+1)-(0+1)-(5+1)-(0+1)-(0+1)-(4+1)]/1}-1=31。
在另一个例子中,以图5所示的CU为例。图5是本发明实施例的编码单元的另一实例示意图,示出了另一个CU的情况。该CU对应的调色板如表3所示。
表3示出了图5所示的CU所确定的调色板。
表3
像素索引 0 1 2 3
像素值 C0 C1 C2 C3
当采用索引拷贝信息时,根据该调色板生成的索引拷贝信息可如下表4所示。表4示出了基于表3的调色板而形成的图5所示的CU的索引拷贝(index run)信息。
表4
Left(0,23)
Left(1,0)
Above(23)
Left(2,3)
Left(3,2)
Left(1,7)
如表4所示,需要编码的拷贝值为“23”、“0”、“23”、“3”、“2”、“7”共6个值。其中有两个Largest Run为23,则可以将23映射为例如MR,然后将MR进行比特流编码。关于映射码的具体值可以根据实际情况确定。
在解码端,例如对于图5所示的CU,可以从比特流中获得该需要进行解码的像素索引的个数,例如为5个;对应地,拷贝类型为Left的个数为5个。此外,如表4所示,拷贝类型为Above的个数为1个,则解码端可以确定总的拷贝值为6个。然后,可以基于拷贝值的个数获得各拷贝值以及映射码。
表5示意性示出了解码端获得的比特流的情况,如表5所示,可以从比特流中获得如下的值:“MR”、“0”、“MR”、“3”、“2”、“7”;其中MR为2个。
在CU为8*8像素的情况下,可以计算出MR所对应的拷贝值为:{[64-(0+1)-(3+1)-(2+1)-(7+1)]/2}-1=23。
在另一个实施方式中,如果所述待编码图像区域需要进行编码的拷贝值的个数为n,在将所述拷贝值中的前n-1个拷贝值进行编码之后,以及不对第n个拷贝值进行编码。
图6是本发明实施例的编码方法的另一流程示意图,示出了进行图像编码的情 况。如图6所示,所述编码方法包括:
步骤601,为待编码图像区域中采用调色板模式的像素确定调色板;
步骤602,基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;
步骤603,将所述调色板进行编码;
步骤604,将所述需要进行编码的像素索引的个数进行比特流编码;
步骤605,将所述需要进行编码的像素索引进行比特流编码;
步骤606,将所述拷贝类型和拷贝值进行比特流编码;其中,将n个所述拷贝值中的前n-1个拷贝值进行编码,以及不对第n个拷贝值进行编码。
例如,所述第n个拷贝值为所述拷贝值中的最大值Largest Run,则可以不对该Largest Run进行编码。以需要编码的拷贝值为“0”、“23”、“3”、“2”、“7”、“23”共6个值为例。在编码端可以仅将“0”、“23”、“3”、“2”、“7”这5个拷贝值进行编码。在解码端,可以如上所述地确定总的拷贝值为6个,而从比特流中获得了5个拷贝值,由此可以确定最后一个拷贝值没有被编码。在CU为8*8像素的情况下,可以计算出最后一个拷贝值为:{[64-(0+1)-(23+1)-(3+1)-(2+1)-(7+1)]/1}-1=23。
由上述实施例可知,在编码端将拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,在解码端基于已获得信息计算出被映射的拷贝值;或者,在编码端不对最后一个拷贝值进行比特流编码,在解码端基于已获得信息计算出所述最后一个拷贝值。由此,即使某些拷贝值比较大,也能进一步降低编码的比特代价。
实施例2
本发明实施例提供一种拷贝信息的编码装置,对应于实施例1中的拷贝信息的编码方法,相同的内容不再赘述。
图7是本发明实施例的编码装置的一示意图,如图7所示,所述编码装置700包括:
调色板确定单元701,为待编码图像区域中采用调色板模式的像素确定调色板;
拷贝信息确定单元702,基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;以及
比特流编码单元703,将所述拷贝值中的其中一个或者相同的多个映射为映射码 并将所述映射码进行比特流编码,并将其余拷贝值进行比特流编码。
在本实施例中,所述拷贝值中的其中一个或者相同的多个为所述拷贝值中的最大值,所述映射码小于所述最大值且不同于所述其余拷贝值。但本发明不限于此,也可以对其他拷贝值进行映射。
在本实施例中,所述比特流编码单元703还可以用于:将所述待编码图像区域需要进行编码的像素索引的个数进行比特流编码。
在本实施例中,所述比特流编码单元703还可以用于:将所述待编码图像区域需要进行编码的像素索引以及所述拷贝类型进行比特流编码。
在另一个实施方式中,所述比特流编码单元703还用于:将所述拷贝值中的前n-1个拷贝值进行编码,以及不对第n个拷贝值进行编码;其中n为所述待编码图像区域需要进行编码的拷贝值的个数。
其中,所述第n个拷贝值可以为所述拷贝值中的最大值。但本发明不限于此,也可以对其他拷贝值进行映射。
由上述实施例可知,在编码端将拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,在解码端基于已获得信息计算出被映射的拷贝值;或者,在编码端不对最后一个拷贝值进行比特流编码,在解码端基于已获得信息计算出所述最后一个拷贝值。由此,即使某些拷贝值比较大,也能进一步降低编码的比特代价。
实施例3
本发明实施例提供一种拷贝信息的解码方法,对应于实施例1中的拷贝信息的编码方法。对于使用实施例1进行编码的拷贝信息,本发明实施例相应地进行解码,相同的内容不再赘述。关于图像解码的其他内容,可以采用相关方法中的任意一种,本发明并不进行限制。
图8是本发明实施例的解码方法的一示意图,如图8所示,所述解码方法包括:
步骤801,从比特流中获得对应于待解码图像区域的拷贝类型;
步骤802,基于所述待解码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;
步骤803,基于所述拷贝值的个数获得对应于所述待解码图像区域的映射码以及 其余拷贝值;其中,所述拷贝值中的其中一个或者相同的多个被映射为所述映射码;
步骤804,基于已获得的所述其余拷贝值计算被映射为所述映射码的拷贝值。
在本实施例中,所述拷贝值中的其中一个或者相同的多个为所述拷贝值中的最大值,所述映射码小于所述最大值且不同于所述其余拷贝值。但本发明不限于此,也可以对其他拷贝值进行映射。
在本实施例中,还可以从比特流中获得所述待解码图像区域需要进行解码的像素索引的个数。此外,还可以从所述比特流中获得所述待解码图像区域的调色板;以及获得所述待解码图像区域需要进行解码的像素索引。
图9是本发明实施例的解码方法的另一示意图,如图9所示,所述解码方法包括:
步骤901,从比特流中获得待解码图像区域的调色板;
步骤902,从比特流中获得所述待解码图像区域需要进行解码的像素索引的个数;
步骤903,从比特流中获得所述待解码图像区域需要进行解码的像素索引;
步骤904,从比特流中获得对应于待解码图像区域的拷贝类型;
步骤905,基于所述待解码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;
步骤906,基于所述拷贝值的个数获得对应于所述待解码图像区域的映射码以及其余拷贝值;其中,所述拷贝值中的其中一个或者相同的多个被映射为所述映射码;
步骤907,基于已获得的所述其余拷贝值计算被映射为所述映射码的拷贝值。
步骤908,基于调色板、像素索引、拷贝类型和拷贝值对所述待解码图像区域进行解码。
在本实施例中,可以采用如下公式计算所述被映射的拷贝值:
Figure PCTCN2015081049-appb-000002
其中,MR为所述被映射的拷贝值,所述itTotal为所述待解码图像区域的大小;RunVi为所述其余拷贝值,其中i=0,……,k;MR_num为所述被映射的拷贝值的个数。
在另一个实施方式中,在编码端可以将所述拷贝值中的前n-1个拷贝值进行编码,以及不对第n个拷贝值进行编码;其中n为所述待编码图像区域需要进行编码的拷贝值的个数。
在解码端可以基于需要解码的拷贝值的个数n以及所获得的拷贝值的个数,判断 第n个拷贝值是否进行了编码;以及基于已获得的n-1个拷贝值计算所述第n个拷贝值。
其中,所述第n个拷贝值可以为所述拷贝值中的最大值。但本发明不限于此,也可以对其他拷贝值进行映射。
图10是本发明实施例的解码方法的另一示意图,如图10所示,所述解码方法包括:
步骤1001,从比特流中获得待解码图像区域的调色板;
步骤1002,从比特流中获得待解码图像区域需要进行解码的像素索引的个数;
步骤1003,从比特流中获得所述待解码图像区域需要进行解码的像素索引;
步骤1004,从比特流中获得对应于待解码图像区域的拷贝类型;
步骤1005,基于所述待解码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;
步骤1006,基于所述拷贝值的个数判断当前拷贝值是否是最后一个拷贝值;如果是则执行步骤1008;如果不是则执行步骤1007;
步骤1007,从比特流中获得该拷贝值;然后执行步骤1006获取下一拷贝值。
步骤1008,基于已获得的拷贝值计算所述最后一个拷贝值。
步骤1009,基于调色板、像素索引、拷贝类型和拷贝值对所述待解码图像区域进行解码。
由上述实施例可知,在编码端将拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,在解码端基于已获得信息计算出被映射的拷贝值;或者,在编码端不对最后一个拷贝值进行比特流编码,在解码端基于已获得信息计算出所述最后一个拷贝值。由此,即使某些拷贝值比较大,也能进一步降低编码的比特代价。
实施例4
本发明实施例提供一种拷贝信息的解码装置,对应于实施例3中的拷贝信息的解码方法,相同的内容不再赘述。
图11是本发明实施例的解码装置的一示意图。如图11所示,所述解码装置1100包括:
拷贝类型获得单元1101,从比特流中获得对应于待解码图像区域的拷贝类型;
拷贝值个数获得单元1102,基于所述待解码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;
拷贝值获得单元1103,基于所述拷贝值的个数获得对应于所述待解码图像区域的映射码以及其余拷贝值;其中,所述拷贝值中的其中一个或者相同的多个被映射为所述映射码;
拷贝值计算单元1104,基于已获得的所述其余拷贝值计算被映射为所述映射码的拷贝值。
在本实施例中,所述拷贝值中的其中一个或者相同的多个为所述拷贝值中的最大值,所述映射码小于所述最大值且不同于所述其余拷贝值。但本发明不限于此,也可以对其他拷贝值进行映射。
如图11所示,所述解码装置1100还可以包括:
索引个数获得单元1105,从所述比特流中获得所述待解码图像区域需要进行解码的像素索引的个数。
如图11所示,所述解码装置1100还可以包括:
调色板获得单元1106,从所述比特流中获得所述待解码图像区域的调色板;以及
像素索引获得单元1107,获得所述待解码图像区域需要进行解码的像素索引。
在本实施例中,所述拷贝值计算单元1104可以采用如下公式计算所述被映射的拷贝值:
Figure PCTCN2015081049-appb-000003
其中,MR为所述被映射的拷贝值,所述itTotal为所述待解码图像区域的大小;RunVi为所述其余拷贝值,其中i=0,……,k;MR_num为所述被映射的拷贝值的个数。
在另一个实施方式中,所述解码装置1100还可以包括:
拷贝值判断单元,基于所述拷贝值个数获得单元1102所获得的所述拷贝值的个数n以及所述拷贝值获得单元1103所获得的拷贝值的个数,判断第n个拷贝值是否进行了编码;以及所述拷贝值计算单元1104还用于:基于已获得的n-1个拷贝值计算所述第n个拷贝值。
其中,所述第n个拷贝值可以为所述拷贝值中的最大值。但本发明不限于此,也可以对其他拷贝值进行映射。
由上述实施例可知,在编码端将拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,在解码端基于已获得信息计算出被映射的拷贝值;或者,在编码端不对最后一个拷贝值进行比特流编码,在解码端基于已获得信息计算出所述最后一个拷贝值。由此,即使某些拷贝值比较大,也能进一步降低编码的比特代价。
实施例5
本发明实施例提供一种图像处理设备,所述图像处理设备包括:如实施例2所述的编码装置和/或如实施例4所述的解码装置。
图12是本发明实施例的图像处理设备的一构成示意图。如图12所示,图像处理设备1200可以包括:中央处理器(CPU)100和存储器110;存储器110耦合到中央处理器100。其中该存储器110可存储各种数据;此外还存储信息处理的程序,并且在中央处理器100的控制下执行该程序。
在一个实施方式中,编码装置700的功能可以被集成到中央处理器100中。其中,中央处理器100可以被配置为实现如实施例1所述的编码方法。和/或,解码装置1100的功能也可以被集成到中央处理器100中。其中,中央处理器100可以被配置为实现如实施例3所述的解码方法。
在另一个实施方式中,编码装置700和/或解码装置1100可以与中央处理器分开配置,例如可以将编码装置700和/或解码装置1100配置为与中央处理器100连接的芯片,通过中央处理器的控制来实现编码装置700和/或解码装置1100的功能。
此外,如图12所示,图像处理设备1200还可以包括:输入输出单元120和显示单元130等;其中,上述部件的功能与现有技术类似,此处不再赘述。值得注意的是,图像处理设备1200也并不是必须要包括图12中所示的所有部件;此外,图像处理设备1200还可以包括图12中没有示出的部件,可以参考现有技术。
本发明实施例还提供一种计算机可读程序,其中当在图像处理设备中执行所述程序时,所述程序使得计算机在所述图像处理设备中执行如实施例1所述的编码方法和/或如实施例3所述的解码方法。
本发明实施例还提供一种存储有计算机可读程序的存储介质,其中所述计算机可读程序使得计算机在图像处理设备中执行如实施例1所述的编码方法和/或如实施例3所述的解码方法。
本发明以上的装置和方法可以由硬件实现,也可以由硬件结合软件实现。本发明涉及这样的计算机可读程序,当该程序被逻辑部件所执行时,能够使该逻辑部件实现上文所述的装置或构成部件,或使该逻辑部件实现上文所述的各种方法或步骤。本发明还涉及用于存储以上程序的存储介质,如硬盘、磁盘、光盘、DVD、flash存储器等。
针对附图中描述的功能方框中的一个或多个和/或功能方框的一个或多个组合,可以实现为用于执行本申请所描述功能的通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件或者其任意适当组合。针对附图描述的功能方框中的一个或多个和/或功能方框的一个或多个组合,还可以实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、与DSP通信结合的一个或多个微处理器或者任何其它这种配置。
以上结合具体的实施方式对本发明进行了描述,但本领域技术人员应该清楚,这些描述都是示例性的,并不是对本发明保护范围的限制。本领域技术人员可以根据本发明的精神和原理对本发明做出各种变型和修改,这些变型和修改也在本发明的范围内。

Claims (15)

  1. 一种拷贝信息的编码装置,所述编码装置包括:
    调色板确定单元,为待编码图像区域中采用调色板模式的像素确定调色板;
    拷贝信息确定单元,基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;以及
    比特流编码单元,将所述拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,并将其余拷贝值进行比特流编码;或者。
  2. 根据权利要求1所述的编码装置,其中,所述拷贝值中的其中一个或者相同的多个为所述拷贝值中的最大值,所述映射码小于所述最大值且不同于所述其余拷贝值。
  3. 根据权利要求1所述的编码装置,其中,所述比特流编码单元还用于:将所述待编码图像区域需要进行编码的像素索引的个数进行比特流编码。
  4. 根据权利要求1所述的编码装置,其中,所述比特流编码单元还用于:将所述待编码图像区域需要进行编码的像素索引以及所述拷贝类型进行比特流编码。
  5. 根据权利要求1所述的编码装置,其中,所述比特流编码单元还用于:将所述拷贝值中的前n-1个拷贝值进行编码,以及不对第n个拷贝值进行编码;其中n为所述待编码图像区域需要进行编码的拷贝值的个数。
  6. 根据权利要求5所述的编码装置,其中,所述第n个拷贝值为所述拷贝值中的最大值。
  7. 一种拷贝信息的解码装置,所述解码装置包括:
    拷贝类型获得单元,从比特流中获得对应于待解码图像区域的拷贝类型;
    拷贝值个数获得单元,基于所述待解码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;
    拷贝值获得单元,基于所述拷贝值的个数获得对应于所述待解码图像区域的映射码以及其余拷贝值;其中,所述拷贝值中的其中一个或者相同的多个被映射为所述映射码;
    拷贝值计算单元,基于已获得的所述其余拷贝值计算被映射为所述映射码的拷贝值。
  8. 根据权利要求7所述的解码装置,其中,所述拷贝值中的其中一个或者相同的多个为所述拷贝值中的最大值,所述映射码小于所述最大值且不同于所述其余拷贝值。
  9. 根据权利要求7所述的解码装置,其中,所述解码装置还包括:
    索引个数获得单元,从所述比特流中获得所述待解码图像区域需要进行解码的像素索引的个数。
  10. 根据权利要求7所述的解码装置,其中,所述解码装置还包括:
    调色板获得单元,从所述比特流中获得所述待解码图像区域的调色板;以及
    像素索引获得单元,获得所述待解码图像区域需要进行解码的像素索引。
  11. 根据权利要求7所述的解码装置,其中,所述拷贝值计算单元采用如下公式计算所述被映射的拷贝值:
    Figure PCTCN2015081049-appb-100001
    其中,MR为所述被映射的拷贝值,所述itTotal为所述待解码图像区域的大小;RunVi为所述其余拷贝值,其中i=0,……,k;MR_num为所述被映射的拷贝值的个数。
  12. 根据权利要求7所述的解码装置,其中,所述解码装置还包括:
    拷贝值判断单元,基于所述拷贝值个数获得单元所获得的所述拷贝值的个数n以及所述拷贝值获得单元所获得的拷贝值的个数,判断第n个拷贝值是否进行了编码;
    以及所述拷贝值计算单元还用于:基于已获得的n-1个拷贝值计算所述第n个拷贝值。
  13. 根据权利要求12所述的解码装置,其中,所述第n个拷贝值为所述拷贝值中的最大值。
  14. 一种图像处理设备,所述图像处理设备包括:
    图像编码器,为待编码图像区域中采用调色板模式的像素确定调色板;基于所述调色板确定所述待编码图像区域需要进行编码的像素索引、拷贝类型以及拷贝值;以及将所述拷贝值中的其中一个或者相同的多个映射为映射码并将所述映射码进行比特流编码,并将其余拷贝值进行比特流编码;
    和/或
    图像解码器,从比特流中获得对应于待解码图像区域的拷贝类型;基于所述待解 码图像区域需要进行解码的像素索引的个数以及所述拷贝类型获得对应于所述待解码图像区域的拷贝值的个数;基于所述拷贝值的个数获得对应于所述待解码图像区域的映射码以及其余拷贝值;其中,所述拷贝值中的其中一个或者相同的多个被映射为所述映射码;基于已获得的所述其余拷贝值计算被映射为所述映射码的拷贝值。
  15. 根据权利要求14所述的图像处理装置,其中,
    所述图像编码器还用于:将所述拷贝值中的前n-1个拷贝值进行编码,以及不对第n个拷贝值进行编码;其中n为所述待编码图像区域需要进行编码的拷贝值的个数;
    所述图像解码器还用于:基于需要解码的拷贝值的个数n以及所获得的拷贝值的个数,判断第n个拷贝值是否进行了编码;以及基于已获得的n-1个拷贝值计算所述第n个拷贝值。
PCT/CN2015/081049 2015-06-09 2015-06-09 拷贝信息的编解码方法、装置以及图像处理设备 Ceased WO2016197317A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/081049 WO2016197317A1 (zh) 2015-06-09 2015-06-09 拷贝信息的编解码方法、装置以及图像处理设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/081049 WO2016197317A1 (zh) 2015-06-09 2015-06-09 拷贝信息的编解码方法、装置以及图像处理设备

Publications (1)

Publication Number Publication Date
WO2016197317A1 true WO2016197317A1 (zh) 2016-12-15

Family

ID=57502865

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081049 Ceased WO2016197317A1 (zh) 2015-06-09 2015-06-09 拷贝信息的编解码方法、装置以及图像处理设备

Country Status (1)

Country Link
WO (1) WO2016197317A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110942418A (zh) * 2019-11-18 2020-03-31 中国航空工业集团公司西安航空计算技术研究所 一种基于glCopyPixels的GPU像素复制方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1592417A (zh) * 2003-08-21 2005-03-09 索尼株式会社 编码设备和编码方法
CN101426141A (zh) * 2007-10-30 2009-05-06 株式会社日立制作所 图像编码装置和编码方法,图像译码装置和译码方法
CN104244007A (zh) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 基于任意形状匹配的图像压缩方法和装置
US20150010053A1 (en) * 2013-07-08 2015-01-08 Sony Corporation Palette coding mode

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1592417A (zh) * 2003-08-21 2005-03-09 索尼株式会社 编码设备和编码方法
CN101426141A (zh) * 2007-10-30 2009-05-06 株式会社日立制作所 图像编码装置和编码方法,图像译码装置和译码方法
CN104244007A (zh) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 基于任意形状匹配的图像压缩方法和装置
US20150010053A1 (en) * 2013-07-08 2015-01-08 Sony Corporation Palette coding mode

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GUO, LIWEI ET AL.: "RCE3: Results of Test 3.1 on Palette Mode for Screen Content Coding", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, 14TH MEETING, 2 August 2013 (2013-08-02), Vienna, AT *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110942418A (zh) * 2019-11-18 2020-03-31 中国航空工业集团公司西安航空计算技术研究所 一种基于glCopyPixels的GPU像素复制方法
CN110942418B (zh) * 2019-11-18 2023-06-13 中国航空工业集团公司西安航空计算技术研究所 一种基于glCopyPixels的GPU像素复制方法

Similar Documents

Publication Publication Date Title
CN109064399B (zh) 图像超分辨率重建方法和系统、计算机设备及其存储介质
CN109379598B (zh) 一种基于fpga实现的图像无损压缩方法
US12412314B2 (en) Color conversion between color spaces using reduced dimension embeddings
BR102018009143A2 (pt) Método e aparelho para codificar e decodificar nuvens de pontos de duas dimensões
CN105488822B (zh) 基于ambtc算法的可逆图像隐藏算法
WO2022127496A1 (zh) 图像重建模型的生成方法、图像重建方法及相关设备
WO2017063168A1 (zh) 图像编码方法、装置以及图像处理设备
US20200244961A1 (en) Method and system for improving compression ratio through pixel conversion of image file
CN107659823B (zh) 一种帧内深度图像块解码的方法及装置
WO2016197317A1 (zh) 拷贝信息的编解码方法、装置以及图像处理设备
CN113808011B (zh) 一种基于特征融合的风格迁移方法、装置及其相关组件
WO2016197312A1 (zh) 像素索引的编码方法、装置以及图像处理设备
WO2016192053A1 (zh) 拷贝信息的编码方法、装置以及图像处理设备
CN110191341A (zh) 一种深度数据的编码方法和解码方法
CN107368430B (zh) 一种降低显存的方法及装置
WO2015188342A1 (zh) 基于三维调色板的图像编码方法、装置以及图像处理设备
WO2018068259A1 (zh) 图像编码/解码方法、装置以及图像处理设备
WO2016045077A1 (zh) 图像编码方法、装置以及图像处理设备
CN114697657B (zh) 一种数据处理方法、装置、设备及介质
WO2015192340A1 (zh) 基于调色板的图像编码方法、装置以及图像处理设备
CN105637861B (zh) 基于调色板的编码装置、方法以及图像处理设备
WO2016192055A1 (zh) 使用预测信息的图像编码方法、装置以及图像处理设备
CN106303531B (zh) 拷贝信息的编码方法、装置以及图像处理设备
WO2016119196A1 (zh) 图像编码方法、装置以及图像处理设备
WO2016106553A1 (zh) 图像编码方法、装置以及图像处理设备

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

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

Country of ref document: EP

Kind code of ref document: A1