WO2016197893A1 - Image encoding and decoding method, image processing device, and computer storage medium - Google Patents

Image encoding and decoding method, image processing device, and computer storage medium Download PDF

Info

Publication number
WO2016197893A1
WO2016197893A1 PCT/CN2016/084992 CN2016084992W WO2016197893A1 WO 2016197893 A1 WO2016197893 A1 WO 2016197893A1 CN 2016084992 W CN2016084992 W CN 2016084992W WO 2016197893 A1 WO2016197893 A1 WO 2016197893A1
Authority
WO
WIPO (PCT)
Prior art keywords
palette
color
copy
pixel
block
Prior art date
Application number
PCT/CN2016/084992
Other languages
French (fr)
Chinese (zh)
Inventor
林涛
李明
吴平
尚国强
吴钊
Original Assignee
同济大学
中兴通讯股份有限公司
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
Priority claimed from CN201610364374.0A external-priority patent/CN106254865B/en
Application filed by 同济大学, 中兴通讯股份有限公司 filed Critical 同济大学
Priority to EP22191754.5A priority Critical patent/EP4114000A1/en
Priority to EP16806791.6A priority patent/EP3306931A4/en
Priority to US15/580,893 priority patent/US20180167623A1/en
Publication of WO2016197893A1 publication Critical patent/WO2016197893A1/en
Priority to US17/902,022 priority patent/US11917168B2/en

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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel

Definitions

  • the present invention relates to digital video coding and decoding technologies, and in particular, to an image coding and decoding method, an image processing device, and a computer storage medium.
  • HEVC High Efficiency Video Coding
  • a notable feature of computer screen images is that there are often many similar or even identical pixel patterns (pi ⁇ el pattern) within the same frame image.
  • pixel patterns pi ⁇ el pattern
  • Chinese or foreign text that often appears in computer screen images is composed of a few basic strokes, and many similar or identical strokes can be found in the same frame image.
  • Menus, icons, etc., which are common in computer screen images, also have many similar or identical patterns. Therefore, the existing image and video compression technologies usually adopt various copying methods, including at least the following copying methods:
  • Intra block copying means intraframe block matching or intraframe motion compensation or block matching or block copying.
  • Intra-frame micro-block copying means intra-frame micro-block matching or micro-block matching or micro-block copying.
  • Intra-frame lines are copied, that is, intra-frame matching or strip matching or strip copying.
  • Intra-frame string replication means intra-frame string matching or string matching or string copying or pixel string copying.
  • Palette index string copy is a palette or index string copy.
  • index-pixel string fusion copy mode also called palette-pixel string fusion copy mode or merged pixel string copy palette mode or fusion palette Pixel string copy mode or palette with pixel string copy mode.
  • each palette and pixel string copying method has separate palette color candidate sets, if the codec block does not adopt a palette and a pixel.
  • the palette color candidate set corresponding to the pixel string copy mode is not updated, and no new more suitable palette color is added to the corresponding palette color candidate set. This approach greatly reduces the compression efficiency of multiple palettes and pixel string replication.
  • an embodiment of the present invention provides an image encoding and decoding method, an image processing device, and a computer storage medium.
  • Palette and pixel string copy coding is performed using the palette of the current coded block, and a video code stream including a copy mode and a copy parameter is generated.
  • the coding block is an coding region of an image, and the coding block includes at least one of: a maximum coding unit (LCU), a coding tree unit (CTU), a coding unit (CU), and a sub-region of a CU. , prediction unit (PU), transform unit (TU).
  • LCU maximum coding unit
  • CTU coding tree unit
  • CU coding unit
  • TU sub-region of a CU.
  • prediction unit PU
  • transform unit TU
  • the video code stream further includes the new palette color.
  • the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  • the method further includes: the palette color candidate set performs one or more of the following operations according to a predetermined rule:
  • the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first-in, first-out rule.
  • the method further includes:
  • some or all of the new palette color of the encoded block is added to the shared palette color candidate set.
  • Palette and pixel string copy decoding is performed using the palette of the current decoded block.
  • the decoding block is a decoding area of an image, and the decoding block includes at least one of the following: an LCU, a CTU, a CU, a sub-area of the CU, a PU, and a TU.
  • the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  • the method further includes: the palette color candidate set performs one or more of the following operations according to a predetermined rule:
  • the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first-in, first-out rule.
  • the method further includes:
  • some or all of the new palette color of the decoded block is added to the shared palette color candidate set.
  • a first generating unit configured to generate a new palette color according to the pixel of the current encoding block when copying and encoding the current encoding block by using one of a color palette and a pixel string copy encoding method
  • a second generating unit configured to generate a palette of the current encoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy encoding manner
  • a coding unit configured to perform palette and pixel string copy coding using a palette of the current coded block, and generate a video code stream including a copy mode and a copy parameter.
  • a parsing unit configured to parse the video stream to obtain at least one of the following: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
  • a third generating unit configured to generate the copy to the current decoded block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy decoding mode The color palette used for palette and pixel string copy decoding;
  • a decoding unit configured to perform palette and pixel string copy decoding using a palette of the current decoded block.
  • the computer storage medium provided by the embodiment of the present invention stores a computer program for performing the above image encoding and/or image decoding method.
  • encoding the image includes: when copying and encoding the current coding block by using one of a palette and a pixel string copy coding mode, generating a new color palette according to the pixel of the current coding block. Color; generating a palette of the current encoded block according to the palette color candidate set shared by the new palette color and/or palette and pixel string copy encoding; using the current encoding block
  • the palette performs palette and pixel string copy encoding and generates a video stream that includes copy mode and copy parameters.
  • Decoding the image includes parsing the video stream, and obtaining at least one of the following: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color; according to the new palette color and/or Or a palette color candidate set shared by the palette and the pixel string copy decoding method, generating a palette used for the current decoded block to perform palette and pixel string copy decoding using the copy mode; using the current decoding
  • the palette of the block performs a palette and pixel string copy decoding. It can be seen that the embodiment of the present invention implements image compression of a plurality of copy mode sharing palette color candidate sets, and improves compression efficiency of multiple color palettes and pixel string copy modes.
  • FIG. 1 is a schematic flowchart 1 of an image encoding method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart 1 of an image decoding method according to an embodiment of the present invention.
  • FIG. 3 is a second schematic flowchart of an image encoding method according to an embodiment of the present invention.
  • FIG. 4 is a second schematic flowchart of an image decoding method according to an embodiment of the present invention.
  • FIG. 5 is a first schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a second schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a third schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • the natural form of a digital video signal of an image is a sequence of images.
  • a frame of image is usually a rectangular area composed of several pixels, and a digital video signal is a sequence of video images composed of tens of frames to thousands of frames of images, sometimes simply referred to as a video sequence or sequence.
  • Encoding a digital video signal encodes a frame by frame image. At any one time, the image of the frame being encoded is referred to as the current encoded image.
  • decoding a compressed video stream (also referred to as a bit stream) of a digital video signal is decoding a stream of one frame by one compressed image.
  • the image of the frame being decoded is referred to as the current decoded image.
  • the current encoded image or the currently decoded image is collectively referred to as the current image.
  • one frame of image is divided into blocks M.
  • the sub-image of the M pixel is called a coding block (from the perspective of decoding, that is, a decoding block, collectively referred to as a codec block) or a coding unit (CU, Coding Unit), and the sub-image is performed one by one with the CU as a basic coding unit.
  • the size of the commonly used M is 4, 8, 16, 32, 64. Therefore, encoding the video image sequence is to encode one CU for each coding unit of each frame image, that is, CU.
  • the CU being coded is referred to as the current coded CU.
  • decoding the code stream of the video image sequence is also one by one for each CU of each frame image.
  • the CUs decode and finally reconstruct the entire video image sequence.
  • the CU being decoded is referred to as the currently decoded CU.
  • the current coding CU or the current decoding CU is collectively referred to as the current CU.
  • each CU in one frame of image can be different, some are 8 ⁇ 8, some are 64 ⁇ 64, etc. .
  • LCUs Longer Coding Units
  • each LCU is further divided into a tree structure. Multiple CUs of different sizes are not necessarily the same. Therefore, the LCU is also called a Coding Tree Unit (CTU).
  • CTU Coding Tree Unit
  • One of the LCUs is composed of three 32 ⁇ 32 pixel CUs and four 16 ⁇ 16 pixel CUs, so that seven CUs in a tree structure constitute one CTU.
  • the other LCU is composed of two 32 ⁇ 32 pixel CUs, three 16 ⁇ 16 pixel CUs, and 20 8 ⁇ 8 pixel CUs.
  • Such 25 CUs in a tree structure constitute another CTU.
  • Encoding one frame of image is to sequentially encode one CU in one CTU.
  • LCU is synonymous with CTU.
  • a CU whose size is equal to the CTU is called a CU with a depth of zero.
  • a CU obtained by dividing the CU up and down and left and right by a depth of 0 is called a CU having a depth of 1.
  • a CU with a depth of 1 and a CU divided into four equal parts is called a CU with a depth of 2.
  • a CU obtained by dividing the CU of the depth of 2 into four equal parts is called a CU having a depth of 3.
  • the CTU being coded is referred to as the current coded CTU.
  • the CTU being decoded is referred to as the current decoded CTU.
  • the current coding CTU or the current decoding CTU is collectively referred to as the current CTU.
  • the CU can also be further divided into sub-areas.
  • Sub-regions include, but are not limited to, prediction unit (PU), transform unit (TU), asymmetric partition (AMP) regions.
  • PU prediction unit
  • TU transform unit
  • AMP asymmetric partition
  • a color pixel usually consists of three components.
  • the two most commonly used pixel color formats are GBR color formats consisting of green, blue, and red components and consist of one luma component and two chroma components.
  • YUV color format The color format commonly known as YUV actually includes multiple color formats, such as the YCbCr color format. Therefore, when encoding a CU, a CU can be divided into three component planes (G plane, B plane, R plane or Y plane, U plane, V plane), and the three component planes are respectively coded; The three component bundles of one pixel are combined into one 3-tuple, and the CUs composed of these 3-tuples are encoded as a whole.
  • the arrangement of the former pixel and its components is called the planar format of the image (and its CU), and the arrangement of the latter pixel and its components is called the stacked format of the image (and its CU). Format).
  • the GBR color format and the YUV color format of the pixel are both 3-component representation formats of the pixel.
  • the palette index representation format In addition to the 3-component representation format of a pixel, another common representation format for a pixel is the palette index representation format.
  • the value of a pixel can also be represented by the index of the palette.
  • the palette space stores the value or approximate value of the three components of the color of the pixel to be represented, and the address of the palette is referred to as the index of the color of the pixel stored in this address.
  • An index can represent a component of a pixel's color, and an index can also represent three components of a pixel's color.
  • the palette can be one or more. In the case of multiple palettes, a complete index is actually composed of the palette number (which one of the multiple palettes) and the index of the palette of the sequence number.
  • the index representation format of a pixel is to represent this pixel with an index. If the pixels in an image region (such as a coded block or a decoded block) cannot all be represented by the palette color (ie, at least one pixel in the image region, the value of no three components is equal or approximately equal to the pixel)
  • the palette color and its index there is usually a special index called escape color in the palette, which is used to represent pixels that cannot be represented by normal palette colors. Therefore, if the index of one pixel is an index of the escape color, the pixel needs to express its color with another dedicated 3 components.
  • the normal color and escape color in the palette are called palette colors, but the escape color is a virtual color. There is no physical space in the palette to store this color.
  • the index of the escape color is usually the last index of the palette.
  • the index representation format of the pixel is also It is called the index color of the pixel (inde ⁇ ed color) or pseudo color, or often referred to directly as index pixel (inde ⁇ ed pi ⁇ el) or pseudo pixel (pseudo pi ⁇ el) or pixel index Or index. Indexes are sometimes referred to as indices.
  • the representation of a pixel in its index representation format is also referred to as indexing or indexing.
  • CMYK representation formats Other commonly used pixel representation formats include CMYK representation formats and grayscale representation formats.
  • the YUV color format can be subdivided into several seed formats according to whether the chroma component is downsampled: a YUV 4:4:4 pixel color format consisting of 1 Y component, 1 U component, and 1 V component.
  • the left and right adjacent pixels are composed of 2 Y components, 1 U component, and 1 V component in a YUV 4:2:2 pixel color format; the left and right adjacent 4 pixels arranged in a 2 ⁇ 2 spatial position are composed of YUV4:2:0 pixel color format consisting of 4 Y components, 1 U component, and 1 V component.
  • a component is generally represented by a number of 8 to 16 bits.
  • the YUV4:2:2 pixel color format and the YUV4:2:0 pixel color format are all downsampled for the YUV4:4:4 pixel color format.
  • a pixel component is also referred to as a pixel sample (pi x el sample) or simply as a sample.
  • the most basic element when encoding or decoding can be one pixel, one pixel component, or one pixel index (ie, index pixel).
  • a pixel or a pixel component or an index pixel, which is the most basic element of encoding or decoding, is collectively referred to as a pixel sample, sometimes referred to as a pixel value, or simply as a sample.
  • pixel sample value In the embodiment of the present invention, "pixel sample value”, “pixel value”, “sample value”, “index pixel”, and “pixel index” are synonyms, and depending on the context, whether “pixel” or “one pixel” is clearly indicated The “component” still means “index pixel” or both. If it is not clear from the context, then it means either of the three.
  • a coded block or a decoded block is an area consisting of a number of pixel values.
  • the shape of the codec block may be a rectangle, a square, a parallelogram, a trapezoid, a polygon, a circle, an ellipse, and the like.
  • the rectangle also includes the width or height A rectangle whose pixel value degenerates into a line (ie, a line segment or a line shape).
  • each codec block may have a different shape and size.
  • some or all of the codec blocks may overlap each other, or all codec blocks may not overlap each other.
  • a codec block may be composed of "pixels”, or may be composed of “components of pixels”, or may be composed of "index pixels”, or may be composed of a mixture of the three, or any of the three. Mixed composition.
  • a codec block refers to an area in which encoding or decoding is performed in a frame image, including but not limited to at least one of the following: a maximum coding unit LCU, a coding tree unit CTU, and a coding unit CU. a sub-region of the CU, a prediction unit PU, and a transform unit TU.
  • a notable feature of computer screen images is that there are often many similar or even identical pixel patterns (pi ⁇ el pattern) within the same frame image.
  • pixel patterns pi ⁇ el pattern
  • Chinese or foreign text that often appears in computer screen images is composed of a few basic strokes, and many similar or identical strokes can be found in the same frame image.
  • Menus, icons, etc., which are common in computer screen images, also have many similar or identical patterns. Therefore, the copying method adopted by image and video compression technology includes at least the following copying methods:
  • Intra block copying means intraframe block matching or intraframe motion compensation or block matching or block copying.
  • the basic operation of block copy coding or decoding is to copy a current code block or a current decoding block (referred to as the current block) from the reconstructed reference pixel sample set by the same size as the current block (the same number of pixel samples).
  • the reference block is referenced and the value of the reference block is assigned to the current block.
  • the copy parameter of the block copy mode includes the displacement vector of the current block, indicating the relative position between the reference block and the current block.
  • a current block has a displacement vector.
  • Intra-frame micro-block copying means intra-frame micro-block matching or micro-block matching or micro-block copying.
  • a current block such as 8 ⁇ 8 pixel samples
  • several microblocks such as microblocks of 4 ⁇ 2 pixel samples or microblocks of 8 ⁇ 2 pixel samples or 2 ⁇ 4 pixels
  • the basic operation of the microblock copy encoding or decoding is to encode each microblock in the current block or Decoding the microblock (referred to as the current microblock), copying a reference microblock from the reconstructed reference pixel sample set, and assigning the value of the reference microblock to the current microblock.
  • the copy parameter of the microblock copy mode includes a displacement vector of the current microblock, indicating a relative position between the reference microblock and the current microblock.
  • a current microblock has a displacement vector. How many displacement vectors are there in how many microblocks a current block is divided into.
  • Intra-frame lines are copied, that is, intra-frame matching or strip matching or strip copying.
  • a strip is a microblock having a height of 1 or a width of 1, such as a microblock of 4x1 or 8x1 or 1x4 or 1x8 pixel samples.
  • the basic operation of the strip copy encoding or decoding is to copy each reference strip or decoded strip (referred to as the current strip) in the current block from the reconstructed reference pixel sample set, and the value of the reference strip Assign to the current bar.
  • strip copying is a special case of microblock copying.
  • the copy parameter of the strip copy mode includes the displacement vector of the current strip, indicating the relative position between the reference strip and the current strip.
  • a current bar has a displacement vector. How many displacement vectors are there in how many bars a current block is divided into.
  • Intra-frame string replication means intra-frame string matching or string matching or string copying or pixel string copying.
  • a current coded block or a current decoded block (referred to as the current block) is divided into several variable-length pixel sample strings.
  • the string here refers to arranging the pixel samples in a two-dimensional area of an arbitrary shape into a string whose length is much larger than the width (for example, a string having a width of 1 pixel sample and a length of 37 pixel samples or a width of 2)
  • a string of pixel samples of length 111 pixels typically but not limited to a length that is an independent encoding or decoding parameter and a width that is a predetermined or derived parameter from other encoding or decoding parameters).
  • the basic operation of string copy encoding or decoding is to copy each reference string from the reconstructed reference pixel sample set to each encoded string or decoded string (referred to as the current string) in the current block, and the value of the reference string Assign to the current string.
  • the copy parameters of the string copy mode include the displacement vector and the copy length of the current string, that is, the copy size, which respectively represent the relative position between the reference string and the current string and the length of the current string, that is, the number of pixel samples.
  • the length of the current string is also the length of the reference string.
  • a current string has a displacement vector and a copy length. How many displacement vectors and how many copy lengths a current block is divided into. Displacement vector
  • the quantity is also called the copy position, and its representation forms are: 2D coordinates, linear address, distance, pointer, index, number, mode number, and so on.
  • Palette index string copy is a palette or index string copy.
  • first construct or acquire a palette and then use some or all of the pixels of the current encoding block or the current decoding block (referred to as the current block) with the palette in the palette.
  • the index of the color is expressed, and then the index is encoded and decoded, including but not limited to: dividing the index of a current block into several index strings of variable length, that is, performing index string copy encoding and decoding.
  • the basic operation of the index string copy encoding or decoding is to copy each reference index string or index decoding string (referred to as the current index string) in the current block, and copy a reference index string from the indexed reconstructed reference pixel sample set.
  • the copy parameter of the index string copy mode includes the displacement vector and the copy length of the current index string, that is, the copy size, respectively indicating the relative position between the reference index string and the current index string and the length of the current index string, that is, the number of corresponding pixel samples.
  • the length of the current index string is also the length of the reference index string.
  • a current index string has a displacement vector and a copy length. How many displacement vectors and how many copy lengths a current index is divided into.
  • the displacement vector is also called the copy position, and its representation forms are: 2D coordinates, linear address, distance, pointer, index, number, mode number, and so on.
  • the index string is also called a palette color string or a palette pixel string or a palette string
  • the index string copy mode is also called a palette copy mode or a palette mode.
  • strings are also called runs or strokes. Therefore, the index string is also called an index run or index run or simply a run or trip.
  • the palette color of the current block is derived from the pixel color and/or palette color candidate set of the current block, and the palette color candidate set is composed of a portion of the palette color of the codec block that has completed the codec.
  • index-pixel string fusion copy mode also called palette-pixel string fusion copy mode or merged pixel string copy palette mode or fusion palette Pixel string copy mode or palette with pixel string copy mode.
  • index-pixel string fusion copy mode also called palette-pixel string fusion copy mode or merged pixel string copy palette mode or fusion palette Pixel string copy mode or palette with pixel string copy mode.
  • Multiple palettes and pixel string copying methods combining multiple palettes and pixel string copying methods. Encoding and decoding are performed using at least two different color palettes and pixel string copying methods. Different color palettes and pixel string copying methods use different fusion schemes to fuse palette copying and pixel string copying. In one frame of image, part of the codec block adopts the palette and pixel string copy mode of the fusion scheme I, and part of the codec block adopts the palette and pixel string copy mode of the fusion scheme II, and some codec blocks adopt the fusion scheme III. The palette is copied with pixel strings, and so on.
  • Different fusion schemes may differ in the following aspects: 1) the number of types of strings, 2) the range of values of parameters, 3) the range of values of one or several replicated parameters, and 4) the location of the displacement vector Range of values, 5) current index or current pixel position, 6) position of the current sample segment, 7) position of the reference index or reference pixel, 8) position of the reference sample segment; 9) copy shape.
  • a pixel sample segment referred to as a sample segment.
  • the basic constituent elements of a sample segment are pixel or pixel components or pixel indices.
  • a sample segment has a copy parameter that represents the relationship between the current pixel sample segment and the reference pixel sample segment. Therefore, a sample segment is the smallest unit of a copy operation with the same replication relationship.
  • a copy parameter includes a plurality of copy parameter components, and the copy parameter components include at least: displacement vector horizontal component, displacement vector vertical component, 1 dimensional displacement vector, linear address, relative linear address, index, palette linear address, relative index, toning Board relative linear address, copy length, copy width, copy height, rectangle width, rectangle length, unmatched pixels (also known as no reference pixels, ie non-replicated pixels that are not copied from elsewhere).
  • pixel samples or indexes need to be arranged in a certain order.
  • the arrangement is also called the scanning method.
  • the scanning method can be divided into the following types according to its path shape:
  • A) Horizontal Z-scan mode is also called horizontal raster scan mode.
  • a pixel sample or index of a coded block or a decoded block (collectively referred to as a codec block) is arranged line by line and arranged in the same direction (all left to right or all right to left) in all rows. Rows and rows can be arranged from top to bottom or from bottom to top.
  • Vertical Z-scan mode is also called vertical raster scan mode.
  • a pixel sample or index of a coded block or a decoded block (collectively referred to as a codec block) is arranged in columns and columns, and is arranged in the same direction (all from top to bottom or all from bottom to top) in all columns. Columns and columns can be arranged from left to right or from right to left.
  • a pixel sample or index of a coded block or a decoded block (collectively referred to as a codec block), arranged line by line, arranged in one direction (eg, from left to right) in an odd line and in another (opposite) direction in an even line (eg, from right to left). Rows and rows can be arranged from top to bottom or from bottom to top.
  • a pixel sample or index of a coded block or a decoded block (collectively referred to as a codec block), arranged in columns and columns, arranged in one direction (eg, from top to bottom) in an odd column and in another in an even column (opposite ) Directions (eg, from bottom to top). Columns and columns can be arranged from left to right or from right to left.
  • the basic copy shape has the following two types:
  • the current string and the reference string are each a one-dimensional sample string formed in the order of a predetermined scanning manner in each codec block, and have equal lengths, but the two-dimensional regions formed by the two strings are not necessarily the same. Two-dimensional shape.
  • the current strings are arranged in the order of the predetermined scanning mode within the current codec block.
  • the reference string remains exactly the same two-dimensional shape as the current string, with equal length.
  • Each of the above basic replicated shapes can be subdivided into a plurality of replicated shapes according to a specific scanning manner, such as a vertical arcuate one-dimensional linear replica shape, a horizontal Z-shaped two-dimensional conformal replica shape, and the like.
  • copying is an operation of reconstruction and decoding, and the corresponding encoding operation is “matching”. Therefore, various copying methods such as block matching mode, microblock copying mode, line copying mode, pixel string copying mode, and index string copying mode are also called block matching mode, microblock matching mode, line matching mode, and pixel string matching mode. , index string matching method, and so on.
  • each palette and pixel string copy mode has separate palette color candidate sets, if one codec block does not adopt a palette and pixel string copy mode.
  • the palette color candidate set corresponding to the pixel string copy mode is not updated, and no new more suitable palette color is added to the corresponding palette color candidate set. This approach greatly reduces the compression efficiency of multiple palettes and pixel string replication.
  • an embodiment of the present invention provides an image encoding and decoding method and an image processing device.
  • a codec block some or all of the new palette color is placed in the shared palette color candidate set regardless of which palette and pixel string copying method is employed.
  • various palette and pixel string copy modes generate respective palettes from the pixels of the current codec block and/or the shared palette color candidate set.
  • the palette color candidate set is also known as the palette predictor or palette prediction set.
  • the maximum number of palette colors that can be accommodated in the maximum space of the palette color candidate set is a predetermined constant.
  • the palette color candidate set is updated according to a predetermined rule.
  • the palette color candidate set deletes an existing palette color according to a predetermined rule.
  • the palette color candidate set adjusts the position of the palette color according to a predetermined rule, that is, changes its address or pointer.
  • the palette color candidate set adds a new palette color according to a predetermined rule.
  • the palette color candidate set adds a new tone according to a first-in, first-out rule.
  • one of the plurality of palette and pixel string copying modes is a simple palette copying mode.
  • any codec block is encoded and decoded by using one of a palette and a pixel string copy mode, and part or all of the newly generated palette color of the codec block is added to the shared palette. Color candidate set.
  • FIG. 1 is a schematic flowchart 1 of an image encoding method according to an embodiment of the present invention.
  • a pixel from a current encoding block is used.
  • Generating a new palette color generating a palette of current coded blocks from the palette color candidate set shared by the new palette color and/or palette and pixel string copy encoding, using the tone
  • the swatch performs palette and pixel string copy coding and generates a video code stream containing at least a copy mode and a copy parameter; as shown in FIG. 1, the image coding method includes the following steps:
  • Step 101 When copying and encoding the current coding block by using one of a color palette and a pixel string copy coding mode, a new color palette color is generated according to the pixel of the current coding block.
  • Step 102 Generate a palette of the current coded block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy coding mode.
  • Step 103 Perform palette and pixel string copy coding using the palette of the current coding block, and generate a video code stream including a copy mode and a copy parameter.
  • the coding block is an coding region of an image, and the coding block includes at least one of: a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-region of a CU, and a prediction unit. PU, transform unit TU.
  • the video code stream further includes the new palette color.
  • the color palette and the pixel string copying manner have respective palettes.
  • the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  • the palette color candidate set performs one or more of the following operations according to a predetermined rule:
  • the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule.
  • one of the plurality of palette and pixel string copying modes is a simple palette copying mode.
  • part or all of the new palette color of the coding block is added to the sharing for the coding block coded by using one of the palette and the pixel string copy mode. Palette color candidate set.
  • FIG. 2 is a schematic flowchart 1 of an image decoding method according to an embodiment of the present invention.
  • a video code stream is parsed, and at least one of the following information is obtained: a copy mode, a copy parameter, and a copying manner of a palette and a pixel string copy and decoding.
  • the palette used for the palette and pixel string copy decoding includes the following steps:
  • Step 201 Parse the video code stream, and obtain at least one of the following information: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color.
  • Step 202 Generate a palette and a pixel string using the copy mode for the current decoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy decoding mode. Copy the palette used for decoding.
  • Step 203 Perform a palette and pixel string copy solution using the palette of the current decoded block. code.
  • the decoding block is a decoding area of an image, and the decoding block includes at least one of the following: an LCU, a CTU, a CU, a sub-area of the CU, a PU, and a TU.
  • the color palette and the pixel string copying manner have respective palettes.
  • the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  • the palette color candidate set performs one or more of the following operations according to a predetermined rule:
  • the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule.
  • one of the plurality of palette and pixel string copying modes is a simple palette copying mode.
  • part or all of the new palette color of the decoding block is added to the shared decoding block for decoding using one of the palette and the pixel string copying mode. Palette color candidate set.
  • the technical solution of the embodiment of the present invention is applicable to encoding and decoding of a stacked format image.
  • the technical solution of the embodiment of the present invention is also applicable to encoding and decoding of component plane format images.
  • FIG. 3 is a second schematic flowchart of an image encoding method according to an embodiment of the present invention. As shown in FIG. 3, in the process:
  • a new palette color is generated from the pixels of the current coded block, from the new palette color and/or color
  • the palette color candidate set shared by the board and the pixel string copy coding method generates the current coding block a palette that uses the palette to perform palette and pixel string copy encoding and to generate a video stream containing at least copy mode, copy parameters.
  • the video stream contains a new palette color.
  • the palette and pixel string copy encoding methods have separate palettes.
  • the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  • the palette color candidate set is updated according to a predetermined rule.
  • the palette color candidate set deletes an existing palette color according to a predetermined rule.
  • the palette color candidate set adjusts the position of the palette color according to a predetermined rule, ie, changes its address or pointer.
  • the palette color candidate set adds a new palette color according to a predetermined rule.
  • the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule.
  • one of the plurality of palette and pixel string copy coding modes is a simple palette copy coding mode.
  • any one of the coding blocks is encoded by using one of a palette and a pixel string copy coding method, and part or all of the newly generated palette color of the coding block is added to the shared palette. Color candidate set.
  • FIG. 4 is a schematic flowchart 2 of an image decoding method according to an embodiment of the present invention. As shown in FIG. 4, in the process:
  • the palette color candidate set shared by the swatch and the pixel string copy decoding mode generates a palette used for the current decoded block to perform palette and pixel string copy decoding using the copy mode.
  • the video stream contains a new palette color.
  • the palette and pixel string copy decoding modes have separate palettes.
  • the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  • the palette color candidate set is performed according to a predetermined rule. Update.
  • the palette color candidate set deletes an existing palette color according to a predetermined rule.
  • the palette color candidate set adjusts the position of the palette color according to a predetermined rule, ie, changes its address or pointer.
  • the palette color candidate set adds a new palette color according to a predetermined rule.
  • the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule.
  • one of the plurality of palette and pixel string copy decoding modes is a simple palette copy decoding mode.
  • the arbitrary decoding block is added to the shared palette color candidate by using one of the palette and the pixel string copy decoding mode, and adding part or all of the newly generated palette color of the decoded block. set.
  • FIG. 5 is a first schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus can encode an image. As shown in FIG. 5, the image processing apparatus includes:
  • the first generating unit 51 is configured to generate a new palette color according to the pixel of the current encoding block when copying and encoding the current encoding block by using one of a palette and a pixel string copy encoding method;
  • a second generating unit 52 configured to generate a palette of the current encoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy encoding manner;
  • the encoding unit 53 is configured to perform palette and pixel string copy encoding using the palette of the current encoding block, and generate a video code stream including a copy mode and a copy parameter.
  • the video stream contains a new palette color.
  • the palette and pixel string copy encoding methods have separate palettes.
  • the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  • the palette color candidate set is updated according to a predetermined rule.
  • the palette color candidate set deletes an existing palette color according to a predetermined rule.
  • the palette color candidate set adjusts the position of the palette color according to a predetermined rule, ie, changes its address or pointer.
  • the The palette color candidate set adds a new palette color according to a predetermined rule.
  • the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule.
  • one of the plurality of palette and pixel string copy coding modes is a simple palette copy coding mode.
  • any coding block is encoded by using any one of a palette and a pixel string copy coding method, and part or all of the newly generated palette color of the coding block is added to the shared color. Board color candidate set.
  • the implementation functions of the units in the image processing apparatus shown in FIG. 5 can be understood by referring to the related description of the foregoing image encoding method.
  • the functions of the units in the image processing apparatus shown in FIG. 5 can be realized by a program running on a processor, or can be realized by a specific logic circuit.
  • each unit in the image processing device may be implemented by a central processing unit (CPU) or a microprocessor (Micro Processor Unit, MPU) located in the image processing device. Or a digital signal processor (DSP), or a Field Programmable Gate Array (FPGA).
  • CPU central processing unit
  • MPU Micro Processor Unit
  • DSP digital signal processor
  • FPGA Field Programmable Gate Array
  • FIG. 6 is a second schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus can decode an image. As shown in FIG. 6, the image processing apparatus includes:
  • the parsing unit 61 is configured to parse the video code stream, and obtain at least one of the following information: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
  • the third generating unit 62 is configured to generate, according to the new palette color and/or the palette color candidate set shared by the palette and the pixel string copy decoding mode, to generate the current decoding block by using the copy mode.
  • the decoding unit 63 is configured to perform palette and pixel string copy decoding using the palette of the current decoded block.
  • the video stream contains a new palette color.
  • the palette and pixel string copy decoding modes have separate palettes.
  • the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  • the palette color candidate set is updated according to a predetermined rule.
  • the palette color candidate set deletes an existing palette color according to a predetermined rule.
  • the palette color candidate set adjusts the position of the palette color according to a predetermined rule, ie, changes its address or pointer.
  • the palette color candidate set adds a new palette color according to a predetermined rule.
  • the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule.
  • one of the palette and pixel string copy decoding modes is a simple palette copy decoding mode.
  • the arbitrary decoding block is added to the shared palette color candidate by using one of the palette and the pixel string copy decoding mode, and adding part or all of the newly generated palette color of the decoded block. set.
  • each unit in the image processing device may be implemented by a central processing unit (CPU) or a microprocessor (Micro Processor Unit, MPU) located in the image processing device. Or a digital signal processor (DSP), or a Field Programmable Gate Array (FPGA).
  • CPU central processing unit
  • MPU Micro Processor Unit
  • DSP digital signal processor
  • FPGA Field Programmable Gate Array
  • FIG. 7 is a third schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus can encode and decode an image. As shown in FIG. 7, the image processing apparatus includes:
  • the first generating unit 71 is configured to generate a new palette color according to the pixel of the current encoding block when copying and encoding the current encoding block by using one of a palette and a pixel string copy encoding method;
  • a second generating unit 72 configured to generate a palette of the current encoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy encoding manner;
  • the encoding unit 73 is configured to perform palette and pixel string copy encoding using the palette of the current encoding block, and generate a video code stream including a copy mode and a copy parameter.
  • the parsing unit 74 is configured to parse the video code stream, and obtain at least one of the following information: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
  • the third generating unit 75 is configured to generate, according to the new palette color and/or the palette color candidate set shared by the palette and the pixel string copy decoding mode, to generate the current decoding block by using the copy mode.
  • Decoding unit 76 is configured to perform palette and pixel string copy decoding using the palette of the current decoded block.
  • each unit in the image processing device may be implemented by a central processing unit (CPU) or a microprocessor (Micro Processor Unit, MPU) located in the image processing device. Or a digital signal processor (DSP), or a Field Programmable Gate Array (FPGA).
  • CPU central processing unit
  • MPU Micro Processor Unit
  • DSP digital signal processor
  • FPGA Field Programmable Gate Array
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the image processing device is implemented in the form of a software function module. When sold or used as a standalone product, it can also be stored on a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk.
  • embodiments of the invention are not limited to any specific combination of hardware and software.
  • an embodiment of the present invention further provides a computer storage medium, wherein a computer program for executing an image encoding method and/or an image decoding method according to an embodiment of the present invention is stored.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • a new color palette color is generated according to the pixel of the current coding block; Palette color and/or palette color palette color candidate set shared with pixel string copy encoding, generating a palette of the current encoding block; coloring using the palette of the current encoding block
  • the board and the pixel string are copied and encoded, and a video stream including a copy mode and a copy parameter is generated.
  • the image compression of the palette color candidate set is realized by multiple copy modes, and the compression efficiency of the multi-palette and pixel string copy mode is improved.

Landscapes

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

Abstract

Disclosed are an image encoding and decoding method, image processing device, and computer storage medium, comprising: when using one of a palette and a pixel-string encoding replication means to replicate the encoding of a currently encoded block, generating a new palette color according to the pixels of said currently encoded block; according to said new palette color and/or palette color candidate set shared by the palette and the pixel-string encoding replication means, generating the palette of said current encoded block; using said palette to replicate the encoding of the palette and the pixel string, and generate a video code stream comprising the replication means and replication parameters. The video code stream is parsed, and at least one of the following information is obtained: the replication means, replication parameters, and new palette color of the palette and pixel-string decoding replication; according to said new palette color and/or palette color candidate set shared by the palette and the pixel-string decoding replication means, generating a palette; using said palette to replicate the decoding of the palette and the pixel string.

Description

图像编码及解码方法、图像处理设备、计算机存储介质Image encoding and decoding method, image processing device, computer storage medium 技术领域Technical field
本发明涉及数字视频编码解码技术,尤其涉及一种图像编码及解码方法、图像处理设备、计算机存储介质。The present invention relates to digital video coding and decoding technologies, and in particular, to an image coding and decoding method, an image processing device, and a computer storage medium.
背景技术Background technique
随着电视机和显示器进入超高清(4K)和特超高清(8K)的分辨率,以及以远程桌面为典型表现形式的新一代云计算与信息处理模式及平台的发展和普及,对视频图像数据压缩的需求也走向更高分辨率和包含摄像机摄取图像和计算机屏幕图像的复合图像。对视频图像进行超高压缩比和极高质量的数据压缩成为必不可少的技术。With the development of televisions and monitors entering ultra-high definition (4K) and ultra-high definition (8K) resolutions, as well as the development and popularization of a new generation of cloud computing and information processing modes and platforms based on remote desktops, video images The need for data compression is also moving toward higher resolution and composite images containing camera-captured images and computer screen images. Ultra-high compression ratio and extremely high-quality data compression of video images have become an indispensable technology.
充分利用4K/8K图像和计算机屏幕图像的特点,对视频图像进行超高效率的压缩(HEVC,High Efficiency Video Coding),也是正在制定中的最新国际视频压缩标准和其他若干国际标准、国内标准、行业标准的一个主要目标。Taking full advantage of the characteristics of 4K/8K images and computer screen images, HEVC (High Efficiency Video Coding) is also the latest international video compression standard and several other international standards and domestic standards under development. A major goal of industry standards.
计算机屏幕图像的一个显著特点是同一帧图像内通常会有很多相似甚至完全相同的像素图样(pi×el pattern)。例如,计算机屏幕图像中常出现的中文或外文文字,都是由少数几种基本笔划所构成,同一帧图像内可以找到很多相似或相同的笔划。计算机屏幕图像中常见的菜单、图标等,也具有很多相似或相同的图样。因此,现有的图像和视频压缩技术中通常采用各种复制方式,至少包括下列复制方式:A notable feature of computer screen images is that there are often many similar or even identical pixel patterns (pi × el pattern) within the same frame image. For example, Chinese or foreign text that often appears in computer screen images is composed of a few basic strokes, and many similar or identical strokes can be found in the same frame image. Menus, icons, etc., which are common in computer screen images, also have many similar or identical patterns. Therefore, the existing image and video compression technologies usually adopt various copying methods, including at least the following copying methods:
1)帧内块复制即帧内块匹配或称帧内运动补偿或称块匹配或称块复制。1) Intra block copying means intraframe block matching or intraframe motion compensation or block matching or block copying.
2)帧内微块复制即帧内微块匹配或称微块匹配或称微块复制。 2) Intra-frame micro-block copying means intra-frame micro-block matching or micro-block matching or micro-block copying.
3)帧内线条(简称条)复制即帧内条匹配或称条匹配或称条复制。3) Intra-frame lines (referred to as strips) are copied, that is, intra-frame matching or strip matching or strip copying.
4)帧内串复制即帧内串匹配或称串匹配或称串复制或称像素串复制。4) Intra-frame string replication means intra-frame string matching or string matching or string copying or pixel string copying.
5)调色板索引串复制即调色板或称索引串复制。5) Palette index string copy is a palette or index string copy.
6)索引串复制与像素串复制混合的融合复制方式,简称索引-像素串融合复制方式,也称调色板-像素串融合复制方式或融合像素串复制的调色板方式或融合调色板的像素串复制方式或调色板与像素串复制方式。6) Fusion copy mode of index string copy and pixel string copy, referred to as index-pixel string fusion copy mode, also called palette-pixel string fusion copy mode or merged pixel string copy palette mode or fusion palette Pixel string copy mode or palette with pixel string copy mode.
7)结合多种调色板与像素串复制方式的多重调色板与像素串复制方式。7) Multiple palettes and pixel string copying methods combining multiple palettes and pixel string copying methods.
现有的各种复制方式中,压缩效果最好的是多重调色板与像素串复制方式。但是在现有技术的多重调色板与像素串复制方式中,各调色板与像素串复制方式有各自独立的调色板颜色候选集,如果编解码块没有采用一种调色板与像素串复制方式,该调色板与像素串复制方式对应的调色板颜色候选集就得不到更新,没有新的更合适的调色板颜色补充到对应的调色板颜色候选集。这种做法在很大程度上降低了多重调色板与像素串复制方式的压缩效率。Among the various existing copying methods, the best compression effect is the multi-palette and pixel string copying method. However, in the prior art multi-palette and pixel string copying method, each palette and pixel string copying method has separate palette color candidate sets, if the codec block does not adopt a palette and a pixel. In the string copy mode, the palette color candidate set corresponding to the pixel string copy mode is not updated, and no new more suitable palette color is added to the corresponding palette color candidate set. This approach greatly reduces the compression efficiency of multiple palettes and pixel string replication.
发明内容Summary of the invention
为解决上述技术问题,本发明实施例提供了一种图像编码及解码方法、图像处理设备、计算机存储介质。To solve the above technical problem, an embodiment of the present invention provides an image encoding and decoding method, an image processing device, and a computer storage medium.
本发明实施例提供的图像编码方法,包括:An image coding method provided by an embodiment of the present invention includes:
在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色;Generating a new palette color according to pixels of the current coding block when copying and encoding the current coding block using one of a palette and a pixel string copy coding method;
依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板;Generating a palette of the current coded block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy coding method;
使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。 Palette and pixel string copy coding is performed using the palette of the current coded block, and a video code stream including a copy mode and a copy parameter is generated.
本发明实施例中,所述编码块是图像的编码区域,所述编码块包括以下至少一种:最大编码单元(LCU)、编码树单元(CTU)、编码单元(CU)、CU的子区域、预测单元(PU)、变换单元(TU)。In this embodiment, the coding block is an coding region of an image, and the coding block includes at least one of: a maximum coding unit (LCU), a coding tree unit (CTU), a coding unit (CU), and a sub-region of a CU. , prediction unit (PU), transform unit (TU).
本发明实施例中,所述视频码流还包括所述新的调色板颜色。In an embodiment of the invention, the video code stream further includes the new palette color.
本发明实施例中,所述调色板颜色候选集的最大空间能够容纳的调色板颜色的最大数目为预定常数。In the embodiment of the present invention, the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
本发明实施例中,所述方法还包括:所述调色板颜色候选集根据预定规则进行以下一种或多种操作:In the embodiment of the present invention, the method further includes: the palette color candidate set performs one or more of the following operations according to a predetermined rule:
更新、调色板颜色的删除、调色板颜色的位置的调整、调色板颜色的添加。Update, palette color deletion, palette color position adjustment, palette color addition.
本发明实施例中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。In the embodiment of the present invention, the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first-in, first-out rule.
本发明实施例中,所述方法还包括:In the embodiment of the present invention, the method further includes:
对于使用所述调色板与像素串复制方式之一进行编码的编码块,将所述编码块的所述新的调色板颜色的部分或全部添加进入共享调色板颜色候选集。For a coded block that is encoded using one of the palette and pixel string copying methods, some or all of the new palette color of the encoded block is added to the shared palette color candidate set.
本发明实施例提供的图像解码方法,包括:The image decoding method provided by the embodiment of the present invention includes:
解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色;Parsing the video stream to obtain at least one of the following: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板;Generating a palette color candidate set shared by the new palette color and/or color palette and the pixel string copy decoding method, and generating a palette and pixel string copy decoding using the copy mode for the current decoded block. The palette used;
使用所述当前解码块的调色板进行调色板与像素串复制解码。Palette and pixel string copy decoding is performed using the palette of the current decoded block.
本发明实施例中,所述解码块是图像的解码区域,所述解码块包括以下至少一种:LCU、CTU、CU、CU的子区域、PU、TU。 In the embodiment of the present invention, the decoding block is a decoding area of an image, and the decoding block includes at least one of the following: an LCU, a CTU, a CU, a sub-area of the CU, a PU, and a TU.
本发明实施例中,所述调色板颜色候选集的最大空间能够容纳的调色板颜色的最大数目为预定常数。In the embodiment of the present invention, the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
本发明实施例中,所述方法还包括:所述调色板颜色候选集根据预定规则进行以下一种或多种操作:In the embodiment of the present invention, the method further includes: the palette color candidate set performs one or more of the following operations according to a predetermined rule:
更新、调色板颜色的删除、调色板颜色的位置的调整、调色板颜色的添加。Update, palette color deletion, palette color position adjustment, palette color addition.
本发明实施例中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。In the embodiment of the present invention, the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first-in, first-out rule.
本发明实施例中,所述方法还包括:In the embodiment of the present invention, the method further includes:
对于使用所述调色板与像素串复制方式之一进行解码的解码块,将所述解码块的所述新的调色板颜色的部分或全部添加进入共享调色板颜色候选集。For a decoded block that is decoded using one of the palette and pixel string copying methods, some or all of the new palette color of the decoded block is added to the shared palette color candidate set.
本发明实施例提供的图像处理设备,包括:An image processing device provided by an embodiment of the present invention includes:
第一生成单元,配置为在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色;a first generating unit, configured to generate a new palette color according to the pixel of the current encoding block when copying and encoding the current encoding block by using one of a color palette and a pixel string copy encoding method;
第二生成单元,配置为依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板;a second generating unit, configured to generate a palette of the current encoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy encoding manner;
编码单元,配置为使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。And a coding unit configured to perform palette and pixel string copy coding using a palette of the current coded block, and generate a video code stream including a copy mode and a copy parameter.
本发明另一实施例提供的图像处理设备,包括:An image processing device according to another embodiment of the present invention includes:
解析单元,配置为解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色;a parsing unit configured to parse the video stream to obtain at least one of the following: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
第三生成单元,配置为依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制 方式进行调色板与像素串复制解码时所用的调色板;a third generating unit configured to generate the copy to the current decoded block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy decoding mode The color palette used for palette and pixel string copy decoding;
解码单元,配置为使用所述当前解码块的调色板进行调色板与像素串复制解码。A decoding unit configured to perform palette and pixel string copy decoding using a palette of the current decoded block.
本发明实施例提供的计算机存储介质存储有计算机程序,该计算机程序用于执行上述图像编码和/或图像解码方法。The computer storage medium provided by the embodiment of the present invention stores a computer program for performing the above image encoding and/or image decoding method.
本发明实施例的技术方案中,对图像编码包括:在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色;依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板;使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。对图像解码包括:解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色;依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板;使用所述当前解码块的调色板进行调色板与像素串复制解码。可见,本发明实施例实现了多种复制方式共享调色板颜色候选集的图像压缩,提高了多重调色板与像素串复制方式的压缩效率。In the technical solution of the embodiment of the present invention, encoding the image includes: when copying and encoding the current coding block by using one of a palette and a pixel string copy coding mode, generating a new color palette according to the pixel of the current coding block. Color; generating a palette of the current encoded block according to the palette color candidate set shared by the new palette color and/or palette and pixel string copy encoding; using the current encoding block The palette performs palette and pixel string copy encoding and generates a video stream that includes copy mode and copy parameters. Decoding the image includes parsing the video stream, and obtaining at least one of the following: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color; according to the new palette color and/or Or a palette color candidate set shared by the palette and the pixel string copy decoding method, generating a palette used for the current decoded block to perform palette and pixel string copy decoding using the copy mode; using the current decoding The palette of the block performs a palette and pixel string copy decoding. It can be seen that the embodiment of the present invention implements image compression of a plurality of copy mode sharing palette color candidate sets, and improves compression efficiency of multiple color palettes and pixel string copy modes.
附图说明DRAWINGS
在附图(其不一定是按比例绘制的)中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例而非限制的方式大体示出了本文中所讨论的各个实施例。In the drawings, which are not necessarily to scale, the Like reference numerals with different letter suffixes may indicate different examples of similar components. The drawings generally illustrate the various embodiments discussed herein by way of example and not limitation.
图1为本发明实施例的图像编码方法的流程示意图一;1 is a schematic flowchart 1 of an image encoding method according to an embodiment of the present invention;
图2为本发明实施例的图像解码方法的流程示意图一; 2 is a schematic flowchart 1 of an image decoding method according to an embodiment of the present invention;
图3为本发明实施例的图像编码方法的流程示意图二;3 is a second schematic flowchart of an image encoding method according to an embodiment of the present invention;
图4为本发明实施例的图像解码方法的流程示意图二;4 is a second schematic flowchart of an image decoding method according to an embodiment of the present invention;
图5为本发明实施例的图像处理设备的结构组成示意图一;FIG. 5 is a first schematic structural diagram of an image processing apparatus according to an embodiment of the present invention; FIG.
图6为本发明实施例的图像处理设备的结构组成示意图二;FIG. 6 is a second schematic structural diagram of an image processing apparatus according to an embodiment of the present invention; FIG.
图7为本发明实施例的图像处理设备的结构组成示意图三。FIG. 7 is a third schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
具体实施方式detailed description
为了能够更加详尽地了解本发明实施例的特点与技术内容,下面结合附图对本发明实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本发明实施例。The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
图像的数字视频信号的自然形式是图像的序列。一帧图像通常是由若干像素组成的矩形区域,而数字视频信号就是由几十帧至成千上万帧图像组成的视频图像序列,有时也简称为视频序列或序列。对数字视频信号进行编码就是对一帧一帧图像进行编码。在任一时刻,正在编码中的那一帧图像称为当前编码图像。同样,对数字视频信号的压缩后的视频码流(简称码流也称为比特流)进行解码就是对一帧一帧压缩图像的码流进行解码。在任一时刻,正在解码中的那一帧图像称为当前解码图像。当前编码图像或当前解码图像都统称为当前图像。The natural form of a digital video signal of an image is a sequence of images. A frame of image is usually a rectangular area composed of several pixels, and a digital video signal is a sequence of video images composed of tens of frames to thousands of frames of images, sometimes simply referred to as a video sequence or sequence. Encoding a digital video signal encodes a frame by frame image. At any one time, the image of the frame being encoded is referred to as the current encoded image. Similarly, decoding a compressed video stream (also referred to as a bit stream) of a digital video signal is decoding a stream of one frame by one compressed image. At any one time, the image of the frame being decoded is referred to as the current decoded image. The current encoded image or the currently decoded image is collectively referred to as the current image.
在几乎所有视频图像编码的国际标准如MPEG-1/2/4,H.264/AVC以及HEVC中,对一帧图像进行编码(以及相应的解码)时,把一帧图像划分成若干块M×M像素的子图像,称为编码块(从解码的角度也就是解码块,统称为编解码块)或编码单元(CU,Coding Unit),以CU为基本编码单位,对子图像一块一块进行编码。常用的M的大小是4,8,16,32,64。因此,对视频图像序列进行编码就是对各帧图像的各个编码单元即CU依次一个一个CU进行编码。在任一时刻,正在编码中的CU称为当前编码CU。同样,对视频图像序列的码流进行解码也是对各帧图像的各个CU依次一个一 个CU进行解码,最终重构出整个视频图像序列。在任一时刻,正在解码中的CU称为当前解码CU。当前编码CU或当前解码CU统称为当前CU。In almost all international standards for video image coding, such as MPEG-1/2/4, H.264/AVC, and HEVC, when one frame of image is encoded (and correspondingly decoded), one frame of image is divided into blocks M. The sub-image of the M pixel is called a coding block (from the perspective of decoding, that is, a decoding block, collectively referred to as a codec block) or a coding unit (CU, Coding Unit), and the sub-image is performed one by one with the CU as a basic coding unit. coding. The size of the commonly used M is 4, 8, 16, 32, 64. Therefore, encoding the video image sequence is to encode one CU for each coding unit of each frame image, that is, CU. At any one time, the CU being coded is referred to as the current coded CU. Similarly, decoding the code stream of the video image sequence is also one by one for each CU of each frame image. The CUs decode and finally reconstruct the entire video image sequence. At any one time, the CU being decoded is referred to as the currently decoded CU. The current coding CU or the current decoding CU is collectively referred to as the current CU.
为适应一帧图像内各部分图像内容与性质的不同,有针对性地进行最有效的编码,一帧图像内各CU的大小可以是不同的,有的是8×8,有的是64×64,等等。为了使不同大小的CU能够无缝拼接起来,一帧图像通常先划分成大小完全相同具有N×N像素的最大编码单元(LCU,Largest Coding Unit),然后每个LCU再进一步划分成树状结构的多个大小不一定相同的CU。因此,LCU也称为编码树单元(CTU,Coding Tree Unit)。例如,一帧图像先划分成大小完全相同的64×64像素的LCU(N=64)。其中某个LCU由3个32×32像素的CU和4个16×16像素的CU构成,这样7个成树状结构的CU构成一个CTU。而另一个LCU由2个32×32像素的CU、3个16×16像素的CU和20个8×8像素的CU构成。这样25个成树状结构的CU构成另一个CTU。对一帧图像进行编码,就是依次对一个一个CTU中的一个一个CU进行编码。在HEVC国际标准中,LCU与CTU是同义词。大小等于CTU的CU称为深度为0的CU。深度为0的CU上下左右四等分得到的CU称为深度为1的CU。深度为1的CU上下左右四等分得到的CU称为深度为2的CU。深度为2的CU上下左右四等分得到的CU称为深度为3的CU。在任一时刻,正在编码中的CTU称为当前编码CTU。在任一时刻,正在解码中的CTU称为当前解码CTU。当前编码CTU或当前解码CTU统称为当前CTU。In order to adapt to the difference between the content and the nature of each part of the image in one frame, the most efficient coding is performed in a targeted manner. The size of each CU in one frame of image can be different, some are 8×8, some are 64×64, etc. . In order to enable seamlessly splicing CUs of different sizes, one frame of image is usually first divided into LCUs (Lorgest Coding Units) of the same size and having N×N pixels, and then each LCU is further divided into a tree structure. Multiple CUs of different sizes are not necessarily the same. Therefore, the LCU is also called a Coding Tree Unit (CTU). For example, a frame of image is first divided into 64x64 pixel LCUs of the same size (N=64). One of the LCUs is composed of three 32×32 pixel CUs and four 16×16 pixel CUs, so that seven CUs in a tree structure constitute one CTU. The other LCU is composed of two 32×32 pixel CUs, three 16×16 pixel CUs, and 20 8×8 pixel CUs. Such 25 CUs in a tree structure constitute another CTU. Encoding one frame of image is to sequentially encode one CU in one CTU. In the HEVC international standard, LCU is synonymous with CTU. A CU whose size is equal to the CTU is called a CU with a depth of zero. A CU obtained by dividing the CU up and down and left and right by a depth of 0 is called a CU having a depth of 1. A CU with a depth of 1 and a CU divided into four equal parts is called a CU with a depth of 2. A CU obtained by dividing the CU of the depth of 2 into four equal parts is called a CU having a depth of 3. At any one time, the CTU being coded is referred to as the current coded CTU. At any one time, the CTU being decoded is referred to as the current decoded CTU. The current coding CTU or the current decoding CTU is collectively referred to as the current CTU.
CU也可以再进一步被划分成若干子区域。子区域包括但不限于预测单元(PU),变换单元(TU),不对称划分(AMP)的区域。The CU can also be further divided into sub-areas. Sub-regions include, but are not limited to, prediction unit (PU), transform unit (TU), asymmetric partition (AMP) regions.
一个彩色像素通常有3个分量(component)组成。最常用的两种像素色彩格式(pi×el color format)是由绿色分量、蓝色分量、红色分量组成的GBR色彩格式和由一个亮度(luma)分量及两个色度(chroma)分量组成 的YUV色彩格式。通称为YUV的色彩格式实际包括多种色彩格式,如YCbCr色彩格式。因此,对一个CU进行编码时,可以把一个CU分成3个分量平面(G平面、B平面、R平面或Y平面、U平面、V平面),对3个分量平面分别进行编码;也可以把一个像素的3个分量捆绑组合成一个3元组,对由这些3元组组成的CU整体进行编码。前一种像素及其分量的排列方式称为图像(及其CU)的平面格式(planar format),而后一种像素及其分量的排列方式称为图像(及其CU)的叠包格式(packed format)。像素的GBR色彩格式和YUV色彩格式都是像素的3分量表现格式。A color pixel usually consists of three components. The two most commonly used pixel color formats (pi × el color format) are GBR color formats consisting of green, blue, and red components and consist of one luma component and two chroma components. YUV color format. The color format commonly known as YUV actually includes multiple color formats, such as the YCbCr color format. Therefore, when encoding a CU, a CU can be divided into three component planes (G plane, B plane, R plane or Y plane, U plane, V plane), and the three component planes are respectively coded; The three component bundles of one pixel are combined into one 3-tuple, and the CUs composed of these 3-tuples are encoded as a whole. The arrangement of the former pixel and its components is called the planar format of the image (and its CU), and the arrangement of the latter pixel and its components is called the stacked format of the image (and its CU). Format). The GBR color format and the YUV color format of the pixel are both 3-component representation formats of the pixel.
除了像素的3分量表现格式,像素的另一种常用的表现格式是调色板索引表现格式。在调色板索引表现格式中,一个像素的数值也可以用调色板的索引来表现。调色板空间中存储了需要被表现的像素的颜色的3个分量的数值或近似数值,调色板的地址被称为这个地址中存储的像素的颜色的索引。一个索引可以表现像素的颜色的一个分量,一个索引也可以表现像素的颜色的3个分量。调色板可以是一个,也可以是多个。在多个调色板的情形,一个完整的索引实际上由调色板序号(表示多个调色板中的哪一个)和该序号的调色板的索引两部分组成。像素的索引表现格式就是用索引来表现这个像素。如果一个图像区域(如编码块或解码块)中的像素不能全部都用调色板颜色来表现(即对该图像区域中至少一个像素,没有3个分量的数值与该像素相等或近似相等的调色板颜色及其索引),则调色板中通常有一个特殊的称为逃逸颜色的索引,用来表现不能用正常的调色板颜色来表现的像素。因此,如果一个像素的索引是逃逸颜色的索引,则该像素需要用另外的专用的3个分量来表现其颜色。调色板中的正常颜色和逃逸颜色都称为调色板颜色,但逃逸颜色是一个虚拟颜色,在调色板中并没有一个物理空间来存放这个颜色,只有一个特殊的专门的虚拟的索引。逃逸颜色的索引通常是调色板的最后一个索引。像素的索引表现格式也被 称为像素的索引颜色(inde×ed color)或仿颜色(pseudo color)表现格式,或者常常被直接称为索引像素(inde×ed pi×el)或仿像素(pseudo pi×el)或像素索引或索引。索引有时也被称为指数。把像素用其索引表现格式来表现也称为索引化或指数化。In addition to the 3-component representation format of a pixel, another common representation format for a pixel is the palette index representation format. In the palette index representation format, the value of a pixel can also be represented by the index of the palette. The palette space stores the value or approximate value of the three components of the color of the pixel to be represented, and the address of the palette is referred to as the index of the color of the pixel stored in this address. An index can represent a component of a pixel's color, and an index can also represent three components of a pixel's color. The palette can be one or more. In the case of multiple palettes, a complete index is actually composed of the palette number (which one of the multiple palettes) and the index of the palette of the sequence number. The index representation format of a pixel is to represent this pixel with an index. If the pixels in an image region (such as a coded block or a decoded block) cannot all be represented by the palette color (ie, at least one pixel in the image region, the value of no three components is equal or approximately equal to the pixel) The palette color and its index), there is usually a special index called escape color in the palette, which is used to represent pixels that cannot be represented by normal palette colors. Therefore, if the index of one pixel is an index of the escape color, the pixel needs to express its color with another dedicated 3 components. The normal color and escape color in the palette are called palette colors, but the escape color is a virtual color. There is no physical space in the palette to store this color. There is only one special dedicated virtual index. . The index of the escape color is usually the last index of the palette. The index representation format of the pixel is also It is called the index color of the pixel (inde × ed color) or pseudo color, or often referred to directly as index pixel (inde × ed pi × el) or pseudo pixel (pseudo pi × el) or pixel index Or index. Indexes are sometimes referred to as indices. The representation of a pixel in its index representation format is also referred to as indexing or indexing.
其他的常用的像素表现格式包括CMYK表现格式和灰度表现格式。Other commonly used pixel representation formats include CMYK representation formats and grayscale representation formats.
YUV色彩格式又可根据是否对色度分量进行下采样再细分成若干种子格式:1个像素由1个Y分量、1个U分量、1个V分量组成的YUV4:4:4像素色彩格式;左右相邻的2个像素由2个Y分量、1个U分量、1个V分量组成的YUV4:2:2像素色彩格式;左右上下相邻按2×2空间位置排列的4个像素由4个Y分量、1个U分量、1个V分量组成的YUV4:2:0像素色彩格式。一个分量一般用1个8~16比特的数字来表示。YUV4:2:2像素色彩格式和YUV4:2:0像素色彩格式都是对YUV4:4:4像素色彩格式施行色度分量的下采样得到。一个像素分量也称为一个像素样值(pi×el sample)或简单地称为一个样值(sample)。The YUV color format can be subdivided into several seed formats according to whether the chroma component is downsampled: a YUV 4:4:4 pixel color format consisting of 1 Y component, 1 U component, and 1 V component. The left and right adjacent pixels are composed of 2 Y components, 1 U component, and 1 V component in a YUV 4:2:2 pixel color format; the left and right adjacent 4 pixels arranged in a 2×2 spatial position are composed of YUV4:2:0 pixel color format consisting of 4 Y components, 1 U component, and 1 V component. A component is generally represented by a number of 8 to 16 bits. The YUV4:2:2 pixel color format and the YUV4:2:0 pixel color format are all downsampled for the YUV4:4:4 pixel color format. A pixel component is also referred to as a pixel sample (pi x el sample) or simply as a sample.
编码或解码时的最基本元素可以是一个像素,也可以是一个像素分量,也可以是一个像素索引(即索引像素)。作为编码或解码的最基本元素的一个像素或一个像素分量或一个索引像素统称为一个像素样值,有时也通称为一个像素值,或简单地称为一个样值。The most basic element when encoding or decoding can be one pixel, one pixel component, or one pixel index (ie, index pixel). A pixel or a pixel component or an index pixel, which is the most basic element of encoding or decoding, is collectively referred to as a pixel sample, sometimes referred to as a pixel value, or simply as a sample.
在本发明实施例中,“像素样值”、“像素值”、“样值”、“索引像素”、“像素索引”是同义词,根据上下文,可以明确是表示“像素”还是表示“一个像素分量”还是表示“索引像素”或者同时表示三者之任一。如果从上下文不能明确,那么就是同时表示三者之任一。In the embodiment of the present invention, "pixel sample value", "pixel value", "sample value", "index pixel", and "pixel index" are synonyms, and depending on the context, whether "pixel" or "one pixel" is clearly indicated The "component" still means "index pixel" or both. If it is not clear from the context, then it means either of the three.
在本发明实施例中,编码块或解码块(统称为编解码块)是由若干像素值组成的一个区域。编解码块的形状可以是矩形、正方形、平行四边形、梯形、多边形、圆形、椭圆形及其他各种形状。矩形也包括宽度或高度为 一个像素值的退化为线(即线段或线形)的矩形。一帧图像中,各个编解码块可以具有各不相同的形状和大小。一帧图像中,某些或全部编解码块可以有互相重叠部分,也可以所有编解码块都互不重叠。一个编解码块,可以由“像素”组成,也可以由“像素的分量”组成,也可以由“索引像素”组成,也可以由这3者混合组成,也可以由这3者中之任意2种混合组成。从视频图像编码或解码的角度,编解码块是指一帧图像中对其施行编码或解码的一个区域,包括但不限于以下至少一种:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。In an embodiment of the invention, a coded block or a decoded block (collectively referred to as a codec block) is an area consisting of a number of pixel values. The shape of the codec block may be a rectangle, a square, a parallelogram, a trapezoid, a polygon, a circle, an ellipse, and the like. The rectangle also includes the width or height A rectangle whose pixel value degenerates into a line (ie, a line segment or a line shape). In one frame of image, each codec block may have a different shape and size. In one frame of image, some or all of the codec blocks may overlap each other, or all codec blocks may not overlap each other. A codec block may be composed of "pixels", or may be composed of "components of pixels", or may be composed of "index pixels", or may be composed of a mixture of the three, or any of the three. Mixed composition. From the perspective of video image encoding or decoding, a codec block refers to an area in which encoding or decoding is performed in a frame image, including but not limited to at least one of the following: a maximum coding unit LCU, a coding tree unit CTU, and a coding unit CU. a sub-region of the CU, a prediction unit PU, and a transform unit TU.
计算机屏幕图像的一个显著特点是同一帧图像内通常会有很多相似甚至完全相同的像素图样(pi×el pattern)。例如,计算机屏幕图像中常出现的中文或外文文字,都是由少数几种基本笔划所构成,同一帧图像内可以找到很多相似或相同的笔划。计算机屏幕图像中常见的菜单、图标等,也具有很多相似或相同的图样。因此,图像和视频压缩技术采用的复制方式,至少包括下列复制方式:A notable feature of computer screen images is that there are often many similar or even identical pixel patterns (pi × el pattern) within the same frame image. For example, Chinese or foreign text that often appears in computer screen images is composed of a few basic strokes, and many similar or identical strokes can be found in the same frame image. Menus, icons, etc., which are common in computer screen images, also have many similar or identical patterns. Therefore, the copying method adopted by image and video compression technology includes at least the following copying methods:
1)帧内块复制即帧内块匹配或称帧内运动补偿或称块匹配或称块复制。块复制编码或解码的基本运算是对一个当前编码块或当前解码块(简称为当前块),从重构参考像素样值集内复制一个与当前块同样大小(同样像素样值的数目)的参考块,并将所述参考块的数值赋值予当前块。块复制方式的复制参数包括当前块的位移矢量,表示参考块与当前块之间的相对位置。一个当前块有一个位移矢量。1) Intra block copying means intraframe block matching or intraframe motion compensation or block matching or block copying. The basic operation of block copy coding or decoding is to copy a current code block or a current decoding block (referred to as the current block) from the reconstructed reference pixel sample set by the same size as the current block (the same number of pixel samples). The reference block is referenced and the value of the reference block is assigned to the current block. The copy parameter of the block copy mode includes the displacement vector of the current block, indicating the relative position between the reference block and the current block. A current block has a displacement vector.
2)帧内微块复制即帧内微块匹配或称微块匹配或称微块复制。在微块复制中,把一个当前块(如8×8像素样值)分成几个微块(如4×2像素样值的微块或8×2像素样值的微块或2×4像素样值的微块或2×8像素样值的微块),微块复制编码或解码的基本运算是对当前块中的每一个编码微块或 解码微块(简称为当前微块),从重构参考像素样值集内复制一个参考微块,并将所述参考微块的数值赋值予当前微块。微块复制方式的复制参数包括当前微块的位移矢量,表示参考微块与当前微块之间的相对位置。一个当前微块有一个位移矢量。一个当前块分成多少个微块就有多少个位移矢量。2) Intra-frame micro-block copying means intra-frame micro-block matching or micro-block matching or micro-block copying. In microblock copying, a current block (such as 8 × 8 pixel samples) is divided into several microblocks (such as microblocks of 4 × 2 pixel samples or microblocks of 8 × 2 pixel samples or 2 × 4 pixels) The microblock of the sample or the microblock of the 2×8 pixel sample), the basic operation of the microblock copy encoding or decoding is to encode each microblock in the current block or Decoding the microblock (referred to as the current microblock), copying a reference microblock from the reconstructed reference pixel sample set, and assigning the value of the reference microblock to the current microblock. The copy parameter of the microblock copy mode includes a displacement vector of the current microblock, indicating a relative position between the reference microblock and the current microblock. A current microblock has a displacement vector. How many displacement vectors are there in how many microblocks a current block is divided into.
3)帧内线条(简称条)复制即帧内条匹配或称条匹配或称条复制。条是高度为1或宽度为1的微块,如4×1或8×1或1×4或1×8像素样值的微块。条复制编码或解码的基本运算是对当前块中的每一个编码条或解码条(简称为当前条),从重构参考像素样值集内复制一个参考条,并将所述参考条的数值赋值予当前条。显然,条复制是微块复制的一种特殊情况。条复制方式的复制参数包括当前条的位移矢量,表示参考条与当前条之间的相对位置。一个当前条有一个位移矢量。一个当前块分成多少个条就有多少个位移矢量。3) Intra-frame lines (referred to as strips) are copied, that is, intra-frame matching or strip matching or strip copying. A strip is a microblock having a height of 1 or a width of 1, such as a microblock of 4x1 or 8x1 or 1x4 or 1x8 pixel samples. The basic operation of the strip copy encoding or decoding is to copy each reference strip or decoded strip (referred to as the current strip) in the current block from the reconstructed reference pixel sample set, and the value of the reference strip Assign to the current bar. Obviously, strip copying is a special case of microblock copying. The copy parameter of the strip copy mode includes the displacement vector of the current strip, indicating the relative position between the reference strip and the current strip. A current bar has a displacement vector. How many displacement vectors are there in how many bars a current block is divided into.
4)帧内串复制即帧内串匹配或称串匹配或称串复制或称像素串复制。在像素串复制中,把一个当前编码块或一个当前解码块(简称为当前块)分成几个长度可变的像素样值串。这里的串是指把一个任意形状的二维区域内的像素样值排列成一个长度远大于宽度的串(如宽度为1个像素样值而长度为37个像素样值的串或宽度为2个像素样值而长度为111个像素样值的串,通常但不限于长度是一个独立编码或解码参数而宽度是一个预定的或由其他编码或解码参数导出的参数)。串复制编码或解码的基本运算是对当前块中的每一个编码串或解码串(简称为当前串),从重构参考像素样值集内复制一个参考串,并将所述参考串的数值赋值予当前串。串复制方式的复制参数包括当前串的位移矢量和复制长度即复制大小,分别表示参考串与当前串之间的相对位置和当前串的长度即像素样值的数目。当前串的长度也是参考串的长度。一个当前串有一个位移矢量和一个复制长度。一个当前块分成多少个串就有多少个位移矢量和多少个复制长度。位移矢 量也称为复制位置,其表现形式有:2维坐标、线性地址、距离、指针、索引、编号、模式号等。4) Intra-frame string replication means intra-frame string matching or string matching or string copying or pixel string copying. In pixel string copying, a current coded block or a current decoded block (referred to as the current block) is divided into several variable-length pixel sample strings. The string here refers to arranging the pixel samples in a two-dimensional area of an arbitrary shape into a string whose length is much larger than the width (for example, a string having a width of 1 pixel sample and a length of 37 pixel samples or a width of 2) A string of pixel samples of length 111 pixels, typically but not limited to a length that is an independent encoding or decoding parameter and a width that is a predetermined or derived parameter from other encoding or decoding parameters). The basic operation of string copy encoding or decoding is to copy each reference string from the reconstructed reference pixel sample set to each encoded string or decoded string (referred to as the current string) in the current block, and the value of the reference string Assign to the current string. The copy parameters of the string copy mode include the displacement vector and the copy length of the current string, that is, the copy size, which respectively represent the relative position between the reference string and the current string and the length of the current string, that is, the number of pixel samples. The length of the current string is also the length of the reference string. A current string has a displacement vector and a copy length. How many displacement vectors and how many copy lengths a current block is divided into. Displacement vector The quantity is also called the copy position, and its representation forms are: 2D coordinates, linear address, distance, pointer, index, number, mode number, and so on.
5)调色板索引串复制即调色板或称索引串复制。在调色板编码和对应的解码方式中,首先构造或获取一个调色板,然后将当前编码块或当前解码块(简称为当前块)的部分或全部像素用调色板中的调色板颜色的索引来表现,再对索引进行编码和解码,包括但不限于:把一个当前块的索引分成几个长度可变的索引串,即进行索引串复制编码和解码。索引串复制编码或解码的基本运算是对当前块中的每一个索引编码串或索引解码串(简称为当前索引串),从索引化的重构参考像素样值集内复制一个参考索引串,并将所述参考索引串的索引数值赋值予当前索引串。索引串复制方式的复制参数包括当前索引串的位移矢量和复制长度即复制大小,分别表示参考索引串与当前索引串之间的相对位置和当前索引串的长度即对应的像素样值的数目。当前索引串的长度也是参考索引串的长度。一个当前索引串有一个位移矢量和一个复制长度。一个当前块分成多少个索引串就有多少个位移矢量和多少个复制长度。位移矢量也称为复制位置,其表现形式有:2维坐标、线性地址、距离、指针、索引、编号、模式号等。在调色板索引串复制方式中,复制的参考像素取自调色板。所以,索引串也称为调色板颜色串或调色板像素串或调色板串,索引串复制方式也称为调色板复制方式或调色板方式。在调色板方式中,串也称为游程或行程。因此,索引串也称为索引游程或索引行程或简称为游程或行程。当前块的调色板颜色来源于当前块的像素颜色和/或调色板颜色候选集,而调色板颜色候选集由已完成编解码的编解码块的调色板颜色的一部分累积组成。5) Palette index string copy is a palette or index string copy. In the palette encoding and the corresponding decoding method, first construct or acquire a palette, and then use some or all of the pixels of the current encoding block or the current decoding block (referred to as the current block) with the palette in the palette. The index of the color is expressed, and then the index is encoded and decoded, including but not limited to: dividing the index of a current block into several index strings of variable length, that is, performing index string copy encoding and decoding. The basic operation of the index string copy encoding or decoding is to copy each reference index string or index decoding string (referred to as the current index string) in the current block, and copy a reference index string from the indexed reconstructed reference pixel sample set. And assigning an index value of the reference index string to the current index string. The copy parameter of the index string copy mode includes the displacement vector and the copy length of the current index string, that is, the copy size, respectively indicating the relative position between the reference index string and the current index string and the length of the current index string, that is, the number of corresponding pixel samples. The length of the current index string is also the length of the reference index string. A current index string has a displacement vector and a copy length. How many displacement vectors and how many copy lengths a current index is divided into. The displacement vector is also called the copy position, and its representation forms are: 2D coordinates, linear address, distance, pointer, index, number, mode number, and so on. In the palette index string copy mode, the copied reference pixels are taken from the palette. Therefore, the index string is also called a palette color string or a palette pixel string or a palette string, and the index string copy mode is also called a palette copy mode or a palette mode. In the palette mode, strings are also called runs or strokes. Therefore, the index string is also called an index run or index run or simply a run or trip. The palette color of the current block is derived from the pixel color and/or palette color candidate set of the current block, and the palette color candidate set is composed of a portion of the palette color of the codec block that has completed the codec.
6)索引串复制与像素串复制混合的融合复制方式,简称索引-像素串融合复制方式,也称调色板-像素串融合复制方式或融合像素串复制的调色板方式或融合调色板的像素串复制方式或调色板与像素串复制方式。对一个 当前编码块或当前解码块(简称为当前块)进行编码或解码时,部分或全部像素采用像素串复制方式,部分或全部像素采用索引串复制方式即参考像素取自调色板的调色板方式。6) Fusion copy mode of index string copy and pixel string copy, referred to as index-pixel string fusion copy mode, also called palette-pixel string fusion copy mode or merged pixel string copy palette mode or fusion palette Pixel string copy mode or palette with pixel string copy mode. For one When the current coding block or the current decoding block (referred to as the current block) is encoded or decoded, part or all of the pixels adopt the pixel string copy mode, and some or all of the pixels adopt the index string copy mode, that is, the reference pixels are taken from the palette of the palette. the way.
7)结合多种调色板与像素串复制方式的多重调色板与像素串复制方式。采用至少两种不同的调色板与像素串复制方式进行编码和解码。不同的调色板与像素串复制方式采用不同的融合方案来融合调色板复制与像素串复制。在一帧图像中,部分编解码块采用融合方案I的调色板与像素串复制方式,部分编解码块采用融合方案II的调色板与像素串复制方式,部分编解码块采用融合方案III的调色板与像素串复制方式,等等。不同的融合方案主要在下列方面可能有所不同:1)串的种类的数目,2)参数的取值范围,3)一个或若干复制参数的取值范围,4)复制位置即位移矢量的取值范围,5)当前索引或当前像素的位置,6)当前样值段的位置,7)参考索引或参考像素的位置,8)参考样值段的位置;9)复制形状。7) Multiple palettes and pixel string copying methods combining multiple palettes and pixel string copying methods. Encoding and decoding are performed using at least two different color palettes and pixel string copying methods. Different color palettes and pixel string copying methods use different fusion schemes to fuse palette copying and pixel string copying. In one frame of image, part of the codec block adopts the palette and pixel string copy mode of the fusion scheme I, and part of the codec block adopts the palette and pixel string copy mode of the fusion scheme II, and some codec blocks adopt the fusion scheme III. The palette is copied with pixel strings, and so on. Different fusion schemes may differ in the following aspects: 1) the number of types of strings, 2) the range of values of parameters, 3) the range of values of one or several replicated parameters, and 4) the location of the displacement vector Range of values, 5) current index or current pixel position, 6) position of the current sample segment, 7) position of the reference index or reference pixel, 8) position of the reference sample segment; 9) copy shape.
其他的复制方式还包括矩形复制方式、以及若干种复制方式混合的复制方式等。Other methods of copying include rectangular copying, and a variety of copying methods.
块复制方式中的块,微块复制方式中的微块,条复制方式中的条,串复制方式中的串,矩形复制方式中的矩形,调色板索引方式中的像素索引串,统称为像素样值段,简称样值段。样值段的基本组成元素是像素或像素分量或像素索引。一个样值段有一个复制参数,用来表示当前像素样值段与参考像素样值段之间的关系。因此,一个样值段是具有同样复制关系的一次复制操作的最小单位。一个复制参数包括若干复制参数分量,复制参数分量至少包括:位移矢量水平分量、位移矢量垂直分量、1维位移矢量、线性地址、相对线性地址、索引、调色板线性地址、相对索引、调色板相对线性地址、复制长度、复制宽度、复制高度、矩形宽度、矩形长度、未匹配像素(又称无参考像素,即不是从其他地方复制过来的非复制像素)。 The block in the block copy mode, the micro block in the micro block copy mode, the bar in the strip copy mode, the string in the string copy mode, the rectangle in the rectangular copy mode, and the pixel index string in the palette index mode are collectively referred to as A pixel sample segment, referred to as a sample segment. The basic constituent elements of a sample segment are pixel or pixel components or pixel indices. A sample segment has a copy parameter that represents the relationship between the current pixel sample segment and the reference pixel sample segment. Therefore, a sample segment is the smallest unit of a copy operation with the same replication relationship. A copy parameter includes a plurality of copy parameter components, and the copy parameter components include at least: displacement vector horizontal component, displacement vector vertical component, 1 dimensional displacement vector, linear address, relative linear address, index, palette linear address, relative index, toning Board relative linear address, copy length, copy width, copy height, rectangle width, rectangle length, unmatched pixels (also known as no reference pixels, ie non-replicated pixels that are not copied from elsewhere).
在各种复制方式中,像素样值或索引需要按照一定顺序排列。排列方式也称为扫描方式。扫描方式根据其路径形状,可分为下列几种:In various ways of copying, pixel samples or indexes need to be arranged in a certain order. The arrangement is also called the scanning method. The scanning method can be divided into the following types according to its path shape:
A)水平Z形扫描方式又称水平光栅扫描方式。一个编码块或解码块(统称为编解码块)的像素样值或索引,一行一行排列,在所有的行内都按照同一方向(全部从左向右或者全部从右向左)排列。行与行之间可以从上向下排列,也可以从下向上排列。A) Horizontal Z-scan mode is also called horizontal raster scan mode. A pixel sample or index of a coded block or a decoded block (collectively referred to as a codec block) is arranged line by line and arranged in the same direction (all left to right or all right to left) in all rows. Rows and rows can be arranged from top to bottom or from bottom to top.
B)垂直Z形扫描方式又称垂直光栅扫描方式。一个编码块或解码块(统称为编解码块)的像素样值或索引,一列一列排列,在所有的列内都按照同一方向(全部从上向下或者全部从下向上)排列。列与列之间可以从左向右排列,也可以从右向左排列。B) Vertical Z-scan mode is also called vertical raster scan mode. A pixel sample or index of a coded block or a decoded block (collectively referred to as a codec block) is arranged in columns and columns, and is arranged in the same direction (all from top to bottom or all from bottom to top) in all columns. Columns and columns can be arranged from left to right or from right to left.
C)水平弓形扫描方式。一个编码块或解码块(统称为编解码块)的像素样值或索引,一行一行排列,在奇数行内按照一个方向(如:从左向右)排列而在偶数行内按照另一个(相反)方向(如:从右向左)排列。行与行之间可以从上向下排列,也可以从下向上排列。C) Horizontal bow scan mode. A pixel sample or index of a coded block or a decoded block (collectively referred to as a codec block), arranged line by line, arranged in one direction (eg, from left to right) in an odd line and in another (opposite) direction in an even line (eg, from right to left). Rows and rows can be arranged from top to bottom or from bottom to top.
D)垂直弓形扫描方式。一个编码块或解码块(统称为编解码块)的像素样值或索引,一列一列排列,在奇数列内按照一个方向(如:从上向下)排列而在偶数列内按照另一个(相反)方向(如:从下向上)排列。列与列之间可以从左向右排列,也可以从右向左排列。D) Vertical bow scanning method. A pixel sample or index of a coded block or a decoded block (collectively referred to as a codec block), arranged in columns and columns, arranged in one direction (eg, from top to bottom) in an odd column and in another in an even column (opposite ) Directions (eg, from bottom to top). Columns and columns can be arranged from left to right or from right to left.
串复制(索引串复制或像素串复制或索引串-像素串融合复制)方式中,基本复制形状有下列2种:In the string copy (index string copy or pixel string copy or index string-pixel string merge copy) mode, the basic copy shape has the following two types:
I)一维线性复制形状。当前串和参考串都是在各个编解码块内按照预定的扫描方式的顺序排列形成的一维样值串,具有相等的长度,但这两个串各自形成的二维区域不一定有相同的二维形状。I) One-dimensional linear replication shape. The current string and the reference string are each a one-dimensional sample string formed in the order of a predetermined scanning manner in each codec block, and have equal lengths, but the two-dimensional regions formed by the two strings are not necessarily the same. Two-dimensional shape.
II)二维保形复制形状。当前串在当前编解码块内按照预定的扫描方式的顺序排列。参考串与当前串保持完全相同的二维形状,具有相等的长度。 II) Two-dimensional conformal copy shape. The current strings are arranged in the order of the predetermined scanning mode within the current codec block. The reference string remains exactly the same two-dimensional shape as the current string, with equal length.
以上每种基本复制形状又可根据具体的扫描方式细分为多种复制形状,如垂直弓形一维线性复制形状、水平Z形二维保形复制形状等。Each of the above basic replicated shapes can be subdivided into a plurality of replicated shapes according to a specific scanning manner, such as a vertical arcuate one-dimensional linear replica shape, a horizontal Z-shaped two-dimensional conformal replica shape, and the like.
需要说明的是,“复制”是重构和解码的操作,对应的编码操作是“匹配”。因此,各种复制方式如块匹配方式、微块复制方式、线条复制方式、像素串复制方式、索引串复制方式等也称为块匹配方式、微块匹配方式、线条匹配方式、像素串匹配方式、索引串匹配方式等。It should be noted that “copying” is an operation of reconstruction and decoding, and the corresponding encoding operation is “matching”. Therefore, various copying methods such as block matching mode, microblock copying mode, line copying mode, pixel string copying mode, and index string copying mode are also called block matching mode, microblock matching mode, line matching mode, and pixel string matching mode. , index string matching method, and so on.
各种复制方式中,压缩效果最好的是多重调色板与像素串复制方式。但是在多重调色板与像素串复制方式中,各调色板与像素串复制方式有各自独立的调色板颜色候选集,如果一个编解码块没有采用一种调色板与像素串复制方式,该调色板与像素串复制方式对应的调色板颜色候选集就得不到更新,没有新的更合适的调色板颜色补充到对应的调色板颜色候选集。这种做法在很大程度上降低了多重调色板与像素串复制方式的压缩效率。Among the various copying methods, the best compression effect is the multi-palette and pixel string copying method. However, in the multi-palette and pixel string copy mode, each palette and pixel string copy mode has separate palette color candidate sets, if one codec block does not adopt a palette and pixel string copy mode. The palette color candidate set corresponding to the pixel string copy mode is not updated, and no new more suitable palette color is added to the corresponding palette color candidate set. This approach greatly reduces the compression efficiency of multiple palettes and pixel string replication.
基于此,本发明实施例提供了一种图像编码及解码方法、图像处理设备。在对一个编解码块进行编解码时,不管采用了哪种调色板与像素串复制方式,部分或全部新的调色板颜色被放入共享的调色板颜色候选集。在对后续的编解码块进行编解码时,各种调色板与像素串复制方式从当前编解码块的像素和/或所述共享的调色板颜色候选集中产生各自的调色板。调色板颜色候选集也称为调色板预测器或调色板预测集。Based on this, an embodiment of the present invention provides an image encoding and decoding method and an image processing device. When encoding and decoding a codec block, some or all of the new palette color is placed in the shared palette color candidate set regardless of which palette and pixel string copying method is employed. When encoding and decoding subsequent codec blocks, various palette and pixel string copy modes generate respective palettes from the pixels of the current codec block and/or the shared palette color candidate set. The palette color candidate set is also known as the palette predictor or palette prediction set.
本发明实施例中,所述调色板颜色候选集的最大空间即可容纳的调色板颜色的最大数目是预定的常数。本发明实施例中,所述调色板颜色候选集根据预定的规则进行更新。本发明实施例中,所述调色板颜色候选集根据预定的规则删除已有的调色板颜色。本发明实施例中,所述调色板颜色候选集根据预定的规则调整调色板颜色的位置即改变其地址或指针。本发明实施例中,所述调色板颜色候选集根据预定的规则添加新的调色板颜色。本发明实施例中,所述调色板颜色候选集根据先入先出的规则添加新的调 色板颜色和/或删除已有的调色板颜色。本发明实施例中,可选择地,所述多种调色板与像素串复制方式之一是单纯的调色板复制方式。本发明实施例中,任意编解码块,只要使用调色板与像素串复制方式之一进行编解码,将该编解码块的新产生的调色板颜色的部分或全部添加进入共享调色板颜色候选集。In the embodiment of the present invention, the maximum number of palette colors that can be accommodated in the maximum space of the palette color candidate set is a predetermined constant. In the embodiment of the present invention, the palette color candidate set is updated according to a predetermined rule. In the embodiment of the present invention, the palette color candidate set deletes an existing palette color according to a predetermined rule. In the embodiment of the present invention, the palette color candidate set adjusts the position of the palette color according to a predetermined rule, that is, changes its address or pointer. In an embodiment of the invention, the palette color candidate set adds a new palette color according to a predetermined rule. In the embodiment of the present invention, the palette color candidate set adds a new tone according to a first-in, first-out rule. Swatch color and / or delete existing palette colors. In the embodiment of the present invention, optionally, one of the plurality of palette and pixel string copying modes is a simple palette copying mode. In the embodiment of the present invention, any codec block is encoded and decoded by using one of a palette and a pixel string copy mode, and part or all of the newly generated palette color of the codec block is added to the shared palette. Color candidate set.
图1为本发明实施例的图像编码方法的流程示意图一,本发明实施例中,在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,从当前编码块的像素产生新的调色板颜色,从所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集产生当前编码块的调色板,使用所述调色板进行调色板与像素串复制编码并产生至少含复制方式、复制参数的视频码流;如图1所示,所述图像编码方法包括以下步骤:FIG. 1 is a schematic flowchart 1 of an image encoding method according to an embodiment of the present invention. In the embodiment of the present invention, when copying and encoding a current encoding block by using one of a palette and a pixel string copy encoding method, a pixel from a current encoding block is used. Generating a new palette color, generating a palette of current coded blocks from the palette color candidate set shared by the new palette color and/or palette and pixel string copy encoding, using the tone The swatch performs palette and pixel string copy coding and generates a video code stream containing at least a copy mode and a copy parameter; as shown in FIG. 1, the image coding method includes the following steps:
步骤101:在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色。Step 101: When copying and encoding the current coding block by using one of a color palette and a pixel string copy coding mode, a new color palette color is generated according to the pixel of the current coding block.
步骤102:依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板。Step 102: Generate a palette of the current coded block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy coding mode.
步骤103:使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。Step 103: Perform palette and pixel string copy coding using the palette of the current coding block, and generate a video code stream including a copy mode and a copy parameter.
本发明实施例的上述方案中,所述编码块是图像的编码区域,所述编码块包括以下至少一种:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。In the foregoing solution of the embodiment of the present invention, the coding block is an coding region of an image, and the coding block includes at least one of: a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-region of a CU, and a prediction unit. PU, transform unit TU.
本发明实施例的上述方案中,所述视频码流还包括所述新的调色板颜色。In the above solution of the embodiment of the present invention, the video code stream further includes the new palette color.
本发明实施例的上述方案中,可选择地,所述调色板与像素串复制方式具有各自的调色板。 In the above solution of the embodiment of the present invention, optionally, the color palette and the pixel string copying manner have respective palettes.
本发明实施例的上述方案中,所述调色板颜色候选集的最大空间能够容纳的调色板颜色的最大数目为预定常数。In the above solution of the embodiment of the present invention, the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
本发明实施例的上述方案中,所述调色板颜色候选集根据预定规则进行以下一种或多种操作:In the above solution of the embodiment of the present invention, the palette color candidate set performs one or more of the following operations according to a predetermined rule:
更新、调色板颜色的删除、调色板颜色的位置的调整、调色板颜色的添加。Update, palette color deletion, palette color position adjustment, palette color addition.
在一实施方式中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。In an embodiment, the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule.
本发明实施例的上述方案中,可选择地,所述多种调色板与像素串复制方式之一为单纯的调色板复制方式。In the above solution of the embodiment of the present invention, optionally, one of the plurality of palette and pixel string copying modes is a simple palette copying mode.
本发明实施例的上述方案中,对于使用所述调色板与像素串复制方式之一进行编码的编码块,将所述编码块的所述新的调色板颜色的部分或全部添加进入共享调色板颜色候选集。In the above solution of the embodiment of the present invention, part or all of the new palette color of the coding block is added to the sharing for the coding block coded by using one of the palette and the pixel string copy mode. Palette color candidate set.
图2为本发明实施例的图像解码方法的流程示意图一,本发明实施例中,解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和可选的新的调色板颜色,从所述新的调色板颜色和/或调色板与像素串复制解码方式所共享的调色板颜色候选集,产生对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板;如图2所示,所述图像解码方法包括以下步骤:FIG. 2 is a schematic flowchart 1 of an image decoding method according to an embodiment of the present invention. In the embodiment of the present invention, a video code stream is parsed, and at least one of the following information is obtained: a copy mode, a copy parameter, and a copying manner of a palette and a pixel string copy and decoding. Selecting a new palette color, from the new palette color and/or palette to the palette color copy set shared by the pixel string copy decoding mode, generating the copy mode for the current decoded block The palette used for the palette and pixel string copy decoding; as shown in FIG. 2, the image decoding method includes the following steps:
步骤201:解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色。Step 201: Parse the video code stream, and obtain at least one of the following information: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color.
步骤202:依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板。Step 202: Generate a palette and a pixel string using the copy mode for the current decoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy decoding mode. Copy the palette used for decoding.
步骤203:使用所述当前解码块的调色板进行调色板与像素串复制解 码。Step 203: Perform a palette and pixel string copy solution using the palette of the current decoded block. code.
本发明实施例的上述方案中,所述解码块是图像的解码区域,所述解码块包括以下至少一种:LCU、CTU、CU、CU的子区域、PU、TU。In the above solution of the embodiment of the present invention, the decoding block is a decoding area of an image, and the decoding block includes at least one of the following: an LCU, a CTU, a CU, a sub-area of the CU, a PU, and a TU.
本发明实施例的上述方案中,可选择地,所述调色板与像素串复制方式具有各自的调色板。In the above solution of the embodiment of the present invention, optionally, the color palette and the pixel string copying manner have respective palettes.
本发明实施例的上述方案中,所述调色板颜色候选集的最大空间能够容纳的调色板颜色的最大数目为预定常数。In the above solution of the embodiment of the present invention, the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
本发明实施例的上述方案中,所述调色板颜色候选集根据预定规则进行以下一种或多种操作:In the above solution of the embodiment of the present invention, the palette color candidate set performs one or more of the following operations according to a predetermined rule:
更新、调色板颜色的删除、调色板颜色的位置的调整、调色板颜色的添加。Update, palette color deletion, palette color position adjustment, palette color addition.
在一实施方式中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。In an embodiment, the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule.
本发明实施例的上述方案中,可选择地,所述多种调色板与像素串复制方式之一为单纯的调色板复制方式。In the above solution of the embodiment of the present invention, optionally, one of the plurality of palette and pixel string copying modes is a simple palette copying mode.
本发明实施例的上述方案中,对于使用所述调色板与像素串复制方式之一进行解码的解码块,将所述解码块的所述新的调色板颜色的部分或全部添加进入共享调色板颜色候选集。In the above solution of the embodiment of the present invention, part or all of the new palette color of the decoding block is added to the shared decoding block for decoding using one of the palette and the pixel string copying mode. Palette color candidate set.
本发明实施例的技术方案适用于叠包格式图像的编码和解码。本发明实施例的技术方案也同样适用于分量平面格式图像的编码和解码。The technical solution of the embodiment of the present invention is applicable to encoding and decoding of a stacked format image. The technical solution of the embodiment of the present invention is also applicable to encoding and decoding of component plane format images.
图3为本发明实施例的图像编码方法的流程示意图二,如图3所示,所述流程中:FIG. 3 is a second schematic flowchart of an image encoding method according to an embodiment of the present invention. As shown in FIG. 3, in the process:
在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,从当前编码块的像素产生新的调色板颜色,从所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集产生当前编码块 的调色板,使用所述调色板进行调色板与像素串复制编码并产生至少含复制方式、复制参数的视频码流。在一实施方式中,所述视频码流含新的调色板颜色。在一实施方式中,可选择地,调色板与像素串复制编码方式有独自的调色板。在一实施方式中,所述调色板颜色候选集的最大空间即可容纳的调色板颜色的最大数目是预定的常数。在一实施方式中,所述调色板颜色候选集根据预定的规则进行更新。在一实施方式中,所述调色板颜色候选集根据预定的规则删除已有的调色板颜色。在一实施方式中,所述调色板颜色候选集根据预定的规则调整调色板颜色的位置即改变其地址或指针。在一实施方式中,所述调色板颜色候选集根据预定的规则添加新的调色板颜色。在一实施方式中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。在一实施方式中,可选择地,所述多种调色板与像素串复制编码方式之一是单纯的调色板复制编码方式。在一实施方式中,任意一个编码块,只要使用调色板与像素串复制编码方式之一进行编码,将该编码块的新产生的调色板颜色的部分或全部就添加进入共享调色板颜色候选集。When copying and encoding the current coded block using one of the palette and the pixel string copy coding method, a new palette color is generated from the pixels of the current coded block, from the new palette color and/or color The palette color candidate set shared by the board and the pixel string copy coding method generates the current coding block a palette that uses the palette to perform palette and pixel string copy encoding and to generate a video stream containing at least copy mode, copy parameters. In an embodiment, the video stream contains a new palette color. In an embodiment, optionally, the palette and pixel string copy encoding methods have separate palettes. In an embodiment, the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant. In an embodiment, the palette color candidate set is updated according to a predetermined rule. In an embodiment, the palette color candidate set deletes an existing palette color according to a predetermined rule. In an embodiment, the palette color candidate set adjusts the position of the palette color according to a predetermined rule, ie, changes its address or pointer. In an embodiment, the palette color candidate set adds a new palette color according to a predetermined rule. In an embodiment, the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule. In an embodiment, optionally, one of the plurality of palette and pixel string copy coding modes is a simple palette copy coding mode. In an embodiment, any one of the coding blocks is encoded by using one of a palette and a pixel string copy coding method, and part or all of the newly generated palette color of the coding block is added to the shared palette. Color candidate set.
图4为本发明实施例的图像解码方法的流程示意图二,如图4所示,所述流程中:4 is a schematic flowchart 2 of an image decoding method according to an embodiment of the present invention. As shown in FIG. 4, in the process:
解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和可选的新的调色板颜色,从所述新的调色板颜色和/或调色板与像素串复制解码方式所共享的调色板颜色候选集,产生对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板。在一实施方式中,所述视频码流含新的调色板颜色。在一实施方式中,可选择地,调色板与像素串复制解码方式有独自的调色板。在一实施方式中,所述调色板颜色候选集的最大空间即可容纳的调色板颜色的最大数目是预定的常数。在一实施方式中,所述调色板颜色候选集根据预定的规则进行 更新。在一实施方式中,所述调色板颜色候选集根据预定的规则删除已有的调色板颜色。在一实施方式中,所述调色板颜色候选集根据预定的规则调整调色板颜色的位置即改变其地址或指针。在一实施方式中,所述调色板颜色候选集根据预定的规则添加新的调色板颜色。在一实施方式中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。在一实施方式中,可选择地,所述多种调色板与像素串复制解码方式之一是单纯的调色板复制解码方式。在一实施方式中,任意解码块,只要使用调色板与像素串复制解码方式之一进行解码,将该解码块的新产生的调色板颜色的部分或全部添加进入共享调色板颜色候选集。Parsing the video stream to obtain at least one of the following: a copy mode of the palette and pixel string copy decoding, a copy parameter, and an optional new palette color, from the new palette color and/or tone The palette color candidate set shared by the swatch and the pixel string copy decoding mode generates a palette used for the current decoded block to perform palette and pixel string copy decoding using the copy mode. In an embodiment, the video stream contains a new palette color. In an embodiment, optionally, the palette and pixel string copy decoding modes have separate palettes. In an embodiment, the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant. In an embodiment, the palette color candidate set is performed according to a predetermined rule. Update. In an embodiment, the palette color candidate set deletes an existing palette color according to a predetermined rule. In an embodiment, the palette color candidate set adjusts the position of the palette color according to a predetermined rule, ie, changes its address or pointer. In an embodiment, the palette color candidate set adds a new palette color according to a predetermined rule. In an embodiment, the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule. In an embodiment, optionally, one of the plurality of palette and pixel string copy decoding modes is a simple palette copy decoding mode. In an embodiment, the arbitrary decoding block is added to the shared palette color candidate by using one of the palette and the pixel string copy decoding mode, and adding part or all of the newly generated palette color of the decoded block. set.
图5为本发明实施例的图像处理设备的结构组成示意图一,所述图像处理设备能够对图像进行编码,如图5所示,所述图像处理设备包括:FIG. 5 is a first schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. The image processing apparatus can encode an image. As shown in FIG. 5, the image processing apparatus includes:
第一生成单元51,配置为在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色;The first generating unit 51 is configured to generate a new palette color according to the pixel of the current encoding block when copying and encoding the current encoding block by using one of a palette and a pixel string copy encoding method;
第二生成单元52,配置为依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板;a second generating unit 52, configured to generate a palette of the current encoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy encoding manner;
编码单元53,配置为使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。The encoding unit 53 is configured to perform palette and pixel string copy encoding using the palette of the current encoding block, and generate a video code stream including a copy mode and a copy parameter.
在一实施方式中,所述视频码流含新的调色板颜色。在一实施方式中,可选择地,调色板与像素串复制编码方式有独自的调色板。在一实施方式中,所述调色板颜色候选集的最大空间即可容纳的调色板颜色的最大数目是预定的常数。在一实施方式中,所述调色板颜色候选集根据预定的规则进行更新。在一实施方式中,所述调色板颜色候选集根据预定的规则删除已有的调色板颜色。在一实施方式中,所述调色板颜色候选集根据预定的规则调整调色板颜色的位置即改变其地址或指针。在一实施方式中,所述 调色板颜色候选集根据预定的规则添加新的调色板颜色。在一实施方式中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。在一实施方式中,可选择地,所述多种调色板与像素串复制编码方式之一是单纯的调色板复制编码方式。在一实施方式中,任意编码块,只要使用调色板与像素串复制编码方式中的任何一种进行编码,将该编码块的新产生的调色板颜色的部分或全部添加进入共享调色板颜色候选集。In an embodiment, the video stream contains a new palette color. In an embodiment, optionally, the palette and pixel string copy encoding methods have separate palettes. In an embodiment, the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant. In an embodiment, the palette color candidate set is updated according to a predetermined rule. In an embodiment, the palette color candidate set deletes an existing palette color according to a predetermined rule. In an embodiment, the palette color candidate set adjusts the position of the palette color according to a predetermined rule, ie, changes its address or pointer. In an embodiment, the The palette color candidate set adds a new palette color according to a predetermined rule. In an embodiment, the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule. In an embodiment, optionally, one of the plurality of palette and pixel string copy coding modes is a simple palette copy coding mode. In an embodiment, any coding block is encoded by using any one of a palette and a pixel string copy coding method, and part or all of the newly generated palette color of the coding block is added to the shared color. Board color candidate set.
本领域技术人员应当理解,图5所示的图像处理设备中的各单元的实现功能可参照前述图像编码方法的相关描述而理解。图5所示的图像处理设备中的各单元的功能可通过运行于处理器上的程序而实现,也可通过具体的逻辑电路而实现。It will be understood by those skilled in the art that the implementation functions of the units in the image processing apparatus shown in FIG. 5 can be understood by referring to the related description of the foregoing image encoding method. The functions of the units in the image processing apparatus shown in FIG. 5 can be realized by a program running on a processor, or can be realized by a specific logic circuit.
在实际应用中,所述图像处理设备中的各个单元所实现的功能,均可由位于图像处理设备中的中央处理器(Central Processing Unit,CPU)、或微处理器(Micro Processor Unit,MPU)、或数字信号处理器(Digital Signal Processor,DSP)、或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。In practical applications, the functions implemented by each unit in the image processing device may be implemented by a central processing unit (CPU) or a microprocessor (Micro Processor Unit, MPU) located in the image processing device. Or a digital signal processor (DSP), or a Field Programmable Gate Array (FPGA).
图6为本发明实施例的图像处理设备的结构组成示意图二,所述图像处理设备能够对图像进行解码,如图6所示,所述图像处理设备包括:FIG. 6 is a second schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. The image processing apparatus can decode an image. As shown in FIG. 6, the image processing apparatus includes:
解析单元61,配置为解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色;The parsing unit 61 is configured to parse the video code stream, and obtain at least one of the following information: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
第三生成单元62,配置为依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板;The third generating unit 62 is configured to generate, according to the new palette color and/or the palette color candidate set shared by the palette and the pixel string copy decoding mode, to generate the current decoding block by using the copy mode. The palette used by the swatch and the pixel string to decode and decode;
解码单元63,配置为使用所述当前解码块的调色板进行调色板与像素串复制解码。 The decoding unit 63 is configured to perform palette and pixel string copy decoding using the palette of the current decoded block.
在一实施方式中,所述视频码流含新的调色板颜色。在一实施方式中,可选择地,调色板与像素串复制解码方式有独自的调色板。在一实施方式中,所述调色板颜色候选集的最大空间即可容纳的调色板颜色的最大数目是预定的常数。在一实施方式中,所述调色板颜色候选集根据预定的规则进行更新。在一实施方式中,所述调色板颜色候选集根据预定的规则删除已有的调色板颜色。在一实施方式中,所述调色板颜色候选集根据预定的规则调整调色板颜色的位置即改变其地址或指针。在一实施方式中,所述调色板颜色候选集根据预定的规则添加新的调色板颜色。在一实施方式中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。在一实施方式中,可选择地,所述调色板与像素串复制解码方式之一是单纯的调色板复制解码方式。在一实施方式中,任意解码块,只要使用调色板与像素串复制解码方式之一进行解码,将该解码块的新产生的调色板颜色的部分或全部添加进入共享调色板颜色候选集。In an embodiment, the video stream contains a new palette color. In an embodiment, optionally, the palette and pixel string copy decoding modes have separate palettes. In an embodiment, the maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant. In an embodiment, the palette color candidate set is updated according to a predetermined rule. In an embodiment, the palette color candidate set deletes an existing palette color according to a predetermined rule. In an embodiment, the palette color candidate set adjusts the position of the palette color according to a predetermined rule, ie, changes its address or pointer. In an embodiment, the palette color candidate set adds a new palette color according to a predetermined rule. In an embodiment, the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first in first out rule. In an embodiment, one of the palette and pixel string copy decoding modes is a simple palette copy decoding mode. In an embodiment, the arbitrary decoding block is added to the shared palette color candidate by using one of the palette and the pixel string copy decoding mode, and adding part or all of the newly generated palette color of the decoded block. set.
本领域技术人员应当理解,图6所示的图像处理设备中的各单元的实现功能可参照前述图像解码方法的相关描述而理解。图6所示的图像处理设备中的各单元的功能可通过运行于处理器上的程序而实现,也可通过具体的逻辑电路而实现。It will be understood by those skilled in the art that the implementation functions of the units in the image processing apparatus shown in FIG. 6 can be understood with reference to the related description of the aforementioned image decoding method. The functions of the units in the image processing apparatus shown in FIG. 6 can be realized by a program running on a processor, or can be realized by a specific logic circuit.
在实际应用中,所述图像处理设备中的各个单元所实现的功能,均可由位于图像处理设备中的中央处理器(Central Processing Unit,CPU)、或微处理器(Micro Processor Unit,MPU)、或数字信号处理器(Digital Signal Processor,DSP)、或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。In practical applications, the functions implemented by each unit in the image processing device may be implemented by a central processing unit (CPU) or a microprocessor (Micro Processor Unit, MPU) located in the image processing device. Or a digital signal processor (DSP), or a Field Programmable Gate Array (FPGA).
图7为本发明实施例的图像处理设备的结构组成示意图三,所述图像处理设备能够对图像进行编码及解码,如图7所示,所述图像处理设备包括: FIG. 7 is a third schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. The image processing apparatus can encode and decode an image. As shown in FIG. 7, the image processing apparatus includes:
第一生成单元71,配置为在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色;The first generating unit 71 is configured to generate a new palette color according to the pixel of the current encoding block when copying and encoding the current encoding block by using one of a palette and a pixel string copy encoding method;
第二生成单元72,配置为依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板;a second generating unit 72, configured to generate a palette of the current encoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy encoding manner;
编码单元73,配置为使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。The encoding unit 73 is configured to perform palette and pixel string copy encoding using the palette of the current encoding block, and generate a video code stream including a copy mode and a copy parameter.
解析单元74,配置为解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色;The parsing unit 74 is configured to parse the video code stream, and obtain at least one of the following information: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
第三生成单元75,配置为依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板;The third generating unit 75 is configured to generate, according to the new palette color and/or the palette color candidate set shared by the palette and the pixel string copy decoding mode, to generate the current decoding block by using the copy mode. The palette used by the swatch and the pixel string to decode and decode;
解码单元76,配置为使用所述当前解码块的调色板进行调色板与像素串复制解码。Decoding unit 76 is configured to perform palette and pixel string copy decoding using the palette of the current decoded block.
在实际应用中,所述图像处理设备中的各个单元所实现的功能,均可由位于图像处理设备中的中央处理器(Central Processing Unit,CPU)、或微处理器(Micro Processor Unit,MPU)、或数字信号处理器(Digital Signal Processor,DSP)、或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。In practical applications, the functions implemented by each unit in the image processing device may be implemented by a central processing unit (CPU) or a microprocessor (Micro Processor Unit, MPU) located in the image processing device. Or a digital signal processor (DSP), or a Field Programmable Gate Array (FPGA).
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明实施例上述图像处理设备如果以软件功能模块的形式实现并作 为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。In the embodiment of the present invention, the image processing device is implemented in the form of a software function module. When sold or used as a standalone product, it can also be stored on a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. A computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
相应地,本发明实施例还提供一种计算机存储介质,其中存储有计算机程序,该计算机程序用于执行本发明实施例的图像编码方法和/或图像解码方法。Correspondingly, an embodiment of the present invention further provides a computer storage medium, wherein a computer program for executing an image encoding method and/or an image decoding method according to an embodiment of the present invention is stored.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机 实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on the computer or other programmable device to produce the computer The implemented processing, such as instructions executed on a computer or other programmable device, provides steps for implementing the functions specified in one or more blocks of the flowchart or in a block or blocks of the flowchart.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.
工业实用性Industrial applicability
本发明实施例的技术方案,在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色;依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板;使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色;依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板;使用所述当前解码块的调色板进行调色板与像素串复制解码。实现了多种复制方式共享调色板颜色候选集的图像压缩,提高了多重调色板与像素串复制方式的压缩效率。 In the technical solution of the embodiment of the present invention, when copying and encoding the current coding block by using one of the color palette and the pixel string copy coding mode, a new color palette color is generated according to the pixel of the current coding block; Palette color and/or palette color palette color candidate set shared with pixel string copy encoding, generating a palette of the current encoding block; coloring using the palette of the current encoding block The board and the pixel string are copied and encoded, and a video stream including a copy mode and a copy parameter is generated. Parsing the video stream to obtain at least one of the following: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color; according to the new palette color and/or color palette a palette color candidate set shared by the pixel string copy decoding method, generating a palette used for the current decoded block to perform palette and pixel string copy decoding using the copy mode; using the palette of the current decoded block Perform palette and pixel string copy decoding. The image compression of the palette color candidate set is realized by multiple copy modes, and the compression efficiency of the multi-palette and pixel string copy mode is improved.

Claims (16)

  1. 一种图像编码方法,所述方法包括:An image encoding method, the method comprising:
    在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色;Generating a new palette color according to pixels of the current coding block when copying and encoding the current coding block using one of a palette and a pixel string copy coding method;
    依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板;Generating a palette of the current coded block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy coding method;
    使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。Palette and pixel string copy coding is performed using the palette of the current coded block, and a video code stream including a copy mode and a copy parameter is generated.
  2. 根据权利要求1所述的图像编码方法,其中,所述编码块是图像的编码区域,所述编码块包括以下至少一种:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。The image encoding method according to claim 1, wherein the encoding block is an encoding region of an image, and the encoding block comprises at least one of: a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-CU Region, prediction unit PU, transform unit TU.
  3. 根据权利要求1所述的图像编码方法,其中,所述视频码流还包括所述新的调色板颜色。The image encoding method according to claim 1, wherein said video code stream further comprises said new palette color.
  4. 根据权利要求1所述的图像编码方法,其中,所述调色板颜色候选集的最大空间能够容纳的调色板颜色的最大数目为预定常数。The image encoding method according to claim 1, wherein a maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  5. 根据权利要求1所述的图像编码方法,其中,所述方法还包括:所述调色板颜色候选集根据预定规则进行以下一种或多种操作:The image encoding method according to claim 1, wherein the method further comprises: the palette color candidate set performing one or more of the following operations according to a predetermined rule:
    更新、调色板颜色的删除、调色板颜色的位置的调整、调色板颜色的添加。Update, palette color deletion, palette color position adjustment, palette color addition.
  6. 根据权利要求1或5所述的图像编码方法,其中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。The image encoding method according to claim 1 or 5, wherein the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first-in, first-out rule.
  7. 根据权利要求1所述的图像编码方法,其中,所述方法还包括:The image encoding method according to claim 1, wherein the method further comprises:
    对于使用所述调色板与像素串复制方式之一进行编码的编码块,将所述编码块的所述新的调色板颜色的部分或全部添加进入共享调色板颜色候 选集。For a coded block that is encoded using one of the palette and the pixel string copy mode, part or all of the new palette color of the coded block is added to the shared palette color. Selection.
  8. 一种图像解码方法,所述方法包括:An image decoding method, the method comprising:
    解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色;Parsing the video stream to obtain at least one of the following: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
    依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板;Generating a palette color candidate set shared by the new palette color and/or color palette and the pixel string copy decoding method, and generating a palette and pixel string copy decoding using the copy mode for the current decoded block. The palette used;
    使用所述当前解码块的调色板进行调色板与像素串复制解码。Palette and pixel string copy decoding is performed using the palette of the current decoded block.
  9. 根据权利要求8所述的图像解码方法,其中,所述解码块是图像的解码区域,所述解码块包括以下至少一种:LCU、CTU、CU、CU的子区域、PU、TU。The image decoding method according to claim 8, wherein the decoding block is a decoding region of an image, and the decoding block includes at least one of the following: an LCU, a CTU, a CU, a sub-region of a CU, a PU, and a TU.
  10. 根据权利要求8所述的图像解码方法,其中,所述调色板颜色候选集的最大空间能够容纳的调色板颜色的最大数目为预定常数。The image decoding method according to claim 8, wherein a maximum number of palette colors that the maximum space of the palette color candidate set can accommodate is a predetermined constant.
  11. 根据权利要求8所述的图像解码方法,其中,所述方法还包括:所述调色板颜色候选集根据预定规则进行以下一种或多种操作:The image decoding method according to claim 8, wherein the method further comprises: the palette color candidate set performing one or more of the following operations according to a predetermined rule:
    更新、调色板颜色的删除、调色板颜色的位置的调整、调色板颜色的添加。Update, palette color deletion, palette color position adjustment, palette color addition.
  12. 根据权利要求8或11所述的图像解码方法,其中,所述调色板颜色候选集根据先入先出的规则添加新的调色板颜色和/或删除已有的调色板颜色。The image decoding method according to claim 8 or 11, wherein the palette color candidate set adds a new palette color and/or deletes an existing palette color according to a first-in, first-out rule.
  13. 根据权利要求8所述的图像解码方法,其中,所述方法还包括:The image decoding method according to claim 8, wherein the method further comprises:
    对于使用所述调色板与像素串复制方式之一进行解码的解码块,将所述解码块的所述新的调色板颜色的部分或全部添加进入共享调色板颜色候选集。For a decoded block that is decoded using one of the palette and pixel string copying methods, some or all of the new palette color of the decoded block is added to the shared palette color candidate set.
  14. 一种图像处理设备,所述设备包括: An image processing device, the device comprising:
    第一生成单元,配置为在使用调色板与像素串复制编码方式之一对当前编码块进行复制编码时,依据所述当前编码块的像素生成新的调色板颜色;a first generating unit, configured to generate a new palette color according to the pixel of the current encoding block when copying and encoding the current encoding block by using one of a color palette and a pixel string copy encoding method;
    第二生成单元,配置为依据所述新的调色板颜色和/或调色板与像素串复制编码方式共享的调色板颜色候选集,生成所述当前编码块的调色板;a second generating unit, configured to generate a palette of the current encoding block according to the palette color candidate set shared by the new palette color and/or color palette and the pixel string copy encoding manner;
    编码单元,配置为使用所述当前编码块的调色板进行调色板与像素串复制编码,并生成包括复制方式和复制参数的视频码流。And a coding unit configured to perform palette and pixel string copy coding using a palette of the current coded block, and generate a video code stream including a copy mode and a copy parameter.
  15. 一种图像处理设备,所述设备包括:An image processing device, the device comprising:
    解析单元,配置为解析视频码流,获取以下信息至少之一:调色板与像素串复制解码的复制方式、复制参数和新的调色板颜色;a parsing unit configured to parse the video stream to obtain at least one of the following: a copy mode of the palette and the pixel string copy decoding, a copy parameter, and a new palette color;
    第三生成单元,配置为依据所述新的调色板颜色和/或调色板与像素串复制解码方式共享的调色板颜色候选集,生成对当前解码块使用所述复制方式进行调色板与像素串复制解码时所用的调色板;a third generating unit, configured to perform color matching on the current decoding block by using the copy mode according to the new palette color and/or the palette color candidate set shared by the color palette and the pixel string copy decoding mode The palette used by the board and the pixel string to decode and decode;
    解码单元,配置为使用所述当前解码块的调色板进行调色板与像素串复制解码。A decoding unit configured to perform palette and pixel string copy decoding using a palette of the current decoded block.
  16. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令配置为执行权利要求1-13任一项所述的图像编码方法和/或图像解码方法。 A computer storage medium having stored therein computer executable instructions configured to perform the image encoding method and/or image decoding method of any of claims 1-13.
PCT/CN2016/084992 2015-06-08 2016-06-06 Image encoding and decoding method, image processing device, and computer storage medium WO2016197893A1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP22191754.5A EP4114000A1 (en) 2015-06-08 2016-06-06 Image encoding and decoding methods, image processing device, and computer storage medium
EP16806791.6A EP3306931A4 (en) 2015-06-08 2016-06-06 Image encoding and decoding method, image processing device, and computer storage medium
US15/580,893 US20180167623A1 (en) 2015-06-08 2016-06-06 Image encoding and decoding methods, image processing device, and computer storage medium
US17/902,022 US11917168B2 (en) 2015-06-08 2022-09-02 Image encoding and decoding methods, image processing device, and computer storage medium

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201510308146 2015-06-08
CN201510308146.7 2015-06-08
CN201610364374.0 2016-05-27
CN201610364374.0A CN106254865B (en) 2015-06-08 2016-05-27 Image encoding and decoding method and image processing equipment

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US15/580,893 A-371-Of-International US20180167623A1 (en) 2015-06-08 2016-06-06 Image encoding and decoding methods, image processing device, and computer storage medium
US17/902,022 Continuation US11917168B2 (en) 2015-06-08 2022-09-02 Image encoding and decoding methods, image processing device, and computer storage medium

Publications (1)

Publication Number Publication Date
WO2016197893A1 true WO2016197893A1 (en) 2016-12-15

Family

ID=57502828

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084992 WO2016197893A1 (en) 2015-06-08 2016-06-06 Image encoding and decoding method, image processing device, and computer storage medium

Country Status (1)

Country Link
WO (1) WO2016197893A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532989A (en) * 2020-06-02 2021-03-19 腾讯科技(深圳)有限公司 Video encoding method, video decoding method and related equipment
CN112543333A (en) * 2020-06-02 2021-03-23 腾讯科技(深圳)有限公司 Video decoding method, video encoding method and related equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340587A (en) * 2007-07-05 2009-01-07 联发科技股份有限公司 Method for encoding input image, method and apparatus for displaying an encoded image
US20090033670A1 (en) * 2007-07-31 2009-02-05 Hochmuth Roland M Providing pixels from an update buffer
US20100214315A1 (en) * 2009-02-23 2010-08-26 Nguyen Uoc H Encoding cmyk data for display using indexed rgb
CN102497546A (en) * 2011-11-28 2012-06-13 同济大学 Screen image compression device and compression method thereof
US20140064612A1 (en) * 2012-09-04 2014-03-06 Kabushiki Kaisha Toshiba Apparatus and a method for coding an image
CN104244007A (en) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 Image compression method and device based on arbitrary shape matching
WO2015090219A1 (en) * 2013-12-18 2015-06-25 Mediatek Inc. Method and apparatus for palette initialization and management

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340587A (en) * 2007-07-05 2009-01-07 联发科技股份有限公司 Method for encoding input image, method and apparatus for displaying an encoded image
US20090033670A1 (en) * 2007-07-31 2009-02-05 Hochmuth Roland M Providing pixels from an update buffer
US20100214315A1 (en) * 2009-02-23 2010-08-26 Nguyen Uoc H Encoding cmyk data for display using indexed rgb
CN102497546A (en) * 2011-11-28 2012-06-13 同济大学 Screen image compression device and compression method thereof
US20140064612A1 (en) * 2012-09-04 2014-03-06 Kabushiki Kaisha Toshiba Apparatus and a method for coding an image
CN104244007A (en) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 Image compression method and device based on arbitrary shape matching
WO2015090219A1 (en) * 2013-12-18 2015-06-25 Mediatek Inc. Method and apparatus for palette initialization and management

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP3306931A4 *
XIU, XIAOYU ET AL.: "Palette-based Coding in the Screen Content Coding Extension of the HEVC Standard", PROCEEDINGS OF THE 2015 DATA COMPRESSION CONFERENCE, 9 April 2015 (2015-04-09), pages 253 - 262, XP055281837, ISSN: 1068-0314 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532989A (en) * 2020-06-02 2021-03-19 腾讯科技(深圳)有限公司 Video encoding method, video decoding method and related equipment
CN112543333A (en) * 2020-06-02 2021-03-23 腾讯科技(深圳)有限公司 Video decoding method, video encoding method and related equipment
CN112543333B (en) * 2020-06-02 2021-08-24 腾讯科技(深圳)有限公司 Video decoding method, video encoding method and related equipment

Similar Documents

Publication Publication Date Title
CN105704491B (en) Image encoding method, decoding method, encoding device, and decoding device
CN112383780B (en) Encoding and decoding method and device for point matching reference set and index back and forth scanning string matching
CN105491376B (en) Image coding and decoding method and device
CN106254865B (en) Image encoding and decoding method and image processing equipment
CN106254888B (en) Image encoding and decoding method and image processing equipment
CN105847842B (en) Image encoding method and device, and image decoding method and device
CN104754362B (en) Image compression method using fine-divided block matching
US11653019B2 (en) Image coding and decoding methods, image processing device and computer storage medium
US10178405B2 (en) Enhanced coding and decoding using intra block copy mode
US11431977B2 (en) Image coding method and apparatus, and image decoding method and apparatus
WO2016202189A1 (en) Image coding and decoding methods, image processing device, and computer storage medium
CN105992003B (en) Image compression method and device for numbering palette colors according to ordering or frequency
WO2016197893A1 (en) Image encoding and decoding method, image processing device, and computer storage medium
CN106303534B (en) Image compression method and device for multiple index string and pixel string fusion copy modes
CN106303535B (en) Image compression method and device with reference pixels taken from different-degree reconstruction pixels
WO2016119746A1 (en) Image coding method and apparatus, and image decoding method and apparatus
US20200252646A1 (en) Method and Device for Image Coding and Method and Device for Image Decoding
WO2016197898A1 (en) Image encoding and decoding method, image processing device, and computer storage medium
WO2016124154A1 (en) Image coding method and apparatus, and image decoding method and apparatus
CN105828079B (en) Image processing method and device
WO2016119666A1 (en) Image coding/decoding method and apparatus

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15580893

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2016806791

Country of ref document: EP