WO2015078422A1 - 图像编码、解码方法及装置 - Google Patents

图像编码、解码方法及装置 Download PDF

Info

Publication number
WO2015078422A1
WO2015078422A1 PCT/CN2014/092718 CN2014092718W WO2015078422A1 WO 2015078422 A1 WO2015078422 A1 WO 2015078422A1 CN 2014092718 W CN2014092718 W CN 2014092718W WO 2015078422 A1 WO2015078422 A1 WO 2015078422A1
Authority
WO
WIPO (PCT)
Prior art keywords
displacement vector
microblock
decoding
block
displacement
Prior art date
Application number
PCT/CN2014/092718
Other languages
English (en)
French (fr)
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
Application filed by 同济大学, 中兴通讯股份有限公司 filed Critical 同济大学
Priority to US15/114,278 priority Critical patent/US20170006285A1/en
Priority to EP14865962.6A priority patent/EP3076668A4/en
Priority to KR1020167017627A priority patent/KR101868247B1/ko
Priority to EP20212240.4A priority patent/EP3869807A1/en
Publication of WO2015078422A1 publication Critical patent/WO2015078422A1/zh
Priority to US16/700,399 priority patent/US11394970B2/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/521Processing of motion vectors for estimating the reliability of the determined motion vectors or motion vector field, e.g. for smoothing the motion vector field or for correcting motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present invention relates to the field of communications, and in particular to an image encoding and decoding method and apparatus.
  • a notable feature of computer screen images is that there are often many similar or even identical pixel patterns within the same frame of image.
  • 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.
  • the intra prediction method used in the existing image and video compression technology only refers to adjacent pixel samples, and cannot improve the compression efficiency by using the similarity or the similarity in one frame image.
  • the intra motion compensation method in the prior art is also called intra block copy mode, and uses several fixed size (8x8, 16x16, 32x32, 64x64 pixels) blocks for intraframe.
  • Intra block matching coding does not achieve a finer match with a variety of different sizes and shapes.
  • Another prior art string matching method although various fine matchings of different sizes and shapes can be effectively found, there are problems such as complexity, computational complexity, and large read and write bandwidth of the memory. Therefore, we must seek new coding tools, which can fully exploit and utilize the similar or identical patterns in the computer screen image to greatly improve the compression effect, and control the complexity, calculation amount, memory read and write bandwidth, etc. Small range.
  • a digital video signal of a screen 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.
  • coding Unit when encoding one frame of image, one frame of image is divided into sub-images of several blocks of MxM pixels, which is called "Coding Unit (CU)", with CU as the basic coding unit.
  • the sub-images are encoded one by one.
  • the size of the commonly used M is 8, 16, 32, 64. Therefore, encoding a sequence of video images is to sequentially encode each coding unit. Similarly, each decoding unit is sequentially decoded during decoding, and finally the entire video image sequence is reconstructed.
  • each CU in one frame of image can be different, some are 8x8, some are 64x64, and so on.
  • One of the LCUs consists of three 32x32 pixel CUs and four 16x16 pixel CUs.
  • the other LCU consists of two 32x32 pixel CUs, three 16x16 pixel CUs, and 20 8x8 pixel CUs. Encoding one frame of image is to sequentially encode one CU.
  • a color pixel consists of three components.
  • the two most commonly used pixel color formats are the GBR color format consisting of a green component, a blue component, and a red component, and a YUV color consisting of a luma component and two chroma components.
  • the format is also called 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 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 two Y components, one U component, and one V component in a YUV 4:2:2 pixel color format; four pixels arranged in a left and right adjacent position by 2x2 spatial position are composed of four pixels.
  • YUV4: 2:0 pixel color format consisting of Y component, 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 or simply as a sample.
  • Intra block matching also known as intra motion compensation or intra block copy
  • Intra block matching is the reconstruction of a CU (including full weight) in the same frame. Construction and varying degrees of preliminary reconstruction) a predetermined search among the reference pixel sample sets Searching within the search range for a matching block with the smallest matching error between the CU (ie, the matched block) (referred to as an optimal matching block), and then comparing the matched block with the optimal matching block
  • the position (called the displacement vector, referred to as DV) is written into the video compression code stream.
  • Intra block matching decoding is to determine the position of the matching block in the reconstructed reference pixel sample set in the same frame according to a DV parsed from the video compressed code stream when decoding a CU, and then The matching block is copied and pasted to the location of the CU (ie, the matched block).
  • Intra string matching coding is to search for a CU in a predetermined search range among the reconstructed reference pixel sample sets in the same frame when encoding a CU.
  • a plurality of optimal variable length pixel sample matching strings each matching string being characterized by a matching relative position (displacement vector, DV) and a matching length, ie, a pair (displacement vector, matching length) .
  • One or more pairs are then written into the video compression code stream.
  • Intra-frame string matching decoding is to determine the reconstructed reference pixel samples in the same frame according to one or more pairs (displacement vectors, matching lengths) parsed from the video compressed code stream when decoding a CU.
  • One or more of the pixel samples in the set match the position of the string, and then one or more of the matching strings are copied and pasted to the relative position of the CU (ie, the position of the matched string).
  • the number of pixel samples for each copied and pasted matching string is the matching length.
  • the corresponding matched strings also have the same matching length.
  • each CU In the intra block matching mode, each CU has only one displacement vector, and there is a problem that the matching precision is low and the matching error is large, resulting in low compression efficiency.
  • the intra-frame string matching mode one CU may have too many displacement vectors and matching lengths, and there may be a problem of consuming too many bits, and the compression efficiency may not be high. Therefore, when encoding and decoding an image in the related art, there is a problem that image compression is performed and the decompression efficiency is not high.
  • the present invention provides an image encoding method and apparatus for solving at least the problem of image compression and low decompression efficiency when encoding and decoding an encoding unit in the related art.
  • an image encoding method comprising the steps of: step 1) performing microblock matching encoding on an input coding unit, that is, an original pixel of a CU, to generate a group in pixel sample units.
  • L (usually L ⁇ 4) optimal displacement vectors, ie matching relative positions or matching distances; that is, dividing the CU into L micro-blocks, called micro-blocks, among the reconstructed reference pixel sample sets Within a predetermined search range, according to predetermined evaluation criteria, searching for L optimal reference microblocks respectively relative to the L microblocks;
  • the displacement vector is the position coordinate and location of the reference microblock The difference in position coordinates of the micro-block;
  • the bit The unit of the shift vector is the smallest coordinate unit of the pixel sample (the whole pixel sample or one-half, one-quarter, one-eighth pixel sample) instead of the micro-block;
  • the output of the micro-block matching code is L
  • the matching residual is the difference between the value of the pixel sample of the reference microblock and the value of the pixel sample of the microblock;
  • the displacement vector is also called the original displacement vector Step 2) Performing a transformation independent of the other displacement vectors for each of the L
  • an image decoding method comprising the steps of: step 1) parsing and entropy decoding a compressed code stream containing displacement vector compressed data and other encoding results, and outputting 1) parsing and entropy decoding The resulting transform transform vector of the reference microblock, 2) the matching residual of the reference microblock obtained by parsing and entropy decoding and the data obtained by the remaining parsing and entropy decoding; step 2) a set of L belonging to a currently decoded CU The overall transform displacement vector is inversely integrated with each other, and the set of individual transform displacement vectors belonging to the CU is obtained and outputted; and step 3) each of the individual transform displacement vectors is independent of the other Performing an inverse individual transformation of the individual transformation displacement vector to obtain and output L displacement vectors in the original form, that is, an original displacement vector; and step 4) performing L microblock matching decoding of the CU using the input L displacement vectors; That is, from the reconstructed reference pixel sample
  • the unit of the displacement vector is a minimum coordinate unit of a pixel sample (integral pixel value or one-half, one-quarter, one-eighth pixel sample) instead of a micro-block; L pieces of the micro-block Forming the CU together; the output of this step is the restored pixel sample of the microblock; step 5) the remaining common decoding and reconstruction steps, such as intra prediction, inter prediction, inverse transform, inverse quantization, Corresponding to the prediction residual and the matching residual compensation (ie, taking the inverse of the residual operation), deblocking filtering, sample adaptive offset (Sample Adaptive Offset); the input of this step is the output of step 4) above
  • the output of step 1) above is 2) the data obtained by the remaining parsing and entropy decoding; the output of this step is reconstructed pixels (
  • an image encoding apparatus comprising the following modules: a module 1) a microblock matching search encoding module: performing microblock matching encoding on input video image pixel samples, and each input coding unit is The CU is divided into a set of L microblocks, called microblocks, and within a predetermined search range among the reconstructed reference pixel sample sets, the search is respectively obtained relative to the L microblocks according to a predetermined evaluation criterion.
  • the difference between the position coordinates of any one of the reference microblocks and the position coordinates of the corresponding microblocks is called a displacement vector;
  • the unit of the displacement vector is a pixel sample (full pixel) The smallest coordinate unit of the sample or one-half, one-quarter, one-eighth pixel sample) instead of the micro-block;
  • each of the CUs has a total of L of the displacement vectors;
  • the output of this module is a displacement vector and a matching residual;
  • the matching residual is a difference between a value of a pixel sample of the reference microblock and a value of a pixel sample of the microblock;
  • the displacement vector is also referred to as an original displacement vector;
  • the output of the module is the overall transform displacement vector; module 4) the remaining common techniques of coding and reconstruction: performing various common techniques, such as intra prediction, inter prediction, transform, quantization, inverse transform , inverse quantization, deblocking filtering, sample adaptive offset (Sample Adaptive Offset), encoding and reconstruction operations; the input to this module is the modulo The output of block 1) and the original input video image pixel sample; the output of the module is the reconstructed pixel and the remaining encoding result; the reconstructed pixel is placed in the reconstructed reference pixel sample temporary storage module, The reference pixels required for the subsequent CU microblock matching search encoding, and the remaining common techniques for encoding and reconstruction; module 5) reconstructing the reference pixel sample temporary storage module: temporarily storing the reconstructed reference pixel sample set a pixel sample, that is, all reconstructed pixel samples up to the position of the CU in the current encoding or to the position of the CU in the current encoding during the encoding process, used as reference pixels
  • an image decoding apparatus comprising the following modules: a module 1) an entropy decoding module: performing entropy decoding on an input compressed vector stream containing displacement vector compression data and other encoding results, and parsing out The meaning of various data obtained by entropy decoding; sending the parsed global transform displacement vector to the inverse whole transform module; sending the parsed matching residual and remaining data to other common techniques for decoding and reconstructing modules; 2) an inverse overall transform module: performing an inverse overall transform of each of the L sets of the global transform displacement vectors of the current decoded CU outputted by the module 1), and obtaining and outputting the CUs belonging to the CU a set of individual transform displacement vectors; module 3) an inverse individual transform module: performing an inverse individual transform independent of the other individual transform displacement vectors for each of the individual transform displacement vectors output by the module 2), obtaining and outputting L displacement vectors of the original form, ie original displacement vectors; module 4) microblock matching decoding
  • the reference pixel samples of the microblock i
  • the inverse global transformation consists of the following two steps: 1) transforming the displacement vector DVg[1], DVg[2], DVg[3], ..., DVg[L-1], DVg[L] from the whole. After the following inverse difference operation, DV[1], DV[2], DV[3], ..., DV[L-1], DV[L]:
  • DV[0] is the displacement vector of the adjacent or nearby CU or the microblock therein.
  • the inverse global transformation consists of the following two steps: 1) performing an inverse horizontal difference operation or an inverse vertical difference operation or an inverse high order difference operation or an inverse matrix operation on the global transformation displacement vector in the form of a two-dimensional array; 2) An inverse sorting rule that inversely sorts the results of the above operation 1) into L displacement vectors (actually individual transformation displacement vectors).
  • the microblock matching is an exact (ie, lossless) matching, in which case the matching residual is zero.
  • the microblock matching is an approximate (ie lossy) match, in which case the matching residual is not zero.
  • the number L of the microblocks in one CU is equal to 4, or equal to 5, or equal to 6, or equal to 7, or equal to 8, or equal to 9, or equal to 10, or equal to 11, or equal to 12, or equal to 13. , or equal to 14, or equal to 15, or equal to 16, or equal to any constant between 17 and 64.
  • the CU portion of the coding unit in the compressed code stream containing the displacement vector compressed data and other encoding results is composed of sequential grammar elements loaded with the following information:
  • an image encoding method including: dividing a coded block into L microblocks, wherein L is a preset number of microblock partitions; determining the microblocks and pre-set a displacement vector between reference microblocks in the reconstructed pixel sample set, wherein the displacement vector is a pixel position of the reference microblock and a pixel position of the microblock in a preset pixel coordinate system Inter-vector; encodes the displacement vector and writes to the code stream.
  • the coding block comprises one of the following: a coding unit CU, a prediction unit PU, and a transformation unit TU.
  • the displacement vector and writing the code stream further comprising at least one of: performing an individual transformation on the displacement vector of the microblock in the coding block;
  • the displacement vector of the micro-block or the displacement vector of the micro-block is subjected to an overall transformation of the individual transformation values obtained after the individual transformation.
  • performing the individual transform on the displacement vector of the micro-block in the coding block comprises modifying the displacement vector using a first predetermined offset.
  • the method further comprises: determining the first predetermined offset by at least one of: determining the first predetermined according to the displacement vector Offset; determining the first predetermined offset based on encoded parameters of the encoded block or the encoded microblock.
  • performing overall transformation on the individual transform values obtained after performing the individual transform on the displacement vector of the microblock in the coding block or the displacement vector of the microblock comprises: determining the displacement vector of the microblock or Determining the first displacement vector of the individual transformation value or the first prediction value of the first individual transformation value; determining the first displacement vector or the first individual transformation value and the corresponding first prediction value a difference value; a difference between other displacement vectors or individual transformation values other than the first displacement vector or the first individual transformation value and its previous displacement vector or individual transformation values.
  • the method before determining the displacement vector between the microblock and the reference microblock in a preset set of reconstructed pixel samples, the method further comprises: determining, by using a predetermined rule, the corresponding microblock And the reference micro-block, wherein the predetermined rule includes at least one of: a lossless matching that matches a residual residual value of zero, and a lossy matching that matches a residual residual value that is not zero; wherein the matching residual value is The difference between the pixel value of the reference microblock and the pixel value of the microblock.
  • the predetermined number of divisions L of the microblocks is any integer from 4 to 64.
  • an image decoding method comprising: decoding a code stream of a decoding block to obtain a displacement vector of a microblock, wherein the decoding block includes a preset number of sub-block divisions L a microblock, the displacement vector being a vector between a pixel position of the reference microblock and a pixel position of the microblock; determining a preset according to a displacement vector of the microblock and a pixel position of the microblock The pixel position of the reference microblock corresponding to the microblock in the reconstructed pixel sample set; the microblock is decoded according to the pixel position of the reference microblock.
  • the decoding block comprises one of: a coding unit CU, a prediction unit PU, and a transformation unit TU.
  • decoding the code stream of the decoding block to obtain the displacement vector corresponding to the micro block comprises: parsing a code stream of the decoding block, and obtaining a parameter of a displacement vector corresponding to the micro block; according to the parameter, Obtaining a displacement vector of the micro-block by using at least one of: performing overall transformation on the parameter corresponding to part or all of the displacement vectors of the micro-block in the decoding block to obtain a displacement vector of the micro-block; Performing parameters corresponding to part or all of the displacement vectors of the microblocks in the decoding block or parameters obtained by performing overall transformation on the parameters corresponding to part or all of the displacement vectors of the microblocks in the decoding block The individual transform obtains the displacement vector of the micro-block.
  • performing overall transformation on the parameter corresponding to part or all of the displacement vectors of the microblock in the decoding block to obtain a displacement vector of the microblock comprises: determining the microblock in the decoding block a second predicted value of the first one of the parameters corresponding to the partial or total displacement vector; determining a sum of the first parameter and the second predicted value; determining other than the first parameter The sum of the argument and the sum obtained using its previous argument.
  • the parameters corresponding to part or all of the displacement vectors of the microblocks in the decoding block or the parameters corresponding to part or all of the displacement vectors of the microblocks in the decoding block are integrally transformed.
  • Obtaining a parameter of the obtained parameter to obtain a displacement vector of the microblock includes: using a second predetermined offset to a parameter corresponding to a part or all of a displacement vector of the microblock in the decoding block or in the decoding block.
  • the parameters obtained by the overall transformation of the parameters corresponding to the partial or total displacement vectors of the microblocks are corrected.
  • a parameter corresponding to a partial or total displacement vector of the microblock in the decoding block or a partial or total displacement vector of the microblock in the decoding block is used, using a second predetermined offset amount
  • the method further includes: determining, by at least one of the following manners, the second predetermined offset: determining the second predetermined offset according to the parameter of the displacement vector The second predetermined offset is determined based on the encoded coded block or the encoded parameters of the encoded microblock.
  • the predetermined number of divisions L of the microblocks is any integer from 4 to 64.
  • an image encoding apparatus comprising: a dividing module configured to divide a coding block into L microblocks, where L is a preset number of microblock partitions; a first determining module, And configured to determine a displacement vector between the micro-block and a reference micro-block in a preset set of reconstructed pixel samples, wherein the displacement vector is the reference micro-block in a preset pixel coordinate system a vector between the pixel location and the pixel location of the microblock; a first encoding module configured to encode the displacement vector and write to the codestream.
  • the coding block comprises one of the following: a coding unit CU, a prediction unit PU, and a transformation unit TU.
  • the apparatus further comprises at least one of: an individual transformation module configured to perform an individual transformation on the displacement vector of the microblock in the coding block; an overall transformation module configured to be in the coding block The displacement vector of the micro-block or the displacement vector of the micro-block is subjected to an overall transformation of the individual transformation values obtained after the individual transformation.
  • an individual transformation module configured to perform an individual transformation on the displacement vector of the microblock in the coding block
  • an overall transformation module configured to be in the coding block
  • the displacement vector of the micro-block or the displacement vector of the micro-block is subjected to an overall transformation of the individual transformation values obtained after the individual transformation.
  • the individual transformation module comprises: a correction unit configured to correct the displacement vector using a first predetermined offset.
  • the individual transformation module further includes: a first determining unit configured to determine the first predetermined offset amount by at least one of: determining the first predetermined offset amount according to the displacement vector; The encoded parameter block or the encoding parameters of the encoded microblock determine the first predetermined offset.
  • a first determining unit configured to determine the first predetermined offset amount by at least one of: determining the first predetermined offset amount according to the displacement vector;
  • the encoded parameter block or the encoding parameters of the encoded microblock determine the first predetermined offset.
  • the overall transformation module comprises: a second determining unit, configured to determine a first prediction of the displacement vector of the microblock or the first displacement vector or the first individual transformation value of the individual transformation values a third determining unit, configured to determine a difference between the first displacement vector or the first individual transformed value and the corresponding first predicted value; and a fourth determining unit configured to determine The difference between the first displacement vector or other displacement vector or individual transformation value other than the first individual transformation value and its previous displacement vector or individual transformation value.
  • the apparatus further comprises: a second determining module, configured to determine the reference microblock corresponding to the microblock using a predetermined rule, wherein the predetermined rule comprises at least one of: a matching residual value of zero Lossless matching, matching lossy matching in which the residual value is not zero; wherein the matching residual value is a difference between a pixel value of the reference microblock and a pixel value of the microblock.
  • a second determining module configured to determine the reference microblock corresponding to the microblock using a predetermined rule, wherein the predetermined rule comprises at least one of: a matching residual value of zero Lossless matching, matching lossy matching in which the residual value is not zero; wherein the matching residual value is a difference between a pixel value of the reference microblock and a pixel value of the microblock.
  • the predetermined number of divisions L of the microblocks is any integer from 4 to 64.
  • an image decoding apparatus comprising: a first decoding module configured to decode a code stream of a decoding block to obtain a displacement vector of a microblock, wherein the decoding block includes a preset The microblock divides the number of L microblocks, the displacement vector is a vector between a pixel position of the reference microblock and a pixel position of the microblock; and a third determining module is set according to the displacement vector of the microblock, And the pixels of the micro-block Positioning, determining a pixel position of a reference microblock corresponding to the microblock in a preset reconstructed pixel sample set; and a second decoding module, configured to perform the microblock according to a pixel position of the reference microblock decoding.
  • the decoding block comprises one of: a coding unit CU, a prediction unit PU, and a transformation unit TU.
  • the first decoding module includes: a parsing unit configured to parse a code stream of the decoding block to obtain a parameter of a displacement vector corresponding to the micro block; and an obtaining unit configured to use the following manner according to the parameter Obtaining, by at least one of the displacement vectors of the micro-blocks: performing overall transformation on the parameter corresponding to part or all of the displacement vectors of the micro-blocks in the decoding block to obtain a displacement vector of the micro-block; a parameter corresponding to part or all of the displacement vectors of the microblock in the block or a parameter obtained by performing overall transformation on the parameter corresponding to part or all of the displacement vectors of the microblock in the decoding block is obtained by individual transformation The displacement vector of the micro-block.
  • the obtaining unit includes: a first determining subunit, configured to determine a second predicted value of a first parameter of the parameter corresponding to part or all of the displacement vectors of the microblock in the decoding block; a second determining subunit, configured to determine a sum of the first parameter and the second predicted value; and a third determining subunit configured to determine other parameters than the first parameter and before using the The sum of the values obtained from a parameter and the value.
  • the obtaining unit comprises: a modifying subunit, configured to use a second predetermined offset to a parameter corresponding to a part or all of the displacement vector of the microblock in the decoding block or to a parameter in the decoding block
  • a modifying subunit configured to use a second predetermined offset to a parameter corresponding to a part or all of the displacement vector of the microblock in the decoding block or to a parameter in the decoding block
  • the obtaining unit further comprises: a fourth determining subunit, configured to determine the second predetermined offset by at least one of: determining the second predetermined offset according to a parameter of the displacement vector The second predetermined offset is determined based on the encoded coded block or the encoded parameters of the encoded microblock.
  • the predetermined number of divisions L of the microblocks is any integer from 4 to 64.
  • the coding block is divided into L microblocks, where L is a preset number of microblock partitions; and the microblocks are determined with reference microblocks in a preset set of reconstructed pixel samples.
  • a displacement vector wherein the displacement vector is a vector between a pixel position of the reference microblock and a pixel position of the microblock in a preset pixel coordinate system; entropy encoding the displacement vector
  • FIG. 1 is a flow chart of an image encoding method according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of an image decoding method according to an embodiment of the present invention.
  • FIG. 3 is a block diagram showing the structure of an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 4 is a block diagram 1 of a preferred structure of an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 5 is a block diagram 1 of a preferred structure of an individual transform module 42 in an image encoding apparatus according to an embodiment of the present invention
  • FIG. 6 is a block diagram 2 of a preferred structure of an individual transform module 42 in an image encoding apparatus according to an embodiment of the present invention
  • FIG. 7 is a block diagram showing a preferred structure of the overall transform module 44 in the image encoding apparatus according to an embodiment of the present invention.
  • FIG. 8 is a block diagram 2 of a preferred structure of an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 9 is a block diagram showing the structure of an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 10 is a block diagram showing a preferred structure of a first decoding module 92 in an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 11 is a block diagram 1 of a preferred structure of an obtaining unit 104 in a first decoding module 92 in an image decoding apparatus according to an embodiment of the present invention
  • FIG. 12 is a block diagram 2 of a preferred structure of the obtaining unit 104 in the first decoding module 92 in the image decoding apparatus according to the embodiment of the present invention
  • FIG. 13 is a block diagram 3 of a preferred structure of the obtaining unit 104 in the first decoding module 92 in the image decoding apparatus according to the embodiment of the present invention
  • FIG. 14 is a schematic diagram of a coding unit divided into a set of L microblocks, microblock matching encoding and decoding, microblock size, matching microblocks, and matched microblocks, in accordance with a preferred embodiment of the present invention
  • 15 is a schematic flow chart of an encoding method according to a preferred embodiment of the present invention.
  • 16 is a schematic flow chart of a decoding method according to a preferred embodiment of the present invention.
  • Figure 17 is a block diagram showing the structure of an encoding apparatus according to a preferred embodiment of the present invention.
  • Figure 18 is a block diagram showing the structure of a decoding apparatus in accordance with a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of an image encoding method according to an embodiment of the present invention. As shown in FIG. 1 , the flow includes the following steps: it should be noted that the above or below The term “matched microblocks” is more commonly referred to as “microblocks.” “Matching microblocks” is more commonly referred to as “reference microblocks.”
  • Step S102 the coding block is divided into L microblocks, where L is a preset number of microblock partitions, for example, the preset number of microblock partitions L may be any integer from 4 to 64;
  • Step S104 determining a displacement vector between the micro-block and a reference micro-block in the preset reconstructed pixel sample set, wherein the displacement vector is a pixel position of the reference micro-block in a preset pixel coordinate system and micro a vector between the pixel locations of the block;
  • step S106 the displacement vector is encoded and written into the code stream.
  • the coding block is divided into L microblocks, and the compressed code stream is obtained according to the relative position between the microblock and the reference microblock included in the reconstructed pixel sample set, that is, the displacement vector, relative to the correlation.
  • encoding is performed in units of coding blocks, resulting in a problem of low coding efficiency.
  • the coding is performed according to the displacement vector between the microblock and the reference microblock, thereby effectively improving the coding. effectiveness.
  • the above coding block or the following decoding block refers to an area in which coding or decoding is performed in one frame image, including one of the following: a coding unit (Code Unit, CU for short), and a prediction unit (Predict Unit) , referred to as PU), and the transfer unit (TU).
  • a coding unit Code Unit, CU for short
  • Predict Unit Predict Unit
  • PU prediction unit
  • TU transfer unit
  • the most basic element in encoding or decoding may be one pixel or one pixel component.
  • a pixel or a pixel component that is the most basic element of encoding or decoding is commonly referred to as a pixel sample, sometimes referred to as a pixel value, or simply as a sample.
  • Microblock matching can also use one of the following aliases: intraframe microblock replication, microblock replication.
  • the displacement vector can also use one of the following aliases: copy position, matching position, position, distance, relative distance, displacement, movement amount, motion vector, offset, offset vector, block vector, compensation amount, compensation, Linear address difference, address difference, relative linear address, address, 2D coordinate difference, coordinate difference, relative coordinates, coordinates, and so on.
  • At least one of the following operations may be performed on the displacement vector of the micro-block: performing individual transformation on the displacement vector of the micro-block in the coding block
  • the individual transform values obtained by performing the individual transform on the displacement vector of the microblock in the coding block or the displacement vector of the microblock are globally transformed.
  • the individual displacement vector transformation can be performed on the micro-block first, and then the overall displacement vector transformation is performed, that is, the whole displacement vector of the L individual transformations, that is, the entire displacement vector group, and then the displacement vectors are correlated with each other. The overall transformation.
  • each displacement vector includes not only L displacement vectors of the current CU, but also K displacement vectors of several CUs or several microblocks adjacent to or nearby (normally K is 1 to 4) An integer), that is, there are a total of L + K displacement vectors.
  • the individual transformation of the displacement vector of the microblock in the coding block may be performed by modifying the displacement vector using the first predetermined offset to obtain a sum of the additive offset and the input parameter.
  • the first predetermined offset may be obtained in multiple manners.
  • the first predetermined offset may be determined by: determining a first predetermined offset according to the displacement vector; according to the encoded block or The encoding parameters of the encoded microblocks determine a first predetermined offset.
  • the displacement vector or the individual of the microblock may be determined first. Transforming a first displacement vector of the value or a first prediction value of the first individual transformation value; thereafter, determining a difference between the first displacement vector or the first individual transformation value and the corresponding first prediction value; A difference between other displacement vectors or individual transformation values other than the first displacement vector or the first individual transformation value and its previous displacement vector or individual transformation values is determined.
  • the overall transformation is preceded by the displacement vector of the micro-block, and the overall transformation is followed by the corresponding determined difference.
  • the method before determining the displacement vector between the microblock and the reference microblock in the preset set of reconstructed pixel samples, the method further includes: determining, by using a predetermined rule, a reference microblock corresponding to the microblock, wherein the predetermined rule may be The method includes at least one of: a lossless matching that matches a residual residual value of zero, and a lossy matching that matches a residual residual value that is not zero, and the matching residual difference is a difference between a pixel value of the reference microblock and a pixel value of the microblock.
  • the reference microblock is selected here mainly for matching the reference microblock with the smallest error, that is, the optimal microblock, in the predetermined reconstructed pixel sample set, so that the encoding is accurate and the error is small.
  • FIG. 2 is a flowchart of an image decoding method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 decoding a code stream of the decoded block to obtain a displacement vector of the microblock, wherein the decoding block includes a preset number of microblock partitioning L microblocks, and the displacement vector is a pixel position of the reference microblock and a pixel of the microblock a vector between positions, it should be noted that the predetermined number L may be any one of 4 to 64;
  • Step S204 determining, according to the displacement vector of the microblock and the pixel position of the microblock, a pixel position of the reference microblock corresponding to the preset microblock in the reconstructed pixel sample set;
  • Step S206 decoding the microblock according to the pixel position of the reference microblock.
  • the decoding is performed in units of the entire decoding block, resulting in a problem of low decoding efficiency.
  • the division of the decoding block into L microblocks according to the microblocks included in the decoding block and the reference microblocks.
  • the displacement vector is decoded to effectively improve the decoding efficiency.
  • the above decoding block may also include one of the following: a coding unit CU, a prediction unit PU, and a transformation unit TU.
  • the decoding of the code stream of the decoding block to obtain the displacement vector corresponding to the microblock may also adopt various methods, for example, first parsing the code stream of the decoding block, and obtaining the parameter of the displacement vector corresponding to the microblock; Obtaining a displacement vector of the microblock by at least one of the following methods: performing overall transformation on a parameter corresponding to part or all of the displacement vector of the microblock in the decoding block to obtain a displacement vector of the microblock; and shifting part or all of the microblock in the decoding block
  • the vector corresponding parameter or the parameter obtained by performing overall transformation on the parameter corresponding to part or all of the displacement vector of the microblock in the decoding block is subjected to individual transformation to obtain a displacement vector of the microblock.
  • the parameter corresponding to part or all of the displacement vectors of the microblocks in the decoding block is globally transformed to obtain the displacement vector of the microblock, and the following method may be used: first determining the parameter corresponding to part or all of the displacement vectors of the microblocks in the decoding block. a second predicted value of a parameter; then a sum of the first parameter and the second predicted value is determined; and a sum between the other parameter except the first parameter and the sum obtained using the previous parameter is determined.
  • Performing an individual transformation on a parameter corresponding to part or all of the displacement vector of the microblock in the decoding block or a parameter obtained by performing overall transformation on a parameter corresponding to a part or all of the displacement vector of the microblock in the decoding block to obtain a displacement vector of the microblock includes Correcting a parameter corresponding to part or all of the displacement vector of the microblock in the decoding block or a parameter obtained by performing overall transformation on the parameter corresponding to part or all of the displacement vector of the microblock in the decoding block, using the second predetermined offset.
  • the method further includes: determining, by at least one of the following methods, a second predetermined offset: determining a second predetermined offset according to the parameter of the displacement vector; determining according to the encoded parameter of the encoded block or the encoded microblock The second predetermined offset.
  • an image encoding and decoding device is further provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 3 is a block diagram showing the structure of an image encoding apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes a dividing module 32, a first determining module 34, and an encoding module 36, which will be described below.
  • the dividing module 32 is configured to divide the coding block into L microblocks, where L is a preset number of microblock partitions. Preferably, the preset number of microblock partitions L may be 4 to 64.
  • An integer determining unit 34 coupled to the dividing module 32, configured to determine a displacement vector between the microblock and a reference microblock in the preset set of reconstructed pixel samples, wherein the displacement vector is in advance a vector between the pixel position of the reference microblock and the pixel position of the microblock in the set pixel coordinate system; the encoding module 36 is coupled to the first determining module 34, configured to encode the displacement vector and write the code stream.
  • the above coding block may include one of the following: a coding unit CU, a prediction unit PU, and a transformation unit TU.
  • FIG. 4 is a block diagram of a preferred structure of an image encoding apparatus according to an embodiment of the present invention.
  • the apparatus includes at least one of the following: in addition to all the modules shown in FIG. 3: the individual transform module 42 and the whole Transform module 44, which will be described below. It should be noted that only the case where both the individual transform module 42 and the integral transform module 44 are included in FIG. 4 is shown in FIG.
  • the individual transformation module 42 is configured to perform an individual transformation on the displacement vector of the microblock in the coding block; the global transformation module 44 is configured to perform the individual transformation on the displacement vector of the microblock in the coding block or the displacement vector of the microblock.
  • the individual transformed values are transformed as a whole.
  • FIG. 5 is a block diagram showing a preferred structure of the individual transform module 42 in the image encoding apparatus according to the embodiment of the present invention. As shown in FIG. 5, the individual transform module 42 includes a correcting unit 52, which will be described below.
  • Correction unit 52 is arranged to correct the displacement vector using a first predetermined offset.
  • FIG. 6 is a block diagram of a preferred structure of the individual transform module 42 in the image encoding apparatus according to the embodiment of the present invention.
  • the individual transform module 42 includes, in addition to the correcting unit 52 shown in FIG. A determining unit 62, the first determining unit 62 will be described below.
  • the first determining unit 62 is connected to the above-mentioned correcting unit 52, and is configured to determine a first predetermined offset by at least one of: determining a first predetermined offset according to the displacement vector; according to the encoded block or the encoded The encoding parameters of the microblocks determine a first predetermined offset.
  • FIG. 7 is a block diagram showing a preferred structure of the overall transform module 44 in the image encoding apparatus according to an embodiment of the present invention.
  • the overall transform module 44 includes: a second determining unit 72, a third determining unit 74, and a fourth determining. Unit 76, the overall transform module 44 is described below.
  • the second determining unit 72 is configured to determine a displacement vector of the microblock or a first displacement vector of the first transformation vector or the first individual transformation value, and a third prediction unit 74, connected to the second determining unit 72. Set to determine a difference between the first displacement vector or the first individual transformation value and the corresponding first prediction value; the fourth determining unit 76 is connected to the third determining unit 74, and is configured to determine the first one. The difference between the displacement vector or other displacement vector or individual transformation value other than the first individual transformation value and its previous displacement vector or individual transformation value.
  • FIG. 8 is a block diagram of a preferred structure of an image encoding apparatus according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes, in addition to all the modules shown in FIG. 3, a second determining module 82. The second determination module 82 is described.
  • the second determining module 82 is connected to the foregoing dividing module 32 and the first determining module 34, and is configured to determine a reference microblock corresponding to the microblock by using a predetermined rule, where the predetermined rule includes at least one of the following: the matching residual value is zero The lossless matching, the matched residual difference is not zero, wherein the matching residual value is the difference between the pixel value of the reference microblock and the pixel value of the microblock.
  • FIG. 9 is a structural block diagram of an image decoding apparatus according to an embodiment of the present invention. As shown in FIG. 9, the apparatus includes a first decoding module 92, a third determining module 94, and a second decoding module 96. .
  • the first decoding module 92 is configured to decode the code stream of the decoding block to obtain a displacement vector of the microblock, where the decoding block includes a preset number of microblock partitioning L microblocks, and the displacement vector is a pixel position of the reference microblock.
  • the predetermined number of partitions L of the microblocks may be any integer from 4 to 64;
  • the third determining module 94 is connected to the first decoding module 92, and is configured.
  • the second decoding module 96 is connected to the third determination Module 94 is configured to decode the microblocks based on the pixel locations of the reference microblocks.
  • the above decoding block may include one of the following: a coding unit CU, a prediction unit PU, and a transformation unit TU.
  • FIG. 10 is a block diagram showing a preferred structure of a first decoding module 92 in an image decoding apparatus according to an embodiment of the present invention.
  • the first decoding module 92 includes a parsing unit 102 and an obtaining unit 104.
  • a decoding module 92 is described.
  • the parsing unit 102 is configured to parse the code stream of the decoding block to obtain a parameter of the displacement vector corresponding to the micro block; the obtaining unit 104 is connected to the parsing unit 102, and is configured to obtain the displacement of the micro block according to at least one of the following manners according to the parameter.
  • Vector performing overall transformation on a parameter corresponding to part or all of the displacement vector of the microblock in the decoding block to obtain a displacement vector of the microblock; a parameter corresponding to part or all of the displacement vector of the microblock in the decoding block or in the decoding block
  • the parameters obtained by the overall transformation of the parameters corresponding to some or all of the displacement vectors of the microblock are individually transformed to obtain the displacement vector of the microblock.
  • the obtaining unit 104 includes a first determining subunit 112 and a second determining unit.
  • the unit 114 and the third determining subunit 116 are described below.
  • a first determining subunit 112 configured to determine a second predicted value of a first parameter of a parameter corresponding to a part or all of the displacement vectors of the microblock in the decoding block; and a second determining subunit 114 connected to the first determining unit
  • the unit 112 is configured to determine a sum value of the first parameter and the second predicted value;
  • the third determining subunit 116 is connected to the second determining subunit 114, and is configured to determine other parameters and uses except the first parameter. The sum of the values obtained from the previous parameter.
  • FIG. 12 is a block diagram showing a preferred structure of the obtaining unit 104 in the first decoding module 92 in the image decoding apparatus according to the embodiment of the present invention.
  • the obtaining unit 104 includes: a modifying subunit 122, and the correction is as follows. Subunit 122 is described.
  • the correction subunit is configured to use a second predetermined offset to perform a global transformation on a parameter corresponding to a part or all of the displacement vectors of the microblocks in the decoding block or a parameter corresponding to a part or all of the displacement vectors of the microblocks in the decoding block.
  • the obtained parameters are corrected.
  • FIG. 13 is a block diagram 3 of a preferred structure of the obtaining unit 104 in the first decoding module 92 in the image decoding apparatus according to the embodiment of the present invention.
  • the obtaining unit 104 includes the correction sub-unit 122 included in FIG.
  • the method further includes: a fourth determining subunit 132, which is described below.
  • a fourth determining subunit 132 coupled to the above modifying subunit 122, configured to determine a second predetermined offset by at least one of: determining a second predetermined offset according to a parameter of the displacement vector; according to the encoded encoding block Or the encoding parameters of the encoded microblocks determine a second predetermined offset.
  • FIG. 14 is a schematic diagram of a coding unit divided into a set of L microblocks, microblock matching coding and decoding, microblock size, matching microblocks and matched microblocks, in accordance with a preferred embodiment of the present invention, wherein the coding block is The CU is described as an example, as shown in FIG.
  • the matching microblocks and matched microblocks shown in FIG. 14 may be matched microblocks and matched microblocks in a stacked format, or may be matched microblocks and matched microblocks of one component (sample) of a planar format.
  • the method and apparatus of the preferred embodiment of the present invention can be applied to both encoding and decoding of pixels of LCUs and CUs in a stacked format, as well as encoding of pixel values of a plane of LCUs and CUs in a planar format. And decoding.
  • a 1x4 microblock consisting of 4x2 microblocks consisting of 4x2 8 pixels or pixel samples with a width of 4 and a height of 2.
  • the most basic characteristic feature is that when encoding the current CU, the CU is divided into a group of L (usually L ⁇ 4) microblocks, which are called matched microblocks.
  • L usually L ⁇ 4
  • Each matching microblock is characterized by a parameter, a displacement vector (the relative position or distance between the matching microblock and the matched microblock in the current coding unit).
  • the starting position of the matching microblock may be the position of any pixel sample or pixel in the reconstructed reference pixel sample set, regardless of the size of the microblock, and is not limited by the size of the microblock. That is, the displacement vector is in units of pixel samples or pixels rather than microblocks.
  • the most essential feature of the preferred embodiment of the present invention further includes performing a transformation independent of other displacement vectors for each of the L displacement vectors, referred to as an individual transformation, to remove partial redundancy present in each displacement vector. degree. For the whole of the displacement vectors after L individual transformations, that is, the entire displacement vector group, an overall transformation of the displacement vectors associated with each other is performed to remove the partial redundancy existing between the displacement vectors.
  • the displacement vector (referred to as the overall transform displacement vector) after the double transformation of the individual transformation and the overall transformation is entropy encoded to obtain the final displacement vector compression data.
  • the displacement vector compressed data is part of the output video compression code stream of the encoding method and apparatus.
  • the most basic characteristic feature is that when the compressed code stream data of the currently decoded CU is decoded, the displacement vector compressed data is read out from the code stream data, and is obtained by entropy decoding.
  • the displacement vector is transformed as a whole, and then the inverse global transformation and the inverse individual transformation are performed to obtain a set of L displacement vectors of a primitive form of a CU in the current decoding.
  • the L displacement vectors correspond to the L matched microblocks of the currently decoded CU.
  • the position of the matching microblock among the reconstructed reference pixel sample sets is calculated from the position and displacement vector of the matched microblock.
  • the matching microblock is copied from the reconstructed reference pixel sample set, and the matched microblock is moved and pasted to the position of the matched microblock in the currently decoded CU, and the matched microblock is restored.
  • the starting position of each matching microblock may be the position of any pixel sample in the reconstructed reference pixel sample set, regardless of the size of the microblock, and is not affected by the size of the microblock. limit. That is, the displacement vector is in units of pixel samples rather than microblocks.
  • the starting position of the matched microblock in the current CU is always L positions in microblocks, and cannot be the position of any pixel sample.
  • FIG. 15 is a schematic flow chart of an encoding method according to a preferred embodiment of the present invention, as shown in FIG.
  • the encoding method of the preferred embodiment of the present invention includes the following steps:
  • microblock matching encoding on an input coding unit that is, the original pixel of the CU
  • L optimal displacement vectors, that is, matching relative positions or matching distances, in units of pixel samples; That is, the CU is divided into L microblocks, which are called matched microblocks.
  • the search is respectively compared with L.
  • the displacement vector is the difference between the position coordinates of the matching microblock and the position coordinates of the matched microblock;
  • the unit of the displacement vector is the pixel sample (the whole pixel sample or the binary image) The smallest coordinate unit of one, one quarter, one eighth pixel sample) is not a microblock;
  • the output of the microblock matching code is L displacement vectors and matching residuals;
  • the matching residual is the pixel of the matching microblock The difference between the value of the value and the value of the pixel sample of the matched microblock; the displacement vector is also referred to as the original displacement vector;
  • entropy coding including entropy coding of the overall transform displacement vector), deblocking filtering, sample self Adaptive Adaptive Offset
  • the input to this step is the output of step 1), the output of step 3), and The original pixel input by the encoding method
  • the output of the step is a reconstructed pixel and a compressed code stream containing the displacement vector compressed data and other encoding results
  • the reconstructed pixel is placed in the reconstructed reference pixel sample temporary storage area, and used as The reference pixels required for the subsequent CU's microblock matching encoding step, the remaining common encoding and reconstruction steps
  • the compressed code stream is also the final output of the encoding method.
  • FIG. 16 is a schematic flow chart of a decoding method according to a preferred embodiment of the present invention, as shown in FIG. 16.
  • the decoding method of the preferred embodiment of the present invention includes the following steps:
  • the compressed code stream with the displacement vector compressed data and other coding results is parsed and entropy decoded, and the 1) the whole transform displacement vector of the matched microblock obtained by parsing and entropy decoding is output, 2) the matching microblock obtained by parsing and entropy decoding Matching the residual and the remaining parsed and entropy decoded data;
  • L pieces of microblock matching decoding of the CU are performed using the input L displacement vectors; that is, L matching determined by the displacement vector and the position of the currently matched microblock in the CU from the reconstructed reference pixel sample temporary storage area Positioning the microblocks, copying all the pixel samples of the L matching microblocks one by one, and moving and pasting the L matching microblocks to the positions of the L currently matched microblocks, restoring all L matched microblocks;
  • the unit of the vector is the smallest coordinate unit of the pixel sample (the whole pixel sample or one-half, one-quarter, one-eighth pixel sample) instead of the micro-block; the L matched micro-blocks are combined CU; the output of this step is the pixel sample of the restored matched microblock;
  • the remaining common decoding and reconstruction steps such as intra prediction, inter prediction, inverse transform, inverse quantization, compensation corresponding to prediction residual and matching residual (ie, inverse operation of residual operation), deblocking filtering , Sample Adaptive Offset; the input of this step is the output of the above step 4) and the output of the above step 1) 2) that is, the remaining parsing and entropy decoding data; the output of this step is the reconstructed pixel (including fully reconstructed pixels and different degrees of partially reconstructed pixels); the reconstructed pixels are placed in the reconstructed reference pixel sample temporary storage area, used as a subsequent microblock matching decoding step, and the remaining common decoding and reconstruction steps are The required reference pixels; fully reconstructed pixels are also the final output of this decoding method.
  • FIG 17 is a block diagram showing the structure of an encoding apparatus in accordance with a preferred embodiment of the present invention, as shown in Figure 17.
  • the entire coding device consists of the following modules:
  • a microblock matching search encoding module (functioning with the first determining module 34 described above): performing microblock matching encoding on the input video image pixel samples, and dividing each input coding unit, ie, CU, into a group of L microblocks, called being Matching the microblocks, searching for L optimal matching microblocks relative to the L matched microblocks according to a predetermined evaluation criterion within a predetermined search range among the reconstructed reference pixel sample sets;
  • the difference between the position coordinates of any matching microblock and the position coordinates of the corresponding matched microblock is called the displacement vector;
  • the unit of the displacement vector is the pixel sample (the whole pixel sample or one-half, one-quarter, eight The smallest coordinate unit of a pixel sample) is not a microblock; there are a total of L displacement vectors for each CU; the output of this module is the displacement vector and the matching residual; the matching residual is the pixel sample of the matching microblock.
  • An individual transformation module (functioning with the individual transformation module 42 described above): performing a transformation independent of other displacement vectors for each of the L displacement vectors of a currently encoded CU output by the module 1), referred to as an individual transformation, to remove the presence Partial redundancy in each displacement vector, the individual transformation displacement vector is obtained and the individual transformation displacement vector is output;
  • the overall transformation module (functions as described above with the overall transformation module 44): the whole of the L individual transformation displacement vectors outputted by the above module 2), that is, the entire displacement vector group, and then performs an overall transformation of the displacement vectors associated with each other, and obtains an overall
  • the transformed displacement vector is called the global transformation displacement vector to remove the partial redundancy existing between the whole set of L displacement vectors; the output of the module is the overall transformation displacement vector;
  • the remaining common techniques of coding and reconstruction modules performing various common techniques such as intra prediction, inter prediction, transform, quantization, inverse transform, inverse quantization, deblocking filtering, sample adaptive compensation (Sample Adaptive Offset), the encoding and reconstruction operations; the input of this module is the output of module 1) and the original input video image pixel sample; the output of this module is the reconstructed pixel and the rest of the encoding result; the reconstructed pixel is placed heavily
  • the reference pixel sample temporary storage module is used as a reference pixel required for the subsequent CU microblock matching search encoding, and the remaining common techniques of encoding and reconstruction;
  • Reconstructing the reference pixel sample temporary storage module temporarily storing the pixel samples of the reconstructed reference pixel sample set, that is, the position of the matched microblock in the current encoding or the position of the CU in the current encoding. All reconstructed pixel samples are used as reference pixel samples for the matched microblocks in the current and subsequent encodings (ie, pixel samples of the candidate matching reference microblocks), and are also used to perform various common purposes for current and subsequent CUs. Reference pixel samples required for coding and reconstruction operations of the technology;
  • Entropy coding module (functioning with the above coding module 36): performing entropy coding operation on all coding results that need to be output to the compressed code stream, including the overall transformation displacement vector and the remaining coding results; the result of entropy coding, that is, the displacement vector
  • the compressed stream of compressed data and other encoded results is also the final output of the encoding device.
  • FIG. 18 is a block diagram showing the structure of a decoding apparatus in accordance with a preferred embodiment of the present invention, as shown in Figure 18.
  • the entire decoding device consists of the following modules:
  • Entropy decoding module (functioning with the first decoding module 92 described above): performing entropy decoding on the input compressed vector stream with displacement vector compression data and other encoding results, and parsing the meaning of various data obtained by entropy decoding;
  • the overall transform displacement vector is sent to the inverse overall transform module;
  • the parsed residual and the remaining data are sent to the remaining common techniques for decoding and reconstructing the module;
  • Inverting the overall transform module (performing the same function of the obtaining unit 104 described above): performing an inverse overall transformation of the respective displacement vectors associated with each other for a set of L global transform displacement vectors belonging to a currently decoded CU output by the module 1), obtaining and outputting a set of individual transformation displacement vectors of the CU;
  • the inverse individual transformation module (executing the same function of the obtaining unit 104 described above): performing an inverse individual transformation independent of other individual transformation displacement vectors for each of the individual transformation displacement vectors output by the module 2), obtaining and outputting L displacements of the original form Vector, the original displacement vector;
  • a microblock matching decoding module (functioning with the second decoding module 96 described above): the input of the module is a displacement vector output by the module 3); the module is from the reconstructed reference pixel sample set by the displacement vector and the current decoding Matching the position of the microblock to calculate the position of the matched microblock, copying all the samples of the entire matching microblock, and moving and pasting the entire matching microblock to the position of the matched microblock in the current decoding, restoring the entire matched microblock
  • the unit of the displacement vector is the smallest coordinate unit of the pixel sample (the whole pixel value or one-half, one-quarter, one-eighth pixel sample) instead of the micro-block; the output of this module is restored. Pixel samples of matched microblocks; L restored matched microblocks are combined to form a CU;
  • the remaining common techniques of decoding and reconstruction modules performing the remaining common techniques for the matched microblocks in the current decoding or the currently decoded CU, such as intra prediction, inter prediction, inverse transform, inverse quantization, corresponding to Predicting the residual and matching residuals (ie, taking the inverse of the residual operation), deblocking filtering, sample adaptive offset (Sampling Adaptive Offset), decoding and reconstruction operations; the output of this module is reconstructed Pixels (including fully reconstructed pixels and different degrees of partially reconstructed pixels); reconstructed pixels are placed in the reconstructed reference pixel sample temporary storage module, used as a subsequent block CU microblock matching decoding operation and the rest of the commonly used
  • the reference pixels required for technical decoding and reconstruction operations; the fully reconstructed pixels are also the final output of the present decoding device;
  • Reconstructing the reference pixel sample temporary storage module temporarily storing the pixel samples of the reconstructed reference pixel sample set, that is, the position of the matched microblock in the current decoding during the decoding process or until the position of the CU in the current decoding All reconstructed pixel samples are used as reference pixel samples for the matched microblocks in the current and subsequent decodings (ie, pixel samples of the reference microblock microblocks), and are also used to perform various common techniques for current and subsequent CUs. Reference pixel samples required for decoding and reconstructing operations.
  • DV[0] is the displacement vector of the adjacent or nearby CU or the microblock therein.
  • DV[0] is the displacement vector of the adjacent or nearby CU or the microblock therein.
  • the overall transform displacement vector is obtained by horizontal difference operation or vertical difference operation or high order difference operation or matrix operation on the two-dimensional array of the above displacement vectors; the overall transformation displacement vector is also arranged in the form of a two-dimensional array of displacement vectors;
  • the result of the above operation 1) is inversely sorted into L displacement vectors (actually individual transformation displacement vectors).
  • a displacement vector DV can itself be represented as a 2-tuple (DVx, DVy), where DVx is the horizontal distance between the matching microblock and the matched microblock and DVy is the vertical distance between the matching microblock and the matched microblock. .
  • W and H be the maximum horizontal distance and the maximum vertical distance of two pixels in one frame of image, respectively, then DVx and DVy satisfy 0 ⁇ DVx ⁇ W and 0 ⁇ DVy ⁇ H.
  • a displacement vector DV itself can also be represented as a number DVL, commonly referred to as a linear distance.
  • H (or W) is a sufficiently large constant, at least greater than the maximum of DVy (or DVx).
  • DVL H x DVx + DVy
  • DVx and DVy are the quotient and remainder of DVL ⁇ H, respectively.
  • DVL W x DVy + DVx
  • DVx and DVy are the remainder and quotient of DVL ⁇ W, respectively.
  • microblock matching may be an exact (ie, lossless) matching, in which case the matching residual is zero.
  • microblock matching may also be an approximate (ie, lossy) matching, in which case the matching residual is not zero.
  • a coding unit ie, a CU
  • the number of microblocks in a CU may be any integer from 4 to 64.
  • L may be equal to 4, or equal to 5, or equal to 6, or equal to 7, or equal to 8, or equal to 9, or equal to 10, or equal to 11. , or equal to 12, or equal to 13, or equal to 14, or equal to 15, or equal to 16, or equal to any constant between 17 and 32.
  • the coding unit in the compressed code stream containing the displacement vector compressed data and other coding results, that is, the CU portion is composed of sequential syntax elements loaded with the following information:
  • microblock matching referred to above or below is more commonly referred to as microblock replication.
  • the height of the microblock is 1 pixel or pixel sample and the width is equal to the width of the coding block or the decoding block, which is called horizontal line matching, horizontal line copying, horizontal bar matching, and horizontal bar copying.
  • the width of the microblock is 1 pixel or pixel sample and the height is equal to the height of the coded block or the decoded block, called vertical line matching, vertical line copying, Vertical bar matching, vertical bar copying.
  • the special cases of these two types of microblock matching are collectively referred to as line matching, line copying, strip matching, and strip copying.
  • the coding block or the decoding block is composed of JxK, that is, horizontal J and vertical K pixels or pixel samples, and is divided into K equal-sized micro-blocks, each of which is Jx1 pixel or horizontal bar of pixel samples.
  • the coding block or the decoding block is composed of JxK, that is, horizontal J and vertical K pixels or pixel samples, and is divided into J equal-sized micro-blocks, each of which is 1xK pixels or vertical bars of pixel samples.
  • the PU unit which is a prediction unit in the compressed code stream including the displacement vector compressed data and other encoding results, is composed of sequential syntax elements loaded with at least the following information:
  • the order in which the other syntax elements are placed in the code stream is not unique, and any predetermined sequence may be adopted; a syntax element may also be split into several parts, and several parts may be concentrated. Placed in the same place in the code stream, they can also be placed in different places in the code stream; several syntax elements can also be combined into one syntax element; some syntax elements can also exist in a PU or a displacement vector code.
  • a syntax element may also not be directly present in the stream data but derived from other encoding or decoding parameters or variables.
  • an inverse total pre-transformation form of L horizontal strips or L-displacement vectors of a decoding block (PU) of height or width of L pixel samples ie, displacement vector in strip copy coding
  • the overall transformed form is the displacement vector difference.
  • L displacement vector differences DVD[1], DVD[2], ...DVD[L-1], DVD[L] from L displacement vector differences DVD[1], DVD[2], ...DVD[ L-1], DVD[L] decoding obtains L displacement vectors DV[1], DV[2], ... DV[L-1], and the decoding process of DV[L] is as follows:
  • the adjacent or nearby decoded blocks in which decoding has been completed include, but are not limited to, a left decoding block, an upper left decoding block, an upper decoding block, and an upper right decoding block, wherein the existing displacement vectors include, but are not limited to, those that have been decoded. 1 to 8 historical displacement vectors retained in accordance with predetermined rules during decoding of the decoded block,
  • DV[L-1] is obtained from DVD[L-1] and DV[L-2] according to predetermined rules
  • DV[L] is obtained from DVD[L] and DV[L-1] according to a predetermined rule.
  • an inverse total pre-transformation form of L horizontal strips or L-displacement vectors of a decoding block (PU) of height or width of L pixel samples ie, displacement vector in strip copy coding
  • the overall transformed form is the displacement vector difference.
  • L displacement vector differences DVD[1], DVD[2], ...DVD[L-1], DVD[L] from L displacement vector differences DVD[1], DVD[2], ...DVD[ L-1], DVD[L] decoding obtains L displacement vectors DV[1], DV[2], ... DV[L-1], and the decoding process of DV[L] is as follows:
  • the DVP is a displacement vector selected according to a predetermined rule from the decoded blocks that have been decoded or all or part of the existing displacement vectors of the strips (microblocks) according to a predetermined rule.
  • the "inverse global transformation” and the "inverse individual transformation” referred to above in the decoding method and the decoding apparatus are terms corresponding to "integral transformation” and “individual transformation” in the encoding method and the encoding apparatus.
  • "inverse global transformation” and “inverse individual transformation” are more commonly referred to directly as “integral transformation” and "individual transformation”.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the above embodiments and preferred embodiments solve the problem of encoding and decoding an image in the related art, and there is a problem of image compression and low decompression efficiency, thereby achieving an effect of improving image encoding and decoding efficiency.

Landscapes

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

Abstract

一种图像编码、解码方法及装置,其中,该方法包括:将编码块划分为L个微块,其中,L为预先设定的微块划分数目;确定微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量,其中,位移矢量为在预先设定的像素坐标系中参考微块的像素位置与微块的像素位置之间的向量;对位移矢量进行编码并写入码流,通过本方法和装置,解决了相关技术中对图像进行编码及解码,存在图像压缩,解压效率不高的问题,进而达到了提高图像编码、解码效率的效果。

Description

图像编码、解码方法及装置 技术领域
本发明涉及通信领域,具体而言,涉及一种图像编码、解码方法及装置。
背景技术
随着以远程桌面为典型表现形式的新一代云计算与信息处理模式及平台的发展和普及,多台计算机之间、计算机主机与智能电视、智能手机、平板电脑等其他数字设备之间及各种各类数字设备之间的互联已经成为现实并日趋成为一种主流趋势。这使得服务器端(云)到用户端的实时屏幕传输成为当前的迫切需求。由于需要传输的屏幕视频数据量巨大,对计算机屏幕图像必须进行高效高质量的数据压缩。
充分利用计算机屏幕图像的特点,对计算机屏幕图像进行超高效率的压缩,也是最新国际视频压缩标准HEVC(High Efficiency Video Coding)的一个主要目标。
计算机屏幕图像的一个显著特点是同一帧图像内通常会有很多相似甚至完全相同的像素图样(pixel pattern)。例如,计算机屏幕图像中常出现的中文或外文文字,都是由少数几种基本笔划所构成,同一帧图像内可以找到很多相似或相同的笔划。计算机屏幕图像中常见的菜单、图标等,也具有很多相似或相同的图样。现有的图像和视频压缩技术中采用的帧内预测(intra prediction)方式,仅参考相邻的像素样值,无法利用一帧图像中的相似性或相同性来提高压缩效率。现有技术中的帧内运动补偿(intra motion compensation)方式也称为帧内块复制(intra block copy)方式,用几种固定大小(8x8,16x16,32x32,64x64像素)的块来进行帧内块匹配(intra block matching)编码,不能达到具有各种不同大小和形状的比较精细的匹配。而另一种现有技术中的串匹配(string matching)方式,虽然能有效找到各种不同大小和形状的精细匹配,但却存在复杂度、计算量、存储器读写带宽都较大等问题。因此,必须寻求新的编码工具,既能充分发掘和利用计算机屏幕图像中存在的相似或相同图样,以大幅度提高压缩效果,又把复杂度、计算量、存储器读写带宽等都控制在较小的范围内。
屏幕图像的数字视频信号的自然形式是图像的序列。一帧图像通常是由若干像素组成的矩形区域,而数字视频信号就是由几十帧至成千上万帧图像组成的视频图像序列,有时也简称为视频序列或序列。对数字视频信号进行编码就是对一帧一帧图像进行编码。
最新国际视频压缩标准HEVC中,对一帧图像进行编码时,把一帧图像划分成若干块MxM像素的子图像,称为“编码单元(Coding Unit简称CU)”,以CU为基本编码单位,对子图像一块一块进行编码。常用的M的大小是8,16,32,64。因此,对一个视频图像序列进行编码就是对各个编码单元依次进行编码。同样,解码时也是对各个编码单元依次进行解码,最终重构出整个视频图像序列。
为适应一帧图像内各部分图像内容与性质的不同,有针对性地进行最有效的编码,一帧图像内各CU的大小可以是不同的,有的是8x8,有的是64x64,等等。为了使不同大小的CU能够无缝拼接起来,一帧图像总是先划分成大小完全相同具有N x N像素的“最大编码单元(Largest Coding Unit简称LCU)”,然后每个LCU再进一步划分成多个大小不一定相同的CU。例如,一帧图像先划分成大小完全相同的64x64像素的LCU(N=64)。其中某个LCU由3个32x32像素的CU和4个16x16像素的CU构成。而另一个LCU由2个32x32像素的CU、3个16x16像素的CU和20个8x8像素的CU构成。对一帧图像进行编码,就是依次对一个一个CU进行编码。
一个彩色像素有3个分量(component)组成。最常用的两种像素色彩格式(pixel color format)是由绿色分量、蓝色分量、红色分量组成的GBR色彩格式和由一个亮度(luma)分量及两个色度(chroma)分量组成的YUV色彩格式也称YCbCr色彩格式。因此,对一个CU进行编码时,可以把一个CU分成3个分量平面(G平面、B平面、R平面或Y平面、U平面、V平面),对3个分量平面分别进行编码;也可以把一个像素的3个分量捆绑组合成一个3元组,对由这些3元组组成的CU整体进行编码。前一种像素及其分量的排列方式称为图像(及其CU)的平面格式(planar format),而后一种像素及其分量的排列方式称为图像(及其CU)的叠包格式(packed format)。
YUV色彩格式又可根据是否对色度分量进行下采样再细分成若干种子格式:1个像素由1个Y分量、1个U分量、1个V分量组成的YUV4:4:4像素色彩格式;左右相邻的2个像素由2个Y分量、1个U分量、1个V分量组成的YUV4:2:2像素色彩格式;左右上下相邻按2x2空间位置排列的4个像素由4个Y分量、1个U分量、1个V分量组成的YUV4:2:0像素色彩格式。一个分量一般用1个8~16比特的数字来表示。YUV4:2:2像素色彩格式和YUV4:2:0像素色彩格式都是对YUV4:4:4像素色彩格式施行色度分量的下采样得到。一个像素分量也称为一个像素样值(pixel sample)或简单地称为一个样值(sample)。
帧内块匹配(intra block matching,也称帧内运动补偿intra motion compensation或称帧内块复制intra block copy)编码就是在对一个CU进行编码时,在同一帧内的已重构(包括完全重构和不同程度的初步重构)参考像素样值集之中的某个预定的搜 索范围(search range)内搜索与所述CU(即被匹配块)之间匹配误差最小的一个匹配块(称为最优匹配块),然后把被匹配块与最优匹配块之间的相对位置(称为位移矢量即displacement vector简称DV)写入视频压缩码流中。
帧内块匹配解码就是在对一个CU进行解码时,根据从视频压缩码流中解析出来的一个DV,来确定同一帧内的已重构参考像素样值集之中的匹配块的位置,然后把所述匹配块复制和粘贴到所述CU(即被匹配块)的位置。
帧内串匹配(intra string matching)编码就是在对一个CU进行编码时,在同一帧内的已重构参考像素样值集之中的某个预定的搜索范围(search range)内搜索得到一个或多个最优的可变长度的像素样值匹配串,每个匹配串用一个匹配相对位置(位移矢量即displacement vector简称DV)和一个匹配长度,即一对(位移矢量,匹配长度)来表征。然后把一对或多对(位移矢量,匹配长度)写入视频压缩码流中。
帧内串匹配解码就是在对一个CU进行解码时,根据从视频压缩码流中解析出来的一对或多对(位移矢量,匹配长度),来确定同一帧内的已重构参考像素样值集之中的一个或多个像素样值匹配串的位置,然后把一个或多个所述匹配串复制和粘贴到所述CU的相对位置(即被匹配串的位置)。每个复制和粘贴的匹配串的像素样值数就是所述匹配长度。对应的被匹配串也具有相同的所述匹配长度。
帧内块匹配方式中,每个CU仅有一个位移矢量,存在匹配精度较低,匹配误差较大的问题,导致压缩效率不高。另一方面,帧内串匹配方式中,一个CU可能会有太多位移矢量和匹配长度,可能存在消耗太多比特数的问题,也可能导致压缩效率不高。因此,在相关技术中对图像进行编码及解码时,存在图像压缩,解压效率不高的问题。
发明内容
本发明提供了一种图像编码方法及装置,以至少解决相关技术中对编码单元进行图像编码及解码时,存在图像压缩,解压效率不高的问题。
根据本发明的一个方面,提供了一种图像编码方法,包括以下步骤:步骤1)对一个输入的编码单元即CU的原始像素进行微块匹配编码,产生出以像素样值为单位的一组L个(通常L≥4)最优的位移矢量即匹配相对位置或匹配距离;也就是把所述CU划分成L个微块,称为微块,在已重构参考像素样值集之中的一个预定的搜索范围内,按照预定的评估准则,搜索得到分别相对于所述L个微块的L个最优的参考微块;所述位移矢量就是所述参考微块的位置坐标与所述微块的位置坐标之差;所述位 移矢量的单位是像素样值(整像素样值或二分之一、四分之一、八分之一像素样值)的最小坐标单位而非微块;微块匹配编码的输出是L个所述位移矢量以及匹配残差;所述匹配残差就是所述参考微块的像素样值的数值与所述微块的像素样值的数值之差;所述位移矢量也称为原始位移矢量;步骤2)对L个所述位移矢量的每一个,进行独立于其他所述位移矢量的变换,称为个体变换,以去除存在于每一个所述位移矢量中的部分冗余度,得到个体变换位移矢量;步骤3)对L个经过所述个体变换的位移矢量(即所述个体变换位移矢量)的整体,即整个位移矢量组,再进行一次互相关联各个所述位移矢量的整体变换,得到经过所述整体变换的位移矢量,称为整体变换位移矢量,以去除存在于这组L个所述位移矢量整体之间的部分冗余度;步骤4)其余的常用编码和重构步骤,如帧内预测、帧间预测、变换、量化、逆变换、反量化、熵编码(包括对所述整体变换位移矢量的熵编码)、去块效应滤波、样值自适应补偿(Sample Adaptive Offset);本步骤的输入是所述步骤1)的输出,所述步骤3)的输出,以及本编码方法输入的所述原始像素;本步骤的输出是重构像素和含位移矢量压缩数据以及其他编码结果的压缩码流;所述重构像素放入已重构参考像素样值暂存区中,用作后续CU的微块匹配编码步骤、其余常用编码和重构步骤所需要的参考像素;所述压缩码流也是本编码方法的最后输出。
根据本发明的另一方面,提供了一种图像解码方法,包括以下步骤:步骤1)对含位移矢量压缩数据以及其他编码结果的压缩码流进行解析和熵解码,输出1)解析和熵解码得到的参考微块的整体变换位移矢量,2)解析和熵解码得到的参考微块的匹配残差与其余解析和熵解码得到的数据;步骤2)对属于一个当前解码CU的一组L个所述整体变换位移矢量整体进行互相关联各个位移矢量的逆整体变换,得到并输出属于所述CU的一组个体变换位移矢量;步骤3)对所述个体变换位移矢量的每一个进行独立于其他所述个体变换位移矢量的逆个体变换,得到并输出原始形式的L个位移矢量,即原始位移矢量;步骤4)使用输入的L个位移矢量进行所述CU的L个微块匹配解码;也就是从已重构参考像素样值暂存区中由所述位移矢量和所述CU中当前微块的位置计算确定的L个参考微块的位置,逐个复制L个所述参考微块的所有像素样值,并将L个所述参考微块移动和粘贴到L个当前所述微块的位置,复原出所有L个所述微块;所述位移矢量的单位是像素样值(整像素样值或二分之一、四分之一、八分之一像素样值)的最小坐标单位而非微块;L个所述微块合在一起构成所述CU;本步骤的输出是复原的所述微块的像素样值;步骤5)其余的常用解码和重构步骤,如帧内预测、帧间预测、逆变换、反量化、对应于预测残差和匹配残差的补偿(即取残差运算的逆运算)、去块效应滤波、样值自适应补偿(Sample Adaptive Offset);本步骤的输入是上述步骤4)的输出和上述步骤1)的输出2)即其余解析和熵解码得到的数据;本步骤的输出是重构像素(包括完全重构像素和不同程度的部分重构像素); 所述重构像素放入已重构参考像素样值暂存区中,用作后续微块匹配解码步骤、其余常用解码和重构步骤所需要的参考像素;所述完全重构像素也是本解码方法的最后输出。
根据本发明的一方面,提供了一种图像编码装置,包括以下模块:模块1)微块匹配搜索编码模块:对输入视频图像像素样值施行微块匹配编码,把每一个输入的编码单元即CU划分成一组L个微块,称为微块,在已重构参考像素样值集之中的一个预定的搜索范围内,按照预定的评估准则,搜索得到分别相对于所述L个微块的L个最优的参考微块;任意一个所述参考微块的位置坐标与对应的所述微块的位置坐标之差称为位移矢量;所述位移矢量的单位是像素样值(整像素样值或二分之一、四分之一、八分之一像素样值)的最小坐标单位而非微块;每一个所述CU总共有L个所述位移矢量;本模块的输出是所述位移矢量以及匹配残差;所述匹配残差就是所述参考微块的像素样值的数值与所述微块的像素样值的数值之差;所述位移矢量也称为原始位移矢量;模块2)个体变换模块:对所述模块1)输出的一个当前编码CU的L个所述位移矢量的每一个,进行独立于其他所述位移矢量的变换,称为个体变换,以去除存在于每一个所述位移矢量中的部分冗余度,得到个体变换位移矢量并输出所述个体变换位移矢量;模块3)整体变换模块:对上述模块2)输出的L个所述个体变换位移矢量的整体,即整个位移矢量组,再进行一次互相关联各个位移矢量的整体变换,得到经过整体变换的位移矢量,称为整体变换位移矢量,以去除存在于这组L个所述位移矢量整体之间的部分冗余度;本模块的输出是所述整体变换位移矢量;模块4)其余的各种常用技术编码和重构模块:施行各种常用技术,如帧内预测、帧间预测、变换、量化、逆变换、反量化、去块效应滤波、样值自适应补偿(Sample Adaptive Offset),的编码和重构运算;本模块的输入是所述模块1)的输出和原始的所述输入视频图像像素样值;本模块的输出是重构像素和其余编码结果;所述重构像素放入已重构参考像素样值暂存模块中,用作后续CU的微块匹配搜索编码、其余的各种常用技术编码和重构所需要的参考像素;模块5)重构参考像素样值暂存模块:暂存已重构参考像素样值集的像素样值,即在编码过程中到当前编码中微块的位置为止或者到当前编码中所述CU的位置为止的所有已重构像素样值,用作当前和后续编码中微块的参考像素样值(即候选的参考微块的像素样值),也用作对当前和后续CU施行各种常用技术的编码和重构运算时所需要的参考像素样值;模块6)熵编码模块:对包括所述整体变换位移矢量和所述其余编码结果在内的所有需要输出到压缩码流中的编码结果施行熵编码运算;熵编码的结果,即含位移矢量压缩数据以及其他编码结果的压缩码流,也是本编码装置的最后输出。
根据本发明的另一方面,提供了一种图像解码装置,包括以下模块:模块1)熵解码模块:对输入的含位移矢量压缩数据以及其他编码结果的压缩码流施行熵解码,并解析出熵解码得到的各种数据的意义;把解析得到的整体变换位移矢量送往逆整体变换模块;把解析得到的匹配残差和其余数据送往其余的各种常用技术解码和重构模块;模块2)逆整体变换模块:对所述模块1)输出的属于一个当前解码CU的一组L个所述整体变换位移矢量施行互相关联各个位移矢量的逆整体变换,得到并输出属于所述CU的一组个体变换位移矢量;模块3)逆个体变换模块:对所述模块2)输出的所述个体变换位移矢量的每一个施行独立于其他所述个体变换位移矢量的逆个体变换,得到并输出原始形式的L个位移矢量,即原始位移矢量;模块4)微块匹配解码模块:本模块的输入是所述模块3)输出的所述位移矢量;本模块从已重构参考像素样值集之中由所述位移矢量和当前解码中微块的位置计算确定的参考微块的位置,复制整个所述参考微块的所有样值,并将整个所述参考微块移动和粘贴到当前解码中所述微块的位置,复原出整个所述微块;所述位移矢量的单位是像素样值(整像素样值或二分之一、四分之一、八分之一像素样值)的最小坐标单位而非微块;本模块的输出是复原的所述微块的像素样值;L个复原的所述微块组合起来就构成所述CU;模块5)其余的各种常用技术解码和重构模块:对当前解码中微块或当前解码中CU施行其余的各种常用技术,如帧内预测、帧间预测、逆变换、反量化、对应于预测残差和匹配残差的补偿(即取残差运算的逆运算)、去块效应滤波、样值自适应补偿(Sample Adaptive Offset),的解码和重构运算;本模块的输出是重构像素(包括完全重构像素和不同程度的部分重构像素);所述重构像素放入已重构参考像素样值暂存模块中,用作后续CU的微块匹配解码运算以及其余的各种常用技术解码和重构运算所需要的参考像素;所述完全重构像素也是本解码装置的最后输出;模块6)重构参考像素样值暂存模块:暂存已重构参考像素样值集的像素样值,即在解码过程中到当前解码中微块的位置为止或者到当前解码中所述CU的位置为止的所有已重构像素样值,用作当前和后续解码中微块的参考像素样值(即参考微块的像素样值),也用作对当前和后续CU施行各种常用技术的解码和重构运算时所需要的参考像素样值。
优选地,对用二维矢量(DV0x,DV0y)表示的一个原始位移矢量和用(DV1x,DV1y)表示的一个个体变换位移矢量,所述从个体变换位移矢量到原始位移矢量的逆个体变换是用下列运算式表示的变换:(DV0x,DV0y)=(DV1x-X,DV1y-Y),其中X和Y是两个全局常数或分区常数即把(DV0x,DV0y)的取值范围分成有限的几个区域,对每个区域中的(DV0x,DV0y),X和Y是不变的。
优选地,所述逆整体变换由下列两步组成:1)从整体变换位移矢量DVg[1],DVg[2],DVg[3],……,DVg[L-1],DVg[L]经过下列逆差分运算得出DV[1],DV[2],DV[3],……,DV[L-1],DV[L]:
DV[1]=DVg[1]+DV[0],
DV[2]=DVg[2]+DV[1],
DV[3]=DVg[3]+DV[2],
……,
DV[L-1]=DVg[L-1]+DV[L-2],
DV[L]=DVg[L]+DV[L-1];
其中,DV[0]是相邻或附近CU或其中微块的位移矢量。
2)按照一个与编码器的整体变换中预定的重排序规则相对应的逆排序规则,把DV[1],DV[2],DV[3],……,DV[L-1],DV[L]逆排序还原成L个位移矢量(实际上是个体变换位移矢量)DV1,DV2,……DVL-1,DVL。
优选地,所述逆整体变换由下列两步组成:1)对二维数组形式的整体变换位移矢量进行逆水平差分运算或逆垂直差分运算或逆高阶差分运算或逆矩阵运算;2)按照一个逆排序规则,把以上运算1)的结果逆排序还原成L个位移矢量(实际上是个体变换位移矢量)。
优选地,一个所述位移矢量DV本身表示成一个2元组(DVx,DVy),其中DVx是所述参考微块与所述微块之间的水平距离而DVy是所述参考微块与所述微块之间的垂直距离;一个所述位移矢量DV本身也可以表示成一个通常称为线性距离的数DVL;所述DVL与所述DVx和所述DVy通常有下列关系:DVL=H×DVx+DVy或DVL=W×DVy+DVx;其中H(或W)是一个充分大的常数;显然,如果DVL=H×DVx+DVy,那么所述DVx和所述DVy就分别是DVL÷H的商和余数;如果DVL=W×DVy+DVx,那么所述DVx和所述DVy就分别是DVL÷W的余数和商。
优选地,所述微块匹配是精确(即无损)匹配,这时匹配残差为零。
优选地,所述微块匹配是近似(即有损)匹配,这时匹配残差不为零。
优选地,一个CU中所述微块数L等于4,或等于5,或等于6,或等于7,或等于8,或等于9,或等于10,或等于11,或等于12,或等于13,或等于14,或等于15,或等于16,或等于17至64之间的任意一个常数。
优选地,所述含位移矢量压缩数据以及其他编码结果的压缩码流中的编码单元即CU部分由载入了下列信息的依次排列的语法元素构成:
CU头、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量、其他编码结果;
或者
CU头、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量、其他编码结果;
或者
CU头、其他编码结果、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量;
或者
CU头、其他编码结果、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量;
或者
CU头、其他编码结果、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量、更多其他编码结果;
或者
CU头、其他编码结果、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量、更多其他编码结果。
根据本发明的一方面,提供了一种图像编码方法,包括:将编码块划分为L个微块,其中,L为预先设定的微块划分数目;确定所述微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量,其中,所述位移矢量为在预先设定的像素坐标系中所述参考微块的像素位置与所述微块的像素位置之间的向量;对所述位移矢量进行编码并写入码流。
优选地,所述编码块包括以下之一:编码单元CU、预测单元PU、变换单元TU。
优选地,在对所述位移矢量进行编码并写入码流之前,还包括以下至少之一:对所述编码块中的所述微块的所述位移矢量进行个体变换;对所述编码块中的所述微块的位移矢量或所述微块的位移矢量进行个体变换后获得的个体变换值进行整体变换。
优选地,对所述编码块中的所述微块的所述位移矢量进行个体变换包括:使用第一预定偏移量对所述位移矢量进行修正。
优选地,在使用所述预定偏移量对所述位移矢量进行修正之前,还包括:通过以下方式至少之一确定所述第一预定偏移量:根据所述位移矢量确定所述第一预定偏移量;根据已编码的编码块或者已编码的微块的编码参数确定所述第一预定偏移量。
优选地,对所述编码块中的所述微块的位移矢量或所述微块的位移矢量进行个体变换后获得的个体变换值进行整体变换包括:确定所述微块的所述位移矢量或所述个体变换值中第一个位移矢量或第一个个体变换值的第一预测值;确定所述第一个位移矢量或所述第一个体变换值与对应的所述第一预测值的差值;确定除所述第一个位移矢量或所述第一个体变换值外的其他位移矢量或个体变换值与其前一个位移矢量或个体变换值之间的差值。
优选地,在确定所述微块与预先设定的已重构像素样值集中的所述参考微块之间的所述位移矢量之前,还包括:使用预定规则,确定所述微块对应的所述参考微块,其中,所述预定规则包括以下至少之一:匹配残差值为零的无损匹配、匹配残差值不为零的有损匹配;其中,所述匹配残差值为所述参考微块的像素数值与所述微块的像素数值之间的差值。
优选地,所述预先设定的微块划分数目L为4至64中任一整数。
根据本发明的另一方面,提供了一种图像解码方法,包括:对解码块的码流进行解码获得微块的位移矢量,其中,所述解码块包含预先设定的微块划分数目L个微块,所述位移矢量为参考微块的像素位置与所述微块的像素位置之间的向量;依据所述微块的位移矢量,以及所述微块的像素位置,确定预先设定的已重构像素样值集中所述微块对应的参考微块的像素位置;依据所述参考微块的像素位置,对所述微块进行解码。
优选地,所述解码块包括以下之一:编码单元CU、预测单元PU、变换单元TU。
优选地,对解码块的码流进行解码获得所述微块对应的所述位移矢量包括:解析所述解码块的码流,获得所述微块对应的位移矢量的参数;根据所述参数,使用以下方式至少之一获得所述微块的位移矢量:对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换获得所述微块的位移矢量;对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行个体变换获得所述微块的位移矢量。
优选地,对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换获得所述微块的位移矢量包括:确定所述解码块中的所述微块的部分或全部位移矢量对应的所述参数中第一个参数的第二预测值;确定所述第一个参数与所述第二预测值的和值;确定除所述第一个参数外的其他参数与使用其前一个参数所得和值之间的和值。
优选地,对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行个体变换获得所述微块的位移矢量包括:使用第二预定偏移量对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行修正。
优选地,在使用第二预定偏移量对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行修正之前,还包括:通过以下方式至少之一确定所述第二预定偏移量:根据所述位移矢量的参数确定所述第二预定偏移量;根据已编码的编码块或者已编码的微块的编码参数确定所述第二预定偏移量。
优选地,所述预先设定的微块划分数目L为4至64中任一整数。
根据本发明的一方面,提供了一种图像编码装置,包括:划分模块,设置为将编码块划分为L个微块,其中,L为预先设定的微块划分数目;第一确定模块,设置为确定所述微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量,其中,所述位移矢量为在预先设定的像素坐标系中所述参考微块的像素位置与所述微块的像素位置之间的向量;第一编码模块,设置为对所述位移矢量进行编码并写入码流。
优选地,所述编码块包括以下之一:编码单元CU、预测单元PU、变换单元TU。
优选地,该装置还包括以下至少之一:个体变换模块,设置为对所述编码块中的所述微块的所述位移矢量进行个体变换;整体变换模块,设置为对所述编码块中的所述微块的位移矢量或所述微块的位移矢量进行个体变换后获得的个体变换值进行整体变换。
优选地,所述个体变换模块包括:修正单元,设置为使用第一预定偏移量对所述位移矢量进行修正。
优选地,所述个体变换模块还包括:第一确定单元,设置为通过以下方式至少之一确定所述第一预定偏移量:根据所述位移矢量确定所述第一预定偏移量;根据已编码的编码块或者已编码的微块的编码参数确定所述第一预定偏移量。
优选地,所述整体变换模块包括:第二确定单元,设置为确定所述微块的所述位移矢量或所述个体变换值中第一个位移矢量或第一个个体变换值的第一预测值;第三确定单元,设置为确定所述第一个位移矢量或所述第一个体变换值与对应的所述第一预测值的差值;第四确定单元,设置为确定除所述第一个位移矢量或所述第一个体变换值外的其他位移矢量或个体变换值与其前一个位移矢量或个体变换值之间的差值。
优选地,该装置还包括:第二确定模块,设置为使用预定规则,确定所述微块对应的所述参考微块,其中,所述预定规则包括以下至少之一:匹配残差值为零的无损匹配、匹配残差值不为零的有损匹配;其中,所述匹配残差值为所述参考微块的像素数值与所述微块的像素数值之间的差值。
优选地,所述预先设定的微块划分数目L为4至64中任一整数。
根据本发明的另一方面,提供了一种图像解码装置,包括:第一解码模块,设置为对解码块的码流进行解码获得微块的位移矢量,其中,所述解码块包含预先设定的微块划分数目L个微块,所述位移矢量为参考微块的像素位置与所述微块的像素位置之间的向量;第三确定模块,设置为依据所述微块的位移矢量,以及所述微块的像素 位置,确定预先设定的已重构像素样值集中所述微块对应的参考微块的像素位置;第二解码模块,设置为依据所述参考微块的像素位置,对所述微块进行解码。
优选地,所述解码块包括以下之一:编码单元CU、预测单元PU、变换单元TU。
优选地,所述第一解码模块包括:解析单元,设置为解析所述解码块的码流,获得所述微块对应的位移矢量的参数;获得单元,设置为根据所述参数,使用以下方式至少之一获得所述微块的位移矢量:对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换获得所述微块的位移矢量;对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行个体变换获得所述微块的位移矢量。
优选地,所述获得单元包括:第一确定子单元,设置为确定所述解码块中的所述微块的部分或全部位移矢量对应的所述参数中第一个参数的第二预测值;第二确定子单元,设置为确定所述第一个参数与所述第二预测值的和值;第三确定子单元,设置为确定除所述第一个参数外的其他参数与使用其前一个参数所得和值之间的和值。
优选地,所述获得单元包括:修正子单元,设置为使用第二预定偏移量对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行修正。
优选地,所述获得单元还包括:第四确定子单元,设置为通过以下方式至少之一确定所述第二预定偏移量:根据所述位移矢量的参数确定所述第二预定偏移量;根据已编码的编码块或者已编码的微块的编码参数确定所述第二预定偏移量。
优选地,所述预先设定的微块划分数目L为4至64中任一整数。
通过本发明,采用将编码块划分为L个微块,其中,L为预先设定的微块划分数目;确定所述微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量,其中,所述位移矢量为在预先设定的像素坐标系中所述参考微块的像素位置与所述微块的像素位置之间的向量;对所述位移矢量进行熵编码并写入码流,解决了相关技术中对图像进行编码及解码,存在图像压缩,解压效率不高的问题,进而达到了提高图像编码、解码效率的效果。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的图像编码方法的流程图;
图2是根据本发明实施例的图像解码方法的流程图;
图3是根据本发明实施例的图像编码装置的结构框图;
图4是根据本发明实施例的图像编码装置的优选结构框图一;
图5是根据本发明实施例的图像编码装置中个体变换模块42的优选结构框图一;
图6是根据本发明实施例的图像编码装置中个体变换模块42的优选结构框图二;
图7是根据本发明实施例的图像编码装置中整体变换模块44的优选结构框图;
图8是根据本发明实施例的图像编码装置的优选结构框图二;
图9是根据本发明实施例的图像解码装置的结构框图;
图10是根据本发明实施例的图像解码装置中第一解码模块92的优选结构框图;
图11是根据本发明实施例的图像解码装置中第一解码模块92中获得单元104的优选结构框图一;
图12是根据本发明实施例的图像解码装置中第一解码模块92中获得单元104的优选结构框图二;
图13是根据本发明实施例的图像解码装置中第一解码模块92中获得单元104的优选结构框图三;
图14是根据本发明优选实施例的一个编码单元被划分成一组L个微块,微块匹配编码和解码,微块的尺寸,匹配微块和被匹配微块的示意图;
图15是本发明优选实施例的编码方法流程示意图;
图16是本发明优选实施例的解码方法流程示意图;
图17是本发明优选实施例的编码装置的结构示意图;
图18是本发明优选实施例的解码装置的结构示意图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
在本实施例中提供了一种图像编码方法,图1是根据本发明实施例的图像编码方法的流程图,如图1所示,该流程包括如下步骤:需要说明的是,以上或以下所称的“被匹配微块”更通常称为“微块”。“匹配微块”更通常称为“参考微块”。
步骤S102,将编码块划分为L个微块,其中,L为预先设定的微块划分数目,例如,该预先设定的微块划分数目L可以为4至64中任一整数;
步骤S104,确定微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量,其中,位移矢量为在预先设定的像素坐标系中参考微块的像素位置与微块的像素位置之间的向量;
步骤S106,对位移矢量进行编码并写入码流。
通过上述步骤,将编码块划分为L个微块,依据微块与已重构像素样值集中包括的参考微块之间的相对位置,即位移矢量,进行编码获得压缩码流,相对于相关技术中,以编码块为单位进行编码,导致编码效率低下的问题,依据将编码块划分为L个微块后,依据微块与参考微块之间的位移矢量进行编码,有效地提高了编码效率。
需要指出的是,上述编码块或下述解码块是指一帧图像中对其施行编码或解码的一个区域,包括以下之一:编码单元(Code Unit,简称为CU)、预测单元(Predict Unit,简称为PU)、变换单元(Transfer Unit,简称为TU)。
上述所指的CU、PU、TU,至少含有4x4个像素或像素样值,最常见的大小包括4x4,4x8,8x4,8x8,8x16,16x8,16x16,16x32,32x16,32x32,32x64,64x32,64x64像素或像素样值。
需要说明的是,编码或解码时的最基本元素可以是一个像素,也可以是一个像素分量。作为编码或解码的最基本元素的一个像素或一个像素分量通称为一个像素样值,有时也通称为一个像素值,或简单地称为一个样值。
微块匹配也可以使用以下别名之一:帧内微块复制,微块复制。另外,位移矢量也可以使用以下别名之一:复制位置,匹配位置,位置,距离,相对距离,位移量,移动量,移动矢量,偏移量,偏移矢量,块矢量,补偿量,补偿,线性地址差,地址差,相对线性地址,地址,2维坐标差,坐标差,相对坐标,坐标,等等。
使得编码更为有效,高性能,在对位移矢量进行编码并写入码流之前,还可以对微块的位移矢量执行以下操作至少之一:对编码块中的微块的位移矢量进行个体变换;对编码块中的微块的位移矢量或微块的位移矢量进行个体变换后获得的个体变换值进行整体变换。较优地,可以先对微块进行个体位移矢量变换后,再进行整体位移矢量变换,即对L个个体变换后位移矢量的整体,即整个位移矢量组,再进行一次互相关联各个位移矢量的整体变换。需要说明的是,其中,“各个位移矢量”不但包括当前CU的L个位移矢量,也可能包括相邻或附近若干CU或其中若干微块的K个位移矢量(通常K为1至4中任一整数),即总共有L+K个位移矢量。
优选地,对编码块中的微块的位移矢量进行个体变换时可以采用以下方式:使用第一预定偏移量对位移矢量进行修正,获得加性偏移量与输入参数的和值。其中,上述第一预定偏移量可以通过多种方式获得,例如,可以通过以下方式来确定该第一预定偏移量:根据位移矢量确定第一预定偏移量;根据已编码的编码块或者已编码的微块的编码参数确定第一预定偏移量。
在对编码块中的微块的位移矢量或微块的位移矢量进行个体变换后获得的个体变换值进行整体变换时,也可以采用多种方式,例如,可以先确定微块的位移矢量或个体变换值中第一个位移矢量或第一个个体变换值的第一预测值;之后,确定第一个位移矢量或第一个体变换值与对应的第一预测值的差值;再者,确定除第一个位移矢量或第一个体变换值外的其他位移矢量或个体变换值与其前一个位移矢量或个体变换值之间的差值。这样整体变换之前是微块的位移矢量,整体变换之后是对应确定的差值。
另外,在确定微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量之前,还包括:通过预定规则,确定微块对应的参考微块,其中,预定规则可以包括以下至少之一:匹配残差值为零的无损匹配、匹配残差值不为零的有损匹配,匹配残差值为参考微块的像素数值与微块的像素数值之间的差值。需要说明的是,此处选择参考微块主要是为了在该预定已重构像素样值集中匹配出一个误差最小的参考微块,即最优微块,使得编码准确,误差小。
图2是根据本发明实施例的图像解码方法的流程图,如图2所示,该流程包括如下步骤:
步骤S202,对解码块的码流进行解码获得微块的位移矢量,其中,解码块包含预先设定的微块划分数目L个微块,位移矢量为参考微块的像素位置与微块的像素位置之间的向量,需要说明的是,预定数目L可以为4至64中任一整数;
步骤S204,依据微块的位移矢量,以及微块的像素位置,确定预先设定的已重构像素样值集中微块对应的参考微块的像素位置;
步骤S206,依据参考微块的像素位置,对微块进行解码。
通过上述步骤,以编码块划分的L个微块为单位,依据微块与已重构像素样值集中包括的参考微块之间的相对位置,即位移矢量,进行解码复原出整个原编码块,相对于相关技术中,以整个解码块为单位进行解码,导致解码效率低下的问题,依据将解码块划分为L个微块后,依据解码块所包括的微块与参考微块之间的位移矢量进行解码,有效地提高了解码效率。
对应于编码过程,上述解码块也可以包括以下之一:编码单元CU、预测单元PU、变换单元TU。
较优地,对解码块的码流进行解码获得微块对应的位移矢量也可以采用多种方式,例如,先解析解码块的码流,获得微块对应的位移矢量的参数;根据参数,使用以下方式至少之一获得微块的位移矢量:对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换获得微块的位移矢量;对解码块中的微块的部分或全部位移矢量对应的参数或对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换后获得的参数进行个体变换获得微块的位移矢量。
其中,对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换获得微块的位移矢量可以以下方式:先确定解码块中的微块的部分或全部位移矢量对应的参数中第一个参数的第二预测值;之后确定第一个参数与第二预测值的和值;再确定除第一个参数外的其他参数与使用其前一个参数所得和值之间的和值。
对解码块中的微块的部分或全部位移矢量对应的参数或对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换后获得的参数进行个体变换获得微块的位移矢量包括:使用第二预定偏移量对解码块中的微块的部分或全部位移矢量对应的参数或对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换后获得的参数进行修正。
其中,在使用第二预定偏移量对解码块中的微块的部分或全部位移矢量对应的参数或对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换后获得的参数进行修正之前,还包括:通过以下方式至少之一确定第二预定偏移量:根据位移矢量的参数确定第二预定偏移量;根据已编码的编码块或者已编码的微块的编码参数确定第二预定偏移量。
在本实施例中还提供了一种图像编码、解码装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本发明实施例的图像编码装置的结构框图,如图3所示,该装置包括划分模块32、第一确定模块34和编码模块36,下面对该装置进行说明。
划分模块32,设置为将编码块划分为L个微块,其中,L为预先设定的微块划分数目,较优地,该预先设定的微块划分数目L可以为4至64中任一整数;第一确定模块34,连接至上述划分模块32,设置为确定微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量,其中,位移矢量为在预先设定的像素坐标系中参考微块的像素位置与微块的像素位置之间的向量;编码模块36,连接至上述第一确定模块34,设置为对位移矢量进行编码并写入码流。
优选地,上述编码块可以包括以下之一:编码单元CU、预测单元PU、变换单元TU。
图4是根据本发明实施例的图像编码装置的优选结构框图一,如图4所示,该装置除包括图3所示的所有模块外,还包括以下至少之一:个体变换模块42、整体变换模块44,下面对该装置进行说明。需要说明的是,图4中仅示出了个体变换模块42和整体变换模块44两个模块均包括的情形。
个体变换模块42,设置为对编码块中的微块的位移矢量进行个体变换;整体变换模块44,设置为对编码块中的微块的位移矢量或微块的位移矢量进行个体变换后获得的个体变换值进行整体变换。
图5是根据本发明实施例的图像编码装置中个体变换模块42的优选结构框图一,如图5所示,该个体变换模块42包括:修正单元52,下面对该修正单元52进行说明。
修正单元52,设置为使用第一预定偏移量对位移矢量进行修正。
图6是根据本发明实施例的图像编码装置中个体变换模块42的优选结构框图二,如图6所示,该个体变换模块42除包括图5所示的修正单元52外,还包括:第一确定单元62,下面对该第一确定单元62进行说明。
第一确定单元62,连接至上述修正单元52,设置为通过以下方式至少之一确定第一预定偏移量:根据位移矢量确定第一预定偏移量;根据已编码的编码块或者已编码的微块的编码参数确定第一预定偏移量。
图7是根据本发明实施例的图像编码装置中整体变换模块44的优选结构框图,如图7所示,该整体变换模块44包括:第二确定单元72、第三确定单元74和第四确定单元76,下面对该整体变换模块44进行说明。
第二确定单元72,设置为确定微块的位移矢量或个体变换值中第一个位移矢量或第一个个体变换值的第一预测值;第三确定单元74,连接至上述第二确定单元72,设置为确定第一个位移矢量或第一个体变换值与对应的第一预测值的差值;第四确定单元76,连接至上述第三确定单元74,设置为确定除第一个位移矢量或第一个体变换值外的其他位移矢量或个体变换值与其前一个位移矢量或个体变换值之间的差值。
图8是根据本发明实施例的图像编码装置的优选结构框图二,如图8所示,该装置除包括图3所示的所有模块外,还包括:第二确定模块82,下面对该第二确定模块82进行说明。
第二确定模块82,连接至上述划分模块32和第一确定模块34,设置为使用预定规则,确定微块对应的参考微块,其中,预定规则包括以下至少之一:匹配残差值为零的无损匹配、匹配残差值不为零的有损匹配;其中,匹配残差值为参考微块的像素数值与微块的像素数值之间的差值。
图9是根据本发明实施例的图像解码装置的结构框图,如图9所示,该装置包括第一解码模块92、第三确定模块94和第二解码模块96,下面对该装置进行说明。
第一解码模块92,设置为对解码块的码流进行解码获得微块的位移矢量,其中,解码块包含预先设定的微块划分数目L个微块,位移矢量为参考微块的像素位置与微块的像素位置之间的向量,优选地,该预先设定的微块划分数目L可以为4至64中任一整数;第三确定模块94,连接至上述第一解码模块92,设置为依据微块的位移矢量,以及微块的像素位置,确定预先设定的已重构像素样值集中微块对应的参考微块的像素位置;第二解码模块96,连接至上述第三确定模块94,设置为依据参考微块的像素位置,对微块进行解码。
优选地,上述解码块可以包括以下之一:编码单元CU、预测单元PU、变换单元TU。
图10是根据本发明实施例的图像解码装置中第一解码模块92的优选结构框图,如图10所示,该第一解码模块92包括:解析单元102、获得单元104,下面对该第一解码模块92进行说明。
解析单元102,设置为解析解码块的码流,获得微块对应的位移矢量的参数;获得单元104,连接至上述解析单元102,设置为根据参数,使用以下方式至少之一获得微块的位移矢量:对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换获得微块的位移矢量;对解码块中的微块的部分或全部位移矢量对应的参数或对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换后获得的参数进行个体变换获得微块的位移矢量。
图11是根据本发明实施例的图像解码装置中第一解码模块92中获得单元104的优选结构框图一,如图11所示,该获得单元104包括第一确定子单元112、第二确定子单元114和第三确定子单元116,下面对该获得单元104进行说明。
第一确定子单元112,设置为确定解码块中的微块的部分或全部位移矢量对应的参数中第一个参数的第二预测值;第二确定子单元114,连接至上述第一确定子单元112,设置为确定第一个参数与第二预测值的和值;第三确定子单元116,连接至上述第二确定子单元114,设置为确定除第一个参数外的其他参数与使用其前一个参数所得和值之间的和值。
图12是根据本发明实施例的图像解码装置中第一解码模块92中获得单元104的优选结构框图二,如图12所示,该获得单元104包括:修正子单元122,下面对该修正子单元122进行说明。
修正子单元,设置为使用第二预定偏移量对解码块中的微块的部分或全部位移矢量对应的参数或对解码块中的微块的部分或全部位移矢量对应的参数进行整体变换后获得的参数进行修正。
图13是根据本发明实施例的图像解码装置中第一解码模块92中获得单元104的优选结构框图三,如图13所示,该获得单元104除包括图12所包括的修正子单元122外,还包括:第四确定子单元132,下面对该获得单元104进行说明。
第四确定子单元132,连接至上述修正子单元122,设置为通过以下方式至少之一确定第二预定偏移量:根据位移矢量的参数确定第二预定偏移量;根据已编码的编码块或者已编码的微块的编码参数确定第二预定偏移量。
下面结合具体操作方式对本发明优选实施例进行说明。
图14是根据本发明优选实施例的一个编码单元被划分成一组L个微块,微块匹配编码和解码,微块的尺寸,匹配微块和被匹配微块的示意图,其中,编码块以CU为为例进行说明,如图14所示。图14中表示的匹配微块和被匹配微块可以是叠包格式的匹配微块和被匹配微块,也可以是平面格式的一个分量(样值)的匹配微块和被匹配微块。因而本发明优选实施例的方法和装置,既可以适用于对叠包格式的LCU和CU的像素的编码和解码,也可以适用于对平面格式的LCU和CU的一个平面的像素样值的编码和解码。图14中的一个微块由宽度为4高度为1的4x1=4个像素或像素样值组成,称为4x1微块。但本发明优选实施例也可用其他尺寸的微块,如宽度为2高度为1的2x1=2个像素或像素样值组成的2x1微块,或宽度为1高度为2的1x2=2个像素或像素样值组成的1x2微块,或宽度为2高度为2的2x2=4个像素或像素样值组成的2x2微块,或宽度为1高度为4的1x4=4个像素或像素样值组成的1x4微块,或宽度为4高度为2的4x2=8个像素或像素样值组成的4x2微块。
本发明优选实施例的编码方法和装置中,最基本的特有技术特征就是在对当前CU进行编码时,把CU划分成一组L个(通常L≥4)微块,称为被匹配微块,在已经完成编码和重构(包括完全重构和不同程度的部分重构)的历史像素样值集合(也称已重构参考像素样值集)中进行搜索,以微块为匹配单位,找到与当前编码CU的L个微块相匹配的L个最优的匹配微块。每个匹配微块用一个参数即位移矢量(匹配微块与当前编码单元中被匹配微块之间的相对位置或距离)来表征。匹配微块的起始位置可以是已重构参考像素样值集之中任意像素样值或像素的位置,与微块的尺寸无关,也不受微块的尺寸的限制。即,位移矢量以像素样值或像素为单位而非微块为单位。本发明优选实施例的最基本特有技术特征还包括,对L个位移矢量的每一个,进行独立于其他位移矢量的变换,称为个体变换,以去除存在于每一个位移矢量中的部分冗余度。对L个个体变换后位移矢量的整体,即整个位移矢量组,再进行一次互相关联各个位移矢量的整体变换,以去除存在于这些位移矢量之间的部分冗余度。然后对经过个体变换以及整体变换这二重变换后的位移矢量(称为整体变换位移矢量)进行熵编码,得到最终的位移矢量压缩数据。位移矢量压缩数据是编码方法和装置的输出视频压缩码流的一部分。
本发明优选实施例的解码方法和装置中,最基本的特有技术特征就是在对当前解码CU的压缩码流数据进行解码时,从码流数据中读出位移矢量压缩数据,经熵解码后得到整体变换位移矢量,然后,再进行逆整体变换和逆个体变换得到当前解码中一个CU的一组原始形式的L个位移矢量。L个位移矢量与当前解码CU的L个被匹配微块相对应。从被匹配微块的位置和位移矢量计算出已重构参考像素样值集之中的匹配微块的位置。接着,从已重构参考像素样值集之中复制匹配微块,将匹配微块移动和粘贴到当前解码CU中的被匹配微块的位置,复原出被匹配微块。这样复制、移动、粘贴L个匹配微块,最终复原出整个当前解码CU的所有像素样值。与编码时的情形一样,每个匹配微块的起始位置可以是已重构参考像素样值集之中任意像素样值的位置,与微块的尺寸无关,也不受微块的尺寸的限制。即,位移矢量以像素样值为单位而非微块为单位。另一方面,被匹配微块在当前CU之中的起始位置总是以微块为单位的L个位置,不能是任意的像素样值的位置。
图15是本发明优选实施例的编码方法流程示意图,如图15所示。本发明优选实施例的编码方法包括如下步骤:
对一个输入的编码单元即CU的原始像素进行微块匹配编码,产生出以像素样值为单位的一组L个(通常L≥4)最优的位移矢量即匹配相对位置或匹配距离;也就是把CU划分成L个微块,称为被匹配微块,在已重构参考像素样值集之中的一个预定的搜索范围内,按照预定的评估准则,搜索得到分别相对于L个被匹配微块的L个最优的匹配微块;位移矢量就是匹配微块的位置坐标与被匹配微块的位置坐标之差;位移矢量的单位是像素样值(整像素样值或二分之一、四分之一、八分之一像素样值)的最小坐标单位而非微块;微块匹配编码的输出是L个位移矢量以及匹配残差;匹配残差就是匹配微块的像素样值的数值与被匹配微块的像素样值的数值之差;位移矢量也称为原始位移矢量;
对L个位移矢量的每一个,进行独立于其他位移矢量的变换,称为个体变换,以去除存在于每一个位移矢量中的部分冗余度,得到个体变换位移矢量;
对L个经过个体变换的位移矢量(即个体变换位移矢量)的整体,即整个位移矢量组,再进行一次互相关联各个位移矢量的整体变换,得到经过整体变换的位移矢量,称为整体变换位移矢量,以去除存在于这组L个位移矢量整体之间的部分冗余度;
其余的常用编码和重构步骤,如帧内预测、帧间预测、变换、量化、逆变换、反量化、熵编码(包括对整体变换位移矢量的熵编码)、去块效应滤波、样值自适应补偿(Sample Adaptive Offset);本步骤的输入是步骤1)的输出,步骤3)的输出,以及 本编码方法输入的原始像素;本步骤的输出是重构像素和含位移矢量压缩数据以及其他编码结果的压缩码流;重构像素放入已重构参考像素样值暂存区中,用作后续CU的微块匹配编码步骤、其余常用编码和重构步骤所需要的参考像素;压缩码流也是本编码方法的最后输出。
图16是本发明优选实施例的解码方法流程示意图,如图16所示。本发明优选实施例的解码方法包括如下步骤:
对含位移矢量压缩数据以及其他编码结果的压缩码流进行解析和熵解码,输出1)解析和熵解码得到的匹配微块的整体变换位移矢量,2)解析和熵解码得到的匹配微块的匹配残差与其余解析和熵解码得到的数据;
对属于一个当前解码CU的一组L个整体变换位移矢量整体进行互相关联各个位移矢量的逆整体变换,得到并输出属于CU的一组个体变换位移矢量;
对个体变换位移矢量的每一个进行独立于其他个体变换位移矢量的逆个体变换,得到并输出原始形式的L个位移矢量,即原始位移矢量;
使用输入的L个位移矢量进行CU的L个微块匹配解码;也就是从已重构参考像素样值暂存区中由位移矢量和CU中当前被匹配微块的位置计算确定的L个匹配微块的位置,逐个复制L个匹配微块的所有像素样值,并将L个匹配微块移动和粘贴到L个当前被匹配微块的位置,复原出所有L个被匹配微块;位移矢量的单位是像素样值(整像素样值或二分之一、四分之一、八分之一像素样值)的最小坐标单位而非微块;L个被匹配微块合在一起构成CU;本步骤的输出是复原的被匹配微块的像素样值;
其余的常用解码和重构步骤,如帧内预测、帧间预测、逆变换、反量化、对应于预测残差和匹配残差的补偿(即取残差运算的逆运算)、去块效应滤波、样值自适应补偿(Sample Adaptive Offset);本步骤的输入是上述步骤4)的输出和上述步骤1)的输出2)即其余解析和熵解码得到的数据;本步骤的输出是重构像素(包括完全重构像素和不同程度的部分重构像素);重构像素放入已重构参考像素样值暂存区中,用作后续微块匹配解码步骤、其余常用解码和重构步骤所需要的参考像素;完全重构像素也是本解码方法的最后输出。
图17是本发明优选实施例的编码装置的结构示意图,如图17所示。整个编码装置由以下模块组成:
微块匹配搜索编码模块(功能同上述第一确定模块34):对输入视频图像像素样值施行微块匹配编码,把每一个输入的编码单元即CU划分成一组L个微块,称为被匹配微块,在已重构参考像素样值集之中的一个预定的搜索范围内,按照预定的评估准则,搜索得到分别相对于L个被匹配微块的L个最优的匹配微块;任意一个匹配微块的位置坐标与对应的被匹配微块的位置坐标之差称为位移矢量;位移矢量的单位是像素样值(整像素样值或二分之一、四分之一、八分之一像素样值)的最小坐标单位而非微块;每一个CU总共有L个位移矢量;本模块的输出是位移矢量以及匹配残差;匹配残差就是匹配微块的像素样值的数值与被匹配微块的像素样值的数值之差;位移矢量也称为原始位移矢量;
个体变换模块(功能同上述个体变换模块42):对模块1)输出的一个当前编码CU的L个位移矢量的每一个,进行独立于其他位移矢量的变换,称为个体变换,以去除存在于每一个位移矢量中的部分冗余度,得到个体变换位移矢量并输出个体变换位移矢量;
整体变换模块(功能同上述整体变换模块44):对上述模块2)输出的L个个体变换位移矢量的整体,即整个位移矢量组,再进行一次互相关联各个位移矢量的整体变换,得到经过整体变换的位移矢量,称为整体变换位移矢量,以去除存在于这组L个位移矢量整体之间的部分冗余度;本模块的输出是整体变换位移矢量;
其余的各种常用技术编码和重构模块:施行各种常用技术,如帧内预测、帧间预测、变换、量化、逆变换、反量化、去块效应滤波、样值自适应补偿(Sample Adaptive Offset),的编码和重构运算;本模块的输入是模块1)的输出和原始的输入视频图像像素样值;本模块的输出是重构像素和其余编码结果;重构像素放入已重构参考像素样值暂存模块中,用作后续CU的微块匹配搜索编码、其余的各种常用技术编码和重构所需要的参考像素;
重构参考像素样值暂存模块:暂存已重构参考像素样值集的像素样值,即在编码过程中到当前编码中被匹配微块的位置为止或者到当前编码中CU的位置为止的所有已重构像素样值,用作当前和后续编码中被匹配微块的参考像素样值(即候选的匹配参考微块的像素样值),也用作对当前和后续CU施行各种常用技术的编码和重构运算时所需要的参考像素样值;
熵编码模块(功能同上述编码模块36):对包括整体变换位移矢量和其余编码结果在内的所有需要输出到压缩码流中的编码结果施行熵编码运算;熵编码的结果,即含位移矢量压缩数据以及其他编码结果的压缩码流,也是本编码装置的最后输出。
图18是本发明优选实施例的解码装置的结构示意图,如图18所示。整个解码装置由以下模块组成:
熵解码模块(功能同上述第一解码模块92):对输入的含位移矢量压缩数据以及其他编码结果的压缩码流施行熵解码,并解析出熵解码得到的各种数据的意义;把解析得到的整体变换位移矢量送往逆整体变换模块;把解析得到的匹配残差和其余数据送往其余的各种常用技术解码和重构模块;
逆整体变换模块(执行上述获得单元104相同的功能):对模块1)输出的属于一个当前解码CU的一组L个整体变换位移矢量施行互相关联各个位移矢量的逆整体变换,得到并输出属于CU的一组个体变换位移矢量;
逆个体变换模块(执行上述获得单元104相同的功能):对模块2)输出的个体变换位移矢量的每一个施行独立于其他个体变换位移矢量的逆个体变换,得到并输出原始形式的L个位移矢量,即原始位移矢量;
微块匹配解码模块(功能同上述第二解码模块96):本模块的输入是模块3)输出的位移矢量;本模块从已重构参考像素样值集之中由位移矢量和当前解码中被匹配微块的位置计算确定的匹配微块的位置,复制整个匹配微块的所有样值,并将整个匹配微块移动和粘贴到当前解码中被匹配微块的位置,复原出整个被匹配微块;位移矢量的单位是像素样值(整像素样值或二分之一、四分之一、八分之一像素样值)的最小坐标单位而非微块;本模块的输出是复原的被匹配微块的像素样值;L个复原的被匹配微块组合起来就构成CU;
其余的各种常用技术解码和重构模块:对当前解码中被匹配微块或当前解码中CU施行其余的各种常用技术,如帧内预测、帧间预测、逆变换、反量化、对应于预测残差和匹配残差的补偿(即取残差运算的逆运算)、去块效应滤波、样值自适应补偿(Sample Adaptive Offset),的解码和重构运算;本模块的输出是重构像素(包括完全重构像素和不同程度的部分重构像素);重构像素放入已重构参考像素样值暂存模块中,用作后续CU的微块匹配解码运算以及其余的各种常用技术解码和重构运算所需要的参考像素;完全重构像素也是本解码装置的最后输出;
重构参考像素样值暂存模块:暂存已重构参考像素样值集的像素样值,即在解码过程中到当前解码中被匹配微块的位置为止或者到当前解码中CU的位置为止的所有已重构像素样值,用作当前和后续解码中被匹配微块的参考像素样值(即参考微块微块的像素样值),也用作对当前和后续CU施行各种常用技术的解码和重构运算时所需要的参考像素样值。
下面分别对本发明优选实施例中涉及的操作方式进行说明。
个体变换和逆个体变换的实施例
上述微块匹配编码和解码方法或装置中,对用二维矢量(DV0x,DV0y)表示的一个原始位移矢量和用(DV1x,DV1y)表示的一个个体变换位移矢量,个体变换是用下列运算式表示的变换:(DV1x,DV1y)=(DV0x+X,DV0y+Y),其中X和Y是两个全局常数或分区常数即把(DV0x,DV0y)的取值范围分成有限的几个区域,对每个区域中的(DV0x,DV0y),X和Y是不变的;相应地,从个体变换位移矢量到原始位移矢量的逆个体变换是用下列运算式表示的变换:(DV0x,DV0y)=(DV1x-X,DV1y-Y),其中X和Y是两个全局常数或分区常数。
整体变换和逆整体变换的实施例1
上述微块匹配编码和解码方法或装置中,对L个位移矢量(实际上是个体变换位移矢量)DV1,DV2,……DVL-1,DVL的整体变换由下列两步组成:
1)按照一个预定的重排序规则,把DV1,DV2,……DVL-1,DVL重排序成另一个一维的位移矢量数组:DV[1],DV[2],DV[3],……,DV[L-1],DV[L];
2)整体变换位移矢量DVg[1],DVg[2],DVg[3],……,DVg[L-1],DVg[L]由下列差分运算得出:
DVg[1]=DV[1]-DV[0],
DVg[2]=DV[2]-DV[1],
DVg[3]=DV[3]-DV[2],
……,
DVg[L-1]=DV[L-1]-DV[L-2],
DVg[L]=DV[L]-DV[L-1],
其中,DV[0]是相邻或附近CU或其中微块的位移矢量。
该逆整体变换由下列两步组成:
1)从整体变换位移矢量DVg[1],DVg[2],DVg[3],……,DVg[L-1],DVg[L]经过下列逆差分运算得出DV[1],DV[2],DV[3],……,DV[L-1],DV[L]:
DV[1]=DVg[1]+DV[0],
DV[2]=DVg[2]+DV[1],
DV[3]=DVg[3]+DV[2],
……,
DV[L-1]=DVg[L-1]+DV[L-2],
DV[L]=DVg[L]+DV[L-1];
其中,DV[0]是相邻或附近CU或其中微块的位移矢量。
2)按照一个与整体变换中预定的重排序规则相对应的逆排序规则,把DV[1],DV[2],DV[3],……,DV[L-1],DV[L]逆排序还原成L个位移矢量(实际上是个体变换位移矢量)DV1,DV2,……DVL-1,DVL
整体变换和逆整体变换的实施例2
微块匹配编码和解码方法或装置中,若L=JxK是两个正整数J和K的乘积,对L个位移矢量(实际上是个体变换位移矢量)DV1,DV2,……DVL-1,DVL的整体变换由下列两步组成:
1)按照一个预定的重排序规则,把DV1,DV2,……DVL-1,DVL重排序成一个位移矢量的二维数组形式:
DV[1][1],DV[1][2],……,DV[1][J-1],DV[1][J],
DV[2][1],DV[2][2],……,DV[2][J-1],DV[2][J],
DV[K-1][1],DV[K-1][2],……,DV[K-1][J-1],DV[K-1][J],
DV[K][1],DV[K][2],……,DV[K][J-1],DV[K][J];
2)整体变换位移矢量由对于以上位移矢量的二维数组进行水平差分运算或垂直差分运算或高阶差分运算或矩阵运算得出;整体变换位移矢量也排列成位移矢量的二维数组的形式;
相应地,上述逆整体变换由下列两步组成:
1)对二维数组形式的整体变换位移矢量进行逆水平差分运算或逆垂直差分运算或逆高阶差分运算或逆矩阵运算;
2)按照一个逆排序规则,把以上运算1)的结果逆排序还原成L个位移矢量(实际上是个体变换位移矢量)。
位移矢量DV的表示格式的实施例
一个位移矢量DV本身可以表示成一个2元组(DVx,DVy),其中DVx是匹配微块与被匹配微块之间的水平距离而DVy是匹配微块与被匹配微块之间的垂直距离。设W和H分别是一帧图像中两个像素的最大水平距离和最大垂直距离,那么,DVx和DVy满足0≤DVx<W和0≤DVy<H。
一个位移矢量DV本身也可以表示成一个通常称为线性距离的数DVL。DVL与DVx和DVy通常有下列关系:DVL=H×DVx+DVy或DVL=W×DVy+DVx。其中H(或W)是一个充分大的常数,至少大于DVy(或DVx)的最大值。显然,如果DVL=H×DVx+DVy,那么DVx和DVy就分别是DVL÷H的商和余数。如果DVL=W×DVy+DVx,那么DVx和DVy就分别是DVL÷W的余数和商。
微块匹配精度的实施例
上述微块匹配可以是精确(即无损)匹配,这时匹配残差为零。
上述微块匹配也可以是近似(即有损)匹配,这时匹配残差不为零。
一个编码单元即CU被划分成一组L个被匹配微块的若干实施例
一个CU中微块数可以为4至64中任一整数,例如,L可以等于4,或等于5,或等于6,或等于7,或等于8,或等于9,或等于10,或等于11,或等于12,或等于13,或等于14,或等于15,或等于16,或等于17至32之间的任意一个常数。
含位移矢量压缩数据以及其他编码结果的压缩码流的若干实施例
含位移矢量压缩数据以及其他编码结果的压缩码流中的编码单元即CU部分由载入了下列信息的依次排列的语法元素构成:
CU头、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量、其他编码结果;
或者
CU头、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量、其他编码结果;
或者
CU头、其他编码结果、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量;
或者
CU头、其他编码结果、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量;
或者
CU头、其他编码结果、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量、更多其他编码结果;
或者
CU头、其他编码结果、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量、更多其他编码结果。
以上或以下所称的微块匹配更通常称为微块复制。其中的一种特殊情形是微块的高度为1个像素或像素样值而宽度等于编码块或解码块的宽度,称为水平线条匹配、水平线条复制、水平条匹配、水平条复制。另一种特殊情形是微块的宽度为1个像素或像素样值而高度等于编码块或解码块的高度,称为垂直线条匹配、垂直线条复制、 垂直条匹配、垂直条复制。这两种微块匹配的特殊情形统称为线条匹配、线条复制、条匹配、条复制。
微块复制中条复制特殊情形的实施例1
微块复制编码和解码方法或装置中,编码块或解码块由JxK,即水平J个而垂直K个像素或像素样值组成,被划分成K个相等大小的微块,每个微块是Jx1个像素或像素样值的水平条。
微块复制中条复制特殊情形的实施例2
微块复制编码和解码方法或装置中,编码块或解码块由JxK,即水平J个而垂直K个像素或像素样值组成,被划分成J个相等大小的微块,每个微块是1xK个像素或像素样值的垂直条。
条复制的含位移矢量压缩数据以及其他编码结果的压缩码流的实施例
条复制编码和解码方法或装置中,含位移矢量压缩数据以及其他编码结果的压缩码流中的预测单元即PU部分由载入了至少下列信息的依次排列的语法元素构成:
PU头、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量、其他编码结果;
其中,除了PU头信息,其他语法元素在码流中的放置排列顺序并不是唯一的,可采用任意一种预先确定的合理的顺序;一个语法元素也可以被拆成几部分,几部分可以集中放置在码流中同一地方,也可以分别放置在码流中不同的地方;若干语法元素也可以合并成一个语法元素;某些语法元素也可以不存在于某个PU或某个位移矢量的码流数据中;某个语法元素也可以不直接存在于码流数据中而是从其他编码或解码参数或者变量中导出。
条复制解码中逆整体变换的实施例1
在条复制解码中,一个高度或宽度为L个像素样值的解码块(PU)的L个水平条或垂直条的L个位移矢量的逆整体变换前形式(即条复制编码中位移矢量的整体变换后形式)是位移矢量差。对L个位移矢量差DVD[1],DVD[2],……DVD[L-1],DVD[L],从L个位移矢量差DVD[1],DVD[2],……DVD[L-1],DVD[L]解码获得L个位移矢量DV[1],DV[2],……DV[L-1],DV[L]的逆整体变换的解码过程如下:
按照预定规则从已完成解码的相邻或附近解码块或其中条(微块)的所有或部分已存在的位移矢量中获得一个位移矢量,称为当前解码块的位移矢量预测值,记为DVP,其中已完成解码的相邻或附近解码块包括但不限于左方解码块,左上方解码块,上方解码块,右上方解码块,其中已存在的位移矢量包括但不限于在已完成解码的解码块的解码过程中按照预定规则保留的1至8个历史位移矢量,
按照预定规则从DVD[1]和DVP获得DV[1],
按照预定规则从DVD[2]和DV[1]获得DV[2],
按照预定规则从DVD[3]和DV[2]获得DV[3],
……,
按照预定规则从DVD[L-1]和DV[L-2]获得DV[L-1],
按照预定规则从DVD[L]和DV[L-1]获得DV[L]。
条复制解码中逆整体变换的实施例2
在条复制解码中,一个高度或宽度为L个像素样值的解码块(PU)的L个水平条或垂直条的L个位移矢量的逆整体变换前形式(即条复制编码中位移矢量的整体变换后形式)是位移矢量差。对L个位移矢量差DVD[1],DVD[2],……DVD[L-1],DVD[L],从L个位移矢量差DVD[1],DVD[2],……DVD[L-1],DVD[L]解码获得L个位移矢量DV[1],DV[2],……DV[L-1],DV[L]的逆整体变换的解码过程如下:
DV[1]=DVD[1]+DVP,
DV[2]=DVD[2]+DV[1],
DV[3]=DVD[3]+DV[2],
……,
DV[L-1]=DVD[L-1]+DV[L-2],
DV[L]=DVD[L]+DV[L-1];
其中,DVP是按照预定规则从已完成解码的解码块或其中条(微块)的所有或部分已存在的位移矢量中按照预定规则选出的一个位移矢量。
以上在解码方法和解码装置中所称的“逆整体变换”与“逆个体变换”是相对应于编码方法和编码装置中的“整体变换”与“个体变换”而言的称呼。在解码方法和解码装置本身中,实际上并不存在与“逆整体变换”与“逆个体变换”相对应的“整体变换”与“个体变换”。因此,在解码方法和解码装置中,“逆整体变换”与“逆个体变换”更通常直接称为“整体变换”与“个体变换”。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
如上所述,通过上述实施例及优选实施方式,解决了相关技术中对图像进行编码及解码,存在图像压缩,解压效率不高的问题,进而达到了提高图像编码、解码效率的效果。

Claims (42)

  1. 一种图像编码方法,包括以下步骤:
    步骤1)对一个输入的编码单元即CU的原始像素进行微块匹配编码,产生出以像素样值为单位的一组L个最优的位移矢量即匹配相对位置或匹配距离;也就是把所述CU划分成L个微块,称为微块,在已重构参考像素样值集之中的一个预定的搜索范围内,按照预定的评估准则,搜索得到分别相对于所述L个微块的L个最优的参考微块;所述位移矢量就是所述参考微块的位置坐标与所述微块的位置坐标之差;所述位移矢量的单位是像素样值的最小坐标单位而非微块;微块匹配编码的输出是L个所述位移矢量以及匹配残差;所述匹配残差就是所述参考微块的像素样值的数值与所述微块的像素样值的数值之差;所述位移矢量也称为原始位移矢量;
    步骤2)对L个所述位移矢量的每一个,进行独立于其他所述位移矢量的变换,称为个体变换,以去除存在于每一个所述位移矢量中的部分冗余度,得到个体变换位移矢量;
    步骤3)对L个经过所述个体变换的位移矢量的整体,即整个位移矢量组,再进行一次互相关联各个所述位移矢量的整体变换,得到经过所述整体变换的位移矢量,称为整体变换位移矢量,以去除存在于这组L个所述位移矢量整体之间的部分冗余度;
    步骤4)其余的常用编码和重构步骤,如帧内预测、帧间预测、变换、量化、逆变换、反量化、熵编码、去块效应滤波、样值自适应补偿;本步骤的输入是所述步骤1)的输出,所述步骤3)的输出,以及本编码方法输入的所述原始像素;本步骤的输出是重构像素和含位移矢量压缩数据以及其他编码结果的压缩码流;所述重构像素放入已重构参考像素样值暂存区中,用作后续CU的微块匹配编码步骤、其余常用编码和重构步骤所需要的参考像素;所述压缩码流也是本编码方法的最后输出。
  2. 一种图像解码方法,包括以下步骤:
    步骤1)对含位移矢量压缩数据以及其他编码结果的压缩码流进行解析和熵解码,输出1)解析和熵解码得到的参考微块的整体变换位移矢量,2)解析和熵解码得到的参考微块的匹配残差与其余解析和熵解码得到的数据;
    步骤2)对属于一个当前解码CU的一组L个所述整体变换位移矢量整体进行互相关联各个位移矢量的逆整体变换,得到并输出属于所述CU的一组个体变换位移矢量;
    步骤3)对所述个体变换位移矢量的每一个进行独立于其他所述个体变换位移矢量的逆个体变换,得到并输出原始形式的L个位移矢量,即原始位移矢量;
    步骤4)使用输入的L个位移矢量进行所述CU的L个微块匹配解码;也就是从已重构参考像素样值暂存区中由所述位移矢量和所述CU中当前微块的位置计算确定的L个参考微块的位置,逐个复制L个所述参考微块的所有像素样值,并将L个所述参考微块移动和粘贴到L个当前所述微块的位置,复原出所有L个所述微块;所述位移矢量的单位是像素样值的最小坐标单位而非微块;L个所述微块合在一起构成所述CU;本步骤的输出是复原的所述微块的像素样值;
    步骤5)其余的常用解码和重构步骤,如帧内预测、帧间预测、逆变换、反量化、对应于预测残差和匹配残差的补偿、去块效应滤波、样值自适应补偿;本步骤的输入是上述步骤4)的输出和上述步骤1)的输出2)即其余解析和熵解码得到的数据;本步骤的输出是重构像素;所述重构像素放入已重构参考像素样值暂存区中,用作后续微块匹配解码步骤、其余常用解码和重构步骤所需要的参考像素;所述完全重构像素也是本解码方法的最后输出。
  3. 一种图像编码装置,包括以下模块:
    模块1)微块匹配搜索编码模块:对输入视频图像像素样值施行微块匹配编码,把每一个输入的编码单元即CU划分成一组L个微块,称为微块,在已重构参考像素样值集之中的一个预定的搜索范围内,按照预定的评估准则,搜索得到分别相对于所述L个微块的L个最优的参考微块;任意一个所述参考微块的位置坐标与对应的所述微块的位置坐标之差称为位移矢量;所述位移矢量的单位是像素样值的最小坐标单位而非微块;每一个所述CU总共有L个所述位移矢量;本模块的输出是所述位移矢量以及匹配残差;所述匹配残差就是所述参考微块的像素样值的数值与所述微块的像素样值的数值之差;所述位移矢量也称为原始位移矢量;
    模块2)个体变换模块:对所述模块1)输出的一个当前编码CU的L个所述位移矢量的每一个,进行独立于其他所述位移矢量的变换,称为个体变 换,以去除存在于每一个所述位移矢量中的部分冗余度,得到个体变换位移矢量并输出所述个体变换位移矢量;
    模块3)整体变换模块:对上述模块2)输出的L个所述个体变换位移矢量的整体,即整个位移矢量组,再进行一次互相关联各个位移矢量的整体变换,得到经过整体变换的位移矢量,称为整体变换位移矢量,以去除存在于这组L个所述位移矢量整体之间的部分冗余度;本模块的输出是所述整体变换位移矢量;
    模块4)其余的各种常用技术编码和重构模块:施行各种常用技术,如帧内预测、帧间预测、变换、量化、逆变换、反量化、去块效应滤波、样值自适应补偿,的编码和重构运算;本模块的输入是所述模块1)的输出和原始的所述输入视频图像像素样值;本模块的输出是重构像素和其余编码结果;所述重构像素放入已重构参考像素样值暂存模块中,用作后续CU的微块匹配搜索编码、其余的各种常用技术编码和重构所需要的参考像素;
    模块5)重构参考像素样值暂存模块:暂存已重构参考像素样值集的像素样值,即在编码过程中到当前编码中微块的位置为止或者到当前编码中所述CU的位置为止的所有已重构像素样值,用作当前和后续编码中微块的参考像素样值,也用作对当前和后续CU施行各种常用技术的编码和重构运算时所需要的参考像素样值;
    模块6)熵编码模块:对包括所述整体变换位移矢量和所述其余编码结果在内的所有需要输出到压缩码流中的编码结果施行熵编码运算;熵编码的结果,即含位移矢量压缩数据以及其他编码结果的压缩码流,也是本编码装置的最后输出。
  4. 一种图像解码装置,包括以下模块:
    模块1)熵解码模块:对输入的含位移矢量压缩数据以及其他编码结果的压缩码流施行熵解码,并解析出熵解码得到的各种数据的意义;把解析得到的整体变换位移矢量送往逆整体变换模块;把解析得到的匹配残差和其余数据送往其余的各种常用技术解码和重构模块;
    模块2)逆整体变换模块:对所述模块1)输出的属于一个当前解码CU的一组L个所述整体变换位移矢量施行互相关联各个位移矢量的逆整体变换,得到并输出属于所述CU的一组个体变换位移矢量;
    模块3)逆个体变换模块:对所述模块2)输出的所述个体变换位移矢量的每一个施行独立于其他所述个体变换位移矢量的逆个体变换,得到并输出原始形式的L个位移矢量,即原始位移矢量;
    模块4)微块匹配解码模块:本模块的输入是所述模块3)输出的所述位移矢量;本模块从已重构参考像素样值集之中由所述位移矢量和当前解码中微块的位置计算确定的参考微块的位置,复制整个所述参考微块的所有样值,并将整个所述参考微块移动和粘贴到当前解码中所述微块的位置,复原出整个所述微块;所述位移矢量的单位是像素样值的最小坐标单位而非微块;本模块的输出是复原的所述微块的像素样值;L个复原的所述微块组合起来就构成所述CU;
    模块5)其余的各种常用技术解码和重构模块:对当前解码中微块或当前解码中CU施行其余的各种常用技术,如帧内预测、帧间预测、逆变换、反量化、对应于预测残差和匹配残差的补偿(即取残差运算的逆运算)、去块效应滤波、样值自适应补偿,的解码和重构运算;本模块的输出是重构像素;所述重构像素放入已重构参考像素样值暂存模块中,用作后续CU的微块匹配解码运算以及其余的各种常用技术解码和重构运算所需要的参考像素;所述完全重构像素也是本解码装置的最后输出;
    模块6)重构参考像素样值暂存模块:暂存已重构参考像素样值集的像素样值,即在解码过程中到当前解码中微块的位置为止或者到当前解码中所述CU的位置为止的所有已重构像素样值,用作当前和后续解码中微块的参考像素样值,也用作对当前和后续CU施行各种常用技术的解码和重构运算时所需要的参考像素样值。
  5. 根据权利要求2所述的解码方法或权利要求4所述的解码装置,其中:对用二维矢量(DV0x,DV0y)表示的一个原始位移矢量和用(DV1x,DV1y)表示的一个个体变换位移矢量,所述从个体变换位移矢量到原始位移矢量的逆个体变换是用下列运算式表示的变换:(DV0x,DV0y)=(DV1x-X,DV1y-Y),其中X和Y是两个全局常数或分区常数即把(DV0x,DV0y)的取值范围分成有限的几个区域,对每个区域中的(DV0x,DV0y),X和Y是不变的。
  6. 根据权利要求2所述的解码方法或权利要求4所述的解码装置,其中:所述逆整体变换由下列两步组成:
    1)从整体变换位移矢量DVg[1],DVg[2],DVg[3],……,DVg[L-1],DVg[L]经过下列逆差分运算得出DV[1],DV[2],DV[3],……,DV[L-1],DV[L]:
    DV[1]=DVg[1]+DV[0],
    DV[2]=DVg[2]+DV[1],
    DV[3]=DVg[3]+DV[2],
    ……,
    DV[L-1]=DVg[L-1]+DV[L-2],
    DV[L]=DVg[L]+DV[L-1],
    其中,DV[0]是相邻或附近CU或其中微块的位移矢量;
    2)按照一个与编码器的整体变换中预定的重排序规则相对应的逆排序规则,把DV[1],DV[2],DV[3],……,DV[L-1],DV[L]逆排序还原成L个位移矢量DV1,DV2,……DVL-1,DVL。
  7. 根据权利要求2所述的解码方法或权利要求4所述的解码装置,其中:所述逆整体变换由下列两步组成:
    1)对二维数组形式的整体变换位移矢量进行逆水平差分运算或逆垂直差分运算或逆高阶差分运算或逆矩阵运算;
    2)按照一个逆排序规则,把以上运算1)的结果逆排序还原成L个位移矢量。
  8. 根据权利要求1所述的编码方法或权利要求2所述的解码方法或权利要求3所述的编码装置或权利要求4所述的解码装置,其中:
    一个所述位移矢量DV本身表示成一个2元组(DVx,DVy),其中DVx是所述参考微块与所述微块之间的水平距离而DVy是所述参考微块与所述微块之间的垂直距离;
    一个所述位移矢量DV本身也可以表示成一个通常称为线性距离的数DVL;所述DVL与所述DVx和所述DVy通常有下列关系:DVL=H×DVx+DVy或DVL=W×DVy+DVx;其中H是一个充分大的常数;显然,如果DVL=H×DVx+DVy,那么所述DVx和所述DVy就分别是DVL÷H的商和余数;如果DVL=W×DVy+DVx,那么所述DVx和所述DVy就分别是DVL÷W的余数和商。
  9. 根据权利要求1所述的编码方法或权利要求2所述的解码方法或权利要求3所述的编码装置或权利要求4所述的解码装置,其中:所述微块匹配是精确匹配,这时匹配残差为零。
  10. 根据权利要求1所述的编码方法或权利要求2所述的解码方法或权利要求3所述的编码装置或权利要求4所述的解码装置,其中:所述微块匹配是近似匹配,这时匹配残差不为零。
  11. 根据权利要求1所述的编码方法或权利要求2所述的解码方法或权利要求3所述的编码装置或权利要求4所述的解码装置,其中:一个CU中所述微块数L等于4,或等于5,或等于6,或等于7,或等于8,或等于9,或等于10,或等于11,或等于12,或等于13,或等于14,或等于15,或等于16,或等于17至32之间的任意一个常数。
  12. 根据权利要求1所述的编码方法或权利要求2所述的解码方法或权利要求3所述的编码装置或权利要求4所述的解码装置,其中:所述含位移矢量压缩数据以及其他编码结果的压缩码流中的编码单元即CU部分由载入了下列信息的依次排列的语法元素构成:
    CU头、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量、其他编码结果;
    或者
    CU头、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量、其他编码结果;
    或者
    CU头、其他编码结果、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量;
    或者
    CU头、其他编码结果、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量;
    或者
    CU头、其他编码结果、位移矢量1水平分量、位移矢量1垂直分量、位移矢量2水平分量、位移矢量2垂直分量、……、位移矢量L水平分量、位移矢量L垂直分量、更多其他编码结果;
    或者
    CU头、其他编码结果、位移矢量1水平分量、位移矢量2水平分量、……、位移矢量L水平分量、位移矢量1垂直分量、位移矢量2垂直分量、……、位移矢量L垂直分量、更多其他编码结果。
  13. 一种图像编码方法,包括:
    将编码块划分为L个微块,其中,L为预先设定的微块划分数目;
    确定所述微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量,其中,所述位移矢量为在预先设定的像素坐标系中所述参考微块的像素位置与所述微块的像素位置之间的向量;
    对所述位移矢量进行编码并写入码流。
  14. 根据权利要求13所述的方法,其中,所述编码块包括以下之一:
    编码单元CU、预测单元PU、变换单元TU。
  15. 根据权利要求13所述的方法,其中,在对所述位移矢量进行编码并写入码流之前,还包括以下至少之一:
    对所述编码块中的所述微块的所述位移矢量进行个体变换;
    对所述编码块中的所述微块的位移矢量或所述微块的位移矢量进行个体变换后获得的个体变换值进行整体变换。
  16. 根据权利要求15所述的方法,其中,对所述编码块中的所述微块的所述位移矢量进行个体变换包括:
    使用第一预定偏移量对所述位移矢量进行修正。
  17. 根据权利要求16所述的方法,其中,在使用所述预定偏移量对所述位移矢量进行修正之前,还包括:通过以下方式至少之一确定所述第一预定偏移量:
    根据所述位移矢量确定所述第一预定偏移量;
    根据已编码的编码块或者已编码的微块的编码参数确定所述第一预定偏移量。
  18. 根据权利要求15所述的方法,其中,对所述编码块中的所述微块的位移矢量或所述微块的位移矢量进行个体变换后获得的个体变换值进行整体变换包括:
    确定所述微块的所述位移矢量或所述个体变换值中第一个位移矢量或第一个个体变换值的第一预测值;
    确定所述第一个位移矢量或所述第一个体变换值与对应的所述第一预测值的差值;
    确定除所述第一个位移矢量或所述第一个体变换值外的其他位移矢量或个体变换值与其前一个位移矢量或个体变换值之间的差值。
  19. 根据权利要求13所述的方法,其中,在确定所述微块与预先设定的已重构像素样值集中的所述参考微块之间的所述位移矢量之前,还包括:
    使用预定规则,确定所述微块对应的所述参考微块,其中,所述预定规则包括以下至少之一:匹配残差值为零的无损匹配、匹配残差值不为零的有损匹配;其中,所述匹配残差值为所述参考微块的像素数值与所述微块的像素数值之间的差值。
  20. 根据权利要求13至19中任一项所述的方法,其中,所述预先设定的微块划分数目L为4至64中任一整数。
  21. 一种图像解码方法,包括:
    对解码块的码流进行解码获得微块的位移矢量,其中,所述解码块包含预先设定的微块划分数目L个微块,所述位移矢量为参考微块的像素位置与所述微块的像素位置之间的向量;
    依据所述微块的位移矢量,以及所述微块的像素位置,确定预先设定的已重构像素样值集中所述微块对应的参考微块的像素位置;
    依据所述参考微块的像素位置,对所述微块进行解码。
  22. 根据权利要求21所述的方法,其中,所述解码块包括以下之一:
    编码单元CU、预测单元PU、变换单元TU。
  23. 根据权利要求21所述的方法,其中,对解码块的码流进行解码获得所述微块对应的所述位移矢量包括:
    解析所述解码块的码流,获得所述微块对应的位移矢量的参数;
    根据所述参数,使用以下方式至少之一获得所述微块的位移矢量:对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换获得所述微块的位移矢量;对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行个体变换获得所述微块的位移矢量。
  24. 根据权利要求23所述的方法,其中,对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换获得所述微块的位移矢量包括:
    确定所述解码块中的所述微块的部分或全部位移矢量对应的所述参数中第一个参数的第二预测值;
    确定所述第一个参数与所述第二预测值的和值;
    确定除所述第一个参数外的其他参数与使用其前一个参数所得和值之间的和值。
  25. 根据权利要求23所述的方法,其中,对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行个体变换获得所述微块的位移矢量包括:
    使用第二预定偏移量对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行修正。
  26. 根据权利要求25所述的方法,其中,在使用第二预定偏移量对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行修正之前,还包括:通过以下方式至少之一确定所述第二预定偏移量:
    根据所述位移矢量的参数确定所述第二预定偏移量;
    根据已编码的编码块或者已编码的微块的编码参数确定所述第二预定偏移量。
  27. 根据权利要求21至26中任一项所述的方法,其中,所述预先设定的微块划分数目L为4至64中任一整数。
  28. 一种图像编码装置,包括:
    划分模块,设置为将编码块划分为L个微块,其中,L为预先设定的微块划分数目;
    第一确定模块,设置为确定所述微块与预先设定的已重构像素样值集中的参考微块之间的位移矢量,其中,所述位移矢量为在预先设定的像素坐标系中所述参考微块的像素位置与所述微块的像素位置之间的向量;
    第一编码模块,设置为对所述位移矢量进行编码并写入码流。
  29. 根据权利要求28所述的装置,其中,所述编码块包括以下之一:
    编码单元CU、预测单元PU、变换单元TU。
  30. 根据权利要求28所述的装置,其中,还包括以下至少之一:
    个体变换模块,设置为对所述编码块中的所述微块的所述位移矢量进行个体变换;
    整体变换模块,设置为对所述编码块中的所述微块的位移矢量或所述微块的位移矢量进行个体变换后获得的个体变换值进行整体变换。
  31. 根据权利要求30所述的装置,其中,所述个体变换模块包括:
    修正单元,设置为使用第一预定偏移量对所述位移矢量进行修正。
  32. 根据权利要求31所述的装置,其中,所述个体变换模块还包括:第一确定单元,设置为通过以下方式至少之一确定所述第一预定偏移量:
    根据所述位移矢量确定所述第一预定偏移量;
    根据已编码的编码块或者已编码的微块的编码参数确定所述第一预定偏移量。
  33. 根据权利要求30所述的装置,其中,所述整体变换模块包括:
    第二确定单元,设置为确定所述微块的所述位移矢量或所述个体变换值中第一个位移矢量或第一个个体变换值的第一预测值;
    第三确定单元,设置为确定所述第一个位移矢量或所述第一个体变换值与对应的所述第一预测值的差值;
    第四确定单元,设置为确定除所述第一个位移矢量或所述第一个体变换值外的其他位移矢量或个体变换值与其前一个位移矢量或个体变换值之间的差值。
  34. 根据权利要求28所述的装置,其中,还包括:
    第二确定模块,设置为使用预定规则,确定所述微块对应的所述参考微块,其中,所述预定规则包括以下至少之一:匹配残差值为零的无损匹配、匹配残差值不为零的有损匹配;其中,所述匹配残差值为所述参考微块的像素数值与所述微块的像素数值之间的差值。
  35. 根据权利要求28至34中任一项所述的装置,其中,所述预先设定的微块划分数目L为4至64中任一整数。
  36. 一种图像解码装置,包括:
    第一解码模块,设置为对解码块的码流进行解码获得微块的位移矢量,其中,所述解码块包含预先设定的微块划分数目L个微块,所述位移矢量为参考微块的像素位置与所述微块的像素位置之间的向量;
    第三确定模块,设置为依据所述微块的位移矢量,以及所述微块的像素位置,确定预先设定的已重构像素样值集中所述微块对应的参考微块的像素位置;
    第二解码模块,设置为依据所述参考微块的像素位置,对所述微块进行解码。
  37. 根据权利要求36所述的装置,其中,所述解码块包括以下之一:
    编码单元CU、预测单元PU、变换单元TU。
  38. 根据权利要求36所述的装置,其中,所述第一解码模块包括:
    解析单元,设置为解析所述解码块的码流,获得所述微块对应的位移矢量的参数;
    获得单元,设置为根据所述参数,使用以下方式至少之一获得所述微块的位移矢量:对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换获得所述微块的位移矢量;对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量 对应的所述参数进行整体变换后获得的参数进行个体变换获得所述微块的位移矢量。
  39. 根据权利要求38所述的装置,其中,所述获得单元包括:
    第一确定子单元,设置为确定所述解码块中的所述微块的部分或全部位移矢量对应的所述参数中第一个参数的第二预测值;
    第二确定子单元,设置为确定所述第一个参数与所述第二预测值的和值;
    第三确定子单元,设置为确定除所述第一个参数外的其他参数与使用其前一个参数所得和值之间的和值。
  40. 根据权利要求38所述的装置,其中,所述获得单元包括:
    修正子单元,设置为使用第二预定偏移量对所述解码块中的所述微块的部分或全部位移矢量对应的参数或对所述解码块中的所述微块的部分或全部位移矢量对应的所述参数进行整体变换后获得的参数进行修正。
  41. 根据权利要求40所述的装置,其中,所述获得单元还包括:第四确定子单元,设置为通过以下方式至少之一确定所述第二预定偏移量:
    根据所述位移矢量的参数确定所述第二预定偏移量;
    根据已编码的编码块或者已编码的微块的编码参数确定所述第二预定偏移量。
  42. 根据权利要求36至41中任一项所述的装置,其中,所述预先设定的微块划分数目L为4至64中任一整数。
PCT/CN2014/092718 2013-11-30 2014-12-01 图像编码、解码方法及装置 WO2015078422A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US15/114,278 US20170006285A1 (en) 2013-11-30 2014-12-01 Method and Device for Coding Image and Method and Device for Decoding Image
EP14865962.6A EP3076668A4 (en) 2013-11-30 2014-12-01 Image encoding and decoding method and device
KR1020167017627A KR101868247B1 (ko) 2013-11-30 2014-12-01 영상 부호화, 복호화 방법 및 장치
EP20212240.4A EP3869807A1 (en) 2013-11-30 2014-12-01 Image encoding and decoding method and device
US16/700,399 US11394970B2 (en) 2013-11-30 2019-12-02 Image encoding and decoding method and device

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201310622444.4 2013-11-30
CN201310622444 2013-11-30
CN201410707306.0 2014-11-27
CN201410707306.0A CN104683805B (zh) 2013-11-30 2014-11-27 图像编码、解码方法及装置

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US15/114,278 A-371-Of-International US20170006285A1 (en) 2013-11-30 2014-12-01 Method and Device for Coding Image and Method and Device for Decoding Image
US16/700,399 Division US11394970B2 (en) 2013-11-30 2019-12-02 Image encoding and decoding method and device

Publications (1)

Publication Number Publication Date
WO2015078422A1 true WO2015078422A1 (zh) 2015-06-04

Family

ID=53198400

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/092718 WO2015078422A1 (zh) 2013-11-30 2014-12-01 图像编码、解码方法及装置

Country Status (5)

Country Link
US (2) US20170006285A1 (zh)
EP (2) EP3076668A4 (zh)
KR (1) KR101868247B1 (zh)
CN (1) CN104683805B (zh)
WO (1) WO2015078422A1 (zh)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106254888B (zh) 2015-06-09 2020-06-02 同济大学 一种图像编码及解码方法、图像处理设备
WO2016197898A1 (zh) * 2015-06-09 2016-12-15 同济大学 图像编码及解码方法、图像处理设备、计算机存储介质
CN117201781A (zh) 2015-10-16 2023-12-08 中兴通讯股份有限公司 编码处理、解码处理方法及装置、存储介质
US10542258B2 (en) * 2016-01-25 2020-01-21 Google Llc Tile copying for video compression
CN107770544B (zh) * 2016-08-21 2023-12-08 上海天荷电子信息有限公司 采用多类匹配参数及前参数缓冲区的数据压缩方法和装置
WO2020016795A2 (en) * 2018-07-17 2020-01-23 Beijing Bytedance Network Technology Co., Ltd. Block size restrictions for visual media coding
US11317099B2 (en) * 2018-10-05 2022-04-26 Tencent America LLC Method and apparatus for signaling an offset in video coding for intra block copy and/or inter prediction
JP7309884B2 (ja) 2019-01-02 2023-07-18 オッポ広東移動通信有限公司 クロマイントラ予測方法および装置、並びにコンピュータ記憶媒体
US11153563B2 (en) * 2019-03-12 2021-10-19 Qualcomm Incorporated Combined in-loop filters for video coding
CN110580679B (zh) * 2019-06-25 2023-04-25 上海圭目机器人有限公司 一种应用于大面积平面图像的混合拼接方法
CN114390289A (zh) * 2020-10-18 2022-04-22 腾讯科技(深圳)有限公司 参考像素候选列表构建方法、装置、设备及存储介质
US11282258B1 (en) * 2020-11-02 2022-03-22 Nvidia Corporation Adaptive sampling at a target sampling rate
EP4241447A4 (en) * 2020-12-06 2024-04-03 Zhejiang Dahua Technology Co., Ltd. VIDEO CODING SYSTEMS AND METHODS
US20240179343A1 (en) * 2021-04-02 2024-05-30 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing
CN113301335A (zh) * 2021-05-28 2021-08-24 上海国茂数字技术有限公司 视频信号的编码和解码方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260097A (zh) * 1997-05-07 2000-07-12 西门子公司 一个数字化图象的编码方法和装置
CN1663278A (zh) * 2002-06-18 2005-08-31 高通股份有限公司 视频编码和解码技术
US20120147961A1 (en) * 2010-12-09 2012-06-14 Qualcomm Incorporated Use of motion vectors in evaluating geometric partitioning modes
CN102939751A (zh) * 2010-03-31 2013-02-20 法国电信 通过向前运动补偿、对应的流和计算机程序实施预测的用于对图像序列进行编码和解码的方法和装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6512537B1 (en) * 1998-06-03 2003-01-28 Matsushita Electric Industrial Co., Ltd. Motion detecting apparatus, motion detecting method, and storage medium storing motion detecting program for avoiding incorrect detection
US6983018B1 (en) * 1998-11-30 2006-01-03 Microsoft Corporation Efficient motion vector coding for video compression
KR20110123651A (ko) * 2010-05-07 2011-11-15 한국전자통신연구원 생략 부호화를 이용한 영상 부호화 및 복호화 장치 및 그 방법
CN108965870B (zh) * 2010-09-10 2022-11-01 交互数字麦迪逊专利控股公司 通过基于图像内容搜索和分级在视频压缩中对至参考块的链接进行编码
US10536701B2 (en) * 2011-07-01 2020-01-14 Qualcomm Incorporated Video coding using adaptive motion vector resolution
KR101628797B1 (ko) * 2012-04-20 2016-06-09 후아웨이 테크놀러지 컴퍼니 리미티드 Hevc에서 무손실 코딩의 개선된 인트라 예측
RU2654129C2 (ru) * 2013-10-14 2018-05-16 МАЙКРОСОФТ ТЕКНОЛОДЖИ ЛАЙСЕНСИНГ, ЭлЭлСи Функциональные возможности режима внутреннего предсказания с блочным копированием для кодирования и декодирования видео и изображений

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1260097A (zh) * 1997-05-07 2000-07-12 西门子公司 一个数字化图象的编码方法和装置
CN1663278A (zh) * 2002-06-18 2005-08-31 高通股份有限公司 视频编码和解码技术
CN102939751A (zh) * 2010-03-31 2013-02-20 法国电信 通过向前运动补偿、对应的流和计算机程序实施预测的用于对图像序列进行编码和解码的方法和装置
US20120147961A1 (en) * 2010-12-09 2012-06-14 Qualcomm Incorporated Use of motion vectors in evaluating geometric partitioning modes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3076668A4 *

Also Published As

Publication number Publication date
EP3869807A1 (en) 2021-08-25
EP3076668A4 (en) 2017-02-22
KR20160117424A (ko) 2016-10-10
US11394970B2 (en) 2022-07-19
CN104683805B (zh) 2019-09-17
US20200280718A1 (en) 2020-09-03
CN104683805A (zh) 2015-06-03
EP3076668A1 (en) 2016-10-05
US20170006285A1 (en) 2017-01-05
KR101868247B1 (ko) 2018-06-15

Similar Documents

Publication Publication Date Title
WO2015078422A1 (zh) 图像编码、解码方法及装置
CN110024392B (zh) 用于视频译码的低复杂度符号预测
JP7047119B2 (ja) 変換領域における残差符号予測のための方法および装置
WO2015120818A1 (zh) 图像编码、解码方法及装置
CN104244007B (zh) 一种图像编码方法和装置及解码方法和装置
CN104378644B (zh) 定宽度变长度像素样值串匹配增强的图像压缩方法和装置
US10820016B2 (en) Encoding and decoding method and device for data compression
CN110691250B (zh) 结合块匹配和串匹配的图像压缩装置
CN105100814B (zh) 图像编码、解码方法及装置
CN102369522A (zh) 计算引擎的并行流水线式集成电路实现
US9300984B1 (en) Independent processing of data streams in codec
CN104853211A (zh) 使用多种形式的参考像素存储空间的图像压缩方法和装置
CN113766249B (zh) 视频编解码中的环路滤波方法、装置、设备及存储介质
CN104754362B (zh) 使用精细划分块匹配的图像压缩方法
KR20220127308A (ko) 비디오 코딩을 위한 방법 및 장치
KR20220085836A (ko) 비디오 코딩 방법 및 장치
CN110505488B (zh) 扩展预测像素数组的图像编码或解码方法
CN114390289A (zh) 参考像素候选列表构建方法、装置、设备及存储介质
RU2777392C1 (ru) Способ и устройство для кодирования видеоданных
RU2783341C1 (ru) Способ и устройство для уменьшения количества контекстных моделей для энтропийного кодирования флага значимости коэффициента преобразования
CN107770544A (zh) 采用多类匹配参数及前参数缓冲区的数据压缩方法和装置
JP2024509461A (ja) 高速なベクトル化転置のための適応ループフィルタ係数の配置

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2014865962

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014865962

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20167017627

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15114278

Country of ref document: US