WO2011137816A1 - 视频图像编码方法、解码方法和装置 - Google Patents

视频图像编码方法、解码方法和装置 Download PDF

Info

Publication number
WO2011137816A1
WO2011137816A1 PCT/CN2011/074565 CN2011074565W WO2011137816A1 WO 2011137816 A1 WO2011137816 A1 WO 2011137816A1 CN 2011074565 W CN2011074565 W CN 2011074565W WO 2011137816 A1 WO2011137816 A1 WO 2011137816A1
Authority
WO
WIPO (PCT)
Prior art keywords
mvp
current block
area
divided
sub
Prior art date
Application number
PCT/CN2011/074565
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 华为技术有限公司
Publication of WO2011137816A1 publication Critical patent/WO2011137816A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/533Motion estimation using multistep search, e.g. 2D-log search or one-at-a-time search [OTS]
    • 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
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Definitions

  • Embodiments of the present invention relate to communication technologies, and in particular, to a video image coding method, a decoding method, and an apparatus in video image technology. Background technique
  • Interframe predictive coding removes this temporal redundancy and is an important part of the video compression processing system.
  • the process of inter prediction coding may be: dividing an image of each frame into several blocks, and searching for a matching block of each block in the temporal reference image, wherein the relative offset of the spatial position between the current block and the matching block That is, the motion vector (Motion Vector, hereinafter referred to as: MV) of the current block, the process of obtaining the MV of the current block is called Motion Estimation (ME); then, the matching block is used as a reference.
  • Motion Vector Motion Vector
  • the current block is predictively encoded, and the motion vector and prediction error signals of the current block are sent to the decoding end.
  • the decoding end finds a corresponding reference block (i.e., the matching block described above) from the known time reference image according to the position indicated by the motion vector, and adds the reference block signal to the prediction error signal to obtain the current block.
  • An existing motion estimation method may be as follows: the frame image at time t is the current frame f(X, y), t, and the frame image at the time is the reference frame f(x, y), wherein the reference frame is in time It can be advanced or lagging behind the current frame.
  • t' ⁇ t it is called forward motion estimation.
  • t'>t it is called backward motion estimation.
  • the motion vector d(x, y; t, t + ⁇ t ) can be obtained. If the motion vector of each block of the current frame is directly encoded, the coding overhead will be greatly increased. Especially when inter-predictive coding is performed using a small-sized block, the overhead of directly encoding the motion vector of each block is enormous.
  • the motion vector of the spatially adjacent coded block or the motion vector of the temporal neighboring reference frame can be used as the motion vector predictor for the current block motion vector.
  • MVP Motion Vector Predictor
  • the motion vector of the spatially adjacent coded block is called the spatial MVP
  • the motion vector of the temporal neighboring reference frame is called the time MVP.
  • MVD Motion Vector Difference
  • the prior art proposes a rate-distortion-optimized spatio-temporal motion vector prediction method, the method comprising: first constructing a set of vector predictors, the set of vector predictors may include a plurality of MVPs; and then passing an improved rate-distortion penalty a function, selecting an optimal MVP from the set of vector prediction values as the MVP of the current block; finally encoding the selected MVP identifier, and transmitting the MVP identifier and the current block relative to the MVP MVD to The decoding end is such that the decoding end obtains the MV of the current block.
  • the encoding end needs to transmit the selected MVP identification code stream to the decoding end, however, the bit overhead required for the MVP identification is large.
  • a set of vector predictors includes two MVPs.
  • the identifier usually accounts for more than 12% of the motion information rate, which is equivalent to more than 4% of the total code rate. The coding overhead reduces the coding efficiency. Summary of the invention
  • the embodiment of the invention provides a video image coding method, a decoding method and a device, so as to reduce coding overhead and improve coding efficiency.
  • An embodiment of the present invention provides a video image coding method, including:
  • the obtained region includes k regions to be divided, and each of the regions to be divided includes one MVP pixel, wherein k is greater than or equal to 2;
  • the MVP corresponding to the to-be-searched sub-region where the pixel corresponding to the MV is located is obtained.
  • the MVD is encoded and sent to the decoding end.
  • An embodiment of the present invention provides a video image decoding method, including:
  • the reference image includes k areas to be divided, each The segmentation area includes one MVP pixel corresponding to the MVP in the reference image, where k is greater than or equal to 2;
  • the MV of the current block points to the k to-be-divided regions, determining, according to the MVD of the current block, a sub-region pointed by the MV of the current block;
  • An embodiment of the present invention provides a video image coding apparatus, including:
  • a region dividing module configured to perform region division on a search region of the reference image according to k corresponding motion vector predictors of a current block to be encoded, corresponding to k different MVP pixels in the reference image;
  • the area includes k areas to be divided, each of the areas to be divided includes one MVP pixel, wherein k is greater than or equal to 2;
  • a sub-area partitioning module configured to divide k to-be-searched sub-regions from the k to-be-divided regions obtained by the region division module; the k to-be-search sub-regions and the k Area to be divided - corresponding;
  • a motion estimation module configured to perform motion estimation on each of the to-be-divided regions and the search regions of the reference image that are divided by the to-be-searched sub-region partitioning module, Determining a motion vector MV of the current block;
  • a first calculation sending module configured to: if the pixel corresponding to the MV of the current block determined by the motion estimation module is included in any of the to-be-searched sub-regions, according to the MV and the pixel corresponding to the MV The MVP corresponding to the to-be-searched sub-region is obtained, and the motion vector difference MVD of the current block is obtained, and the obtained MVD is encoded and sent to the decoding end.
  • the present invention provides a video image decoding apparatus, including:
  • a first determining module determining, according to k MVPs of the current block to be decoded and the MVD of the decoded current block, an area in the reference image pointed by the MV of the current block; the reference image includes k to be divided a region, each of the to-be-divided regions includes one MVP pixel corresponding to the MVP in the reference image, where k is greater than or equal to 2;
  • a second determining module configured to: if the first determining module determines that the MV of the current block points to the k to-be-divided regions, determine, according to the MVD of the current block, a sub-region pointed by the MV of the current block And obtaining an MV of the current block according to the MVP corresponding to the to-be-divided area to which the sub-area belongs and the MVD.
  • the search area of the reference image is divided according to the corresponding MVP pixel points in the reference image according to the k MVPs of the current block to be encoded, and is divided into the to-be-divided areas obtained by the division.
  • the MVD of the current block is obtained, and the MVD is encoded and sent to the decoding end, so that the decoding end can determine the MVP corresponding to the MVD according to the MVD, so the encoding end does not need to be
  • the identifier of the MVP corresponding to the MVD is sent to the decoding end, so that the coding overhead can be reduced and the coding efficiency can be improved.
  • Embodiment 1 is a flowchart of Embodiment 1 of a video image encoding method according to the present invention
  • Embodiment 1 of a video image decoding method according to the present invention is a flowchart of Embodiment 1 of a video image decoding method according to the present invention
  • Embodiment 3 is a flowchart of Embodiment 2 of a video image encoding method according to the present invention.
  • Embodiment 4 is a flowchart of Embodiment 2 of a video image decoding method according to the present invention.
  • Embodiment 3 of a video image encoding method according to the present invention is a flowchart of Embodiment 3 of a video image encoding method according to the present invention.
  • FIG. 5b is a schematic diagram of a method for dividing a region in the embodiment shown in FIG. 5a;
  • FIG. 5c is a schematic diagram of a method for dividing a sub-area in the embodiment shown in FIG. 5a;
  • FIG. 6 is a flowchart of Embodiment 3 of a video image decoding method according to the present invention.
  • FIG. 8 is a schematic diagram of Embodiment 1 of a video image encoding apparatus according to the present invention.
  • Embodiment 9 is a schematic diagram of Embodiment 2 of a video image encoding apparatus according to the present invention.
  • FIG. 10 is a schematic diagram of Embodiment 1 of a video image decoding apparatus according to the present invention.
  • FIG. 11 is a schematic diagram of Embodiment 2 of a video image decoding apparatus according to the present invention. detailed description
  • Embodiment 1 is a flowchart of Embodiment 1 of a video image encoding method according to the present invention, as shown in FIG.
  • the law includes:
  • Step 101 Perform area division on the search area of the reference image according to k corresponding MVP pixels in the reference image according to the k MVPs of the current block to be encoded.
  • the encoding end may acquire k MVPs of the current block according to an existing method, where k is greater than or equal to 2, k MVPs are different from each other, and k MVPs may include multiple spatial MVPs ( Referred to as MVPs), it may also include multiple time MVPs (referred to as MVPts), and may also include one or more MVPs and one or more MVPts.
  • the encoding end can obtain one MVPs and one MVPt of the current block according to the corresponding method in the H.264 standard.
  • the MVPs are MVPs of the coded blocks adjacent to the current block, and the MVPts are MVPs obtained from the images of the encoded non-current frames.
  • Each MVP corresponds to one pixel in the reference image of the current block, and the pixel corresponding to the MVP is the MVP pixel referred to in the embodiment of the present invention, and the k MVPs that are different from each other correspond to different k-th. MVP pixel points.
  • the reference image may be an interpolated filtered image, and the MVP pixel points may be pixels or sub-pixels of different precision.
  • the region obtained by dividing the search region of the reference image by the encoding end may include: k regions to be divided and other regions; wherein each region to be divided includes one MVP pixel, and the MVP pixels included in any two regions to be divided are not mutually The same, and any two areas to be divided do not overlap each other.
  • the other areas described above are regions other than the k areas to be divided in the search area of the reference image.
  • Step 102 Demarcate k to-be-searched sub-regions from the k to-be-divided regions.
  • each pixel in the search area of the reference image corresponds to one of the k MVPs, and each pixel may correspond to a different MVP according to its position relative to the k MVP pixel points.
  • the MVP corresponding to the pixel point is the i-th MVP pixel point corresponding to MVP.
  • the k pixels correspond to k MVPs respectively, that is, the i-th of the k pixels
  • the pixel points are separated from the i-th MVP pixel points of the k MVP pixels
  • the distance is the shortest, and the displacement of any two pixel points with respect to the shortest MVP pixel point is the same, thereby making the k pixel points the same MVD value with respect to the current block. Therefore, if the encoding end only sends the MVD to the decoding end, the decoding end will not be able to determine which MVP corresponds to the MVD, and thus the MV of the current block cannot be decoded.
  • the decoding end in order to solve the problem that the decoding end cannot determine, the k areas to be divided are further divided. Therefore, the decoding end can determine the MVP corresponding to the MVD according to the MVD, that is, the MVP corresponding to the pixel point corresponding to the MVD at the encoding end can be determined by the MVD. Therefore, the encoding end does not need to transmit the MVP identifier to the decoding end, but only needs to transmit the value of the MVD.
  • the coding end divides k to-be-searched sub-regions from k to-be-divided regions, k to-be-searched sub-regions correspond to k to-be-divided regions, and each to-be-searched sub-region is a part of the corresponding to-be-divided region
  • the i-th to-be-searched sub-region corresponds to the i-th to-be-divided region
  • the i-th to-be-searched sub-region is a part of the i-th to-be-divided region corresponding thereto
  • the MVP corresponding to each pixel is the MVP corresponding to the i-th to be divided region.
  • the MVP corresponding to each pixel in the sub-region to be searched is the MVP corresponding to each sub-region to be searched; the MVP corresponding to each sub-region to be searched is the MVP corresponding to the region to be divided in which the sub-region to be searched is located.
  • the MVP corresponding to each to-be-divided area is divided into k to-be-searched sub-regions corresponding to the MVP pixel points included in the to-be-divided area, and the limited encoding end can only divide k to-be-searched sub-regions from the k to-be-divided regions.
  • the area, but according to the specific situation, the coding end can also divide other processing areas from the k to-be-divided areas.
  • the process of dividing the k sub-regions to be searched from the k to-be-divided regions may be: dividing k sub-regions from each region to be divided, and then extracting k sub-regions from each region to be divided. A sub-region is selected as the sub-region to be searched corresponding to the region to be divided, thereby obtaining k sub-regions to be searched.
  • the encoding end may divide the k sub-regions from a to-be-divided region by using the following method: the encoding end takes the MVP pixel included in the to-be-divided region as a coordinate origin, and then according to the horizontal of each pixel in the region to be divided.
  • Coordinate component and ordinate component, horizontal A numerical feature of a coordinate component or a ordinate component, and k sub-regions are divided from the region to be divided. Selecting one sub-region to be searched from each of the k regions to be searched to select k sub-regions to be searched, and ensuring the coordinate components (the abscissa component and the ordinate component) of the pixel in each sub-region to be searched. The numerical characteristics of the abscissa component or the ordinate component are different, so that the decoding end can determine the sub-region corresponding to the MVD according to the numerical feature of the coordinate component of the MVD.
  • Step 103 Perform motion estimation on each of the to-be-divided areas of the search area of the to-be-searched sub-area and the reference image, and determine the MV of the current block.
  • the area other than the to-be-divided area is removed from the search area of the reference image, that is, the other area of the search area of the reference image described in step 102.
  • motion estimation is not performed for each pixel in the divided area, but only each pixel in the to-be-searched area in the divided area is treated. Perform motion estimation. It should be noted that the motion estimation of the region in the embodiments of the present invention is to perform motion estimation for each pixel in the region.
  • Step 104 If the determined pixel corresponding to the MV of the current block is included in any of the to-be-searched sub-regions, the MVD of the current block is obtained according to the MVP corresponding to the sub-region to be searched for the pixel corresponding to the MV and the MV.
  • the rate distortion (hereinafter referred to as: RD) cost corresponding to all the searched pixel points is measured, and the pixel point of the most RD cost is obtained, and the pixel point corresponds to
  • the MV can be used as the MV of the current block, thus determining the MV of the current block.
  • the pixel corresponding to the MV of the current block may be included in any of the sub-regions to be searched, and may also be included in other regions of the search region of the reference image.
  • Step 105 Encode the obtained MVD and send it to the decoding end.
  • the encoding end After obtaining the MVD of the current block, the encoding end encodes the MVD and sends it to the decoding end.
  • the encoding end divides k to-be-divided regions from the search region of the reference image according to the corresponding MVP pixel points in the reference image according to the k MVPs of the current block to be encoded, and from the k to-be-divided regions.
  • the MVD of the current block is obtained according to the MV and the MVP corresponding to the MV, and the MVD is encoded and sent to the decoding end; so that the decoding end can determine the MVP corresponding to the MVD according to the MVD, so The encoding end does not need to send the identifier of the MVP corresponding to the MVD to the decoding end, thereby reducing coding overhead and improving coding efficiency.
  • Embodiment 1 of a video image decoding method according to the present invention is a flowchart of Embodiment 1 of a video image decoding method according to the present invention. This embodiment corresponds to the encoding method shown in FIG. 1. As shown in FIG. 2, the method includes:
  • Step 201 Determine, according to the k MVPs of the current block to be decoded and the MVD of the decoded current block, an area in the reference image pointed by the MV of the current block.
  • the decoding end After the current block to be decoded is determined, the decoding end obtains k MVPs of the current block according to the same method as the encoding end, where k is greater than or equal to 2, and k MVPs are different from each other, and the k MVPs and the encoding end acquire The k MVPs are the same. Each MVP corresponds to one MVP pixel in the reference image of the current block.
  • the reference image includes k areas to be divided and other areas.
  • the MV of the current block may point to k regions to be divided in the reference image, and may also point to other regions of the reference image; wherein the k regions to be divided in the reference image refer to the k regions to be divided Set area.
  • the decoding end can obtain the MVD of the current block, and then the decoding end can determine the area pointed by the MV of the current block according to the k MVPs and MVDs of the current block, that is, can determine that the MV of the current block is pointing to the reference image.
  • the k areas to be divided are still pointing to other areas of the reference image.
  • Step 202 If the MV of the current block points to the k areas to be divided, according to the MVD of the current block, Determine the sub-region pointed to by the MV of the current block.
  • the decoding end may further determine the sub-area pointed by the MV of the current block according to the MVD of the current block.
  • the encoding end divides k sub-regions to be searched from k regions to be searched, and then only performs motion estimation on the pixel points in the search sub-region; correspondingly, at the decoding end, k of the reference image There are corresponding k sub-regions in the to-be-divided region, and each of the k sub-regions corresponds to one MVP, and the k sub-regions correspond to the k to-be-searched sub-regions at the time of encoding.
  • the decoding end needs to determine which one of the k sub-areas the MV of the current block points to, so as to finally determine the MVP corresponding to the current block.
  • the decoding end may determine the sub-area pointed by the MV of the current block according to the abscissa component of the MVD of the current block and the numerical features of the ordinate component, the abscissa component, or the ordinate component. For example, the decoding end may determine the sub-region pointed by the MV of the current block according to the remainder of the abscissa component and the ordinate component of the MVD of the current block, the amplitude of the abscissa component, or the remainder of the ordinate component divided by k.
  • Step 203 Obtain an MV of the current block according to the MVP and the MVD corresponding to the to-be-divided area to which the sub-area belongs.
  • the MVP corresponding to the sub-area can be determined according to the MVP corresponding to the sub-area; wherein the MVP corresponding to the sub-area is the to-be-divided area to which the sub-area belongs.
  • the MVP corresponding to the area to be divided is the MVP corresponding to the MVP pixel included in the area to be divided.
  • the decoding end and the encoding end may pre-arrange the correspondence between the sub-area and the area to be divided, or the decoding end receives the relationship between the sub-area and the to-be-divided area i or from the encoding end.
  • the decoder After the decoder obtains the MVP of the current block, according to the MVD and MVP of the current block, the MV of the current block can be obtained.
  • the decoding end after the decoding end receives the MVD of the current block sent by the encoding end, according to the MVD and k MVPs of the current block may determine an area of the reference image pointed by the MV of the current block. If the MV of the current block points to k areas to be divided, according to the MVD of the current block, the MV of the current block may be determined. The sub-area is then obtained according to the MVD and the MVP corresponding to the sub-area.
  • the decoding end can determine the MVP corresponding to the MVD according to the MVD, the encoding end does not need to send the identifier of the MVP corresponding to the MVD to the decoding end, thereby reducing coding overhead and improving coding efficiency.
  • FIG. 3 is a flowchart of Embodiment 2 of a video image encoding method according to the present invention. As shown in FIG. 3, the method includes:
  • Step 301 Perform area division on the search area of the reference image according to k corresponding MVP pixels in the reference image according to the k MVPs of the current block to be encoded.
  • Step 302 Remove MVP pixel points from each to-be-divided area, and divide k sub-areas from the to-be-divided area from which MVP pixels are removed.
  • the encoding end needs to further divide k sub-regions from each of the divided regions to be divided.
  • the probability that the pixel corresponding to the matching block of the current block is the MVP pixel is relatively large.
  • the MVP pixel is also used as the sub-region obtained by the division, One point, in the motion estimation, k-1 MVP pixel points will not be matched with the current block, which will bring performance loss.
  • the MVP pixel can be treated as a separate processing area.
  • the encoding end When the encoding end uses k MVP pixels as separate processing regions, the encoding end removes the MVP pixel points from each of the regions to be divided, and then divides the k sub-regions from the to-divided regions from which the MVP pixels are removed.
  • the process of dividing the k sub-regions from the to-be-divided region of the MVP pixel by the encoding end may be: the encoding end according to the abscissa component and the ordinate component of each pixel in the to-be-divided region of the MVP pixel.
  • k sub-regions may be divided from the to-be-divided region by the above method.
  • Step 303 Select one sub-region from each of the k sub-regions to be divided into regions to be searched for the sub-region to be searched.
  • each to-be-divided region of the MVP pixel After the encoding end divides each to-be-divided region of the MVP pixel into k sub-regions, one sub-region is selected from the k sub-regions of each to-be-divided region as the sub-region to be searched, thereby obtaining k sub-regions to be searched.
  • the region to be divided is divided into k sub-regions based on the remainder j, the remainder j corresponding to the two sub-regions to be searched from any two regions to be divided are different from each other.
  • the MVP corresponding to the sub-region to be searched is the MVP corresponding to the to-be-divided region in which the sub-region to be searched is located; the MVP corresponding to each region to be divided is the MVP corresponding to the MVP pixel included in the to-be-divided region.
  • Step 304 Perform motion estimation on each of the to-be-searched sub-areas, the search area other than the to-be-divided area, and each MVP pixel in the search area to be searched, and determine the MV of the current block.
  • the present embodiment processes the MVP pixel as a single processing region, when performing motion estimation, in addition to moving the region other than the k to-be-divided regions in the search region of each of the to-be-searched sub-region and the reference image It is estimated that motion estimation is also required for each MVP pixel.
  • the process of estimating the motion of any region of the reference image to obtain the MV of the current block may be:
  • Step 305 If the determined pixel corresponding to the MV of the current block is any MVP pixel, obtain the MVD of the current block according to the MVP corresponding to the MVP pixel corresponding to the MV and the MV, and obtain the MVP corresponding to the MVD and the MVD.
  • the identifier is encoded and sent to the decoder.
  • the MVD of the current block is obtained according to the MV and the MVP corresponding to the MV, where the MVD is (0, 0), and then the MVD and The identifier of the MVP corresponding to the MVD is encoded and sent to the decoding end.
  • both the encoding end and the decoding end can obtain the k MVPs corresponding to the current block, and the encoding end and the decoding end pre-negotiate the identifiers corresponding to the k MVPs, the encoding end only needs to send the identifier of the MVP corresponding to the MVD to the decoding.
  • the decoding end can determine which MVP the MVD corresponds to according to the identifier.
  • the MVD of the current block is obtained according to the MVP corresponding to the sub-region to be searched for the pixel corresponding to the MV and the MV; The description in step 104 of the illustrated embodiment.
  • the encoding method provided by the embodiment of the present invention enables the decoding end to determine the sub-region (or MVP pixel point) pointed by the MV of the current block according to the MVD and the k MVPs of the current block after receiving the MVD, and then The MV of the current block can be obtained according to the MVP corresponding to the MVD and the sub-region (or MVP pixel). Therefore, the present embodiment has the same advantages as the embodiment shown in FIG. 1.
  • the encoding end divides k MVP pixels in the process of dividing the k regions to be divided into sub-regions. Firstly, it is removed from the k regions to be divided, and the region to be divided by removing the MVP pixels is divided into sub-regions. Then, when motion estimation is performed, motion estimation is performed for each MVP pixel, thereby improving the accuracy of motion estimation. .
  • Embodiment 2 of a video image decoding method according to the present invention. This embodiment corresponds to the encoding method shown in FIG. 3. As shown in FIG. 4, the method includes:
  • Step 401 Determine, according to the k MVPs of the current block to be decoded and the MVD of the decoded current block, an area in the reference image pointed by the MV of the current block.
  • the solution The code end can determine the area pointed by the MV of the current block according to the k MVPs and MVDs of the current block, and the area may be the k to be divided areas in the reference image, or may be other areas of the reference image, or may be k
  • the processing area composed of MVP pixels.
  • Step 402 If the MVD of the current block is (0, 0), then determining to further receive the identifier of the MVP corresponding to the MVD sent by the encoding end, and obtaining the MV of the current block according to the MVP corresponding to the identifier and the received MVD.
  • the decoding end decodes the MVD of the current block to be (0, 0), it can be determined that the MV of the current block corresponds to one of k MVP pixels; when the MVD is (0, 0), the encoding end will The identifier of the MVP corresponding to the MVD is also sent to the decoding end.
  • the decoding end knows the MVP corresponding to the MVD according to the identifier of the MVP sent by the encoding end, and then obtains the MV of the current block according to the MVD and the MVP.
  • MV of the current block points to k areas to be divided, refer to the description in step 202 in the embodiment shown in FIG. 2.
  • the encoding end since the encoding end uses k MVP pixel points as a single processing area when encoding, and when the MV of the current block corresponds to the MVP pixel point, the encoding end The identifier of the MVP corresponding to the MVP pixel is sent to the decoding end. Therefore, when the MVD of the received current block is (0, 0), the decoding end determines to further receive the identifier of the MVP corresponding to the current block, and then according to the above description. Get the MV of the current block.
  • the codec method shown in Fig. 3 and Fig. 4 can improve the accuracy of motion estimation while improving coding efficiency by processing k MVP pixels as a single region.
  • FIG. 5 is a flowchart of a third embodiment of a video image encoding method according to the present invention.
  • FIG. 6 is a flowchart of a third embodiment of a video image decoding method according to the present invention.
  • the decoding method shown in FIG. 6 corresponds to the encoding method shown in FIG. 5a.
  • k 2 as an example.
  • the encoding method includes:
  • Step 501 The encoding end acquires MVPs and MVPts of the current block.
  • the encoding end acquires according to the corresponding method in the H.264 standard. MVPs and MVPt of the previous block.
  • the current block corresponds to two MVPs.
  • the two MVPs are described by taking MVPs and MVPts as an example. However, the present embodiment is not limited thereto.
  • the two MVPs may be two different MVPs, or may be two. Different MVPts.
  • the MVPs in this embodiment are equivalent to the first MVP, and the MVPt is equivalent to the second MVP, and the MVPs pixel points are equivalent to the first MVP pixel points, and the MVPt is equivalent to the second MVP pixel points.
  • Step 502 The coding end performs area division on the search area of the reference image according to the MVPs pixel and the MVPt pixel corresponding to the MVPs and the MVPt of the current block in the reference image.
  • FIG. 5b is a schematic diagram of the area division method in the embodiment shown in FIG. 5a.
  • the coding end performs area division on the search area of the reference image.
  • the specific process is:
  • Step bl connecting the MVPs pixel point and the MVPt pixel point to obtain a line segment, wherein the length of the line segment is 2d; wherein, the MVPs pixel point is the corresponding pixel point of the MVPs in the reference image, and the MVPt pixel point is the corresponding pixel point of the MVPt in the reference image;
  • Step b2 extending the line segment ⁇ to both ends to obtain a line segment a 2 ;
  • Step b3 the ends of the line segment a 2 are respectively made as a straight line / 2 parallel to the straight line and wherein the straight line / is a vertical bisector of the line segment ⁇ .
  • the embodiment of the present invention is not limited thereto, and any equivalent or similar method capable of achieving the above division effect can be applied to the embodiment of the present invention.
  • the lines /, / 2 and ⁇ divide the search area of the reference image into area A, area B, area C and area D; wherein area B includes MVPs pixels, area C includes MVPt pixels, and area B and area C are Area to be divided; Area A is the adjacent area of Area B, and Area D is the adjacent area of Area C.
  • the distance between the pixel in the area A and the area B is far from the pixel of the MVPs, and the distance corresponding to the pixel in the area A and the area B is MVPs.
  • the area C The MVP corresponding to each pixel in the area D is MVPt.
  • the decoding end can determine the pointed area (A or D) according to the MVD of the current block, so that the corresponding MVP can be obtained; however, if the final motion
  • the result of the estimation is that the MV of the current block points to the area B or the area C, and the decoding end can only judge that the pointing area is the union area of the area B and the area C according to the MVD, and cannot determine whether it points to the area B or the area C, Therefore, the MVP corresponding to the MVD cannot be determined. Therefore, in this embodiment, the area B and the area C are further divided so that the decoding end can determine whether it points to the area B or the area C according to the MVD.
  • Step 503 The coding end divides the area B and the area C into two sub-areas.
  • FIG. 5c is a schematic diagram of the sub-area division method in the embodiment shown in FIG. 5a.
  • the coding end divides the area B into two sub-areas.
  • the specific process of the area is:
  • the pixel with the remainder 0 is called the even point, that is, the block in FIG. 5c
  • the X and y components of the pixel represented by the square satisfy (
  • )%2 0; the pixel with the remainder of 1 is called the odd point, that is, the circle in Fig. 5c, represented by the circle
  • the X and y components of the pixel satisfy (
  • )%2 l; all even points form a sub-region, called the even sub-region, and all odd points form another sub-region, called the odd punctuation. region.
  • the area C can be divided into two sub-areas.
  • the region B and the region C may be divided into sub-regions according to the amplitude of the abscissa component of each pixel or the remainder of the ordinate component divided by 2. .
  • the encoding end can subdivide the region B and the region C by using one of three methods (the amplitude of the abscissa component, the amplitude of the ordinate component, and the magnitude sum of the abscissa component and the ordinate component), and specifically
  • the encoding end and the decoding end may be pre-predetermined, or the encoding side may traverse various sub-area partitioning modes for each encoded image, and select an optimal dividing mode, and then transmit the identifier in the image header. The division of the selection is informed to the decoder.
  • the mesh precision is the motion search accuracy set by the encoding end.
  • the motion search accuracy is a quarter pixel
  • the distance between two adjacent grid points in the horizontal and vertical directions is a quarter pixel interval. If the pixel in the figure is not a whole pixel, the pixel value at the grid point can be calculated by various interpolation methods.
  • Step 504 The encoding end selects one of the two sub-areas of the area B as the sub-area to be searched, and selects one of the two sub-areas of the area C as the sub-area to be searched.
  • the encoding end may select an odd point sub-area from the area B as the to-be-searched sub-area according to the agreement with the decoding end, and select an even-numbered sub-area area from the area C as the to-be-searched sub-area; or select an even-numbered sub-area from the area B as the to-be-searched sub-area.
  • the area, the odd point sub-area is selected from the area C as the sub-area to be searched. That is to say, the encoding end selects a sub-region for MVPs and MVPt respectively, and the amplitude characteristics of the coordinate components of the pixel points in the selected two sub-regions are different, that is, one must be an even-point sub-region and one is an odd-point sub-region.
  • the rule may be sent to the decoding end after determining the selected rule according to the agreement with the decoding end.
  • this embodiment may use adaptive sub-region partitioning instead of fixed sub-region partitioning.
  • the encoding end and the decoding end may count the probability distribution of each element (ie, MVPs and MVPt) of the MVP set in the coded block of the same one or more coded images of the same type or the current coded image, and respectively calculate the probability of use of the MVPs and the MVPt.
  • a MVP with a high probability to correspond to a sub-region including a large number of pixels for example: if the MVPs use probability is significantly larger than the MVPt use probability, select an even-numbered sub-region for the MVPs (ie, select an even-point sub-region in the region B as the Search sub-region), select odd-point sub-region for MVPt; if MVPs use probability is less than MVPt usage probability, select odd-point sub-region for MVPs (ie select odd-point sub-region in region B as sub-region to be searched), select even pip for MVPt A region; wherein, when the pixels included in the region B and the region C are the same, the number of pixels included in the even-numbered sub-region is larger than the number of pixels included in the odd-point sub-region.
  • the encoding end sends the corresponding relationship between the selected MVPs and MVPt and the odd point sub-area and the even point sub-area to the decoding end.
  • the MVPs and the MVPt are separately processed.
  • the MVPs pixel and the MVPt pixel are processed separately, which is equivalent to the case where the MVD is (0, 0). In this case, the probability that MVD is (0, 0) can be counted first.
  • the encoding end and the decoding end may count the probability that the MVD of the one or more encoded images of the same type or the encoded image of the current encoded image is (0, 0); if the probability of the MVD being (0, 0) is greater than a certain For a preset threshold, the MVD (0, 0) is treated as a separate sub-area, and the identifier of the MVP corresponding to the MVP is transmitted to the decoding end.
  • Step 505 Perform motion estimation on the two to-be-searched sub-areas in the areas B and C, and the area A and the area D, and determine the MV of the current block.
  • step 504 motion estimation is also performed on the MVPs pixel and the MVPt pixel.
  • Step 506 Determine the used MVP according to the region or sub-region to which the determined pixel points belong, and then calculate the MVD according to the MV and the MVP, and encode the MVD and send the MVD to the decoding end.
  • the area to which each pixel belongs may be determined according to the following method, so that the corresponding MVP can be selected:
  • Step cl taking the midpoint of the line connecting the MVPs pixel and the MVPt pixel as the coordinate origin, taking the line connecting the MVPs pixel and the MVPt pixel as the X axis, and the direction of the MVPs pixel pointing to the MVPt pixel as the X axis Direction
  • Step c2 Projecting the vector of the current pixel on the X axis, that is, calculating the X component of the pixel, and determining the region to which the pixel belongs according to the value of the X component, which may be classified into the following cases:
  • the MVP corresponding to the areas A, B, C, and D is as described above. If the determined pixel of the MV of the current block is included in the area A or the area D, the MVD of the current block is obtained according to the MVP corresponding to the area where the pixel corresponding to the MV and the MV is located; wherein the MVP corresponding to the area A is MVPs, the MVP corresponding to area D is MVPt.
  • the decoding method includes:
  • Step 601 The decoding end acquires MVPs and MVPts of the current block.
  • the encoding end acquires the MVPs and MVPts of the current block according to the corresponding method in the H.264 standard.
  • Step 602 The decoding end determines an area in the reference image pointed by the MV of the current block according to the MVPs and the MVPt, and the MVD of the decoded current block.
  • the method for determining which area of the current block MV points to FIG. 5b may be: Step sl, calculating d according to formula 1;
  • Step s2 according to formula 2 and formula 3, the projection of the MVD of the current block on the difference vector of MVPs and MVPt is calculated;
  • Equation 3 d p di D p lld
  • Step s3, ⁇ -d ⁇ d p ⁇ d determining that the MV of the current block points to the area to be divided, that is, pointing to the area B and the area C, and cannot determine whether the specific pointing area B or the pointing area C;
  • the region D pointed to by the MV of the current block is determined, and the MVP corresponding to the MV of the current block is MVPt.
  • step 603 is performed;
  • step 604 is performed.
  • d and D may not be calculated, but the area pointed by the MV of the current block may be determined according to the relationship between the size of d 2 and D p ;
  • MV of the current block is determined to be directed divided areas
  • Step 603 The decoding end determines, according to the MVD of the current block, a sub-area pointed by the MV of the current block; and then performs step 604.
  • the sub-region pointed to by the MV may be determined according to the following method: If (
  • )%2 0, then the MV is pointed to the even-numbered pip Region; if (
  • )%2 1, then the MV is judged to point to the odd sub-region.
  • Step 604 The decoding end determines an MVP corresponding to the MV of the current block.
  • determining the area A pointed to by the MV of the current block it may determine that the MV of the current block corresponds to the MVPs; when determining the area D pointed to by the MV of the current block, it may determine that the MV of the current block corresponds to the MVPt.
  • step 602 when ⁇ - ⁇ is calculated, the MV corresponding to the current block is obtained, and when ⁇ is calculated, the MV corresponding to the current block is obtained, and the MV is not needed to be judged first.
  • the area pointed to is only a logical step and may not be a step in a specific implementation.
  • the decoding end has an agreement with the encoding end, or the encoding end sends the corresponding relationship to the decoding end.
  • the decoding end determines whether the MV of the current block points to the region B or the region C according to the correspondence or the correspondence sent by the encoding end, and thus can determine the MV of the current block.
  • Corresponding MVP when the MV of the current block points to the even-point sub-region or the odd-point sub-region, the decoding end determines whether the MV of the current block points to the region B or the region C according to the correspondence or the correspondence sent by the encoding end, and thus can determine the MV of the current block. Corresponding MVP.
  • Step 605 The decoding end calculates the MV of the current block according to the MVD and the MVP of the current block.
  • the process of encoding and decoding is the same as that of the foregoing embodiment, and the coding end specifically divides the k regions to be divided into sub-regions.
  • the current block corresponds to three MVPs, that is, MVP1, MVP2, and MVP3, and the reference image in the embodiment shown in FIG. 5a-5c is shown.
  • the search area of the reference image is divided into regions; for example: connecting the MVP1 point and the MVP2 point to obtain a line segment having a length of 2 2 , and the line segment is directed to both ends Each extension ⁇ 12 , and then the parallel lines of the vertical bisector of the line segment are made at both ends, thereby dividing the search area of the reference image, and also performing the same for the MVP1 point and the MVP3 point, and the MVP2 point and the MVP3 point. Processing, thereby dividing the search area of the reference image, as shown in FIG.
  • the area to be divided described in the foregoing embodiment includes the area 1, the area 2, and the area 3 in FIG.
  • the area 1 the area 2 and the area 3, three sub-areas can be respectively divided, and the specific process is as described in the above embodiments.
  • the decoding end can determine the area pointed by the MV of the current block according to the MVD, MVP 1, MVP2, and MVP3 of the current block.
  • the specific process may be:
  • the decoding end is according to the formula 1 in the embodiment shown in Fig. 6.
  • the MVD projects the calculated value on the line passing the MVP1 point and the MVP3 point.
  • the line direction points from the MVP1 point to the MVP3 point.
  • the OMVD projects the calculated value on the line passing the MVP3 point and the MVP2 point.
  • the linear direction is determined by the MVP2.
  • the MV of the current block points to the area A, and the MVP corresponding to the area A is MVP1;
  • the MV of the current block points to the area D, and the MVP corresponding to the area D is MVP2;
  • the MV of the current block points to the area G, and the area G corresponds to
  • MVP is MVP3;
  • Bay 1 J determines the MV of the current block points to the union area of area 1, area 2 and area 3. At this time, according to the remainder of the X component amplitude, the y component amplitude, or the sum of the x and y component amplitudes of the MVD of the current block divided by 3, the region pointed by the MV of the current block may be specifically determined.
  • the decoding end is based on 12
  • the combination of the values of 13 and 23 can rule out the possibility that an MVP is selected. Therefore, it is only necessary to separately divide two sub-areas from each area, and the other two MVPs can be distinguished according to the method in the foregoing embodiment.
  • the following describes areas B and C as an example. If ⁇ ⁇ 13 ⁇ - ⁇ 13 or ⁇ ⁇ 23 ⁇ - ⁇ 23 and
  • the MV of the current block points to the area B or C (that is, to the union area composed of the area B and the area C).
  • MVP3 can be excluded, but it cannot be determined whether the MVD corresponds to MVP 1 or MVP2.
  • the decoding end determines that the MV of the current block points to the area B or C, it can be processed by referring to the case where the previous embodiment k is 2, thereby distinguishing whether MVP1 or MVP2 is selected.
  • the encoding end divides two to-be-divided areas from the search area of the reference image according to the MVPs and MVPt of the current block to be encoded in the corresponding MVPs pixel points and MVPt pixels in the reference image, and from the two Two sub-regions to be searched are divided in the to-be-divided region, and then motion estimation is performed on each region of the search region of the to-be-searched sub-region and the reference image, and the pixel corresponding to the MV of the current block determined by the motion estimation includes
  • the MVD of the current block is obtained according to the MV and the MVP corresponding to the MV, and the MVD is encoded and sent to the decoding end, so that the decoding end receives the MVD, according to the
  • the MVPs and the MVPs of the current block may determine the region of the reference image pointed by the MV of the current block.
  • the MV of the current block may be determined according to the MVD of the current block.
  • the sub-area and then the MV of the current block can be obtained according to the MVD and the MVP corresponding to the sub-area. Therefore, since the decoding end can determine the MVP corresponding to the MVD according to the MVD, the encoding end does not need to send the identifier of the MVP corresponding to the MVD to the decoding end, thereby reducing coding overhead and improving coding efficiency.
  • the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • FIG. 8 is a schematic diagram of Embodiment 1 of a video image coding apparatus according to the present invention. As shown in FIG. 8, the apparatus includes: a region division module 81, a sub-region division module 83 to be searched, a motion estimation module 85, and a first calculation transmission module 87.
  • the area dividing module 81 is configured to perform area division on the search area of the reference image according to the k pieces of mutually different MVP pixels in the reference image according to the k motion vector predictors MVP of the current block to be encoded.
  • the divided area includes k areas to be divided, and each area to be divided includes An MVP pixel, where k is greater than or equal to 2.
  • the to-be-searched sub-area dividing module 83 is configured to divide the k to-be-searched sub-areas from the k to-be-sorted areas divided by the area dividing module 81.
  • the k to-be-searched sub-regions correspond one-to-one with the k to-be-divided regions.
  • the motion estimation module 85 is configured to perform motion estimation on each of the search sub-regions to be searched and the search regions of the reference image, except for the k regions to be divided, to determine the motion vector MV of the current block. .
  • the first calculation sending module 87 is configured to: if the pixel corresponding to the MV of the current block determined by the motion estimation module 85 is included in any of the to-be-searched sub-regions, the MVP corresponding to the to-be-searched sub-region where the pixel corresponding to the MV and the MV is located The motion vector difference MVD of the current block is obtained, and the obtained MVD is encoded and sent to the decoding end.
  • This embodiment is used to implement the method embodiment shown in FIG. 1.
  • the video image coding apparatus in this embodiment is located at the coding end described in the method embodiment.
  • the area dividing module divides the k to be divided areas from the search area of the reference image according to the corresponding MVP pixel points in the reference image according to the k MVPs of the current block to be encoded, and the sub-area dividing module to be searched
  • the k pieces to be searched are divided into k to be searched, and then the motion estimation module performs motion estimation on each of the to-be-searched sub-areas and other areas of the search area of the reference image, and if the motion is estimated, the MV of the current block is determined by motion estimation.
  • the corresponding pixel is included in any of the to-be-searched sub-regions, and the first calculation sending module obtains the MVD of the current block according to the MV and the MVP corresponding to the MV, and encodes the MVD and sends the MVD to the decoding end;
  • the MVP can determine the MVP corresponding to the MVD according to the MVD. Therefore, the encoding end does not need to send the identifier of the MVP corresponding to the MVD to the decoding end, thereby reducing coding overhead and improving coding efficiency.
  • FIG. 9 is a schematic diagram of Embodiment 2 of a video image encoding apparatus according to the present invention. Based on the embodiment shown in FIG. 8, FIG. 9 is as follows:
  • the to-be-searched sub-area dividing module 83 includes a first dividing unit 831 and a first selecting unit 833.
  • the first dividing unit 831 is configured to divide k sub-regions from each to-be-divided region.
  • the first selecting unit 833 is configured to select one sub-region from the k sub-regions obtained by dividing the region to be divided from the first dividing unit 831 as the sub-region to be searched corresponding to the region to be divided.
  • the first dividing unit is specifically configured to: use the MVP pixel point included in the area to be divided as a coordinate origin, and according to the horizontal coordinate component of each pixel point in the area to be divided, and the numerical characteristics of the ordinate component, the abscissa component, or the ordinate component , k sub-regions are divided from the area to be divided.
  • the first dividing unit is specifically configured to: divide the sum of the abscissa component and the ordinate component of each pixel point in the region to be divided, the amplitude of the abscissa component, or the amplitude of the ordinate component by k j, k sub-regions are divided from the area to be divided.
  • the to-be-searched sub-area dividing module 83 may include: a removing unit 830, a second dividing unit 832, and a second selecting unit 834.
  • the motion estimation module 85 is specifically configured to perform motion estimation on each of the to-be-searched sub-regions, the search regions other than the to-be-divided regions, and each MVP pixel in the search region of the reference image, and determine the MV of the current block. .
  • the removing unit 830 is for removing MVP pixel points from each of the areas to be divided.
  • the second dividing unit 832 is for dividing k sub-regions from each of the to-be-divided regions from which the MVP pixel points are removed by the removing unit 830.
  • the second selecting unit 834 is configured to select one of the k sub-regions divided by the second dividing unit 832 as the sub-region to be searched corresponding to the to-be-divided region.
  • the video image coding apparatus may further include: a second calculation sending module 89.
  • the second calculation sending module 89 is configured to: if the determined pixel corresponding to the MV of the current block is any MVP pixel, obtain the MVD of the current block according to the MVP corresponding to the MVP pixel corresponding to the MV and the MV, and obtain the MVD and The identifier of the MVP corresponding to the MVD is encoded and sent to the decoding end.
  • the area dividing module 81 includes: a first executing unit 811 and a second executing unit 813.
  • the first execution unit 811 is configured to connect the first MVP pixel point and the second MVP pixel point to obtain a line segment ⁇ , and extend the line segment ⁇ 1 to both ends to obtain a line segment a 2 .
  • the length of the line segment ⁇ 1 is 2d
  • the first MVP pixel point is the corresponding pixel point of the first MVP in the reference image
  • the second MVP pixel point is the corresponding pixel point of the second MVP in the reference image.
  • the second execution unit 813 is configured to make a straight line parallel to the straight line h through the two end points of the line segment.
  • the line is the vertical bisector of the line segment.
  • area B includes a first MVP pixel
  • area C includes a second MVP pixel
  • area B and area C The area to be divided;
  • the area A is the neighboring area of the area B
  • the area D is the neighboring area of the area C.
  • the video image encoding device further includes: a third calculation transmitting module 80.
  • the third calculation sending module 80 is configured to obtain the MVD of the current block according to the MVP corresponding to the region where the pixel corresponding to the MV and the MV is located, if the determined pixel corresponding to the MV of the current block is included in the area A or the area D, The obtained MVD is encoded and sent to the decoding end.
  • the MVP corresponding to the area A is the first MVP
  • the MVP corresponding to the area D is the second MVP.
  • This embodiment is used to implement the foregoing method embodiments.
  • the video image coding apparatus in this embodiment is located at the coding end described in the method embodiment.
  • the encoding end may further divide k MVP pixel points from k to be divided in the process of dividing the k regions to be divided into sub-regions. In the region, the area to be divided except the MVP pixel is divided into sub-regions, and then motion estimation is performed for each MVP pixel when motion estimation is performed, thereby improving the accuracy of motion estimation.
  • the advantages of this embodiment refer to the description in the foregoing method embodiments.
  • FIG. 10 is a schematic diagram of Embodiment 1 of a video image decoding apparatus according to the present invention. As shown in FIG. 10, the apparatus includes: a first determining module 11 and a second determining module 13.
  • the first determining module 11 is configured to obtain, according to k MVPs of the current block to be decoded and decoded
  • the MVD of the previous block determines the region in the reference image pointed to by the MV of the current block.
  • the reference image includes k regions to be divided, and each of the regions to be divided includes one MVP pixel corresponding to one MVP in the reference image, where k is greater than or equal to 2.
  • the second determining module 13 is configured to determine, according to the MVD of the current block, the sub-area pointed to by the MV of the current block, according to the MVD of the current block, if the first determining module 11 determines that the MV of the current block points to the k-to-be-divided area, and according to the sub-area to which the sub-area belongs The MVP and MVD corresponding to the region get the MV of the current block.
  • This embodiment is used to implement the method embodiment shown in FIG. 3.
  • the video image decoding apparatus in this embodiment is located at the decoding end in the method embodiment.
  • the first determining module may determine, according to the MVD and the k MVPs of the current block, an area of the reference image pointed by the MV of the current block, if the current block is The MV points to the k areas to be divided, and the second determining module may determine the sub-area pointed by the MV of the current block according to the MVD of the current block, and then obtain the MV of the current block according to the MVD and the MVP corresponding to the sub-area.
  • the decoding end can determine the MVP corresponding to the MVD according to the MVD, the encoding end does not need to send the identifier of the MVP corresponding to the MVD to the decoding end, thereby reducing coding overhead and improving coding efficiency.
  • FIG. 11 is a schematic diagram of Embodiment 2 of a video image decoding apparatus according to the present invention. On the basis of the embodiment shown in FIG. 10, as shown in FIG.
  • the second determining module 13 is specifically configured to: if the first determining module 11 determines that the MV of the current block points to the k to be divided regions, according to the abscissa component and the ordinate component, the abscissa component or the ordinate component of the MVD of the current block.
  • the numerical feature determines the sub-region pointed to by the MV of the current block, and obtains the MV of the current block according to the MVP and MVD corresponding to the region to be divided to which the sub-region belongs.
  • the second determining module 13 is specifically configured to: if the first determining module 11 determines that the MV of the current block points to the k to be divided regions, according to the amplitude sum and the abscissa of the abscissa component and the ordinate component of the MVD of the current block Determining the amplitude of the component or the amplitude of the ordinate component by the remainder of k, determining the sub-region to which the MV of the current block points, and corresponding to the region to be divided to which the sub-region belongs MVP and MVD, get the MV of the current block.
  • the video image decoding apparatus may further include: a third determining module 15.
  • the third determining module 15 is configured to: if the first determining module determines that the MVD of the current block is (0, 0), receive the identifier of the MVP corresponding to the MVD sent by the encoding end, and obtain the current MVP and MVD corresponding to the identifier of the MVP, and obtain the current The MV of the block.
  • the first determining module 11 may specifically include: a first calculating unit 111, a second calculating unit 113, and a first determining unit 115.
  • Equation 1 The first calculation unit ill is used to calculate d according to Equation 1.
  • the second calculating unit 113 is configured to calculate the projection of the MVD of the current block on the MVPs and MVPt difference vectors according to Equation 2 and Equation 3.
  • the absc issa component and the ordinate component.
  • Equation 3 is: d p di D p l2d.
  • the first determining unit 115 is configured to determine if the MV of the current block points to the area to be divided if - ⁇ ⁇ ⁇ ⁇ .
  • the first determining module 11 may further include: a second determining unit 117 and a third determining unit 119.
  • the second determining unit 117 is configured to determine, if ⁇ - ⁇ , the MVP corresponding to the region pointed by the MV of the current block as the first MVP, and obtain the MV of the current block according to the first MVP and the MVD.
  • the third determining unit 119 is configured to determine, if >, that the MVP corresponding to the area pointed by the MV of the current block is the second MVP, and obtain the MV of the current block according to the second MVP and the MVD.
  • the embodiment shown in FIG. 10 and FIG. 11 can improve coding efficiency by processing k MVP pixel points as a single area when performing codec decoding. At the same time, improve the accuracy of motion estimation.
  • the advantages of this embodiment can be specifically referred to the description in the foregoing method embodiments.

Landscapes

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

Description

视频图像编码方法、 解码方法和装置 技术领域
本发明实施例涉及通信技术, 尤其涉及视频图像技术中的一种视频图像 编码方法、 解码方法和装置。 背景技术
在视频序列中, 时间相邻的两帧中的景物存在着一定的相关性。 帧间预 测编码能够去除这种时间冗余, 是视频压缩处理系统的一个重要组成部分。 帧间预测编码的过程可以为: 将每一帧的图像划分成若干块, 并搜索得到每 个块在时间参考图像中的匹配块, 其中当前块与匹配块间的空间位置的相对 偏移量即为该当前块的运动矢量(Motion Vector, 以下简称为: MV ) , 获得 当前块的 MV的过程称为运动估计 (Motion Estimation, 简称为: ME); 然后, 该匹配块被用作参考, 对当前块进行预测编码, 并将当前块的运动矢量和预 测误差信号发送到解码端。 解码端按照运动矢量指明的位置, 从已知的时间 参考图像中找到相应的参考块(即上述的匹配块) , 并将该参考块信号与预 测误差信号相加, 从而得到该当前块。
现有的一种运动估计方法可以如下:设 t时刻的帧图像为当前帧 f( X, y ) , t,时刻的帧图像为参考帧 f(x, y), 其中, 参考帧在时间上可以超前或者滞后 于当前帧, 当 t'<t时, 称为前向运动估计, 当 t'>t时, 称为后向运动估计。 当在参考帧 f(x , y)中搜索到当前帧 f ( X , y ) 中的块的最佳匹配时, 可以得 到运动矢量 d(x, y; t, t + \t )。如果对当前帧每个块的运动矢量直接进行编码, 将大大增加编码开销。 尤其是当使用小尺寸的块进行帧间预测编码时, 对每 个块的运动矢量都直接进行编码的开销巨大。
利用运动矢量的相关性, 无需对每个块的运动矢量都直接进行编码, 由 此减少了开销。 具体可以如下: 由于一个运动物体会覆盖多个块, 空间域相 邻块的运动矢量具有相关性; 又由于物体运动的连续性, 时间域相邻帧的对 应块的运动矢量也存在相关性。 因此可以使用空间邻近已编码块的运动矢量 或时间邻近参考帧的运动矢量作为对当前块运动矢量的运动矢量预测值
(Motion Vector Predictor, 简称为: MVP), 其中, 空间邻近已编码块的运动矢 量称为空间 MVP, 时间邻近参考帧的运动矢量称为时间 MVP。 计算当前块 的运动矢量与空间 MVP 或时间 MVP 的运动矢量差值 (Motion Vector Difference, 以下简称为: MVD), 从而将该 MVD传送到解码端, 即可使解 码端根据该 MVD和 MVP就可以得到当前块的 MV。
现有技术提出一种率失真最优化的时空运动矢量预测方法,该方法包括: 首先构造一组矢量预测值, 该组矢量预测值中可以包括多个 MVP; 然后再通 过一个改进的率失真代价函数,从这一组矢量预测值中选择一个最优的 MVP 作为当前块的 MVP; 最后将所选择的 MVP的标识进行编码, 并将该 MVP 的标识和当前块相对于该 MVP的 MVD传输到解码端,以使解码端获得该当 前块的 MV。
在现有的方法中, 为了使解码端能获知 MVD对应的 MVP, 需要编码端 将选择的 MVP的标识写入码流传送到解码端, 然而, 该 MVP的标识所需的 比特开销 ^艮大, 例如, 一组矢量预测值中包含两个 MVP, 在中低码率应用中 该标识通常要占运动信息码率的 12%以上,相当于占总码率的 4%以上, 由此 大大增加了编码开销, 降低了编码效率。 发明内容
本发明实施例提供一种视频图像编码方法、 解码方法和装置, 以降低编 码开销, 提高编码效率。
本发明实施例提供一种视频图像编码方法, 包括:
根据待编码的当前块的 k个运动矢量预测值 MVP在参考图像中对应的 k 个互不相同的 MVP像素点,对所述参考图像的搜索区域进行区域划分; 划分 得到的区域中包括 k个待划分区域,每个所述待划分区域包括一个所述 MVP 像素点, 其中, k大于等于 2;
从所述 k个待划分区域中划分出 k个待搜索子区域; 所述 k个待搜索子 区域与所述 k个待划分区域——对应;
对每个所述待搜索子区域和所述参考图像的搜索区域中除所述 k个待划 分区域以外的区域进行运动估计, 确定出所述当前块的运动矢量 MV;
若确定的所述当前块的 MV对应的像素点包含在任一所述待搜索子区域 中, 则根据所述 MV和所述 MV对应的像素点所在的所述待搜索子区域对应 的 MVP, 得到所述当前块的运动矢量差值 MVD;
将所述 MVD进行编码后发送给解码端。
本发明实施例提供一种视频图像解码方法, 包括:
根据待解码的当前块的 k个 MVP和解码得到的所述当前块的 MVD, 确 定所述当前块的 MV指向的参考图像中的区域; 所述参考图像包括 k个待划 分区域,每个所述待划分区域包括一个所述 MVP在所述参考图像中对应的一 个 MVP像素点, 其中, k大于等于 2;
若所述当前块的 MV指向所述 k个待划分区域, 则根据所述当前块的 MVD, 确定所述当前块的 MV指向的子区域;
根据所述子区域所属的待划分区域对应的 MVP和所述 MVD, 得到所述 当前块的 MV。
本发明实施例提供一种视频图像编码装置, 包括:
区域划分模块, 用于根据待编码的当前块的 k个运动矢量预测值 MVP 在参考图像中对应的 k个互不相同的 MVP像素点,对所述参考图像的搜索区 域进行区域划分; 划分得到的区域中包括 k个待划分区域, 每个所述待划分 区域包括一个所述 MVP像素点, 其中, k大于等于 2;
待搜索子区域划分模块, 用于从所述区域划分模块划分得到的所述 k个 待划分区域中划分出 k个待搜索子区域; 所述 k个待搜索子区域与所述 k个 待划分区域——对应;
运动估计模块, 用于对所述待搜索子区域划分模块划分出的每个所述待 搜索子区域和所述参考图像的搜索区域中除所述 k个待划分区域以外的区域 进行运动估计, 确定出所述当前块的运动矢量 MV;
第一计算发送模块, 用于若所述运动估计模块确定的所述当前块的 MV 对应的像素点包含在任一所述待搜索子区域中, 则根据所述 MV和所述 MV 对应的像素点所在的所述待搜索子区域对应的 MVP,得到所述当前块的运动 矢量差值 MVD , 并将得到的所述 MVD进行编码后发送给解码端。
本发明提供一种视频图像解码装置, 包括:
第一确定模块,根据待解码的当前块的 k个 MVP和解码得到的所述当前 块的 MVD,确定所述当前块的 MV指向的参考图像中的区域; 所述参考图像 包括 k个待划分区域,每个所述待划分区域包括一个所述 MVP在所述参考图 像中对应的一个 MVP像素点, 其中, k大于等于 2;
第二确定模块, 用于若所述第一确定模块确定所述当前块的 MV指向所 述 k个待划分区域,则根据所述当前块的 MVD,确定所述当前块的 MV指向 的子区域, 并根据所述子区域所属的待划分区域对应的 MVP和所述 MVD, 得到所述当前块的 MV。
本发明实施例提供的技术方案,根据待编码的当前块的 k个 MVP在参考 图像中对应的 MVP像素点,对参考图像的搜索区域进行区域划分,并从划分 得到的待划分区域中划分出 k个待搜索子区域, 然后对每个待搜索子区域和 参考图像的搜索区域的其他区域进行运动估计, 若经运动估计确定出的当前 块的 MV对应的像素点包含在任一待搜索子区域中, 则根据该 MV和该 MV 对应的 MVP, 得到当前块的 MVD, 并将该 MVD进行编码后发送给解码端, 从而解码端根据 MVD就可以判断出该 MVD对应的 MVP, 所以编码端无需 将 MVD对应的 MVP的标识发送给解码端 , 从而可以降低编码开销 , 提高编 码效率。 附图说明
为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例或现有 技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下面描述中的 附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明视频图像编码方法实施例一的流程图;
图 2为本发明视频图像解码方法实施例一的流程图;
图 3为本发明视频图像编码方法实施例二的流程图;
图 4为本发明视频图像解码方法实施例二的流程图;
图 5a为本发明视频图像编码方法实施例三的流程图;
图 5b为图 5a所示实施例中区域划分方法示意图;
图 5c为图 5a所示实施例中子区域划分方法示意图;
图 6为本发明视频图像解码方法实施例三的流程图;
图 7为本发明实施例中 k=3时区域划分方法示意图;
图 8为本发明视频图像编码装置实施例一的示意图;
图 9为本发明视频图像编码装置实施例二的示意图;
图 10为本发明视频图像解码装置实施例一的示意图;
图 11为本发明视频图像解码装置实施例二的示意图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1为本发明视频图像编码方法实施例一的流程图, 如图 1所示, 该方 法包括:
步骤 101、根据待编码的当前块的 k个 MVP在参考图像中对应的 k个互 不相同的 MVP像素点, 对参考图像的搜索区域进行区域划分。
当待编码的当前块确定后, 编码端可以根据现有的方法获取到当前块的 k个 MVP, 其中 k大于等于 2, k个 MVP互不相同, 且 k个 MVP可以包括 多个空间 MVP (简称为 MVPs ) ,也可以包括多个时间 MVP (简称为 MVPt ) , 还可以包括一个或多个 MVPs以及一个或多个 MVPt。 例如, 编码端可以根 据 H.264标准中对应的方法获取到当前块的一个 MVPs和一个 MVPt。 其中, MVPs为与当前块相邻的已编码块的 MVP, MVPt为从已编码的非当前帧的 图像中获取的 MVP。
每个 MVP在当前块的参考图像中对应一个像素点, 与 MVP对应的像素 点即为本发明实施例中所称的 MVP像素点, 互不相同的 k个 MVP就对应互 不相同的 k个 MVP像素点。 其中, 根据搜索精度, 该参考图像可以是插值滤 波后的图像, MVP像素点可以是不同精度的像素点或亚像素点。
编码端将参考图像的搜索区域划分得到的区域可以包括: k个待划分区 域和其他区域; 其中, 每个待划分区域包括一个 MVP像素点, 任两个待划分 区域包括的 MVP像素点互不相同,并且任两个待划分区域互不重叠。上述的 其他区域为参考图像的搜索区域中除去 k个待划分区域以外的区域。
步骤 102、 从 k个待划分区域中划分出 k个待搜索子区域。
需要说明的是: 参考图像的搜索区域中的每个像素点都对应 k个 MVP 中的一个,每个像素点根据其相对于 k个 MVP像素点的位置,可能对应不同 的 MVP。相对于 k个 MVP像素点,当参考图像中的一个像素点与第 i个 MVP 像素点( i=l〜k )的距离最短时, 该像素点对应的 MVP就是该第 i个 MVP像 素点对应的 MVP。在参考图像中的 k个待划分区域中,会存在多组 k个 MVD 数值相同的像素点, 并且这 k个像素点分别对应 k个 MVP, 也就是说, 这 k 个像素点中的第 i个像素点距离 k个 MVP像素点中的第 i个 MVP像素点的 距离最短, 并且任两个像素点相对于其距离最短的 MVP像素点的位移相同, 由此使得这 k个像素点相对于当前块的 MVD数值相同。 所以, 如果编码端 只将 MVD发送给解码端时, 解码端将无法判断出哪个 MVP与该 MVD相对 应, 从而也就无法解码出当前块的 MV。 本发明实施例为了解决解码端无法 判断的问题, 将 k个待划分区域进行进一步划分。 以使得解码端根据 MVD 即可判断出与其对应的 MVP,即通过 MVD就可以判断出编码端的与该 MVD 对应的像素点所对应的 MVP。由此编码端就无需向解码端传输 MVP的标识, 而只需要传输 MVD的值即可。
编码端从 k个待划分区域中划分出 k个待搜索子区域, k个待搜索子区 域与 k个待划分区域——对应, 且每个待搜索子区域为与其对应的待划分区 域的一部分, 例如: 第 i个待搜索子区域与第 i个待划分区域对应, 第 i个待 搜索子区域为与其对应的第 i个待划分区域的一部分,并且第 i个待搜索子区 域中的每个像素点对应的 MVP均为第 i个待划分区域对应的 MVP。 每个待 搜索子区域中的每个像素点对应的 MVP即为每个待搜索子区域对应的 MVP; 每个待搜索子区域对应的 MVP 为该待搜索子区域所在的待划分区域对应的 MVP;每个待划分区域对应的 MVP为该待划分区域包括的 MVP像素点对应 划分出 k个待搜索子区域, 并不是限定编码端只能从 k个待划分区域中划分 出 k个待搜索子区域, 而是根据具体情况, 编码端还可以从 k个待划分区域 中划分出其他的处理区域。
编码端从 k个待划分区域中划分出 k个待搜索子区域的过程具体可以为: 从每个待划分区域中划分出 k个子区域, 然后从每个待划分区域划分得到的 k个子区域中选取一个子区域作为该待划分区域对应的待搜索子区域, 由此 得到 k个待搜索子区域。 进一步的, 编码端可以通过以下方法从一个待划分 区域划分出 k个子区域:编码端以该待划分区域包括的 MVP像素点为坐标原 点, 然后根据该待划分区域中的每个像素点的横坐标分量和纵坐标分量、 横 坐标分量或纵坐标分量的数值特征, 从该待划分区域划分出 k个子区域。 从 k个待划分区域中的每个中选取一个待搜索子区域, 以选取 k个待搜索子区 域时, 要保证每个待搜索子区域中像素点的坐标分量(横坐标分量和纵坐标 分量、 横坐标分量或纵坐标分量) 的数值特征不同, 由此才能使得解码端根 据 MVD的坐标分量的数值特征判断出该 MVD对应的子区域。
步骤 103、 对每个待搜索子区域和参考图像的搜索区域的除 k个待划分 区域以外的区域进行运动估计, 确定出当前块的 MV。
其中, 该参考图像的搜索区域中除去 k个待划分区域以外的区域即为步 骤 102中所述的参考图像的搜索区域的其他区域。
在对参考图像的搜索区域中的像素点进行运动估计时, 并不是对待划分 区域中的每个像素点都进行运动估计, 而是只对待划分区域中的待搜索子区 域中的每个像素点进行运动估计。 需要说明的是, 本发明各实施例中所说的 对区域进行运动估计, 即为对该区域内的每个像素点进行运动估计。
步骤 104、 若确定的当前块的 MV对应的像素点包含在任一待搜索子区 域中, 则根据 MV和 MV对应的像素点所在的待搜索子区域对应的 MVP,得 到当前块的 MVD。
在步骤 103 中对参考图像进行运动估计后, 衡量所有被搜索的像素点对 应的率失真( Rate Distortion , 以下简称为: RD )代价, 可以获得最 、 RD代 价的像素点, 该像素点对应的 MV即可作为当前块的 MV, 由此就确定了当 前块的 MV。 当前块的 MV对应的像素点可能包含在任一待搜索子区域中, 也可能包含在参考图像的搜索区域的其他区域。 若当前块的 MV对应的像素 点包含在任一待搜索子区域中, 则该 MV对应的 MVP即为该 MV对应的像 素点所在的待搜索子区域所对应的 MVP,由此可以根据该 MV和该 MV对应 的 MVP得到当前块的 MVD, 其中 , MVD=MV-MVP。
步骤 105、 将得到的 MVD进行编码后发送给解码端。
编码端得到当前块的 MVD后, 将该 MVD进行编码后发送给解码端。 本发明实施例,编码端根据待编码的当前块的 k个 MVP在参考图像中对 应的 MVP像素点, 从参考图像的搜索区域中划分出 k个待划分区域, 并从 k 个待划分区域中划分出 k个待搜索子区域, 然后对每个待搜索子区域和参考 图像的搜索区域的其他区域进行运动估计, 若经运动估计确定出的当前块的 MV对应的像素点包含在任一待搜索子区域中, 则根据该 MV和该 MV对应 的 MVP, 得到当前块的 MVD, 并将该 MVD进行编码后发送给解码端; 从 而使得解码端根据 MVD就可以判断出该 MVD对应的 MVP , 所以编码端无 需将 MVD对应的 MVP的标识发送给解码端, 从而可以降低编码开销, 提高 编码效率。
图 2为本发明视频图像解码方法实施例一的流程图, 本实施例与图 1所 示的编码方法相对应, 如图 2所示, 该方法包括:
步骤 201、 根据待解码的当前块的 k个 MVP 和解码得到的当前块的 MVD, 确定当前块的 MV指向的参考图像中的区域。
当待解码的当前块确定后, 解码端根据与编码端相同的方法可获取到当 前块的 k个 MVP, 其中 k大于等于 2, k个 MVP互不相同, 这 k个 MVP与 编码端获取到的 k个 MVP相同。 每个 MVP在当前块的参考图像中对应一个 MVP像素点。
其中, 参考图像包括 k个待划分区域和其他区域, 具体可以参见图 1所 示实施例步骤 101中的描述。 当前块的 MV可能指向参考图像中的 k个待划 分区域, 也可能指向参考图像的其他区域; 其中所述的指向参考图像中的 k 个待划分区域指的是指向 k个待划分区域的并集区域。
解码端对接收到的数据解码后可以得到当前块的 MVD,然后解码端根据 当前块的 k个 MVP和 MVD, 能够确定当前块的 MV指向的区域, 即能够确 定当前块的 MV是指向参考图像中的 k个待划分区域, 还是指向参考图像的 其他区域。
步骤 202、若当前块的 MV指向 k个待划分区域,则根据当前块的 MVD, 确定当前块的 MV指向的子区域。
当解码端确定出当前块的 MV指向 k个待划分区域后, 解码端可以再根 据当前块的 MVD确定出当前块的 MV指向的子区域。
在编码的过程中,编码端从 k个待划分区域中划分出 k个待搜索子区域, 然后只对待搜索子区域中的像素点进行了运动估计; 相应的, 在解码端, 参 考图像的 k个待划分区域中有相应的 k个子区域, 这 k个子区域中每个子区 域对应一个 MVP,这 k个子区域与编码时的 k个待搜索子区域相对应。由此, 若解码端得到当前块的 MV指向 k个待划分区域, 则解码端需要再判断当前 块的 MV指向的是 k个子区域中的哪一个, 以最终判断出该当前块对应的 MVP。
具体的, 解码端可以根据当前块的 MVD的横坐标分量和纵坐标分量、 横坐标分量或纵坐标分量的数值特征, 确定当前块的 MV指向的子区域。 例 如: 解码端可以根据当前块的 MVD的横坐标分量和纵坐标分量的幅度和、 横坐标分量的幅度或纵坐标分量的幅度除以 k得到的余数,确定当前块的 MV 指向的子区域。
步骤 203、 根据子区域所属的待划分区域对应的 MVP和 MVD, 得到当 前块的 MV。
当解码端确定出当前块的 MV指向的子区域后, 根据该子区域对应的 MVP就可以确定当前块的对应的 MVP; 其中, 该子区域对应的 MVP即为该 子区域所属的待划分区域对应的 MVP, 待划分区域对应的 MVP为待划分区 域包括的 MVP像素点对应的 MVP。 其中, 解码端和编码端可以预先约定子 区域与待划分区域的对应关系, 或者解码端从编码端接收到子区域与待划分 区 i或的 3†应关系。
解码端获取到当前块的 MVP后, 根据当前块的 MVD和 MVP, 就可以 得到当前块的 MV。
本发明实施例, 解码端接收到编码端发送的当前块的 MVD后, 根据该 MVD和当前块的 k个 MVP, 可以确定该当前块的 MV指向的参考图像的区 域, 若当前块的 MV指向 k个待划分区域, 则根据当前块的 MVD, 可以确定 当前块的 MV指向的子区域,然后根据该 MVD和该子区域对应的 MVP就可 以得到当前块的 MV。 因此, 由于解码端根据 MVD就可以判断出该 MVD对 应的 MVP, 所以编码端无需将 MVD对应的 MVP的标识发送给解码端, 从 而可以降低编码开销, 提高编码效率。
图 3为本发明视频图像编码方法实施例二的流程图, 如图 3所示, 该方 法包括:
步骤 301、根据待编码的当前块的 k个 MVP在参考图像中对应的 k个互 不相同的 MVP像素点, 对参考图像的搜索区域进行区域划分。
该步骤的具体内容与图 1所示实施例步骤 101 中的描述相同, 在此不再 赘述。
步骤 302、 从每个待划分区域中去除 MVP像素点, 从去除 MVP像素点 的待划分区域划分出 k个子区域。
为了能使解码端判断出 MVD对应的 MVP, 编码端需要从划分出的每个 待划分区域再划分出 k个子区域。 然而, 在有些编码条件下, 最终运动估计 得到的与当前块的匹配块对应的像素点是 MVP像素点的概率比较大, 此时, 若还将 MVP像素点作为划分得到的某个子区域中的一点,则在运动估计中会 使 k-1个 MVP像素点都不与当前块进行匹配运算, 从而会带来性能损失。 由 此, 可以把 MVP像素点作为单独的一个处理区域。
当编码端将 k个 MVP像素点作为单独的处理区域时,编码端从每个待划 分区域中把 MVP像素点去除掉, 然后再从去除 MVP像素点的待划分区域划 分出 k个子区域。
具体的,编码端从去除 MVP像素点的待划分区域划分出 k个子区域的过 程可以为:编码端根据去除 MVP像素点的待划分区域中的每个像素点的横坐 标分量和纵坐标分量的幅度和、 横坐标分量的幅度或纵坐标分量的幅度除以 k得到的余数 j , 从待划分区域划分出 k个子区域; 其中余数 j相同的像素点 构成一个子区域, j=0〜k-l。 需要说明的是, 当不从待划分区域中去除 MVP 像素点时, 也可以用上述方法从待划分区域划分出 k个子区域。
步骤 303、 从每个待划分区域划分得到的 k个子区域中选取一个子区域 作为待划分区域的待搜索子区域。
编码端将去除 MVP像素点的每个待划分区域划分成 k个子区域后,从每 一个待划分区域的 k个子区域中选取一个子区域作为待搜索子区域, 从而得 到 k个待搜索子区域。 当基于余数 j将待划分区域划分成 k个子区域时, 从 任意两个待划分区域中选取的两个待搜索子区域对应的余数 j互不相同。
其中,每个待搜索子区域对应的 MVP为该待搜索子区域所在的待划分区 域对应的 MVP; 每个待划分区域对应的 MVP为该待划分区域包括的 MVP 像素点对应的 MVP。
步骤 304、 对每个待搜索子区域、 参考图像的搜索区域中除 k个待划分 区域以外的区域、以及每个 MVP像素点进行运动估计,确定出当前块的 MV。
由于本实施例将 MVP像素点作为一个单独的处理区域进行处理,所以在 进行运动估计时, 除了对每个待搜索子区域和参考图像的搜索区域中除 k个 待划分区域以外的区域进行运动估计以夕卜,还需要对每个 MVP像素点进行运 动估计。
其中, 对参考图像的任一区域进行运动估计得到当前块的 MV的过程可 以为:
根据式( 1 )计算每个像素点对应的 RD代价; 然后找到具有最小 RD代 价的像素点, 并将该像素点对应的 MV作为当前图像块的 MV;
式(1 )为 = /) + 。人。 11 , 其中, D为当前块与 MV所指参考块的失真, 可使用 SAD衡量; 为编码器所设定的用于运动估计的权重因子; 。 为 编码运动信息, 即该 MV对应的 MVD所带来的比特开销; J为 RD代价。 步骤 305、 若确定的当前块的 MV对应的像素点为任一 MVP像素点, 则 根据 MV和 MV对应的 MVP像素点对应的 MVP, 得到当前块的 MVD, 并 将 MVD和 MVD对应的 MVP的标识进行编码后发送给解码端。
若编码端确定的当前块的 MV对应的像素点为一个 MVP像素点时, 根 据该 MV和该 MV对应的 MVP得到当前块的 MVD, 此时 MVD为 ( 0, 0 ) , 然后将该 MVD和该 MVD对应的 MVP的标识进行编码后发送给解码端。
由于编码端和解码端均能获取到当前块对应的 k个 MVP, 并且编码端和 解码端预先协商这 k个 MVP对应的标识 ,所以编码端只需要将该 MVD对应 的 MVP的标识发送给解码端,解码端就能根据该标识确定出该 MVD对应于 哪一个 MVP。
若确定的当前块的 MV对应的像素点包含在任一待搜索子区域中, 则根 据 MV和 MV对应的像素点所在的待搜索子区域对应的 MVP,得到当前块的 MVD; 该过程参见图 1所示实施例步骤 104中的描述。
本发明实施例提供的编码方法, 使得解码端在接收到该 MVD后, 根据 该 MVD和当前块的 k个 MVP, 即可确定出当前块的 MV指向的子区域(或 者 MVP像素点 ) , 然后根据该 MVD和该子区域 (或者 MVP像素点 )对应 的 MVP就可以得到当前块的 MV。由此本实施例具有与图 1所示实施例的相 同的优点, 除此之外, 本实施例中, 编码端在将 k个待划分区域划分子区域 的过程中, 将 k个 MVP像素点先从 k个待划分区域中除去, 再将除去 MVP 像素点的待划分区域划分成子区域, 然后在进行运动估计时, 对每个 MVP 像素点都进行运动估计, 由此可以提高运动估计的精度。
图 4为本发明视频图像解码方法实施例二的流程图, 本实施例与图 3所 示的编码方法相对应, 如图 4所示, 该方法包括:
步骤 401、 根据待解码的当前块的 k个 MVP 和解码得到的当前块的 MVD, 确定当前块的 MV指向的参考图像中的区域。
该步骤的具体内容参见图 2所示实施例的步骤 201中的描述。 其中, 解 码端根据当前块的 k个 MVP和 MVD, 能够确定当前块的 MV指向的区域, 该区域可以是参考图像中的 k个待划分区域,也可以是参考图像的其他区域, 还可以是 k个 MVP像素点组成的处理区域。
步骤 402、 若当前块的 MVD为 (0, 0 ) , 则决定进一步接收编码端发送 的 MVD对应的 MVP的标识, 并才 据该标识对应的 MVP和接收到的 MVD, 得到当前块的 MV。
当解码端解码得到当前块的 MVD为 (0, 0 ) 时, 可以判断当前块的 MV 对应的是 k个 MVP像素点中的一个; 当 MVD为 ( 0, 0 ) 时, 编码端会将该 MVD对应的 MVP的标识也发送给解码端。
然后解码端根据编码端发送的 MVP的标识,获知该 MVD对应的 MVP, 然后就能根据该 MVD和 MVP得到当前块的 MV。
若当前块的 MV指向 k个待划分区域,则参见图 2所示实施例中步骤 202 中的描述。
本发明实施例除了具有图 2所示实施例的优点以外, 由于编码端在进行 编码时将 k个 MVP像素点作为一个单独的处理区域, 并且在当前块的 MV 对应 MVP像素点时, 编码端会发送该 MVP像素点对应的 MVP的标识给解 码端, 所以解码端在接收到的当前块的 MVD为 (0, 0 )时, 则决定进一步接 收当前块对应的 MVP的标识, 再按上述描述得到当前块的 MV。
图 3和图 4所示的编解码方法,由于将 k个 MVP像素点作为一个单独区 域进行处理, 能够在提高编码效率的同时, 提高运动估计的精度。
图 5a为本发明视频图像编码方法实施例三的流程图, 图 6为本发明视频 图像解码方法实施例三的流程图, 图 6所示的解码方法与图 5a所示的编码方 法相对应。 在图 5a和图 6所示的实施例中, 以 k=2为例进行说明。
如图 5a所示, 该编码方法包括:
步骤 501、 编码端获取当前块的 MVPs与 MVPt。
当待编码的当前块确定后, 编码端根据 H.264标准中对应的方法获取当 前块的 MVPs与 MVPt。 本实施例中当前块对应两个 MVP, 这两个 MVP以 MVPs和 MVPt为例进行说明 , 但是本实施例并不限于此, 这两个 MVP可以 是两个不同的 MVPs, 也可以是两个不同的 MVPt。
其中 , 本实施例中的 MVPs相当于第一 MVP, MVPt相当于第二 MVP, 则 MVPs像素点即相当于第一 MVP像素点 , MVPt即相当于第二 MVP像素 点。
步骤 502、 编码端根据当前块的 MVPs 和 MVPt在参考图像中对应的 MVPs像素点和 MVPt像素点, 对参考图像的搜索区域进行区域划分。
对参考图像的搜索区域进行区域划分的具体方法参见图 5b进行说明,图 5b为图 5a所示实施例中区域划分方法示意图, 如图 5b所示, 编码端对参考 图像的搜索区域进行区域划分的具体过程为:
步骤 bl、连接 MVPs像素点和 MVPt像素点得到线段 , 线段 的长度 为 2d; 其中, MVPs像素点为 MVPs在参考图像中对应的像素点, MVPt像 素点为 MVPt在参考图像中对应的像素点;
步骤 b2、 将线段 αι分别向两端延长 d得到线段 a2;
步骤 b3、通过线段 a2的两端点分别作平行于直线 的直线 /2和 其中, 直线 /为线段 αι的垂直平分线。
关于本实施例中提供的上述区域划分的方法, 本发明实施例不限于此, 任何能达到上述划分效果的等同或类似的方法都可以应用在本发明实施例 中。
直线 /、 /2和 ^将参考图像的搜索区域划分为区域 A、 区域 B、 区域 C 和区域 D; 其中, 区域 B包括 MVPs像素点 , 区域 C包括 MVPt像素点 , 区 域 B和区域 C均为待划分区域; 区域 A为区域 B的邻近区域, 区域 D为区 域 C的邻近区域。其中, 区域 A和区域 B中的像素点距 MVPs像素点的距离 比距 MVPt像素点的距离远, 所以区域 A和区域 B 中的每个像素点对应的 MVP均为 MVPs; 同理, 区域 C和区域 D中的每个像素点对应的 MVP均为 MVPt。 若最终运动估计的结果是当前块的 MV指向区域 A或区域 D, 则解 码端可以根据当前块的 MVD判断出指向的区域( A或 D ) , 从而可以得到 对应的 MVP;但是,若最终运动估计的结果是当前块的 MV指向区域 B或区 域 C , 则解码端根据 MVD只能判断出指向区域为区域 B和区域 C的并集区 域, 而无法判断出是指向区域 B 还是指向区域 C, 从而也就无法判断出该 MVD对应的 MVP。 所以本实施例要对区域 B和区域 C进一步划分, 以使解 码端可以根据 MVD判断出是指向区域 B还是指向区域 C。
步骤 503、 编码端将区域 B和区域 C分别划分为 2个子区域。
编码端将区域 B划分成 2个子区域的具体方法参见图 5c进行说明, 图 5c为图 5a所示实施例中子区域划分方法示意图, 如图 5c所示, 编码端将区 域 B划分成 2个子区域的具体过程为:
以 MVPs像素点为坐标原点, 然后根据区域 B中的每个像素点的横坐标 分量和纵坐标分量的幅度和除以 2, 余数为 0的像素点称为偶数点, 即图 5c 中的方块, 方块所表示的像素点的 X分量与 y分量满足 (|x|+|y|)%2=0; 余数为 1的像素点称为奇数点, 即图 5c中的圆圈, 圆圈所表示的像素点的 X分量与 y分量满足 (|x|+|y|)%2=l ; 所有偶数点组成一个子区域, 称为偶数点子区域, 所有奇数点组成另一个子区域, 称为奇数点子区域。
同理, 可以将区域 C分成 2个子区域。
进一步的, 在将区域 B和区域 C划分子区域时, 还可以根据每个像素点 的横坐标分量的幅度或纵坐标分量的幅度除以 2得到的余数, 将区域 B和区 域 C划分子区域。 编码端可以使用三种方式(横坐标分量的幅度、 纵坐标分 量的幅度以及横坐标分量和纵坐标分量的幅度和 ) 中的任一种对区域 B和区 域 C进行子区域划分, 具体使用哪一种方式, 可以是编码端和解码端预先预 定好, 也可以在编码端为每一个编码图像遍历各种子区域划分方式, 并选择 使用最优的划分方式, 然后在图像头中传输标识将选择的划分方式告知解码 端。 其中, 在图 5c中, 网格精度为编码端设定的运动搜索精度。 例如, 当运 动搜索精度为四分之一像素, 则水平与竖直方向两个相邻网格点距离为四分 之一像素间隔。 若图中的像素点非整像素点, 网格点处的像素值可采用各种 插值方法计算得到。
步骤 504、编码端从区域 B的 2个子区域中选取一个作为待搜索子区域, 从区域 C的 2个子区域中也选取一个作为待搜索子区域。
编码端可以根据与解码端的约定, 从区域 B中选取奇数点子区域作为待 搜索子区域, 从区域 C中选取偶数点子区域作为待搜索子区域; 或者从区域 B中选取偶数点子区域作为待搜索子区域, 从区域 C中选取奇数点子区域作 为待搜索子区域。 也就是说, 编码端为 MVPs和 MVPt分别选取了一个子区 域, 且选取的两个子区域中像素点的坐标分量的幅度特征是不同, 即必须一 个是偶数点子区域, 一个是奇数点子区域。
当然, 在编码端为 MVPs和 MVPt选取子区域时, 可以不根据与解码端 的约定, 而是确定选取的规则后, 将该规则发送给解码端。
需要说明的是, 本实施例可以使用自适应子区域划分来代替固定子区域 划分。 例如, 编码端和解码端可以统计以前一个或多个同类型编码图像或者 当前编码图像的已编码块中 MVP集每一个元素(即 MVPs和 MVPt )的概率 分布,分别统计 MVPs与 MVPt的使用概率,并将使用概率大的 MVP与包括 像素点多的子区域相对应; 例如: 如果 MVPs使用概率显著大于 MVPt使用 概率, 则为 MVPs选择偶数点子区域(即在区域 B中选择偶数点子区域作为 待搜索子区域),为 MVPt选择奇数点子区域;如果 MVPs使用概率小于 MVPt 使用概率, 则为 MVPs选择奇数点子区域(即在区域 B中选择奇数点子区域 作为待搜索子区域) , 为 MVPt选择偶数点子区域; 其中, 在区域 B和区域 C 中包含的像素点相同时, 偶数点子区域中的包含的像素点的数量大于奇数 点子区域中包含的像素点的数量。 然后编码端将选择的 MVPs和 MVPt与奇 数点子区域和偶数点子区域的对应关系发送给解码端。 本实施例中, 在将区域 B和区域 C划分子区域时, 可以将 MVPs像素点 和 MVPt像素点单独处理,具体可以参见图 3所示实施例步骤 302中的描述。 其中, 将 MVPs像素点和 MVPt像素点单独处理, 相当于对 MVD为(0, 0)的 情况单独处理。 在该情况下, 可以先统计 MVD为(0, 0)的概率。 具体为: 编 码端和解码端可以统计以前一个或多个同类型编码图像或者当前编码图像的 已编码块中 MVD为 (0, 0)的概率; 若 MVD为 (0, 0)的概率大于某一预设门限 值, 则将 MVD(0, 0)作为单独的子区域处理, 并将该 MVD对应 MVP的标识 传输给解码端。
步骤 505、 对区域 B和 C中的 2个待搜索子区域、 以及区域 A、 区域 D 进行运动估计, 确定出当前块的 MV。
具体的运动估计方法参见图 3所示实施例步骤 304中的描述。
若在步骤 504 中将 MVPs像素点和 MVPt像素点单独处理时, 还要对 MVPs像素点和 MVPt像素点进行运动估计。
步骤 506、 根据确定的 MV所指的像素点所属的区域或子区域确定所使 用的 MVP, 然后根据 MV和 MVP计算得到 MVD, 并对该 MVD进行编码后 发送给解码端。
具体在运动估计过程中, 可以按照以下方法判断每一个像素点所属的区 域, 从而可以选择对应的 MVP:
步骤 cl、 以 MVPs像素点与 MVPt像素点的连线的中点作为坐标原点, 以 MVPs像素点与 MVPt像素点的连线作为 X轴,并以 MVPs像素点指向 MVPt 像素点的方向为 X轴的方向;
步骤 c2、 将当前像素点的向量在 X轴上作投影, 即计算该像素点的 X分 量, 根据 X分量的取值判断该像素点所属的区域, 具体可以分为下面几种情 况:
若; ^ (-οο,-2θ , 则该像素点属于区域 A;
若 x e [-2Ao;> , 则该像素点属于区域 B; 若 xe[0,2 ) , 则该像素点属于区域 C;
若 xe(2A∞) , 则该像素点属于区域 D。
其中, 区域 A、 B、 C、 D对应的 MVP如前所述。 若确定的当前块的 MV 对应的像素点包含在区域 A或区域 D中,则根据 MV和 MV对应的像素点所 在的区域对应的 MVP , 得到当前块的 MVD; 其中, 区域 A对应的 MVP为 MVPs, 区域 D对应的 MVP为 MVPt。
如图 6所示, 该解码方法包括:
步骤 601、 解码端获取当前块的 MVPs与 MVPt。
当待解码的当前块确定后, 编码端根据 H.264标准中对应的方法获取当 前块的 MVPs与 MVPt。
步骤 602、解码端根据 MVPs与 MVPt, 以及解码得到的当前块的 MVD, 确定当前块的 MV指向的参考图像中的区域。
具体的, 判断当前块的 MV指向图 5b的哪个区域的方法可以为: 步骤 sl、 根据公式 1计算得到 d;
公式 1为: 4i2 =( ^.x— s.x)2+( ^._y— Ps._y)2, 其中, MVPs.x 与 M Ps.y分别表示 MVPs的横坐标分量与纵坐标分量; ΜΓ χ与 M .y分别 表示 MVPt的横坐标分量与纵坐标分量;
步骤 s2、根据公式 2和公式 3计算得到当前块的 MVD在 MVPs与 MVPt 差值矢量上的投影 ;
公式 2为: Dp= MVD.x * (MVPt.x - MVPS .x) + MVD.y * {MVPt.y - MVPS .y) , 其中, ΓΖ χ与 .y分别表示当前块的 MVD的横坐标分量与纵坐标分量; 公式 3为: dp二 Dplld
步骤 s3、 ^-d<dp<d, 则确定当前块的 MV指向待划分区域, 即指向 区域 B和区域 C, 而无法判断具体指向区域 B还是指向区域 C;
若 dn<— d , 则确定当前块的 MV指向的区域 A, 则当前块的 MV对应的 MVP为 MVPs;
若 dp > d , 则确定当前块的 MV指向的区域 D, 则当前块的 MV对应的 MVP为 MVPt。
当确定当前块的 MV指向区域 B和区域 C时, 执行步骤 603;
当确定当前块的 MV指向的区域 A或区域 D时, 执行步骤 604。
其中, 在步骤 sl-s3的具体实现过程中, 可以不计算出 d和 , 而是根 据 d2和 Dp的大小关系来判断当前块的 MV指向的区域; 具体为:
若- 2d2≤Dp≤2d2 , 则确定当前块的 MV指向待划分区域,
当 ΰρ < -2d2时, 确定当前块的 MV指向的区域 Α;
当 £)ρ > 2ί 2时, 确定当前块的 MV指向的区域 D。
步骤 603、解码端根据当前块的 MVD,确定当前块的 MV指向的子区域; 然后执行步骤 604。
对应于编码端奇数点子区域与偶数点子区域的划分, 可按照以下方法确 定 MV指向的子区域: 若 (|M .x| + |MKD.x|)%2 = 0 , 则判断 MV指向偶数点 子区域; 若 (|Μ ΑΧ| + |ΜΚΟ.Χ|)%2 = 1 , 则判断 MV指向奇数点子区域。
步骤 604、 解码端确定当前块的 MV所对应的 MVP。
当确定当前块的 MV指向的区域 A时, 则可以确定当前块的 MV对应 MVPs; 当确定当前块的 MV指向的区域 D时, 则可以确定当前块的 MV对 应 MVPt。 需要说明的是, 根据步骤 602中, 当计算出 〈- ί时, 就可以获 知当前块的 MV对应 MVPs , 当计算出 > ί时, 就可以获知当前块的 MV 对应 MVPt, 而无需首先判断 MV指向的区域。 事实上, 在本发明所有实施 例中, 判断 MV指向的区域只是逻辑上的步骤, 可以不是具体实现中的步骤。
关于奇数点子区域和偶数点子区域与 MVPs和 MVPt的对应关系, 解码 端与编码端有约定, 或者编码端会将该对应关系发送给解码端。 由此, 当确 定当前块的 MV指向偶数点子区域或奇数点子区域时, 解码端根据约定或者 编码端发送的对应关系,即可确定当前块的 MV指向区域 B还是指向区域 C, 也就可以确定当前块的 MV对应的 MVP。
步骤 605、 解码端根据当前块的 MVD和 MVP, 即可计算得到当前块的 MV。
在上述图 5a和图 6所示的实施例中, 是以 k=2为例进行具体说明的。 然 而本发明实施例提供的方案还可以应用的 k>2的场景中, 当 k>2时, 编码和 解码的流程与前述实施例相同, 编码端具体对 k个待划分区域进行子区域划 分的方法, 以及解码端根据当前块的 MVD值确定当前块的 MV对应的 MVP 的方法与前述 k=2时相类似。
下面参见图 7, 对 k=3 时, 对参考图像的搜索区域进行区域划分的情况 进行描述。 图 7为本发明实施例中 k=3时区域划分方法示意图, 如图 7所示: 当前块对应 3个 MVP, 即 MVP1、 MVP2和 MVP3 , 参见图 5a-5c所示 实施例中对参考图像的搜索区域进行区域划分的方法, 根据其中任意两个 MVP对该参考图像的搜索区域进行区域划分; 例如: 将 MVP1 点和 MVP2 点连接, 得到长度为 2 2的线段, 将该线段向两端各延长 ί 12 , 然后在两端点 做该线段的垂直平分线的平行线, 由此将参考图像的搜索区域进行了划分, 并且,对 MVP1点和 MVP3点,以及 MVP2点和 MVP3点也进行同样的处理, 由此将参考图像的搜索区域进行了划分, 如图 7所示。
其中, 前述实施例中所述的待划分区域包括图 7中的区域 1、 区域 2和 区域 3。 对于区域 1、 区域 2和区域 3可分别划分出 3个子区域, 具体的过程 如上述各实施例中的描述。
解码端根据当前块的 MVD、 MVP 1、 MVP2和 MVP3 , 可以确定出当前 块的 MV指向的区域, 具体的过程可以为:
解码端根据 MVD和每两个 MVP , 按照图 6所示实施例中的公式 1 -公式
3 , 可以计算得到 dn 17n和 dn„; 17为 MVD在过 MVP1点与 MVP2点 的直线上投影计算得到的数值,该直线方向由 MVP1点指向 MVP2点; >13
MVD在过 MVP1点与 MVP3点的直线上投影计算得到的数值, 该直线方向 由 MVP1点指向 MVP3点; O MVD在过 MVP3点与 MVP2点的直线上 投影计算得到的数值, 该直线方向由 MVP2点指向 MVP3点; 2为 MVP1 点与 MVP2点连线距离数值的一半; dl3为 MVP1点与 MVP3点连线距离数 值的一半; 3为 MVP2点与 MVP3点连线距离数值的一半。
^dpU<-dn, 3.dpl3<-dl3, 则当前块的 MV指向区域 A, 区域 A对应 的 MVP为 MVP1;
^dpU>dn, 且 dp23 < -d23 , 则当前块的 MV指向区域 D , 区域 D对应 的 MVP为 MVP2;
若 ίρ1313, 且 ,23> 3, 则当前块的 MV指向区域 G, 区域 G对应的
MVP为 MVP3;
^ -dn <dpl2< dn , JL - 23p2323 , JL-i13pl3l3 , 贝1 J确定当前 块的 MV指向区域 1、 区域 2和区域 3组成的并集区域; 此时根据当前块的 MVD的 X分量幅度、 y分量幅度或者 x与 y分量幅度之和除以 3得到的余数 可以具体确定当前块的 MV指向的区域, 具体参见上述实施例中的描述; 若当前块的 MV指向区域 B、 C、 E、 F、 H、 I时, dpU、 ,13和 ,23的 取值范围约束为除上述以外的其他情况, 此时, 解码端根据 ,12、 ,13和 ,23 的取值情况的组合,可以排除一个 MVP被选到的可能性。 因此仅需要从每个 区域分别划分出两个子区域, 即可按照前述实施例中的方法区分另外两个 MVP。 下面以区域 B 和 C 为例进行说明。 若 ίρ13 < - ί13或 ίρ23 < - ί23
-d < dp l2 < d , 此时判断当前块的 MV指向区域 B或 C (即指向区域 B和 区域 C组成的并集区域)。可以排除 MVP3 ,但是无法判断该 MVD对应 MVP 1 还是对应 MVP2。此时,可参见前一实施例 k为 2的情况,在编码端将区域 B 与 C作为待划分区域进行处理。 对应的, 解码端在判断当前块的 MV指向区 域 B或 C后,可参见前一实施例 k为 2的情况进行处理,从而区分选择 MVP1 还是 MVP2。
本发明实施例, 编码端根据待编码的当前块的 MVPs和 MVPt在参考图 像中对应的 MVPs像素点和 MVPt像素点, 从参考图像的搜索区域中划分出 2个待划分区域, 并从 2个待划分区域中划分出 2个待搜索子区域, 然后对 每个待搜索子区域和参考图像的搜索区域的其他区域进行运动估计, 若经运 动估计确定出的当前块的 MV对应的像素点包含在任一待搜索子区域中, 则 根据该 MV和该 MV对应的 MVP, 得到当前块的 MVD, 并将该 MVD进行 编码后发送给解码端; 以使解码端在接收到该 MVD后,根据该 MVD和当前 块的 MVPs和 MVPt, 可以确定该当前块的 MV指向的参考图像的区域, 若 当前块的 MV指向 2个待划分区域,则根据当前块的 MVD,可以确定当前块 的 MV指向的子区域,然后才 据该 MVD和该子区域对应的 MVP就可以得到 当前块的 MV。 因此, 由于解码端根据 MVD就可以判断出该 MVD对应的 MVP ,所以编码端无需将 MVD对应的 MVP的标识发送给解码端 ,从而可以 降低编码开销, 提高编码效率。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 前述的 存储介质包括: ROM, RAM,磁碟或者光盘等各种可以存储程序代码的介质。
图 8为本发明视频图像编码装置实施例一的示意图, 如图 8所示, 该装 置包括: 区域划分模块 81、 待搜索子区域划分模块 83、 运动估计模块 85和 第一计算发送模块 87。
区域划分模块 81用于根据待编码的当前块的 k个运动矢量预测值 MVP 在参考图像中对应的 k个互不相同的 MVP像素点,对参考图像的搜索区域进 行区域划分。 划分得到的区域中包括 k个待划分区域, 每个待划分区域包括 一个 MVP像素点, 其中, k大于等于 2。
待搜索子区域划分模块 83用于从区域划分模块 81划分得到的 k个待划 分区域中划分出 k个待搜索子区域。 k个待搜索子区域与 k个待划分区域一 一对应。
运动估计模块 85用于对待搜索子区域划分模块 83划分出的每个待搜索 子区域和参考图像的搜索区域中除 k个待划分区域以外的区域进行运动估 计, 确定出当前块的运动矢量 MV。
第一计算发送模块 87用于若运动估计模块 85确定的当前块的 MV对应 的像素点包含在任一待搜索子区域中, 则根据 MV和 MV对应的像素点所在 的待搜索子区域对应的 MVP, 得到当前块的运动矢量差值 MVD, 并将得到 的 MVD进行编码后发送给解码端。
本实施例用于实现图 1所示的方法实施例, 本实施例中各个模块的工作 流程和工作原理参见上述图 1所示的方法实施例中的描述, 在此不再赘述。 本实施例中的视频图像编码装置位于方法实施例中所述的编码端。
本发明实施例,区域划分模块根据待编码的当前块的 k个 MVP在参考图 像中对应的 MVP像素点, 从参考图像的搜索区域中划分出 k个待划分区域, 待搜索子区域划分模块从 k个待划分区域中划分出 k个待搜索子区域, 然后 运动估计模块对每个待搜索子区域和参考图像的搜索区域的其他区域进行运 动估计, 若经运动估计确定出的当前块的 MV对应的像素点包含在任一待搜 索子区域中, 则第一计算发送模块根据该 MV和该 MV对应的 MVP ,得到当 前块的 MVD, 并将该 MVD进行编码后发送给解码端; 从而使得解码端根据 MVD就可以判断出该 MVD对应的 MVP, 所以编码端无需将 MVD对应的 MVP的标识发送给解码端, 从而可以降低编码开销, 提高编码效率。
图 9为本发明视频图像编码装置实施例二的示意图, 在图 8所示实施例 的基础上, 如图 9所示:
待搜索子区域划分模块 83包括:第一划分单元 831和第一选取单元 833。 第一划分单元 831用于从每个待划分区域划分出 k个子区域。 第一选取 单元 833用于从第一划分单元 831从每个待划分区域划分得到的 k个子区域 中选取一个子区域作为待划分区域对应的待搜索子区域。
第一划分单元具体用于: 以待划分区域包括的 MVP像素点为坐标原点, 根据待划分区域中的每个像素点的横坐标分量和纵坐标分量、 横坐标分量或 纵坐标分量的数值特征, 从待划分区域划分出 k个子区域。
进一步的, 第一划分单元具体用于: 根据待划分区域中的每个像素点的 横坐标分量和纵坐标分量的幅度和、 横坐标分量的幅度或纵坐标分量的幅度 除以 k得到的余数 j, 从待划分区域划分出 k个子区域。 其中余数 j相同的像 素点构成一个子区域, j=0〜k-l ; 从任意两个待划分区域中选取的两个待搜索 子区域对应的余数 j互不相同。
在另一种实现方式中, 待搜索子区域划分模块 83 可以包括: 去除单元 830、 第二划分单元 832和第二选取单元 834。 此时, 运动估计模块 85具体 用于对每个待搜索子区域、 参考图像的搜索区域中除 k个待划分区域以外的 区域、 以及每个 MVP像素点进行运动估计, 确定出当前块的 MV。
去除单元 830用于从每个待划分区域中去除 MVP像素点。第二划分单元 832用于从通过去除单元 830去除 MVP像素点的每个待划分区域划分出 k个 子区域。 第二选取单元 834用于从第二划分单元 832划分得到的 k个子区域 中选取一个子区域作为待划分区域对应的待搜索子区域。
进一步的, 该视频图像编码装置还可以包括: 第二计算发送模块 89。 第二计算发送模块 89用于若确定的当前块的 MV对应的像素点为任一 MVP像素点, 则根据 MV和 MV对应的 MVP像素点对应的 MVP, 得到当 前块的 MVD, 并将 MVD和 MVD对应的 MVP的标识进行编码后发送给解 码端。
当 k等于 2, 当前块的 k个 MVP包括第一 MVP和第二 MVP时, 区域 划分模块 81包括: 第一执行单元 811和第二执行单元 813。 第一执行单元 811用于连接第一 MVP像素点和第二 MVP像素点得到线 段 αι, 将线段 αι分别向两端延长 d得到线段 a2。 线段 αι的长度为 2d, 第一 MVP像素点为第一 MVP在参考图像中对应的像素点, 第二 MVP像素点为 第二 MVP在参考图像中对应的像素点。
第二执行单元 813用于通过线段 的两端点分别作平行于直线 h的直线 和 。 直线 为线段 的垂直平分线。
、 /2和 ^将参考图像的搜索区域划分为区域 A、 区域 B、 区域 C和区域 D; 其中, 区域 B包括第一 MVP像素点, 区域 C包括第二 MVP像素点, 区 域 B和区域 C为待划分区域; 区域 A为区域 B的邻近区域, 区域 D为区域 C的邻近区域。
进一步的, 该视频图像编码装置还包括: 第三计算发送模块 80。
第三计算发送模块 80用于若确定的当前块的 MV对应的像素点包含在区 域 A或区域 D中,则根据 MV和 MV对应的像素点所在的区域对应的 MVP, 得到当前块的 MVD, 并将得到的 MVD进行编码后发送给解码端。 区域 A对 应的 MVP为第一 MVP, 区域 D对应的 MVP为第二 MVP。
本实施例用于实现上述各方法实施例, 本实施例中各个模块和单元的工 作流程和工作原理参见上述各方法实施例中的描述, 在此不再赘述。 本实施 例中的视频图像编码装置位于方法实施例中所述的编码端。
除了具有与图 8所示的实施例相同的优点以外, 本实施例中, 编码端在 将 k个待划分区域划分子区域的过程中, 还可以将 k个 MVP像素点先从 k 个待划分区域中除去,再将除去 MVP像素点的待划分区域划分成子区域,然 后在进行运动估计时,对每个 MVP像素点都进行运动估计, 由此可以提高运 动估计的精度。 本实施例的优点具体可以参见上述各方法实施例中的描述。
图 10为本发明视频图像解码装置实施例一的示意图, 如图 10所示, 该 装置包括: 第一确定模块 11和第二确定模块 13。
第一确定模块 11用于根据待解码的当前块的 k个 MVP和解码得到的当 前块的 MVD, 确定当前块的 MV指向的参考图像中的区域。 参考图像包括 k 个待划分区域,每个待划分区域包括一个 MVP在参考图像中对应的一个 MVP 像素点, 其中, k大于等于 2。
第二确定模块 13用于若第一确定模块 11确定当前块的 MV指向 k个待 划分区域, 则根据当前块的 MVD, 确定当前块的 MV指向的子区域, 并根据 子区域所属的待划分区域对应的 MVP和 MVD, 得到当前块的 MV。
本实施例用于实现图 3所示的方法实施例, 本实施例中各个模块的工作 流程和工作原理参见上述图 3所示的方法实施例中的描述, 在此不再赘述。 本实施例中的视频图像解码装置位于方法实施例中的解码端。
本发明实施例, 接收到编码端发送的当前块的 MVD后, 第一确定模块 根据该 MVD和当前块的 k个 MVP , 可以确定该当前块的 MV指向的参考图 像的区域, 若当前块的 MV指向 k个待划分区域, 则第二确定模块根据当前 块的 MVD, 可以确定当前块的 MV指向的子区域, 然后根据该 MVD和该子 区域对应的 MVP就可以得到当前块的 MV。 因此, 由于解码端根据 MVD就 可以判断出该 MVD对应的 MVP, 所以编码端无需将 MVD对应的 MVP的 标识发送给解码端, 从而可以降低编码开销, 提高编码效率。
图 11为本发明视频图像解码装置实施例二的示意图, 在图 10所示实施 例的基础上, 如图 11所示:
第二确定模块 13具体用于: 若第一确定模块 11确定当前块的 MV指向 k个待划分区域, 则根据当前块的 MVD的横坐标分量和纵坐标分量、横坐标 分量或纵坐标分量的数值特征, 确定当前块的 MV指向的子区域, 并根据子 区域所属的待划分区域对应的 MVP和 MVD , 得到当前块的 MV。
进一步的, 第二确定模块 13具体用于: 若第一确定模块 11确定当前块 的 MV指向 k个待划分区域, 则根据当前块的 MVD的横坐标分量和纵坐标 分量的幅度和、 横坐标分量的幅度或纵坐标分量的幅度除以 k得到的余数, 确定当前块的 MV指向的子区域, 并根据子区域所属的待划分区域对应的 MVP和 MVD, 得到当前块的 MV。
进一步的, 该视频图像解码装置还可以包括: 第三确定模块 15。
第三确定模块 15用于若第一确定模块确定当前块的 MVD为 (0, 0) , 则接收编码端发送的 MVD对应的 MVP的标识, 并 据 MVP的标识对应的 MVP和 MVD, 得到当前块的 MV。
当 k等于 2, 当前块的 k个 MVP包括第一 MVP和第二 MVP时, 第一 确定模块 11具体可以包括: 第一计算单元 111、 第二计算单元 113和第一确 定单元 115。
第一计算单元 ill 用于根据公式 1 计算得到 d。 公式 1 为: 4d2 = (MVPx - MVPs.xf + (MVPt.y - MVPs.y) , 其中, ϊ^.χ与 分别 表示第一 MVP的横坐标分量与纵坐标分量; Λ η.χ与 M ._y分别表示第二 MVP的横坐标分量与纵坐标分量。
第二计算单元 113用于根据公式 2和公式 3计算得到当前块的 MVD在 MVPs 与 MVPt 差 值 矢 量 上 的 投 影 。 公 式 2 为 : p= .x*( ^.x— Ps.x) + D._y*( ^._y— Ps._y),其中, MVD.X与 KD._y分别表示当前块的 MVD 的横坐标分量与纵坐标分量。 公式 3 为: dp二 Dpl2d。
第一确定单元 115用于若 - ί ≤ ≤ί , 则确定当前块的 MV指向待划分 区域。
进一步的, 当 k=2时, 第一确定模块 11还可以包括: 第二确定单元 117 和第三确定单元 119。
第二确定单元 117用于若 〈- ί ,则确定当前块的 MV指向的区域对应 的 MVP为第一 MVP, 并根据第一 MVP和 MVD, 得到当前块的 MV。 第三 确定单元 119用于若 > ί ,则确定当前块的 MV指向的区域对应的 MVP为 第二 MVP, 并根据第二 MVP和 MVD, 得到当前块的 MV。 本实施例用于实现上述各方法实施例, 本实施例中各个模块和单元的工 作流程和工作原理参见上述各方法实施例中的描述, 在此不再赘述。 本实施 例中的视频图像解码装置位于方法实施例中所述的解码端。
除了具有与图 10所示的实施例相同的优点以外,图 10和图 11所示的实 施例在进行编解码时, 由于将 k个 MVP像素点作为一个单独区域进行处理, 能够在提高编码效率的同时, 提高运动估计的精度。 本实施例的优点具体可 以参见上述各方法实施例中的描述。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims

权 利 要求
1、 一种视频图像编码方法, 其特征在于, 包括:
根据待编码的当前块的 k个运动矢量预测值 MVP在参考图像中对应的 k 个互不相同的 MVP像素点,对所述参考图像的搜索区域进行区域划分; 划分 得到的区域中包括 k个待划分区域,每个所述待划分区域包括一个所述 MVP 像素点, 其中, k大于等于 2;
从所述 k个待划分区域中划分出 k个待搜索子区域; 所述 k个待搜索子 区域与所述 k个待划分区域——对应;
对每个所述待搜索子区域和所述参考图像的搜索区域中除所述 k个待划 分区域以外的区域进行运动估计, 确定出所述当前块的运动矢量 MV;
若确定的所述当前块的 MV对应的像素点包含在任一所述待搜索子区域 中, 则根据所述 MV和所述 MV对应的像素点所在的所述待搜索子区域对应 的 MVP, 得到所述当前块的运动矢量差值 MVD;
将所述 MVD进行编码后发送给解码端。
2、 根据权利要求 1所述的方法, 其特征在于, 所述从所述 k个待划分区 域中划分出 k个待搜索子区域包括:
从每个所述待划分区域划分出 k个子区域;
从每个所述待划分区域划分得到的所述 k个子区域中选取一个子区域作 为所述待划分区域对应的所述待搜索子区域。
3、 根据权利要求 2所述的方法, 其特征在于, 通过以下方法从一个所述 待划分区域划分出 k个子区域:
以所述待划分区域包括的 MVP像素点为坐标原点,根据所述待划分区域 中的每个像素点的横坐标分量和纵坐标分量、 横坐标分量或纵坐标分量的数 值特征, 从所述待划分区域划分出 k个子区域。
4、 根据权利要求 3所述的方法, 其特征在于, 所述根据所述待划分区域 中的每个像素点的横坐标分量和纵坐标分量、 横坐标分量或纵坐标分量的数 值特征, 从所述待划分区域划分出 k个子区域包括: 根据所述待划分区域中 的每个像素点的横坐标分量和纵坐标分量的幅度和、 横坐标分量的幅度或纵 坐标分量的幅度除以 k得到的余数 j, 从所述待划分区域划分出 k个子区域; 其中余数 j相同的像素点构成一个子区域, j=0〜k-l ;
从任意两个所述待划分区域中选取的两个待搜索子区域对应的余数 j 互 不相同。
5、 根据权利要求 1所述的方法, 其特征在于,
所述从所述 k个待划分区域中划分出 k个待搜索子区域包括: 从每个所 述待划分区域中去除 MVP像素点, 从去除所述 MVP像素点的所述 k个待划 分区域中划分出 k个待搜索子区域;
所述对每个所述待搜索子区域和所述参考图像的搜索区域中除所述 k个 待划分区域以外的区域进行运动估计, 确定出所述当前块的 MV具体包括: 对每个所述待搜索子区域、 所述参考图像的搜索区域中除所述 k个待划分区 域以外的区域、以及每个所述 MVP像素点进行运动估计,确定出所述当前块 的 MV。
6、 根据权利要求 5所述的方法, 其特征在于, 所述方法还包括: 若确定的所述当前块的 MV对应的像素点为任一所述 MVP像素点, 则 根据所述 MV和所述 MV对应的 MVP像素点对应的 MVP , 得到所述当前块 的 MVD, 并将所述 MVD和所述 MVD对应的 MVP的标识进行编码后发送 给解码端。
7、 根据权利要求 1-6任一所述的方法, 其特征在于, k等于 2, 所述当 前块的 k个 MVP包括第一 MVP和第二 MVP,所述根据待编码的当前块的 k 个 MVP在参考图像中对应的 k个互不相同的 MVP像素点, 对所述参考图像 的搜索区域进行区域划分包括:
连接第一 MVP像素点和第二 MVP像素点得到线段 α ·,线段 αι的长度为
2d;所述第一 MVP像素点为所述第一 MVP在所述参考图像中对应的像素点, 所述第二 MVP像素点为所述第二 MVP在所述参考图像中对应的像素点; 将线段 αι分别向两端延长 d得到线段 a2;
通过线段 的两端点分别作平行于直线 /的直线 /2和 !3 直线 /为线段 的垂直平分线;
h、 /2和/将所述参考图像的搜索区域划分为区域 A、 区域 B、 区域 C和 区域 D; 其中, 所述区域 B包括所述第一 MVP像素点, 所述区域 C包括所 述第二 MVP像素点, 所述区域 B和区域 C为所述待划分区域; 所述区域 A 为所述区域 B的邻近区域, 所述区域 D为所述区域 C的邻近区域。
8、 根据权利要求 7所述的方法, 其特征在于, 所述方法还包括: 若确定的所述当前块的 MV对应的像素点包含在区域 A或区域 D中,则 根据所述 MV和所述 MV对应的像素点所在的区域对应的 MVP,得到所述当 前块的 MVD; 所述区域 A对应的 MVP为所述第一 MVP, 所述区域 D对应 的 MVP为所述第二 MVP;
将所述 MVD进行编码后发送给解码端。
9、 一种视频图像解码方法, 其特征在于, 包括:
根据待解码的当前块的 k个 MVP和解码得到的所述当前块的 MVD, 确 定所述当前块的 MV指向的参考图像中的区域; 所述参考图像包括 k个待划 分区域,每个所述待划分区域包括一个所述 MVP在所述参考图像中对应的一 个 MVP像素点, 其中, k大于等于 2;
若所述当前块的 MV指向所述 k个待划分区域, 则根据所述当前块的
MVD, 确定所述当前块的 MV指向的子区域;
根据所述子区域所属的待划分区域对应的 MVP和所述 MVD, 得到所述 当前块的 MV。
10、 根据权利要求 9所述的方法, 其特征在于, 所述根据所述当前块的 MVD, 确定所述当前块的 MV指向的子区域包括:
根据所述当前块的 MVD 的横坐标分量和纵坐标分量、 横坐标分量或纵 坐标分量的数值特征, 确定所述当前块的 MV指向的子区域。
11、 根据权利要求 10所述的方法, 其特征在于, 所述根据所述当前块的 MVD的横坐标分量和纵坐标分量、横坐标分量或纵坐标分量的数值特征,确 定所述当前块的 MV指向的子区域包括:
根据所述当前块的 MVD 的横坐标分量和纵坐标分量的幅度和、 横坐标 分量的幅度或纵坐标分量的幅度除以 k得到的余数, 确定所述当前块的 MV 指向的子区域。
12、根据权利要求 9-11任一所述的方法, 其特征在于, 所述方法还包括: 若所述当前块的 MVD为 (0, 0 ) , 则接收所述 MVD对应的 MVP的标 识, 并根据所述 MVP的标识对应的 MVP和所述 MVD, 得到所述当前块的 MV。
13、 根据权利要求 9-11任一所述的方法, 其特征在于, k等于 2, 所述 当前块的 k个 MVP包括第一 MVP和第二 MVP, 所述根据待解码的当前块 的 k个 MVP和解码得到的所述当前块的 MVD, 确定所述当前块的 MV指向 的区域包括:
根据公式 1计算得到 d;
根据公式 2和公式 3计算得到所述当前块的 MVD在 MVPs与 MVPt差 值矢量上的投影 ; 公式 1为: 4i 2 = (MVPrx - MVPs.x + (MVPry - MVPs.y) , 其中, MVPs.x 与 M Ps._y分别表示第一 MVP的横坐标分量与纵坐标分量; MVPt.x与 MVPt.y 分别表示第二 MVP的横坐标分量与纵坐标分量;
公式 2为: Dp = MVD.x * (MVPt.x - MVPS .x) + MVD.y * (MVPt.y - MVPS .y) , 其中, .x与 ._y分别表示所述当前块的 MVD的横坐标分量与纵坐标 分量;
公式 3为: dn = Dn l Id ; 若- d≤dp≤d , 则确定所述当前块的 MV指向所述待划分区域。
14、 根据权利要求 13所述的方法, 其特征在于, 还包括:
若 dp < - d , 则确定所述当前块的 MV指向的区域对应的 MVP 为第一
MVP , 并根据所述第一 MVP和所述 MVD , 得到所述当前块的 MV;
务 dp > d , 则确定所述当前块的 MV指向的区域对应的 MVP 为第二
MVP , 并根据所述第二 MVP和所述 MVD , 得到所述当前块的 MV。
15、 根据权利要求 9所述的方法, 其特征在于, 所述方法还包括: 根据与编码端预先约定或者从编码端接收的指示, 获取所述子区域与所 述待划分区域的对应关系。
16、 一种视频图像编码装置, 其特征在于, 包括:
区域划分模块, 用于根据待编码的当前块的 k个运动矢量预测值 MVP 在参考图像中对应的 k个互不相同的 MVP像素点,对所述参考图像的搜索区 域进行区域划分; 划分得到的区域中包括 k个待划分区域, 每个所述待划分 区域包括一个所述 MVP像素点, 其中, k大于等于 2;
待搜索子区域划分模块, 用于从所述区域划分模块划分得到的所述 k个 待划分区域中划分出 k个待搜索子区域; 所述 k个待搜索子区域与所述 k个 待划分区域——对应;
运动估计模块, 用于对所述待搜索子区域划分模块划分出的每个所述待 搜索子区域和所述参考图像的搜索区域中除所述 k个待划分区域以外的区域 进行运动估计, 确定出所述当前块的运动矢量 MV;
第一计算发送模块, 用于若所述运动估计模块确定的所述当前块的 MV 对应的像素点包含在任一所述待搜索子区域中, 则根据所述 MV和所述 MV 对应的像素点所在的所述待搜索子区域对应的 MVP,得到所述当前块的运动 矢量差值 MVD , 并将得到的所述 MVD进行编码后发送给解码端。
17、 根据权利要求 16所述的视频图像编码装置, 其特征在于, 所述待搜 索子区域划分模块包括: 第一划分单元, 用于从每个所述待划分区域划分出 k个子区域; 第一选取单元, 用于从所述第一划分单元从每个所述待划分区域划分得 到的所述 k个子区域中选取一个子区域作为所述待划分区域对应的所述待搜 索子区域。
18、 根据权利要求 17所述的视频图像编码装置, 其特征在于, 所述第一 划分单元具体用于: 以所述待划分区域包括的 MVP像素点为坐标原点,根据 所述待划分区域中的每个像素点的横坐标分量和纵坐标分量、 横坐标分量或 纵坐标分量的数值特征, 从所述待划分区域划分出 k个子区域。
19、 根据权利要求 18所述的视频图像编码装置, 其特征在于, 所述第一 划分单元具体用于: 根据所述待划分区域中的每个像素点的横坐标分量和纵 坐标分量的幅度和、 横坐标分量的幅度或纵坐标分量的幅度除以 k得到的余 数 j, 从所述待划分区域划分出 k个子区域;
其中余数 j相同的像素点构成一个子区域, j=0〜k-l ; 从任意两个所述待 划分区域中选取的两个待搜索子区域对应的余数 j互不相同。
20、 根据权利要求 16所述的视频图像编码装置, 其特征在于, 所述待搜索子区域划分模块包括:
去除单元, 用于从每个所述待划分区域中去除 MVP像素点;
第二划分单元,用于从去除所述 MVP像素点的每个所述待划分区域划分 出 k个子区域;
第二选取单元, 用于从所述第二划分单元划分得到的所述 k个子区域中 选取一个子区域作为所述待划分区域对应的所述待搜索子区域;
所述运动估计模块具体用于对每个所述待搜索子区域、 所述参考图像的 搜索区域中除所述 k个待划分区域以外的区域、以及每个所述 MVP像素点进 行运动估计, 确定出所述当前块的 MV。
21、 根据权利要求 20所述的视频图像编码装置, 其特征在于, 所述装置 还包括: 第二计算发送模块, 用于若确定的所述当前块的 MV对应的像素点为任 一所述 MVP像素点 ,则根据所述 MV和所述 MV对应的 MVP像素点对应的 MVP, 得到所述当前块的 MVD, 并将所述 MVD和所述 MVD对应的 MVP 的标识进行编码后发送给解码端。
22、 根据权利要求 16-21任一所述的视频图像编码装置, 其特征在于, k 等于 2, 所述当前块的 k个 MVP包括第一 MVP和第二 MVP, 所述区域划分 模块包括:
第一执行单元, 用于连接第一 MVP像素点和第二 MVP像素点得到线段 aj , 将线段 分别向两端延长 d得到线段 ; 线段 的长度为 2d, 所述第一 MVP像素点为所述第一 MVP 在所述参考图像中对应的像素点, 所述第二 MVP像素点为所述第二 MVP在所述参考图像中对应的像素点;
第二执行单元, 用于通过线段《2的两端点分别作平行于直线 h的直线 /2 和 ; 直线 /为线段 的垂直平分线;
h、 /2和/将所述参考图像的搜索区域划分为区域 A、 区域 B、 区域 C和 区域 D; 其中, 所述区域 B包括所述第一 MVP像素点, 所述区域 C包括所 述第二 MVP像素点, 所述区域 B和区域 C为所述待划分区域; 所述区域 A 为所述区域 B的邻近区域, 所述区域 D为所述区域 C的邻近区域。
23、 根据权利要求 22所述的视频图像编码装置, 其特征在于, 所述装置 还包括:
第三计算发送模块, 用于若确定的所述当前块的 MV对应的像素点包含 在区域 A或区域 D中,则根据所述 MV和所述 MV对应的像素点所在的区域 对应的 MVP, 得到所述当前块的 MVD, 并将得到的所述 MVD进行编码后 发送给解码端;
所述区域 A对应的 MVP为所述第一 MVP , 所述区域 D对应的 MVP为 所述第二 MVP。
24、 一种视频图像解码装置, 其特征在于, 包括: 第一确定模块,用于根据待解码的当前块的 k个 MVP和解码得到的所述 当前块的 MVD,确定所述当前块的 MV指向的参考图像中的区域; 所述参考 图像包括 k个待划分区域,每个所述待划分区域包括一个所述 MVP在所述参 考图像中对应的一个 MVP像素点, 其中, k大于等于 2;
第二确定模块, 用于若所述第一确定模块确定所述当前块的 MV指向所 述 k个待划分区域,则根据所述当前块的 MVD,确定所述当前块的 MV指向 的子区域, 并根据所述子区域所属的待划分区域对应的 MVP和所述 MVD, 得到所述当前块的 MV。
25、 根据权利要求 24所述的视频图像解码装置, 其特征在于, 所述第二 确定模块具体用于: 若所述第一确定模块确定所述当前块的 MV指向所述 k 个待划分区域, 则根据所述当前块的 MVD的横坐标分量和纵坐标分量、 横 坐标分量或纵坐标分量的数值特征, 确定所述当前块的 MV指向的子区域, 并根据所述子区域所属的待划分区域对应的 MVP和所述 MVD, 得到所述当 前块的 MV。
26、 根据权利要求 25所述的视频图像解码装置, 其特征在于, 所述第二 确定模块具体用于: 若所述第一确定模块确定所述当前块的 MV指向所述 k 个待划分区域, 则根据所述当前块的 MVD的横坐标分量和纵坐标分量的幅 度和、 横坐标分量的幅度或纵坐标分量的幅度除以 k得到的余数, 确定所述 当前块的 MV指向的子区域, 并根据所述子区域所属的待划分区域对应的 MVP和所述 MVD , 得到所述当前块的 MV。
27、 根据权利要求 24-26任一所述的视频图像解码装置, 其特征在于, 所述装置还包括:
第三确定模块, 用于若所述第一确定模块确定所述当前块的 MVD为(0, 0 ) , 则接收所述 MVD对应的 MVP的标识, 并根据所述 MVP的标识对应的 MVP和所述 MVD , 得到所述当前块的 MV。
28、 根据权利要求 24-26任一所述的视频图像解码装置, 其特征在于, k 等于 2, 所述当前块的 k个 MVP包括第一 MVP和第二 MVP, 所述第一确定 模块包括:
第一计算单元, 用于根据公式 1计算得到 d;
第二计算单元, 用于根据公式 2和公式 3计算得到所述当前块的 MVD 在 MVPs与 MVPt差值矢量上的投影 dp
第一确定单元, 用于若 -ί ≤ ≤ ί , 则确定所述当前块的 MV指向所述 待划分区域;
公式 1为: 4i 2 = (MVPt.x - MVPs.x + (MVPry - MVPs.y) , 其中, MVPs.x 与 M Ps._y分别表示第一 MVP的横坐标分量与纵坐标分量; MVPt.x与 MVPt.y 分别表示第二 MVP的横坐标分量与纵坐标分量;
公式 2为: Dp = MVD.x * (MVPt.x - MVP .x) + MVD.y * (MVPt.y - MVP .y) , 其中, .x与 ._y分别表示所述当前块的 MVD的横坐标分量与纵坐标 分量;
公式 3为: dp 二 Dplld。
29、 根据权利要求 28所述的视频图像解码装置, 其特征在于, 所述第一 确定模块还包括:
第二确定单元, 用于若 <- ί , 则确定所述当前块的 MV指向的区域对 应的 MVP为第一 MVP , 并根据所述第一 MVP和所述 MVD , 得到所述当前 块的 MV;
第三确定单元, 用于若 >ί , 则确定所述当前块的 MV指向的区域对 应的 MVP为第二 MVP , 并根据所述第二 MVP和所述 MVD , 得到所述当前 块的 MV。
PCT/CN2011/074565 2010-09-30 2011-05-24 视频图像编码方法、解码方法和装置 WO2011137816A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201010502285 CN102447894B (zh) 2010-09-30 2010-09-30 视频图像编码方法、解码方法和装置
CN201010502285.0 2010-09-30

Publications (1)

Publication Number Publication Date
WO2011137816A1 true WO2011137816A1 (zh) 2011-11-10

Family

ID=44903609

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/074565 WO2011137816A1 (zh) 2010-09-30 2011-05-24 视频图像编码方法、解码方法和装置

Country Status (2)

Country Link
CN (1) CN102447894B (zh)
WO (1) WO2011137816A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533376A (zh) * 2012-07-02 2014-01-22 华为技术有限公司 帧间预测编码运动信息的处理方法、装置和编解码系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109496431A (zh) * 2016-10-13 2019-03-19 富士通株式会社 图像编码/解码方法、装置以及图像处理设备
CN110958452B (zh) * 2018-09-27 2023-11-03 华为技术有限公司 视频解码方法及视频解码器

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1703097A (zh) * 2004-05-26 2005-11-30 松下电器产业株式会社 编码运动矢量的设备和方法及其程序和介质
CN101573983A (zh) * 2007-01-03 2009-11-04 三星电子株式会社 使用全局运动矢量预测运动矢量的方法和设备、编码器、解码器及解码方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101415116B (zh) * 2007-10-15 2011-08-03 华为技术有限公司 一种确定对应宏块的方法和系统
JP5170800B2 (ja) * 2009-01-15 2013-03-27 ルネサスエレクトロニクス株式会社 画像処理装置、デコード方法、フレーム内復号装置、フレーム内復号方法、及びフレーム内符号化装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1703097A (zh) * 2004-05-26 2005-11-30 松下电器产业株式会社 编码运动矢量的设备和方法及其程序和介质
CN101573983A (zh) * 2007-01-03 2009-11-04 三星电子株式会社 使用全局运动矢量预测运动矢量的方法和设备、编码器、解码器及解码方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533376A (zh) * 2012-07-02 2014-01-22 华为技术有限公司 帧间预测编码运动信息的处理方法、装置和编解码系统
CN103533376B (zh) * 2012-07-02 2017-04-12 华为技术有限公司 帧间预测编码运动信息的处理方法、装置和编解码系统

Also Published As

Publication number Publication date
CN102447894A (zh) 2012-05-09
CN102447894B (zh) 2013-11-06

Similar Documents

Publication Publication Date Title
CN111385569B (zh) 一种编解码方法及其设备
TWI617185B (zh) 具有仿射運動補償的視訊編碼的方法以及裝置
US10097850B2 (en) Method and apparatus for removing redundancy in motion vector predictors
US9538197B2 (en) Methods and systems to estimate motion based on reconstructed reference frames at a video decoder
AU2019416266A1 (en) Video encoding and decoding
RU2360375C2 (ru) Способ определения векторов движения для текущего блока в кадре, подлежащем декодированию
JP4663792B2 (ja) 多視点動映像を符号化及び復号化する装置及び方法
EP2103141A1 (en) Method and apparatus for estimating motion vector using plurality of motion vector predictors, encoder, decoder, and decoding method
RU2700399C2 (ru) Способ и устройство для прямого многогипотезного кодирования/декодирования блока изображения
JP6065088B2 (ja) 動画像符号化装置、動画像符号化方法、及び動画像符号化プログラム、並びに、送信装置、送信方法、及び送信プログラム
WO2011137816A1 (zh) 视频图像编码方法、解码方法和装置
US20080267296A1 (en) Method and apparatus for concealing an error of an image using residual data
CN112449180B (zh) 一种编解码方法、装置及其设备
CN111510726B (zh) 一种编解码方法及其设备
JP5725009B2 (ja) 動画像復号装置、動画像復号方法、及び動画像復号プログラム、並びに、受信装置、受信方法、及び受信プログラム
JP5842803B2 (ja) 動画像符号化装置、動画像符号化方法、及び動画像符号化プログラム、並びに、送信装置、送信方法、及び送信プログラム
JP2018182435A (ja) 動きベクトル予測装置及びコンピュータプログラム
US20150092857A1 (en) Methods for Encoding Motion Vectors
CN112449197A (zh) 视频编解码的方法、装置、电子设备及存储介质
JP2014068368A (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: 11777235

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11777235

Country of ref document: EP

Kind code of ref document: A1