WO2018127090A1 - 图像预测方法和相关设备 - Google Patents

图像预测方法和相关设备 Download PDF

Info

Publication number
WO2018127090A1
WO2018127090A1 PCT/CN2018/071351 CN2018071351W WO2018127090A1 WO 2018127090 A1 WO2018127090 A1 WO 2018127090A1 CN 2018071351 W CN2018071351 W CN 2018071351W WO 2018127090 A1 WO2018127090 A1 WO 2018127090A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
sub
reference block
feature points
points
Prior art date
Application number
PCT/CN2018/071351
Other languages
English (en)
French (fr)
Inventor
陈焕浜
杨海涛
梁凡
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP18736299.1A priority Critical patent/EP3557874A4/en
Publication of WO2018127090A1 publication Critical patent/WO2018127090A1/zh
Priority to US16/460,029 priority patent/US11330285B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • 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/537Motion estimation other than block-based
    • H04N19/54Motion estimation other than block-based using feature points or meshes

Definitions

  • the present invention relates to the field of video coding and video decoding, and in particular to an image prediction method and related equipment.
  • the basic principle of video coding compression is to use the correlation between airspace, time domain and codewords to remove redundancy as much as possible.
  • the current popular practice is to use a block-based hybrid video coding framework to implement video coding compression through prediction (including intra prediction and inter prediction), transform, quantization, and entropy coding.
  • This coding framework shows a strong vitality, and HEVC still uses this block-based hybrid video coding framework.
  • motion estimation/motion compensation is a key technique that affects encoding/decoding performance.
  • the existing motion estimation/motion compensation algorithms are basically block motion compensation algorithms based on the translational motion model.
  • the existing interframe prediction mainly uses block-based motion compensation prediction based on the translational motion model (English: motion compensation).
  • Some non-translational motion models (such as affine motion models) designed for non-translational motion are also being proposed.
  • Embodiments of the present invention provide an image prediction method and related equipment, so as to improve the accuracy of predicting a current block by using a reference block.
  • a first aspect of the embodiments of the present invention provides an image prediction method, including:
  • the image prediction device determines a reference block of the current block, wherein the reference block is spatially adjacent to the current block, and the reference block is predicted using an affine motion model.
  • the motion information of the sub-block is obtained based on the motion information of the corresponding feature point (specifically, the motion information of the feature point is taken as the motion information of the sub-block in which the feature point is located).
  • the image prediction apparatus calculates motion information of each sub-block in the current block according to position information and motion information of the at least two feature points in the reference block.
  • the image prediction apparatus performs motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block.
  • the motion information in each embodiment of the present application is, for example, a motion vector
  • the location information in each embodiment of the present application is, for example, a coordinate.
  • the affine motion model employed by the reference block is, for example, the same or similar to the affine motion model employed by the current block.
  • the so-called “affine motion model adopted by the reference block” is the affine motion model used by the prediction reference block.
  • the so-called “affine motion model used in the current block” is the affine motion model used to predict the current block.
  • the reference block of the current block may be, for example, an image block adjacent to the upper left vertex of the current block, an image block adjacent to the lower left vertex of the current block, an image block adjacent to the upper right vertex of the current block, or the lower right of the current block
  • the image blocks adjacent to the vertices may, for example, also be other image blocks adjacent to the current block.
  • the motion information of each sub-block in the current block is calculated, and the at least two feature points are located.
  • a sub-block in which at least two control points of the reference block are located the at least two control points are control points used to predict an affine motion model used by the reference block, and motion information of the sub-block in which the feature point is located is based on The motion information of the corresponding feature point is obtained; this makes the matching between the position information of the feature point of the reference block used for calculating the motion information of each sub-block in the current block and the motion information high, and it is found that this is beneficial to improve the current block.
  • the motion information of each sub-block is calculated accurately, thereby improving the accuracy of predicting the current block by using the reference block.
  • the image prediction method provided by the embodiment of the present application may be applied to a video encoding process or applied to a video decoding process.
  • the second aspect of the present application further provides an image prediction apparatus, including:
  • a determining unit configured to determine a reference block of the current block, wherein the reference block is adjacent to the current block space, and the reference block is predicted by using an affine motion model.
  • An acquiring unit configured to acquire location information and motion information of at least two feature points in the reference block, where the at least two feature points are located in a sub-block where at least two control points of the reference block are located, where the at least two The two control points are control points used by the affine motion model used by the reference block, and the motion information of the sub-blocks where the feature points are located is obtained based on the motion information of the corresponding feature points.
  • a calculating unit configured to calculate motion information of each sub-block in the current block according to location information and motion information of the at least two feature points in the reference block.
  • a prediction unit configured to perform motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block.
  • the image prediction apparatus provided by the embodiment of the present application is applied to a video encoding apparatus or applied to a video decoding apparatus.
  • the video encoding device or the video decoding device may be any device that needs to output or store video, such as a notebook computer, a tablet computer, a personal computer, a mobile phone, or a video server.
  • the video encoding device and the video decoding device may perform sub-block partitioning according to the same same block division manner.
  • the video encoding apparatus may write the indication of the block division manner into the code stream, and then notify the video decoding apparatus of the block division manner adopted by the video encoding apparatus to keep the video coding apparatus and the video decoding apparatus in the same block division manner.
  • the feature point is located at a center position of a sub-block where the control point of the reference block is located. That is, the feature point may be a pixel point of the center position of the sub-block in which it is located. It has been found in practice that if the motion information (motion vector) of the pixel at the center of the sub-block is taken as the motion information of the sub-block, it is advantageous to obtain relatively better prediction accuracy.
  • (x, y) is the coordinate of one control point of the reference block
  • (x', y') is the feature point in the sub-block where the control point of the reference block is (x, y) Coordinates
  • a is a horizontal offset
  • b is a vertical offset
  • a and b are not equal to zero.
  • the at least two control points of the reference block include an upper left vertex, an upper right vertex, a lower left vertex, and a lower right vertex of the reference block. At least one.
  • the coordinate position of the upper left vertex of the reference block is (x 0 , y 0 )
  • the width of the reference block is w
  • the height of the reference block is h
  • (x 1 , y 1 ) is the coordinate of the upper right vertex of the reference block
  • (x 2 , y 2 ) is the coordinate of the lower left vertex of the reference block
  • (x 3 , y 3 ) is the reference block The coordinates of the lower right vertex.
  • the at least two feature points may include feature points in the reference block that have coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ), respectively. among them,
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located
  • (x 0 , y 0 ) is the The coordinates of the control points in the sub-block where the feature points (x' 0 , y' 0 ) in the reference block are located
  • (x 1 , y 1 ) are the feature points (x' 1 , y' 1 ) in the reference block
  • the at least two feature points may include coordinates (x′ 0 , y′ 0 ), ( ⁇ ′ 1 , y′ 1 ), and (x) in the reference block, respectively. a feature point of ' 2 , y ' 2 ), wherein
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located
  • (x 0 , y 0 ) is the The coordinates of the control points in the sub-block where the feature points (x' 0 , y' 0 ) in the reference block are located
  • (x 1 , y 1 ) are the feature points (x' 1 , y' 1 ) in the reference block
  • (x 2 , y 2 ) are the coordinates of the control points in the sub-block where the feature points (x′ 2 , y′ 2 ) in the reference block are located
  • the w is The width of the reference block is described
  • h is the height of the reference block.
  • the at least two feature points include coordinates (x′ 0 , y′ 0 ), (x′ 1 , y′ 1 ), (x′) in the reference block, respectively. 2 , y' 2 ) and (x' 3 , y' 3 ) characteristic points, wherein
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located
  • (x 0 , y 0 ) is the The coordinates of the control points in the sub-block where the feature points (x' 0 , y' 0 ) in the reference block are located
  • (x 1 , y 1 ) are the feature points (x' 1 , y' 1 ) in the reference block
  • (x 2 , y 2 ) are the coordinates of the control points in the sub-block where the feature points (x′ 2 , y′ 2 ) in the reference block are located
  • the w is The width of the reference block is described
  • h is the height of the reference block.
  • the calculating the motion information of each sub-block in the current block according to the location information and the motion information of the at least two feature points in the reference block includes: according to the reference The position information and the motion information of the at least two feature points in the block, and the position information of each sub-block in the current block, calculate motion information of each sub-block in the current block.
  • the location information and the motion information of the at least two feature points in the reference block and the location information of each sub-block in the current block are calculated, and the sub-blocks in the current block are calculated.
  • the motion information includes: referring to the following formula, calculating, according to position information and motion information of the at least two feature points in the reference block, and location information of each sub-block in the current block, Motion information of the sub-block,
  • the at least two feature points include feature points of the reference block having coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ),
  • the at least two feature points including the reference block with coordinates (x '0, y' 0 ), (2 x '2, y') of the feature point (x '1, y' 1 ) and,
  • the at least two feature points include coordinates (x' 0 , y' 0 ), (x' 1 , y' 1 ), (x' 2 , y' 2 ), and (x' in the reference block. 3 , y' 3 ) feature points;
  • the vx 0 is a horizontal motion vector of a feature point (x′ 0 , y′ 0 ), and the vy 0 is a vertical motion vector of the feature point (x′ 0 , y′ 0 );
  • the v ⁇ 1 is a feature point (x '1, y' 1 ) the horizontal motion vector
  • vy 1 the feature point (x '1, y' 1 ) vertical motion vector
  • said vy 2 is a feature point (x ' 2 , y ' 2 ) a vertical motion vector
  • the vx 2 being a horizontal motion vector of a feature point (x′ 2 , y′ 2 )
  • the vy 3 being a feature point of (x′ 3 , y′ 3 ) a vertical motion vector
  • the vx 3 being a horizontal motion vector of a feature point (x' 3 , y' 3 )
  • the vx is a horizontal motion vector of a sub-block of the current block whose coordinates are (x, y)
  • the vy is a vertical motion vector of the sub-block of the current block whose coordinates are (x, y) .
  • the calculating the motion information of each sub-block in the current block according to the location information and the motion information of the at least two feature points in the reference block includes: according to the reference Calculating motion information of at least two control points used by the affine motion model used by the current block according to position information and motion information of the at least two feature points in the block; and using an affine according to the current block.
  • the at least two control points used by the affine motion model used by the current block may include, for example, at least two of an upper left vertex, a lower left vertex, an upper right vertex, and a lower right vertex of the current block.
  • the calculating, according to the location information and the motion information of the at least two feature points in the reference block, the motion information of the at least two control points used by the affine motion model used by the current block includes: And calculating, according to the following formula, motion information of at least two control points used by the affine motion model used by the current block according to position information and motion information of the at least two feature points in the reference block:
  • the at least two feature points include feature points of the reference block having coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ),
  • the at least two feature points including the reference block with coordinates (x '0, y' 0 ), (2 x '2, y') of the feature point (x '1, y' 1 ) and,
  • the at least two feature points include coordinates (x' 0 , y' 0 ), (x' 1 , y' 1 ), (x' 2 , y' 2 ), and (x' in the reference block. 3 , y' 3 ) feature points;
  • At least two control points employed by the affine motion model employed by the current block include control points in the current block having coordinates (x 4 , y 4 ) and (x 5 , y 5 ), respectively, or At least two control points employed by the affine motion model employed by the current block include coordinates (x 4 , y 4 ), (x 5 , y 5 ), and (x 6 , y 6 ) in the current block, respectively.
  • a control point; or at least two control points employed by the affine motion model employed by the current block include coordinates (x 4 , y 4 ), (x 5 , y 5 ), (x) in the current block, respectively Control points of 6 , y 6 ) and (x 7 , y 7 );
  • the vx 4 is a horizontal motion vector of a control point (x 4 , y 4 )
  • the vy 4 is a vertical motion vector of the control point (x 4 , y 4 )
  • the vx 5 is a control point (x) a horizontal motion vector of 5 , y 5 )
  • the vy 5 being a vertical motion vector of a control point (x 5 , y 5 )
  • the vx 6 being a horizontal motion vector of the control point (x 6 , y 6 )
  • the control point vx 7 (x 7, y 7) the horizontal motion vector
  • the motion information and the location information of the at least two control points used by the affine motion model used by the current block, and the location information of each sub-block in the current block, the current block is calculated.
  • the motion information of each sub-block includes: referring to the following formula, the motion information and the position information of at least two control points used according to the affine motion model used by the current block, and the sub-blocks of the current block Position information, and calculating motion information of each sub-block in the current block:
  • the vx is a horizontal motion vector of a sub-block of the current block whose coordinates are (x, y)
  • the vy is a vertical motion vector of the sub-block of the current block whose coordinates are (x, y) .
  • a third aspect of the embodiments of the present invention further provides an image predicting apparatus comprising: a processor and a storage unit coupled to each other.
  • the processor is configured to invoke code stored in the memory to perform some or all of the steps of any of the image prediction methods provided by the embodiments of the present invention.
  • a fourth aspect of the present application provides a video system, including: a video encoding apparatus and a video decoding apparatus, where the video encoding apparatus or the video decoding apparatus is used to perform any one of the image prediction methods provided by the embodiments of the present invention. Part or all of the steps.
  • a fifth aspect of embodiments of the present application provides a computer readable storage medium storing program code.
  • the program code includes instructions for performing some or all of the steps of any one of the image prediction methods provided by the embodiments of the present invention.
  • a sixth aspect of the embodiments of the present application provides a computer program product, wherein when the computer program product is run on a computer, the computer is caused to perform part of any image prediction method provided by an embodiment of the present invention. Or all steps.
  • FIG. 1 is a schematic diagram of partitioning of several image blocks according to an embodiment of the present invention
  • FIG. 1 is a schematic diagram of inter prediction according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of an image prediction method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of another image prediction method according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of a possible location of a reference block according to an embodiment of the present disclosure
  • FIG. 3 - FIG. 3 - FIG. 3 e are schematic diagrams of possible reference blocks according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of sub-block partitioning of a reference block according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of possible positional relationship between control points and feature points in a reference block according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of several non-translational motions according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart diagram of another image prediction method according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart diagram of another image prediction method according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart diagram of another image prediction method according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of an image prediction apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of another image prediction apparatus according to an embodiment of the present invention.
  • 9-A is a schematic diagram of a video encoder according to an embodiment of the present application.
  • 9-B is a schematic diagram of a video decoder provided by an embodiment of the present application.
  • FIG. 10 is a schematic block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 11 is another schematic block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of an embodiment of the present invention applicable to a television application
  • Figure 13 is a schematic block diagram of an embodiment of the present invention suitable for use in a mobile phone application.
  • Embodiments of the present invention provide an image prediction method and related device.
  • the video sequence consists of a series of pictures (English: picture), the picture is further divided into slices (English: slice), and the slice is further divided into blocks (English: block).
  • the video coding is performed in units of blocks, and can be encoded from left to right and from top to bottom line from the upper left corner position of the picture.
  • the concept of block is further extended.
  • the MB can be further divided into a plurality of prediction blocks (English: partition) that can be used for predictive coding.
  • coding unit English: coding unit, abbreviation: CU
  • prediction unit English: prediction unit, abbreviation: PU
  • transform unit English: transform unit, abbreviation: TU
  • CU PU or TU
  • the PU can correspond to a prediction block and is the basic unit of predictive coding.
  • the CU is further divided into a plurality of PUs according to a division mode.
  • the TU can correspond to a transform block and is a basic unit for transforming the prediction residual.
  • High-performance video coding English: high efficiency video coding, abbreviated: HEVC
  • HEVC high efficiency video coding
  • the size of a coding unit may include four levels of 64 ⁇ 64, 32 ⁇ 32, 16 ⁇ 16, and 8 ⁇ 8, and coding units of each level may be divided into different according to intra prediction and inter prediction.
  • the size of the prediction unit. 1 - a and FIG. The corresponding prediction unit division method.
  • Figure 1-c is a schematic diagram of interframe prediction.
  • the existing interframe prediction mainly uses block-based motion compensation prediction based on the translational motion model.
  • Some non-translational motion models (such as affine motion models) designed for non-translational motion are also being proposed.
  • Figure 3-i illustrates non-translational motions such as rotational motion, scaling motion, and affine motion.
  • the encoder can derive the motion vector of the current image block by using the peripheral motion vector, and directly copy the value of the reference block as the predicted value of the current image block according to the motion vector, and use the predicted value to the current value at the encoding end.
  • the image block is encoded and predicted.
  • the image prediction method provided by the embodiment of the present invention is first described below.
  • the execution subject of the image prediction method provided by the embodiment of the present invention is a video encoding device or a video decoding device, where the video encoding device or the video decoding device may be any device that needs to output or store video, such as a notebook computer, a tablet computer, or an individual.
  • a device such as a computer, mobile phone or video server.
  • FIG. 2 is a schematic flowchart diagram of an image prediction method according to an embodiment of the present invention.
  • an image prediction method provided by an embodiment of the present invention may include:
  • the image prediction apparatus determines a reference block of the current block.
  • the reference block (ie, the reference image block) is spatially adjacent to the current block (ie, the current image block).
  • the reference block is predicted using an affine motion model (motion compensated prediction). For example, at the encoding end or the decoding end, one image block may be selected as a reference block of the current block according to a preset selection strategy from among spatial neighboring blocks of the current block.
  • the reference block of the current block may be, for example, an image block adjacent to the upper left vertex of the current block, an image block adjacent to the lower left vertex of the current block, an image block adjacent to the upper right vertex of the current block, or the lower right of the current block Image blocks adjacent to the vertex, etc.
  • the reference block of the current block may also be, for example, other image blocks adjacent to the current block.
  • the image prediction apparatus acquires location information and motion information of at least two feature points in the reference block.
  • the at least two feature points are located in a sub-block where at least two control points of the reference block are located.
  • the at least two control points are control points employed by the affine motion model employed by the reference block.
  • the motion information of the sub-block in which the feature point is located is obtained based on the motion information of the corresponding feature point (specifically, the motion information of the feature point is taken as the motion information of the sub-block in which the feature point is located).
  • the at least two feature points can be, for example, 2, 3, 4 or other number of feature points.
  • control points can be, for example, 2, 3, 4 or other number of control points.
  • control point used to predict the affine motion model employed by the reference block may include at least one of an upper left vertex, a lower left vertex, an upper right vertex, and a lower right vertex of the reference block.
  • the coordinate position of the upper left vertex of the reference block is (x 0 , y 0 )
  • the width of the reference block is w
  • the height of the reference block is h
  • (x 1 , y 1 ) is the coordinate of the upper right vertex of the reference block
  • (x 2 , y 2 ) is the coordinate of the lower left vertex of the reference block
  • (x 3 , y 3 ) is the reference block The coordinates of the lower right vertex.
  • the feature point may be located at a central location of the sub-block where the control point of the reference block is located. That is, the feature point may be a pixel point of the center position of the sub-block in which it is located. It has been found in practice that if the motion information (motion vector) of the pixel at the center of the sub-block is taken as the motion information of the sub-block, it is advantageous to obtain relatively better prediction accuracy.
  • At least two of the reference blocks may include, for example, the following pixels. At least two of: a pixel point at a center position of a sub-block in which the upper left vertex of the reference block is located, a pixel point at a center position of a sub-block in which the lower left vertex is located, and a pixel point at a center position of the sub-block in which the upper right vertex is located.
  • the motion information in the embodiments of the present application is, for example, a motion vector.
  • the position information in each embodiment of the present application is, for example, a coordinate.
  • the affine motion model employed by the prediction reference block is, for example, the same as or similar to the affine motion model used to predict the current block.
  • Position information of at least two feature points (the at least two feature points are, for example, 2, 3, or 4 feature points) adopted by the reference block using an affine motion model, and the reference block may be
  • (x, y) is the coordinate of one control point of the reference block (x is a horizontal coordinate, y is a vertical coordinate), and (x', y') is a coordinate of the reference block (x, The coordinates of the feature points corresponding to the control points of y) (x' is a horizontal coordinate, y' is a vertical coordinate), wherein a is a horizontal offset, and b is a vertical offset, wherein Said a and said b are not equal to zero.
  • the a may be equal to 1, 2, 3, 4, 5, 6, 7, 1, -2, -3, -4, -5 or other values.
  • the b can be equal to 1, 2, 3, 4, 5, 6, 7, 1, -2, -3, -4, -5 or other values.
  • the image prediction apparatus calculates motion information of each sub-block in the current block according to location information and motion information of at least two feature points of the reference block.
  • the calculating the motion information of each sub-block in the current block according to the location information and the motion information of the at least two feature points in the reference block includes: according to the reference block The position information and the motion information of the at least two feature points and the position information of each sub-block in the current block are calculated, and motion information of each sub-block in the current block is calculated.
  • the calculating the motion information of each sub-block in the current block according to the location information and the motion information of the at least two feature points in the reference block includes: according to the foregoing in the reference block Calculating motion information of at least two control points used by the affine motion model used by the current block according to position information and motion information of at least two feature points; according to the affine motion model used by the current block The motion information and the position information of the at least two control points, and the position information of each sub-block in the current block, calculate motion information of each sub-block in the current block.
  • the image prediction apparatus performs motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block.
  • the motion information of each sub-block in the current block is calculated according to the location information and the motion information of the at least two feature points of the current block, and the at least two features are Point is located in a sub-block where at least two control points of the reference block are located, and the at least two control points are control points used to predict an affine motion model used by the reference block, and motion of the sub-block in which the feature point is located
  • the information is obtained based on the motion information of the corresponding feature point; this makes the matching between the position information of the feature points of the reference block used for calculating the motion information of each sub-block in the current block and the motion information high, and it is found that this is beneficial to improve the current
  • the motion information of each sub-block in the block is calculated accurately, thereby improving the accuracy of predicting the current block by using the reference block.
  • the motion information of the feature points of the reference block and the position information of the control point are used to calculate the motion information of each sub-block in the current block, the motion information of the feature point and the position information of the control point do not match (at least match).
  • the accuracy is lower than the matching between the motion information of the feature point and the location information, which is likely to affect the accuracy of the prediction of the current block.
  • the image prediction method can be applied to a video encoding process or the image prediction method can be applied to a video decoding process.
  • FIG. 3-a is a schematic flowchart diagram of another image prediction method according to another embodiment of the present invention.
  • the image prediction method provided by another embodiment of the present invention may include:
  • the video encoding device determines a reference block in the current block.
  • the video encoding apparatus can traverse the spatially adjacent five image blocks of the current block in the order of the pixel units A, B, C, D, and E, and can find the first one to adopt the affine motion.
  • the image block predicted by the model is used as the reference block in the current block.
  • any image block in which the pixel units A, B, C, D, and E are located may be used as the current block in the image block predicted by the affine motion model. Reference block.
  • the pixel unit A and the pixel unit D are adjacent to the lower left vertex of the current block
  • the pixel unit B and the pixel unit C are adjacent to the upper right vertex of the current block
  • the pixel unit E is adjacent to the upper left vertex of the current block.
  • the pixel unit in each embodiment of the present invention may include one or more pixels, for example, the pixel unit may be a 2*2 pixel block, a 2*1 pixel block, a 2*1 pixel block, and a 4*4 pixel. Block or 4*2 pixel block, etc.
  • the image blocks of five positions adjacent to each other in the space of the current block are traversed in the order of A, B, C, D, and E shown in FIG. 3-b.
  • the image block in which the pixel unit A is located is predicted using the affine motion model, as shown in the example of FIG. 3-c
  • the image block in which the pixel unit A is located can be used as the reference block in the current block.
  • the image block in which the pixel unit A is located is not predicted by the affine motion model
  • the image block in which the pixel unit B is located is predicted by the affine motion model.
  • the image block in which the pixel unit B is located can be used as the image block.
  • the reference block in the current block It is also assumed that the image blocks in which the pixel units A and B are located are not predicted by the affine motion model, and the image block in which the pixel unit C is located is predicted by the affine motion model, so as shown in the example of FIG. 3-e, the pixel unit C can be used.
  • the image block is used as a reference block in the current block. It is also assumed that the image blocks in which the pixel units A, B, and C are located are not predicted by the affine motion model, and the image block in which the pixel unit D is located is predicted by the affine motion model, and the image block in which the pixel unit D is located can be used as the current block. Reference block.
  • the image blocks in which the pixel units A, B, C, and D are located are not predicted by the affine motion model, and the image block in which the pixel unit E is located is predicted by the affine motion model, so that the image block in which the pixel unit E is located can be used as the image block.
  • the reference block in the current block is not predicted by the affine motion model, and the image block in which the pixel unit E is located is predicted by the affine motion model, so that the image block in which the pixel unit E is located can be used as the image block.
  • the affine motion model may also be used for prediction.
  • the image blocks are used as candidate reference blocks, and the prediction quality of the current block prediction is calculated by using the candidate reference blocks respectively, and the candidate reference block with the relatively best prediction quality is used as the reference block of the current block.
  • the mechanism for selecting the reference block of the current block is not limited to the above example.
  • the decoder uses the same strategy as the encoding side to select the reference block of the current block.
  • the video encoding apparatus uses the sub-block partitioning information of the reference block and the location information of at least two control points used by the affine motion model used by the reference block to derive at least two feature points in the reference block. location information.
  • the at least two feature points are located in a sub-block where at least two control points of the reference block are located, and motion information of the feature point is used as motion information of the sub-block in which the feature point is located.
  • the encoding end and the decoding end may perform sub-block partitioning of the reference block in the same sub-block division manner.
  • it can be fixedly divided into sub-blocks of 4*4 size.
  • a sub-block divided into 8*8 sizes may also be fixed.
  • the corresponding sub-block division manner may also be derived by using the size information of the reference block, the vertex motion information, and the like, which is not limited herein.
  • the at least two feature points include 2, 3, and 4 feature points, respectively.
  • the at least two feature points may include feature points of coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ) in the reference block, where
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located
  • (x 0 , y 0 ) is the The coordinates of the control points in the sub-block where the feature points (x' 0 , y' 0 ) in the reference block are located
  • (x 1 , y 1 ) are the feature points (x' 1 , y' 1 ) in the reference block
  • the at least two feature points include feature points in the reference block that are (x' 0 , y' 0 ), (x' 1 , y' 1 ), and (x' 2 , y' 2 ), respectively ,among them,
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located
  • (x 0 , y 0 ) is the The coordinates of the control points in the sub-block where the feature points (x' 0 , y' 0 ) in the reference block are located
  • (x 1 , y 1 ) are the feature points (x' 1 , y' 1 ) in the reference block
  • (x 2 , y 2 ) are the coordinates of the control points in the sub-block where the feature points (x′ 2 , y′ 2 ) in the reference block are located
  • the w is The width of the reference block is described
  • h is the height of the reference block.
  • the at least two feature points include coordinates in the reference block are (x' 0 , y' 0 ), (x' 1 , y' 1 ), (x Characteristic points of ' 2 , y′ 2 ) and (x′ 3 , y′ 3 ), wherein
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located
  • (x 0 , y 0 ) is the The coordinates of the control points in the sub-block where the feature points (x' 0 , y' 0 ) in the reference block are located
  • (x 1 , y 1 ) are the feature points (x' 1 , y' 1 ) in the reference block
  • the coordinates of the control points in the sub-block, (x 2 , y 2 ) are the coordinates of the control points in the sub-block where the feature points (x' 2 , y' 2 ) in the reference block are located
  • (x 3 , y 3 ) is the coordinate of the control point in the sub-block where the feature point (x′ 3 , y′ 3 ) in the reference block is located
  • the w is the width of the reference block
  • FIG. 3-h exemplifies a possible positional relationship between control points and feature points in each sub-block of the reference block, the control points are located at the vertices of the sub-block, and the corresponding features The point is located at the center of the sub-block.
  • the feature point can be located at any central position of the sub-block.
  • control point used to predict the affine motion model employed by the reference block may include at least one of an upper left vertex, a lower left vertex, an upper right vertex, and a lower right vertex of the reference block.
  • the coordinate position of the upper left vertex of the reference block is (x 0 , y 0 )
  • the width of the reference block is w
  • the height of the reference block is h
  • (x 1 , y 1 ) is the coordinate of the upper right vertex of the reference block
  • (x 2 , y 2 ) is the coordinate of the lower left vertex of the reference block
  • (x 3 , y 3 ) is the reference block The coordinates of the lower right vertex.
  • control points and the feature points located in the same sub-block is not limited to the example shown in FIG. 3-h.
  • the video encoding apparatus calculates motion information of each sub-block in the current block according to location information and motion information of at least two feature points of the reference block, and location information of each sub-block of the current block.
  • the motion information of each sub-block in the current block may be used as motion information of all pixel points in the corresponding sub-block.
  • the location information of the central pixel of the sub-block in the current block may be used as the location information of the corresponding sub-block.
  • the following information may be used to calculate, according to the location information and the motion information of the at least two feature points in the reference block, and the location information of each sub-block in the current block, Motion information of the sub-block,
  • the at least two feature points include feature points of the reference block having coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ),
  • the at least two feature points including the reference block with coordinates (x '0, y' 0 ), (2 x '2, y') of the feature point (x '1, y' 1 ) and,
  • the at least two feature points include coordinates (x' 0 , y' 0 ), (x' 1 , y' 1 ), (x' 2 , y' 2 ), and (x' in the reference block. 3 , y' 3 ) feature points.
  • the vx 0 is a horizontal motion vector of a feature point (x′ 0 , y′ 0 ), and the vy 0 is a vertical motion vector of the feature point (x′ 0 , y′ 0 );
  • the v ⁇ 1 is a feature point (x '1, y' 1 ) the horizontal motion vector
  • vy 1 the feature point (x '1, y' 1 ) vertical motion vector
  • said vy 2 is a feature point (x ' 2 , y ' 2 ) a vertical motion vector
  • the vx 2 being a horizontal motion vector of a feature point (x′ 2 , y′ 2 )
  • the vy 3 being a feature point of (x′ 3 , y′ 3 )
  • a vertical motion vector, the vx 3 being a horizontal motion vector of a feature point (x' 3 , y' 3 ).
  • the vx is a horizontal motion vector of a sub-block of the current block whose coordinates are (x, y)
  • the vy is a vertical motion vector of the sub-block of the current block whose coordinates are (x, y) .
  • the motion information of the two, three, and four feature points is mainly used for derivation, and other examples may be used.
  • the video encoding apparatus performs motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block. Specifically, using the motion information of each sub-block in the current block to obtain a prediction value of each pixel in each sub-block, performing motion compensation prediction on the predicted value of each pixel of each sub-block in the current block to obtain a current block. Forecast block.
  • the video encoding apparatus obtains a prediction residual of the current block based on the prediction block of the current block.
  • the video encoding device can write the prediction residual of the current image block to the video code stream.
  • the video encoding device calculates the motion information of each sub-block in the current block according to the position information and the motion information of the at least two feature points of the current block, and the at least two The feature point is located in a sub-block where at least two control points of the reference block are located, and the at least two control points are control points used to predict an affine motion model used by the reference block, where the feature point is located
  • the motion information is obtained based on the motion information of the corresponding feature point; this causes the video encoding apparatus to calculate the matching degree between the position information of the feature point of the reference block used in the motion information of each sub-block in the current block and the motion information, and it is found that This is beneficial to improve the accuracy of motion information calculation of each sub-block in the current block, and thus improve the accuracy of using the reference block to predict the current block.
  • FIG. 4 is a schematic flowchart diagram of another image prediction method according to another embodiment of the present invention.
  • another image prediction method provided by another embodiment of the present invention may include:
  • the video encoding device determines a reference block in the current block.
  • the video encoding apparatus uses the sub-block partitioning information of the reference block and the location information of the at least two control points used by the affine motion model used by the reference block to derive at least two feature points in the reference block. location information.
  • steps 401 and 402 For specific implementations of steps 401 and 402, reference may be made to the related descriptions of steps 301 and 302, and details are not described herein.
  • the video encoding apparatus calculates, according to location information and motion information of the at least two feature points in the reference block, motion information of at least two control points used by the affine motion model used by the current block.
  • the motion information of each sub-block in the current block may be used as motion information of all pixel points in the corresponding sub-block.
  • the location information of the central pixel of the sub-block in the current block may be used as the location information of the corresponding sub-block.
  • the at least two control points used by the affine motion model used by the current block may be calculated according to the position information and the motion information of the at least two feature points in the reference block.
  • the at least two feature points include feature points of the reference block having coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ),
  • the at least two feature points including the reference block with coordinates (x '0, y' 0 ), (2 x '2, y') of the feature point (x '1, y' 1 ) and,
  • the at least two feature points include coordinates (x' 0 , y' 0 ), (x' 1 , y' 1 ), (x' 2 , y' 2 ), and (x' in the reference block. 3 , y' 3 ) feature points;
  • the at least two control points used by the affine motion model used in the current block include control points in the current block having coordinates (x 4 , y 4 ) and (x 5 , y 5 ), respectively, or At least two control points employed by the affine motion model employed by the current block include coordinates (x 4 , y 4 ), (x 5 , y 5 ), and (x 6 , y 6 ) in the current block, respectively.
  • a control point; or at least two control points employed by the affine motion model employed by the current block include coordinates (x 4 , y 4 ), (x 5 , y 5 ), (x) in the current block, respectively Control points for 6 , y 6 ) and (x 7 , y 7 ).
  • the vx 4 is a horizontal motion vector of a control point (x 4 , y 4 )
  • the vy 4 is a vertical motion vector of the control point (x 4 , y 4 )
  • the vx 5 is a control point (x) a horizontal motion vector of 5 , y 5 )
  • the vy 5 being a vertical motion vector of a control point (x 5 , y 5 )
  • the vx 6 being a horizontal motion vector of the control point (x 6 , y 6 )
  • the control point vx 7 (x 7, y 7) the horizontal motion vector
  • the motion information of the two, three, and four feature points is mainly used for derivation, and other examples may be used.
  • the video encoding apparatus calculates the current block according to motion information and location information of at least two control points used by the affine motion model used by the current block, and location information of each sub-block in the current block. The motion information of each sub-block.
  • the following formula may be referred to: calculating motion information according to motion information and position information of at least two control points used by the affine motion model used by the current block, and location information of each sub-block in the current block.
  • Motion information of each sub-block in the block :
  • the vx is a horizontal motion vector of a sub-block of the current block whose coordinates are (x, y)
  • the vy is a vertical motion vector of the sub-block of the current block whose coordinates are (x, y) .
  • the video encoding apparatus performs motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block.
  • the video encoding apparatus obtains a prediction residual of the current block based on the prediction block of the current block.
  • the video encoding device can write the prediction residual of the current image block to the video code stream.
  • the video encoding device calculates the at least two control points used by the affine motion model used by the current block according to the position information and the motion information of at least two feature points of the current block. And motion information, calculating motion information of each sub-block in the current block based on motion information of at least two control points used by the affine motion model used by the current block, and the at least two feature points are located in at least two reference points a control block in which the two control points are located, the at least two control points are used to predict an affine motion model used by the reference block, and the motion information of the sub-block in which the feature point is located is based on motion information of the corresponding feature point Obtaining; this enables the video encoding apparatus to calculate the matching information between the position information of the feature points of the reference block used in the motion information of each sub-block in the current block and the motion information, and it is found that this is advantageous for improving each of the current blocks.
  • FIG. 5 is a schematic flowchart diagram of another image prediction method according to another embodiment of the present invention.
  • another image prediction method provided by another embodiment of the present invention may include:
  • the video decoding device determines a reference block in the current block.
  • the reference block is adjacent to the current block space, and the reference block is predicted by using an affine motion model.
  • the video decoding apparatus uses the sub-block partitioning information of the reference block and the location information of the at least two control points used by the affine motion model used by the reference block to derive at least two feature points in the reference block. location information.
  • the at least two feature points are located in a sub-block where at least two control points of the reference block are located, and motion information of the feature point is used as motion information of the sub-block in which the feature point is located.
  • the encoding end and the decoding end may perform sub-block division of the reference block according to the same sub-block division manner, for example, may be fixedly divided into sub-blocks of 4*4 or 8*8 size, and of course, may also be referenced by the size of the reference block.
  • the information, the vertex motion information, and the like are derived from the corresponding sub-block division manner, which is not limited herein.
  • the video decoding device calculates motion information of each sub-block in the current block according to location information and motion information of at least two feature points of the reference block, and location information of each sub-block of the current block.
  • the motion information of each sub-block in the current block may be used as motion information of all pixel points in the corresponding sub-block.
  • the location information of the central pixel of the sub-block in the current block may be used as the location information of the corresponding sub-block.
  • the video decoding apparatus performs motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block.
  • the video decoding apparatus reconstructs the current block based on the prediction block of the current block and the corresponding prediction residual in the video code stream.
  • the video decoding device calculates the motion information of each sub-block in the current block according to the position information and the motion information of the at least two feature points of the current block, and the at least two The feature point is located in a sub-block where at least two control points of the reference block are located, and the at least two control points are control points used to predict an affine motion model used by the reference block, where the feature point is located
  • the motion information is obtained based on the motion information of the corresponding feature point; this causes the video decoding device to calculate the matching between the position information of the feature point of the reference block and the motion information used by the motion information of each sub-block in the current block, and finds that the degree of matching is high. This is beneficial to improve the accuracy of the motion information calculation of each sub-block in the current block, and thereby improve the accuracy of using the reference block to predict the current block.
  • FIG. 6 is a schematic flowchart diagram of another image prediction method according to another embodiment of the present invention.
  • another image prediction method provided by another embodiment of the present invention may include:
  • the video decoding device determines a reference block in the current block. Wherein, the reference block is adjacent to the current block space, and the reference block is predicted by using an affine motion model.
  • the video decoding apparatus uses the sub-block partitioning information of the reference block and the location information of at least two control points used by the affine motion model used by the reference block to derive at least two feature points in the reference block. location information.
  • the video decoding device calculates, according to location information and motion information of the at least two feature points in the reference block, motion information of at least two control points used by the affine motion model used by the current block.
  • the motion information of each sub-block in the current block may be used as motion information of all pixel points in the corresponding sub-block.
  • the location information of the central pixel of the sub-block in the current block may be used as the location information of the corresponding sub-block.
  • the video decoding device calculates the current block according to motion information and location information of at least two control points used by the affine motion model used by the current block, and location information of each sub-block in the current block. The motion information of each sub-block.
  • steps 601-604 For the specific implementation of steps 601-604, refer to the related descriptions of steps 401 and 404, and details are not described herein.
  • the video decoding apparatus performs motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block.
  • the video decoding apparatus reconstructs the current block based on the prediction block of the current block and the corresponding prediction residual in the video code stream.
  • the video decoding device calculates the motion of at least two control points used by the affine motion model used by the current block according to the position information and the motion information of at least two feature points of the current block.
  • Information calculating motion information of each sub-block in the current block based on motion information of at least two control points adopted by the affine motion model adopted by the current block, and the at least two feature points are located in the reference block.
  • At least two control points are located in a sub-block, and the at least two control points are control points used to predict an affine motion model used by the reference block, and motion information of the sub-block in which the feature points are located is based on motion of corresponding feature points
  • the information is obtained; this makes the video decoding device calculate the matching between the position information of the feature points of the reference block used in the motion information of each sub-block in the current block and the motion information, and it is found that this is beneficial to improve each of the current blocks.
  • the motion information of the sub-block is calculated accurately,
  • an embodiment of the present invention provides an image prediction apparatus, including:
  • the determining unit 710 is configured to determine a reference block of the current block, where the reference block is adjacent to the current block space, and the reference block is predicted by using an affine motion model.
  • the acquiring unit 720 is configured to acquire location information and motion information of at least two feature points of the reference block, where the at least two feature points are located in a sub-block where at least two control points of the reference block are located,
  • the at least two control points are control points used to predict an affine motion model used by the reference block, and motion information of the sub-blocks in which the feature points are located is obtained based on motion information of the corresponding feature points.
  • the calculating unit 730 is configured to calculate motion information of each sub-block in the current block according to location information and motion information of the at least two feature points in the reference block.
  • the prediction unit 740 is configured to perform motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block.
  • the feature point is located at a central location of a sub-block where the control point of the reference block is located.
  • the location information of the feature points in the reference block is obtained by offsetting the location information of the control points in the reference block in the following manner:
  • (x', y') (x + a, y + b), where (x, y) is the coordinate of one control point of the reference block, and (x', y') is the reference block
  • the at least two control points of the reference block include at least one of an upper left vertex, an upper right vertex, a lower left vertex, and a lower right vertex of the reference block, where the reference The coordinates of the upper left vertex position of the block are (x 0 , y 0 ), and the width of the reference block is w, and the height of the reference block is h,
  • (x 1 , y 1 ) is the coordinate of the upper right vertex of the reference block
  • (x 2 , y 2 ) is the coordinate of the lower left vertex of the reference block
  • (x 3 , y 3 ) is the reference block The coordinates of the lower right vertex.
  • the at least two feature points include feature points in the reference block that have coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ), respectively, where
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located
  • (x 0 , y 0 ) is the The coordinates of the control points in the sub-block where the feature points (x' 0 , y' 0 ) in the reference block are located
  • (x 1 , y 1 ) are the feature points (x' 1 , y' 1 ) in the reference block
  • the at least two feature points include coordinates (x′ 0 , y′ 0 ), (x′ 1 , y′ 1 ), and ( ⁇ ′ 2 , respectively, in the reference block.
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located.
  • (x 0 , y 0 ) is the coordinates of the control points in the sub-block where the feature points (x' 0 , y′ 0 ) in the reference block are located.
  • (x 1 , y 1 ) is the coordinates of the control points in the sub-block where the feature points (x' 1 , y' 1 ) in the reference block are located.
  • (x 2 , y 2 ) is the coordinates of the control points in the sub-block where the feature points (x' 2 , y' 2 ) in the reference block are located.
  • the w is the width of the reference block, and h is the height of the reference block.
  • the at least two feature points include coordinates in the reference block are (x' 0 , y' 0 ), (x' 1 , y' 1 ), (x' 2 , respectively Characteristic points of y' 2 ) and (x' 3 , y' 3 ),
  • the N 1 is a width of a sub-block in which the control point in the reference block is located
  • the N 2 is a height of a sub-block in which the control point in the reference block is located.
  • (x 0 , y 0 ) is the coordinates of the control points in the sub-block where the feature points (x' 0 , y′ 0 ) in the reference block are located.
  • (x 1 , y 1 ) is the coordinates of the control points in the sub-block where the feature points (x' 1 , y' 1 ) in the reference block are located.
  • (x 2 , y 2 ) is the coordinates of the control points in the sub-block where the feature points (x' 2 , y' 2 ) in the reference block are located.
  • (x 3 , y 3 ) is the coordinate of the control point in the sub-block where the feature point (x′ 3 , y′ 3 ) in the reference block is located.
  • the w is the width of the reference block, and h is the height of the reference block.
  • the calculating unit is specifically configured to: according to location information and motion information of the at least two feature points in the reference block, and location information of each sub-block in the current block, The motion information of each sub-block in the current block is calculated.
  • the calculating unit is specifically configured to refer to the following formula, according to location information and motion information of the at least two feature points in the reference block, and each sub-block in the current block. Position information, and calculating motion information of each sub-block in the current block,
  • the at least two feature points include feature points of the reference block having coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ),
  • the at least two feature points including the reference block with coordinates (x '0, y' 0 ), (2 x '2, y') of the feature point (x '1, y' 1 ) and,
  • the at least two feature points include coordinates (x' 0 , y' 0 ), (x' 1 , y' 1 ), (x' 2 , y' 2 ), and (x' in the reference block. 3 , y' 3 ) feature points;
  • the vx 0 is a horizontal motion vector of a feature point (x′ 0 , y′ 0 ), and the vy 0 is a vertical motion vector of the feature point (x′ 0 , y′ 0 );
  • the v ⁇ 1 is a feature point (x '1, y' 1 ) the horizontal motion vector
  • vy 1 the feature point (x '1, y' 1 ) vertical motion vector
  • said vy 2 is a feature point (x ' 2 , y ' 2 ) a vertical motion vector
  • the vx 2 being a horizontal motion vector of a feature point (x′ 2 , y′ 2 )
  • the vy 3 being a feature point of (x′ 3 , y′ 3 ) a vertical motion vector
  • the vx 3 being a horizontal motion vector of a feature point (x' 3 , y' 3 )
  • the vx is a horizontal motion vector of a sub-block of the current block whose coordinates are (x, y)
  • the vy is a vertical motion vector of the sub-block of the current block whose coordinates are (x, y) .
  • the calculating unit is specifically configured to calculate, according to location information and motion information of the at least two feature points in the reference block, an affine motion model used by the current block. Motion information of at least two control points adopted; motion information and position information of at least two control points used according to an affine motion model used by the current block, and position information of each sub-block in the current block, The motion information of each sub-block in the current block is calculated.
  • At least two control points used by the affine motion model used by the current block are calculated according to location information and motion information of the at least two feature points in the reference block.
  • the calculation unit is configured to calculate an affine motion model used by the current block according to position information and motion information of the at least two feature points in the reference block, with reference to a formula Motion information for at least two control points used:
  • the at least two feature points include feature points of the reference block having coordinates (x′ 0 , y′ 0 ) and ( ⁇ ′ 1 , y′ 1 ),
  • the at least two feature points including the reference block with coordinates (x '0, y' 0 ), (2 x '2, y') of the feature point (x '1, y' 1 ) and,
  • the at least two feature points include coordinates (x' 0 , y' 0 ), (x' 1 , y' 1 ), (x' 2 , y' 2 ), and (x' in the reference block. 3 , y' 3 ) feature points;
  • the at least two control points used by the affine motion model used by the current block include control points in the current block with coordinates (x 4 , y 4 ) and (x 5 , y 5 ), respectively, or
  • the at least two control points used by the affine motion model used by the current block include coordinates (x 4 , y 4 ), (x 5 , y 5 ), and (x 6 , y 6 ) in the current block, respectively.
  • control points employed by the affine motion model employed by the current block include coordinates (x 4 , y 4 ), (x 5 , y 5 ), respectively, in the current block, Control points of (x 6 , y 6 ) and (x 7 , y 7 );
  • the vx 4 is a horizontal motion vector of a control point (x 4 , y 4 )
  • the vy 4 is a vertical motion vector of the control point (x 4 , y 4 )
  • the vx 5 is a control point (x) a horizontal motion vector of 5 , y 5 )
  • the vy 5 being a vertical motion vector of a control point (x 5 , y 5 )
  • the vx 6 being a horizontal motion vector of the control point (x 6 , y 6 )
  • the control point vx 7 (x 7, y 7) the horizontal motion vector
  • the motion information and the location information of the at least two control points used according to the affine motion model adopted by the current block, and the location information of each sub-block in the current block are calculated.
  • the aspect of the motion information of each sub-block in the current block, the calculating unit is configured to refer to the following formula, according to motion information and location information of at least two control points used by the affine motion model used by the current block And the position information of each sub-block in the current block, and calculating motion information of each sub-block in the current block:
  • the vx is a horizontal motion vector of the (x, y) sub-block of the current block
  • the vy is a vertical motion vector of the (x, y) sub-block of the current block.
  • the image prediction apparatus 700 can be applied to or used in a video encoding apparatus.
  • an embodiment of the present application further provides an image prediction apparatus 800, which may include: a storage component 810, and a processor 830 coupled to the storage component.
  • the storage component 810 is configured to store instructions
  • the processor 830 is configured to execute the instructions.
  • the steps performed by the file server in any of the above-described embodiments of the present application may be performed according to the instructions.
  • the processor 830 can also be referred to as a Central Processing Unit (CPU).
  • Storage component 810 can include read only memory and random access memory and provides instructions, data, and the like to processor 830.
  • a portion of storage component 810 can also include a non-volatile random access memory.
  • the components of image prediction device 800 in a particular application are coupled together, for example, by a bus system.
  • the bus system may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 840 in the figure.
  • the method disclosed in the above embodiments of the present invention may be applied to the processor 830 or implemented by the processor 830.
  • Processor 830 may be an integrated circuit chip with signal processing capabilities.
  • each step of the above method may be completed by an integrated logic circuit of hardware in the processor 830 or an instruction in a form of software.
  • the processor 830 can be a general purpose processor, a digital signal processor, an application specific integrated circuit, an off-the-shelf programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
  • the processor 830 can implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present invention.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present invention may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software modules can be located in random memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, etc., which are well established in the art.
  • the storage medium is located in storage component 810, for example, processor 830 can read the information in storage component 810, in conjunction with its hardware, to perform the steps of the above method.
  • the image prediction apparatus 800 can perform the corresponding method steps in the above-described embodiments shown in FIGS. 2-6.
  • the image prediction apparatus provided by the embodiment of the present application is applied to a video encoding apparatus or applied to a video decoding apparatus.
  • the video encoding device or the video decoding device may be any device that needs to output or store video, such as a notebook computer, a tablet computer, a personal computer, a mobile phone, or a video server.
  • the embodiment of the present application further provides a computer readable storage medium, where the program code is stored.
  • the program code includes instructions for performing some or all of the steps of any of the image prediction methods provided by embodiments of the present invention.
  • the embodiment of the present application further provides a computer program product, wherein when the computer program product is run on a computer, the computer is caused to perform some or all of the steps of the method in the foregoing method embodiments.
  • An embodiment of the present application further provides an application publishing platform, wherein the application publishing platform is configured to release a computer program product, wherein when the computer program product runs on a computer, the computer is executed to perform the foregoing methods.
  • FIG. 9-A is a schematic block diagram of a video encoder 20 that can be used in an embodiment of the present application, including an encoding end prediction module 201, a transform quantization module 202, an entropy encoding module 203, a code reconstruction module 204, and an encoding.
  • the terminal filtering module 205 and FIG. 9-B are schematic block diagrams of the video decoder 30 applicable to the embodiment of the present application, including a decoding end prediction module 206, an inverse transform inverse quantization module 207, an entropy decoding module 208, and a decoding reconstruction module 209.
  • the decoding module 210 is decoded.
  • Video encoder 20 may be used to implement an image prediction method or a video encoding method of an embodiment of the present application.
  • Video encoder 30 may be used to implement the image prediction method or video decoding method of embodiments of the present application. specific:
  • Video encoder 20 may generate one or more prediction units (PUs) that each no longer partition the CU. Each PU of a CU may be associated with a different block of pixels within a block of pixels of the CU. Video encoder 20 may generate predictive pixel blocks for each PU of the CU. Video encoder 20 may use intra prediction or inter prediction to generate predictive pixel blocks for the PU. If video encoder 20 uses intra prediction to generate a predictive pixel block for a PU, video encoder 20 may generate a predictive pixel block for the PU based on the decoded pixels of the picture associated with the PU.
  • PUs prediction units
  • video encoder 20 may generate predictiveness of the PU based on decoded pixels of one or more pictures that are different from pictures associated with the PU. Pixel block. Video encoder 20 may generate residual pixel blocks of the CU based on the predictive pixel blocks of the PU of the CU. The residual pixel block of the CU may indicate the difference between the sampled value in the predictive pixel block of the PU of the CU and the corresponding sampled value in the initial pixel block of the CU.
  • Transform quantization module 202 is operative to process the predicted residual data.
  • Video encoder 20 may perform recursive quadtree partitioning on the residual pixel blocks of the CU to partition the residual pixel blocks of the CU into one or more smaller residual pixel blocks associated with the transform units (TUs) of the CU. Because the pixels in the pixel block associated with the TU each correspond to one luma sample and two chroma samples, each TU can be associated with one luma residual sample block and two chroma residual sample blocks.
  • Video encoder 20 may apply one or more transforms to the residual sample block associated with the TU to generate a coefficient block (ie, a block of coefficients).
  • the transform can be a DCT transform or a variant thereof.
  • the coefficient block is obtained by applying a one-dimensional transform in the horizontal and vertical directions to calculate a two-dimensional transform.
  • Video encoder 20 may perform a quantization procedure for each of the coefficients in the coefficient block. Quantization generally refers to the process by which the coefficients are quantized to reduce the amount of data used to represent the coefficients, thereby providing further compression.
  • the inverse transform inverse quantization module 207 performs the inverse of the transform quantization module 202.
  • Video encoder 20 may generate a set of syntax elements that represent coefficients in the quantized coefficient block.
  • Video encoder 20 may apply an entropy encoding operation (eg, a context adaptive binary arithmetic coding (CABAC) operation) to some or all of the above syntax elements by entropy encoding module 203.
  • CABAC context adaptive binary arithmetic coding
  • video encoder 20 may binarize the syntax elements to form a binary sequence that includes one or more bits (referred to as "binary").
  • Video encoder 20 may encode a portion of the binary using regular encoding, and may use bypass encoding to encode other portions of the binary.
  • video encoder 20 may apply inverse quantization and inverse transform to the transformed coefficient block by code reconstruction module 204 to reconstruct the residual sample block from the transformed coefficient block.
  • Video encoder 20 may add the reconstructed residual sample block to a corresponding sample block of one or more predictive sample blocks to produce a reconstructed sample block.
  • video encoder 20 may reconstruct the block of pixels associated with the TU. The pixel block of each TU of the CU is reconstructed in this way until the entire pixel block reconstruction of the CU is completed.
  • video encoder 20 After video encoder 20 reconstructs the block of pixels of the CU, video encoder 20 performs a deblocking filtering operation through encoding end filtering module 205 to reduce the blockiness of the block of pixels associated with the CU. And after video encoder 20 performs the deblocking filtering operation, video encoder 20 may use sample adaptive offset (SAO) to modify the reconstructed block of pixels of the CTB of the picture. After performing these operations, video encoder 20 may store the reconstructed blocks of pixels of the CU in a decoded picture buffer for use in generating predictive blocks of pixels for other CUs.
  • SAO sample adaptive offset
  • Video decoder 30 can receive the code stream.
  • the code stream contains encoded information of video data encoded by video encoder 20 in the form of a bitstream.
  • Video decoder 30 parses the code stream by entropy decoding module 208 to extract syntax elements from the code stream.
  • video decoder 30 may perform regular decoding on partial bins and may perform bypass decoding on bins of other portions, and the bins in the code stream have mapping relationships with syntax elements, through parsing The binary gets the syntax element.
  • the process of reconstructing video data based on syntax elements is generally reciprocal to the process performed by video encoder 20 to generate syntax elements.
  • video decoder 30 may generate a predictive pixel block of a PU of a CU based on syntax elements associated with the CU.
  • video decoder 30 may inverse quantize the coefficient blocks associated with the TUs of the CU.
  • Video decoder 30 may perform an inverse transform on the inverse quantized coefficient block to reconstruct a residual pixel block associated with the TU of the CU.
  • Video decoder 30 may reconstruct a block of pixels of the CU based on the predictive pixel block and the residual pixel block.
  • video decoder 30 After video decoder 30 reconstructs the block of pixels of the CU, video decoder 30 performs a deblocking filtering operation through decoding filter module 210 to reduce the blockiness of the block of pixels associated with the CU. Additionally, video decoder 30 may perform the same SAO operations as video encoder 20 based on one or more SAO syntax elements. After video decoder 30 performs these operations, video decoder 30 may store the block of pixels of the CU in a decoded picture buffer. The decoded picture buffer can provide reference pictures for subsequent motion compensation, intra prediction, and presentation by the display device.
  • 10 and 11 are two schematic block diagrams of an electronic device 50 that can incorporate a codec that can be utilized in embodiments of the present application. 11 is a schematic diagram of an apparatus for video encoding in accordance with an embodiment of the present application. The units in Figs. 10 and 11 will be explained below.
  • the electronic device 50 can be, for example, a mobile terminal or user equipment of a wireless communication system. It should be understood that embodiments of the present application may be implemented in any electronic device or device that may require encoding and decoding, or encoding, or decoding of a video image.
  • Device 50 can include a housing 30 for incorporating and protecting the device.
  • Device 50 may also include display 32 in the form of a liquid crystal display.
  • the display may be any suitable display technology suitable for displaying images or video.
  • Device 50 may also include a keypad 34.
  • any suitable data or user interface mechanism can be utilized.
  • the user interface can be implemented as a virtual keyboard or data entry system as part of a touch sensitive display.
  • the device may include a microphone 36 or any suitable audio input, which may be a digital or analog signal input.
  • the device 50 may also include an audio output device, which in the embodiment of the present application may be any of the following: an earphone 38, a speaker, or an analog audio or digital audio output connection.
  • Device 50 may also include battery 40, and in other embodiments of the present application, the device may be powered by any suitable mobile energy device, such as a solar cell, fuel cell, or clock mechanism generator.
  • the device may also include an infrared port 42 for short-range line of sight communication with other devices.
  • device 50 may also include any suitable short range communication solution, such as a Bluetooth wireless connection or a USB/Firewire wired connection.
  • Device 50 may include a controller 56 or processor for controlling device 50.
  • the controller 56 can be coupled to a memory 58, which in the embodiments of the present application can store data in the form of data and audio in the form of images, and/or can also store instructions for execution on the controller 56.
  • Controller 56 may also be coupled to codec circuitry 54 suitable for implementing encoding and decoding of audio and/or video data or assisted encoding and decoding by controller 56.
  • the apparatus 50 may also include a card reader 48 and a smart card 46, such as a UICC and a UICC reader, for providing user information and for providing authentication information for authenticating and authorizing users on the network.
  • a card reader 48 and a smart card 46 such as a UICC and a UICC reader, for providing user information and for providing authentication information for authenticating and authorizing users on the network.
  • Apparatus 50 may also include a radio interface circuit 52 coupled to the controller and adapted to generate, for example, a wireless communication signal for communicating with a cellular communication network, a wireless communication system, or a wireless local area network. Apparatus 50 may also include an antenna 44 coupled to radio interface circuitry 52 for transmitting radio frequency signals generated at radio interface circuitry 52 to other apparatus(s) and for receiving radio frequency signals from other apparatus(s).
  • a radio interface circuit 52 coupled to the controller and adapted to generate, for example, a wireless communication signal for communicating with a cellular communication network, a wireless communication system, or a wireless local area network.
  • Apparatus 50 may also include an antenna 44 coupled to radio interface circuitry 52 for transmitting radio frequency signals generated at radio interface circuitry 52 to other apparatus(s) and for receiving radio frequency signals from other apparatus(s).
  • device 50 includes a camera capable of recording or detecting a single frame, and codec 54 or controller receives these single frames and processes them.
  • the device may receive video image data to be processed from another device prior to transmission and/or storage.
  • device 50 may receive images for encoding/decoding via a wireless or wired connection.
  • the solution of the embodiment of the present application can be applied to various electronic devices.
  • an example of the application of the embodiment of the present application to a television device and a mobile phone device is given below.
  • FIG. 12 is a schematic structural diagram of an embodiment of the present application applied to a television application.
  • the television device 900 includes an antenna 901, a tuner 902, a demultiplexer 903, a decoder 904, a video signal processor 905, a display unit 906, an audio signal processor 907, a speaker 908, an external interface 909, and a controller 910. , user interface 911, bus 912, and the like.
  • the tuner 902 extracts a signal of a desired channel from a broadcast signal received via the antenna 901, and demodulates the extracted signal.
  • the tuner 902 then outputs the encoded bit stream obtained by the demodulation to the demultiplexer 903. That is to say, the tuner 902 functions as a transmitting device in the television device 900 that receives the encoded stream of the encoded image.
  • the demultiplexer 903 separates the video stream and the audio stream of the program to be viewed from the encoded bit stream, and outputs the separated stream to the decoder 904.
  • the demultiplexer 903 also extracts auxiliary data, such as an electronic program guide, from the encoded bit stream, and provides the extracted data to the controller 910. If the encoded bit stream is scrambled, the demultiplexer 903 can descramble the encoded bit stream.
  • the decoder 904 decodes the video stream and the audio stream input from the demultiplexer 903. The decoder 904 then outputs the video data generated by the decoding to the video signal processor 905. The decoder 904 also outputs the audio data generated by the decoding to the audio signal processor 907.
  • the video signal processor 905 reproduces the video data input from the decoder 904, and displays the video data on the display unit 906.
  • the video signal processor 905 can also display an application screen provided via the network on the display unit 906. Additionally, video signal processor 905 can perform additional processing, such as noise removal, on the video data in accordance with the settings.
  • Video signal processor 905 can also generate an image of a GUI (Graphical User Interface) and overlay the resulting image on the output image.
  • GUI Graphic User Interface
  • the display unit 906 is driven by a drive signal supplied from the video signal processor 905, and displays a video or image on a video screen of a display device such as a liquid crystal display, a plasma display, or an OELD (with an organic electroluminescence display).
  • a display device such as a liquid crystal display, a plasma display, or an OELD (with an organic electroluminescence display).
  • the audio signal processor 907 performs reproduction processing, for example, digital-to-analog conversion and amplification, and the like on the audio data input from the decoder 904, and outputs the audio through the speaker 908.
  • the audio signal processor 907 can perform additional processing on the audio data, such as noise removal and the like.
  • the external interface 909 is an interface for connecting the television device 900 with an external device or network.
  • a video stream or audio stream received via external interface 909 may be decoded by decoder 904. That is, the external interface 909 is also used as a transmitting device in the television device 900 that receives the encoded stream of the encoded image.
  • Controller 910 includes a processor and a memory.
  • the memory stores programs to be executed by the processor, program data, auxiliary data, data acquired via the network, and the like. For example, when the television device 900 is booted, the program stored in the memory is read and executed by the processor.
  • the processor controls the operation of the television device 900 based on control signals input from the user interface 911.
  • the user interface 911 is connected to the controller 910.
  • the user interface 911 includes buttons and switches for the user to operate the television device 900 and a receiving unit for receiving remote control signals.
  • the user interface 911 detects an operation performed by the user via these components, generates a control signal, and outputs the generated control signal to the controller 910.
  • the bus 912 connects the tuner 902, the demultiplexer 903, the decoder 904, the video signal processor 905, the audio signal processor 907, the external interface 909, and the controller 910 to each other.
  • the decoder 904 can have the functions of the video decoding device or the image predicting device according to the above embodiment.
  • the decoder 904 can be configured to: determine a reference block of a current block, the reference block is adjacent to the current block space, the reference block is predicted by using an affine motion model; and acquiring at least two features in the reference block Position information of the point and motion information, the at least two feature points are located in a sub-block where at least two control points of the reference block are located, and the at least two control points are used by an affine motion model adopted by the reference block a control point, wherein the motion information of the sub-block in which the feature point is located is obtained based on motion information of the corresponding feature point; and the current block is calculated according to position information and motion information of the at least two feature points in the reference block And performing motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block
  • FIG. 13 is a schematic structural diagram of an embodiment of the present application applied to a mobile phone application.
  • the mobile telephone device 920 may include an antenna 921, a communication unit 922, an audio codec 923, a speaker 924, a microphone 925, a camera unit 926, an image processor 927, a demultiplexer 928, a recording/reproducing unit 929, and a display unit. 930, controller 931, operation unit 932, bus 933, and the like.
  • the antenna 921 is connected to the communication unit 922.
  • the speaker 924 and the microphone 925 are connected to the audio codec 923.
  • the operation unit 932 is connected to the controller 931.
  • the bus 933 connects the communication unit 922, the audio codec 923, the camera unit 926, the image processor 927, the demultiplexer 928, the recording/reproducing unit 929, the display unit 930, and the controller 931 to each other.
  • the mobile telephone device 920 performs operations in various operational modes, such as transmission/reception of audio signals, transmission/reception of electronic mail and image data, photographing of images, recording of data, etc., the various modes of operation including voice calls Mode, data communication mode, imaging mode, and video telephony mode.
  • the analog audio signal generated by the microphone 925 is supplied to the audio codec 923.
  • the audio codec 923 converts the analog audio signal into audio data, performs analog-to-digital conversion on the converted audio data, and compresses the audio data.
  • the audio codec 923 then outputs the audio data obtained as a result of the compression to the communication unit 922.
  • the communication unit 922 encodes and modulates the audio data to generate a signal to be transmitted.
  • the communication unit 922 then transmits the generated signal to be transmitted to the base station via the antenna 921.
  • the communication unit 922 also amplifies the radio signal received via the antenna 921 and performs frequency conversion on the radio signal received via the antenna 921 to obtain a received signal.
  • the communication unit 922 then demodulates and decodes the received signal to generate audio data, and outputs the generated audio data to the audio codec 923.
  • the audio codec 923 decompresses the audio data and performs digital to analog conversion on the audio data to generate an analog audio signal.
  • the audio codec 923 then supplies the generated audio signal to the speaker 924 to output audio from the speaker 924.
  • the controller 931 In the data communication mode, for example, the controller 931 generates text data to be included in the email in accordance with an operation by the user via the operation unit 932.
  • the controller 931 also displays text on the display unit 930.
  • the controller 931 also generates email data in response to an instruction from the user for transmission via the operation unit 932, and outputs the generated email data to the communication unit 922.
  • the communication unit 922 encodes and modulates the email data to generate a signal to be transmitted.
  • the communication unit 922 then transmits the generated signal to be transmitted to the base station via the antenna 921.
  • the communication unit 922 also amplifies the radio signal received via the antenna 921 and performs frequency conversion on the radio signal received via the antenna 921 to obtain a received signal.
  • the communication unit 922 then demodulates and decodes the received signal to recover the email data, and outputs the restored email data to the controller 931.
  • the controller 931 displays the content of the email on the display unit 930, and stores the email data in the storage medium of the recording/reproducing unit 929.
  • the recording/reproducing unit 929 includes a readable/writable storage medium.
  • the storage medium may be an internal storage medium, or may be an externally mounted storage medium such as a hard disk, a magnetic disk, a magneto-optical disk, a USB (Universal Serial Bus) memory, or a memory card.
  • USB Universal Serial Bus
  • the camera unit 926 images an object to generate image data, and outputs the generated image data to the image processor 927.
  • the image processor 927 encodes the image data input from the camera unit 926, and stores the encoded stream in the storage medium of the storage/reproduction unit 929.
  • the demultiplexer 928 In the video telephony mode, the demultiplexer 928 multiplexes the video stream encoded by the image processor 927 and the audio stream input from the audio codec 923, and outputs the multiplexed stream to the communication unit 922. .
  • Communication unit 922 encodes and modulates the multiplexed stream to produce a signal to be transmitted.
  • the communication unit 922 then transmits the generated signal to be transmitted to the base station via the antenna 921.
  • the communication unit 922 also amplifies the radio signal received via the antenna 921 and performs frequency conversion on the radio signal received via the antenna 921 to obtain a received signal.
  • the signal to be transmitted and the received signal may comprise an encoded bit stream.
  • the communication unit 922 then demodulates and decodes the received signal to recover the stream, and outputs the recovered stream to the demultiplexer 928.
  • the demultiplexer 928 separates the video stream and the audio stream from the input stream, outputs the video stream to the image processor 927, and outputs the audio stream to the audio codec 923.
  • Image processor 927 decodes the video stream to produce video data.
  • the video data is supplied to the display unit 930, and a series of images are displayed by the display unit 930.
  • the audio codec 923 decompresses the audio stream and performs digital to analog conversion on the audio stream to produce an analog audio signal.
  • the audio codec 923 then supplies the generated audio signal to the speaker 924 to output audio from the speaker 924.
  • the image processor 927 has the functions of the video encoding device (video encoder, image predicting device) and/or video decoding device (video decoder) according to the above embodiment.
  • the image processor 927 can be configured to determine a reference block of a current block, the reference block is adjacent to the current block space, the reference block is predicted using an affine motion model; and at least two features in the reference block are acquired Position information of the point and motion information, the at least two feature points are located in a sub-block where at least two control points of the reference block are located, and the at least two control points are used by an affine motion model adopted by the reference block a control point, wherein the motion information of the sub-block in which the feature point is located is obtained based on motion information of the corresponding feature point; and the current block is calculated according to position information and motion information of the at least two feature points in the reference block And performing motion compensation prediction on each sub-block of the current block according to motion information of each sub-block in the current block to obtain a prediction block of the current block.
  • system and “network” are used interchangeably herein. It should be understood that the term “and/or” herein is merely an association relationship describing an associated object, indicating that there may be three relationships, such as A and/or B, which may indicate that A exists separately, and A and B exist at the same time. There are three cases of B alone. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • B corresponding to A means that B is associated with A, and B can be determined from A.
  • determining B from A does not mean that B is only determined based on A, and that B can also be determined based on A and/or other information.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center via wired (eg, coaxial cable, fiber optic, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (the magnetic medium may be, for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (such as an optical disk), or a semiconductor medium (such as a solid state hard disk) or the like.
  • the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
  • the disclosed device may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the above units is only a logical function division.
  • multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be in the form of an electrical or other form through some interface, indirect coupling or communication connection of the device or unit.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or employed as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .

Landscapes

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

Abstract

一种图像预测方法和相关装置,图像预测方法包括:确定当前块的参考块,所述参考块与所述当前块空间相邻,参考块采用仿射运动模型进行预测;获取所述参考块中的至少两个特征点的位置信息与运动信息,所述至少两个特征点位于参考块的至少两个控制点所在子块,所述至少两个控制点为预测所述参考块采用的仿射运动模型所采用的控制点,特征点所在子块的运动信息基于相应特征点的运动信息得到;根据参考块中的所述至少两个特征点的位置信息与运动信息,计算得到当前块中各子块的运动信息;根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。本发明实施例方案有利于提升当前块预测精确性。

Description

图像预测方法和相关设备 技术领域
本发明涉及视频编码和视频解码领域,具体涉及一种图像预测方法和相关设备。
背景技术
随着光电采集技术的发展及不断增长的高清数字视频需求,视频数据量越来越大,有限异构的传输带宽、多样化的视频应用不断地对视频编码效率提出了更高的需求,高性能视频编码(英文:high efficient video coding,缩写:HEVC)标准的制定工作因需启动。
视频编码压缩的基本原理是利用空域、时域和码字之间的相关性,尽可能去除冗余。目前流行做法是采用基于块的混合视频编码框架,通过预测(包括帧内预测和帧间预测)、变换、量化、熵编码等步骤实现视频编码压缩。这种编码框架,显示了很强的生命力,HEVC也仍沿用这种基于块的混合视频编码框架。
在各种视频编/解码方案中,运动估计/运动补偿是一种影响编/解码性能的关键技术。其中,现有很多视频编/解码方案中,一般假设物体的运动是满足平动运动,整个物体的各个部分有相同的运动。现有的运动估计/运动补偿算法基本都是建立在平动运动模型(英文:translational motion model)的基础上的块运动补偿算法。现有帧间预测主要采用基于平动运动模型的基于块的运动补偿预测(英文:motion compensation)。针对非平动运动设计的一些非平动运动模型(例如彷射运动模型)也在逐步提出。
实践发现,传统基于彷射运动模型进行预测的机制,利用参考块对当前块进行预测的精确性有时候相对较低,这样在某些场景下就难以满足高精度预测要求。
发明内容
本发明实施例提供应图像预测方法和相关设备,以期提高利用参考块对当前块进行预测的精确性。
本发明实施例第一方面提供一种图像预测方法,包括:
图像预测装置确定当前块的参考块,其中,所述参考块与所述当前块空间相邻,所述参考块采用仿射运动模型进行预测。获取所述参考块中的至少两个特征点的位置信息与运动信息,其中,所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为所述参考块采用的仿射运动模型所采用的控制点(即所述至少两个控制点为预测所述参考块采用的仿射运动模型所采用的控制点),其中,所述特征点所在子块的运动信息基于相应特征点的运动信息得到(具体例如,特征点的运动信息被作为这个特征点所在子块的运动信息)。图像预测装置根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息。图像预测装置根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
本申请各实施例中的运动信息例如为运动矢量,本申请各实施例中的位置信息例如为坐标。
本申请各实施例中,参考块采用的仿射运动模型例如与当前块采用的仿射运动模型相同或相似。所谓“参考块采用的仿射运动模型”,也就是预测参考块采用的仿射运动模型。所谓“当前块采用的仿射运动模型”,也就是预测当前块采用的仿射运动模型。
当前块的参考块例如可为与当前块的左上顶点相邻的图像块、与当前块的左下顶点相邻的图像块、 与当前块的右上顶点相邻的图像块或与当前块的右下顶点相邻的图像块,当然当前块的参考块例如也可以是与当前块的相邻的其他图像块。
可以看出,上述技术方案中,由于是根据当前块的至少两个特征点的位置信息与运动信息,来计算得到当前块中各子块的运动信息,并且,所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为预测所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;这使得计算当前块中各子块的运动信息所采用的参考块的特征点的位置信息与运动信息之间匹配度较高,实践发现这样有利于提升当前块中各子块的运动信息计算准确性,进而提升利用参考块对当前块进行预测的精确性。
其中,本申请实施例提供的图像预测方法可应用于视频编码过程中或应用于视频解码过程中。
本申请第二方面还提供一种图像预测装置,包括:
确定单元,用于确定当前块的参考块,其中,所述参考块与所述当前块空间相邻,所述参考块采用仿射运动模型进行预测。
获取单元,用于获取所述参考块之中的至少两个特征点的位置信息与运动信息,所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到。
计算单元,用于根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息。
预测单元,用于根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
其中,本申请实施例提供的所述图像预测装置应用于视频编码装置中或应用于视频解码装置中。其中,该视频编码装置或视频解码装置可以是任何需要输出或存储视频的装置,如笔记本电脑、平板电脑、个人电脑、手机或视频服务器等等设备。
其中,视频编码装置和视频解码装置可按照约定的相同的块划分方式来进行子块划分。或者,视频编码装置也可将块划分方式的指示写入码流,进而将视频编码装置采用的块划分方式通知视频解码装置,以保持视频编码装置和视频解码装置采用相同的块划分方式。
结合在以上任意一方面的技术方案,在一些可能的实施方式中,所述特征点位于所述参考块的控制点所在子块的中心位置。也就是说,所述特征点可为其所在子块的中心位置的像素点。实践发现,若将子块的中心位置的像素点的运动信息(运动矢量)作为这个子块的运动信息,有利于获得相对更好的预测精确性。
结合在以上任意一方面的技术方案,在一些可能的实施方式中,所述参考块中的特征点的位置信息,通过所述参考块中的控制点的位置信息进行如下方式的偏移而得到:(x′,y′)=(x+a,y+b)。
其中,(x,y)为所述参考块的1个控制点的坐标,(x′,y′)为所述参考块的坐标为(x,y)的控制点所在子块中的特征点的坐标,所述a为水平偏移量,所述b为垂直偏移量,所述a和所述b不等于0。
结合在以上任意一方面的技术方案,在一些可能的实施方式中,所述参考块的所述至少两个控制点包括所述参考块的左上顶点、右上顶点、左下顶点和右下顶点中的至少1个。在所述参考块的左上顶点位置坐标为(x 0,y 0),且所述参考块的宽为w,且所述参考块的高为h的情况下,
Figure PCTCN2018071351-appb-000001
其中,(x 1,y 1)为所述参考块的右上顶点的坐标,(x 2,y 2)为所述参考块的左下顶点的坐标,(x 3,y 3)为所述参考块的右下顶点的坐标。
例如在一些可能的实施方式中,所述至少两个特征点可包括所述参考块中的坐标分别为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,其中,
Figure PCTCN2018071351-appb-000002
或者,
Figure PCTCN2018071351-appb-000003
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,其中,所述w为所述参考块的宽度。
又例如在一些可能的实施方式中,所述至少两个特征点可包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,其中,
Figure PCTCN2018071351-appb-000004
或者,
Figure PCTCN2018071351-appb-000005
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标,所述w为所述参考块的宽度,所述h为所述参考块的高度。
又例如在一些可能的实施方式中,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点,其中,
Figure PCTCN2018071351-appb-000006
或者,
Figure PCTCN2018071351-appb-000007
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标,所述w为所述参考块的宽度,所述h为所述参考块的高度。
在一些可能的实施方式中,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息包括:根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
具体例如,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息包括:参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息,
Figure PCTCN2018071351-appb-000008
或者,
Figure PCTCN2018071351-appb-000009
或者,
Figure PCTCN2018071351-appb-000010
其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点;
其中,所述vx 0为特征点(x′ 0,y′ 0)的水平运动矢量,所述vy 0为特征点(x′ 0,y′ 0)的竖直运动矢量;所述vx 1为特征点(x′ 1,y′ 1)的水平运动矢量,所述vy 1为特征点(x′ 1,y′ 1)的竖直运动矢量,其中,所述vy 2为特征点的(x′ 2,y′ 2)竖直运动矢量,所述vx 2为特征点(x′ 2,y′ 2)的水平运动矢量,所述vy 3为特征点的(x′ 3,y′ 3)竖直运动矢量,所述vx 3为特征点(x′ 3,y′ 3)的水平运动矢量;
其中,所述vx为所述当前块的坐标为(x,y)的子块的水平运动矢量,所述vy为所述当前块的坐标为(x,y)的子块的竖直运动矢量。
在一些可能的实施方式中,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息包括:根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息;根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
其中,所述当前块采用的仿射运动模型所采用的至少两个控制点例如可包括当前块的左上顶点、左下顶点、右上顶点和右下顶点之中的至少两个。
具体例如,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息包括:参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息:
Figure PCTCN2018071351-appb-000011
Figure PCTCN2018071351-appb-000012
或者,
Figure PCTCN2018071351-appb-000013
Figure PCTCN2018071351-appb-000014
Figure PCTCN2018071351-appb-000015
或者,
Figure PCTCN2018071351-appb-000016
Figure PCTCN2018071351-appb-000017
Figure PCTCN2018071351-appb-000018
Figure PCTCN2018071351-appb-000019
其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点;
所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)和(x 5,y 5)的控制点,或所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)和(x 6,y 6)的控制点;或所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)、(x 6,y 6)和(x 7,y 7)的控制点;
其中,所述vx 4为控制点(x 4,y 4)的水平运动矢量,所述vy 4为控制点(x 4,y 4)的竖直运动矢量,所述vx 5为控制点(x 5,y 5)的水平运动矢量,所述vy 5为控制点(x 5,y 5)的竖直运动矢量,所述vx 6为控制点(x 6,y 6)的水平运动矢量,所述vy 6为控制点(x 6,y 6)的竖直运动矢量,所述vx 7为控制点(x 7,y 7)的水平运动矢量,所述vy 7为控制点(x 7,y 7)的竖直运动矢量。
具体例如,所述根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息,包括:参考如下公式,根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息:
Figure PCTCN2018071351-appb-000020
或者,
Figure PCTCN2018071351-appb-000021
或者,
Figure PCTCN2018071351-appb-000022
其中,所述vx为所述当前块的坐标为(x,y)的子块的水平运动矢量,所述vy为所述当前块的坐标为(x,y)的子块的竖直运动矢量。
本发明实施例第三方面还一种图像预测装置,包括:相互耦合的处理器和存储部件。其中,所述处理器用于调用所述存储器中存储的代码,以执行本发明实施例提供的任意一种图像预测方法的部分或全部步骤。
本申请实施例的第四方面提供一种视频系统,包括:视频编码装置和视频解码装置,其中,所述视频编码装置或视频解码装置用于执行本发明实施例提供的任意一种图像预测方法的部分或全部步骤。
此外,本申请实施例第五方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储了程序代码。其中,所述程序代码包括用于执行本发明实施例提供的任意一种图像预测方法的部分或全部步骤的指令。
此外,本申请实施例第六方面提供了一种计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行本发明实施例提供的任意一种图像预测方法的部分或全部步骤。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要采用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下还可以根据这些附图获得其他的附图。
图1-a~图1-b为本发明实施例提供的几种图像块的划分示意图;
图1-c为本发明实施例提供的一种帧间预测的示意图;
图2为本发明实施例提供的一种图像预测方法的流程示意图;
图3-a为本发明实施例提供的另一种图像预测方法的流程示意图;
图3-b为本发明实施例提供的一种参考块的可能位置的示意图;
图3-c~图3-e为本发明实施例提供的可能参考块的示意图;
图3-f~图3-g为本发明实施例提供的参考块的子块划分的示意图;
图3-h为本发明实施例提供的参考块中控制点和特征点的可能位置关系的示意图;
图3-i为本发明实施例提供的几种非平动运动的示意图;
图4为本发明实施例提供的另一种图像预测方法的流程示意图;
图5为本发明实施例提供的另一种图像预测方法的流程示意图;
图6为本发明实施例提供的另一种图像预测方法的流程示意图;
图7为本发明实施例提供的一种图像预测装置的示意图;
图8为本发明实施例提供的另一种图像预测装置的示意图;
图9-A是本申请实施例提供的一种视频编码器的示意图;
图9-B是本申请实施例提供的一种视频解码器的示意图;
图10是本申请实施例提供的电子装置的一种示意性框图;
图11是本申请实施例提供的电子装置的另一种示意性框图;
图12是本发明实施例适用于电视机应用的示意性结构图;
图13是本发明实施例适用于移动电话应用的示意性结构图。
具体实施方式
本发明实施例提供应图像预测方法和相关设备。
本发明说明书、权利要求书和附图中出现的术语“第一”、“第二”和“第三”等是用于区别不同的对象,而并非用于描述特定的顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
下面先对本发明实施例可能涉及的一些概念进行简单介绍。
在多数编码框架中,视频序列包括一系列图像(英文:picture),图像被进一步划分为切片(英文:slice),slice再被划分为块(英文:block)。视频编码以块为单位,可从picture的左上角位置开始从左到右从上到下一行一行进行编码处理。在一些新的视频编码标准中,block的概念被进一步扩展。在H.264标准中有宏块(英文:macroblock,缩写:MB),MB可进一步划分成多个可用于预测编码的预测块(英文:partition)。其中,在HEVC标准中,采用编码单元(英文:coding unit,缩写:CU),预测单元(英文:prediction unit,缩写:PU)和变换单元(英文:transform unit,缩写: TU)等基本概念,从功能上划分了多种Unit,并采用全新的基于树结构进行描述。比如CU可以按照四叉树进行划分为更小的CU,而更小的CU还可以继续划分,从而形成一种四叉树结构。对于PU和TU也有类似的树结构。无论CU,PU还是TU,本质上都属于块block的概念,CU类似于宏块MB或者编码块,是对编码图像进行划分和编码的基本单元。PU可以对应预测块,是预测编码的基本单元。对CU按照划分模式进一步划分成多个PU。TU可以对应变换块,是对预测残差进行变换的基本单元。高性能视频编码(英文:high efficiency video coding,缩写:HEVC)标准中则可以把它们统一称之为编码树块(英文:coding tree block,缩写:CTB)等等。
在HEVC标准中,编码单元的大小可包括64×64,32×32,16×16和8×8等四个级别,每个级别的编码单元按照帧内预测和帧间预测由可以划分为不同大小的预测单元。其中,例如图1-a和图1-b所示,图1-a举例示出了一种与帧内预测对应的预测单元划分方式,图1-b举例示出了几种与帧间预测对应的预测单元划分方式。图1-c为一种帧间预测的示意图。现有帧间预测主要采用基于平动运动模型的基于块的运动补偿预测。而针对非平动运动设计的一些非平动运动模型(例如彷射运动模型)也在逐步提出。图3-i举例示出了旋转运动、缩放运动和彷射运动等非平动运动方式。
在视频编码技术发展演进过程中,业界的视频编码专家们想了各种方法来利用相邻编解码块之间的时空相关性来努力提高编码效率。举例来说,在H264/高级视频编码(英文:advanced video coding,缩写:AVC)标准中,跳过模式(skip mode)编码和直接模式(direct mode)编码成为提高编码效率的有效工具,在低码率时采用这两种编码模式的块通常可能占到整个编码序列的一半以上。当采用跳过模式编码时,在码流中传递一个跳过模式标记,就可利用周边运动矢量推导得到当前图像块的运动矢量,根据该运动矢量来直接的拷贝参考块的值作为当前图像块的重建值。当采用直接模式编码时,编码器可以利用周边运动矢量推导得到当前图像块的运动矢量,根据该运动矢量直接拷贝参考块的值作为当前图像块的预测值,在编码端利用该预测值对当前图像块进行编码预测。
下面继续探讨本发明实施例的技术方案。
下面先介绍本发明实施例提供的图像预测方法。本发明实施例提供的图像预测方法的执行主体是视频编码装置或视频解码装置,其中,该视频编码装置或视频解码装置可以是任何需要输出或存储视频的装置,如笔记本电脑、平板电脑、个人电脑、手机或视频服务器等设备。
请参见图2,图2为本发明的一个实施例提供的一种图像预测方法的流程示意图。其中,图2举例所示,本发明的一个实施例提供的一种图像预测方法可以包括:
S201、图像预测装置确定当前块的参考块。
其中,所述参考块(即参考图像块)与所述当前块(即当前图像块)空间相邻。所述参考块采用仿射运动模型进行预测(运动补偿预测)。例如在编码端或解码端,可从当前块的空间相邻块之中,按照预设选择策略选择1个图像块作为当前块的参考块。
当前块的参考块例如可为与当前块的左上顶点相邻的图像块、与当前块的左下顶点相邻的图像块、与当前块的右上顶点相邻的图像块或与当前块的右下顶点相邻的图像块等。当然,当前块的参考块例如也可以是与当前块的相邻的其他图像块。
S202、图像预测装置获取所述参考块中的至少两个特征点的位置信息与运动信息。
所述至少两个特征点位于所述参考块的至少两个控制点所在子块。所述至少两个控制点为所述参考块采用的仿射运动模型所采用的控制点。所述特征点所在子块的运动信息基于相应特征点的运动信息得 到(具体例如,特征点的运动信息被作为这个特征点所在子块的运动信息)。
可以理解,所述至少两个特征点例如可以是2个、3个、4个或其他数量的特征点。
可以理解,所述至少两个控制点例如可以是2个、3个、4个或其他数量的控制点。
例如预测所述参考块采用的仿射运动模型所采用的控制点可包括所述参考块的左上顶点、左下顶点、右上顶点和右下顶点中的至少1个。在所述参考块的左上顶点位置坐标为(x 0,y 0),且所述参考块的宽为w,且所述参考块的高为h的情况下,
Figure PCTCN2018071351-appb-000023
其中,(x 1,y 1)为所述参考块的右上顶点的坐标,(x 2,y 2)为所述参考块的左下顶点的坐标,(x 3,y 3)为所述参考块的右下顶点的坐标。
举例来说,所述特征点可位于参考块的控制点所在子块的中心位置。也就是说,所述特征点可为其所在子块的中心位置的像素点。实践发现,若将子块的中心位置的像素点的运动信息(运动矢量)作为这个子块的运动信息,有利于获得相对更好的预测精确性。
具体例如,假设预测所述参考块采用的仿射运动模型所采用的控制点包括左上顶点、左下顶点和右上顶点,那么,所述参考块中的至少两个特征点例如可以包括如下像素点中的至少2个:所述参考块的左上顶点所在子块的中心位置的像素点、左下顶点所在子块的中心位置的像素点和右上顶点所在子块的中心位置的像素点。
本申请各实施例中的运动信息例如为运动矢量。本申请各实施例中的位置信息例如为坐标。
本申请各实施例中,预测参考块采用的仿射运动模型例如与预测当前块采用的仿射运动模型相同或相似。
所述参考块采用的仿射运动模型所采用的至少两个特征点(所述至少两个特征点例如为2个、3个或4个特征点)的位置信息,可通过所述参考块的控制点的位置信息进行如下方式的偏移而得到:(x′,y′)=(x+a,y+b)。其中,(x,y)为所述参考块的1个控制点的坐标(x为水平坐标、y为竖直坐标),(x′,y′)为所述参考块的坐标为(x,y)的控制点所对应的特征点的坐标(x′为水平坐标、y′为竖直坐标),其中,所述a为水平偏移量,所述b为垂直偏移量,其中,所述a和所述b不等于0。
例如所述a可等于1、2、3、4、5、6、7、-1、-2、-3、-4、-5或其他值。
例如所述b可等于1、2、3、4、5、6、7、-1、-2、-3、-4、-5或其他值。
S203、图像预测装置根据所述参考块的至少两个特征点的位置信息和运动信息,计算得到所述当前块中各子块的运动信息。
举例来说,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息包括:根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
又例如,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息包括:根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得 到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息;根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
S204、图像预测装置根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
由上可见,本实施例提供的方案中,由于是根据当前块的至少两个特征点的位置信息与运动信息,来计算得到当前块中各子块的运动信息,且所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为预测所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;这使得计算当前块中各子块的运动信息所采用的参考块的特征点的位置信息与运动信息之间匹配度较高,实践发现这样有利于提升当前块中各子块的运动信息计算准确性,进而提升利用参考块对当前块进行预测的精确性。
例如若采用的参考块的特征点的运动信息和控制点的位置信息来计算当前块中各子块的运动信息,那么由于特征点的运动信息和控制点的位置信息之间不匹配(至少匹配性低于特征点的运动信息与位置信息之间匹配性),这样很可能影响到对当前块进行预测的精确性。
其中,所述图像预测方法可应用于视频编码过程中或者所述图像预测方法可应用于视频解码过程中。
为便于更好的理解本发明实施例的技术方案,下面从编码端和解码端的角度进行详细举例介绍。
请参见图3-a,图3-a为本发明的另一个实施例提供的另一种图像预测方法的流程示意图。其中,图3-a举例所示,本发明的另一个实施例提供的另一种图像预测方法可以包括:
301、视频编码装置确定当前块中的参考块。
例如图3-b所示,视频编码装置可按照像素单元A、B、C、D和E的顺序遍历当前块的空间相邻的五个图像块,可将找到的第1个采用仿射运动模型进行预测的图像块作为当前块中的参考块,当然也可将像素单元A、B、C、D和E所在图像块中的任意一个采用仿射运动模型进行预测的图像块作为当前块中的参考块。
其中,像素单元A和像素单元D与当前块的左下顶点相邻,像素单元B和像素单元C与当前块的右上顶点相邻,像素单元E与当前块的左上顶点相邻。
其中,本发明各实施例中的像素单元可包括一个或多个像素,例如像素单元可以为2*2的像素块、2*1的像素块、2*1的像素块、4*4的像素块或者4*2的像素块等。
例如按照图3-b所示A、B、C、D、E的顺序遍历当前块的空间相邻的五个位置的图像块。假设像素单元A所在图像块采用仿射运动模型进行预测,那么如图3-c举例所示,可将像素单元A所在图像块作为当前块中的参考块。又假设像素单元A所在图像块未采用仿射运动模型进行预测,而像素单元B所在图像块采用仿射运动模型进行预测,如图3-d举例所示,可将像素单元B所在图像块作为当前块中的参考块。又假设像素单元A和B所在图像块均未采用仿射运动模型进行预测,而像素单元C所在图像块采用仿射运动模型进行预测,那么如图3-e举例所示,可将像素单元C所在图像块作为当前块中的参考块。又假设像素单元A、B和C所在图像块均未采用仿射运动模型进行预测,而像素单元D所在图像块采用仿射运动模型进行预测,那么可将像素单元D所在图像块作为当前块中的参考块。又假设像素单元A、B、C和D所在图像块均未采用仿射运动模型进行预测,而像素单元E所在图像块采用仿射运动模型进行预测,那么便可以将像素单元E所在图像块作为当前块中的参考块。
此外,在另一些可能实施方式中,当像素单元A、B、C、D和E所在图像块中的至少两个图像块采用仿射运动模型进行预测,也可将采用仿射运动模型进行预测的这些图像块作为候选参考块,分别计算采用这些候选参考块来进行当前块预测是的预测质量,将预测质量相对最好的那个候选参考块作为当前块的参考块。
当然,选择当前块的参考块的机制并不限于上述举例。解码端采用与编码端同样的策略来选择当前块的参考块。
302、视频编码装置利用所述参考块的子块划分信息和参考块采用的仿射运动模型所采用的至少两个控制点的位置信息,推导出所述参考块中的至少两个特征点的位置信息。
所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述特征点的运动信息被作为这个特征点所在子块的运动信息。
需要说明的是,编码端和解码端可按相同子块划分方式进行参考块的子块划分。例如图3-f举例所示,可以固定的划分为4*4大小的子块。或例如图3-g举例所示,也可以固定划分为8*8大小的子块。当然,也可以通过参考块的尺寸信息、顶点运动信息等推导出相应的子块划分方式,在此不做限定。
下面针对所述至少两个特征点包括2个、3个和4个特征点的情况分别进行举例说明。
具体例如,所述至少两个特征点可包括所述参考块中的坐标分别为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,其中,
Figure PCTCN2018071351-appb-000024
或者,
Figure PCTCN2018071351-appb-000025
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,其中,所述w为所述参考块的宽度。
又例如当所述至少两个特征点包括参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,其中,
Figure PCTCN2018071351-appb-000026
或者,
Figure PCTCN2018071351-appb-000027
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标,所述w为所述参考块的宽度,所述h为所述参考块的高度。
又例如,在一些可能实施方式中,当所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点,其中,
Figure PCTCN2018071351-appb-000028
或者,
Figure PCTCN2018071351-appb-000029
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标,其中,(x 3,y 3)为所述参考块中的特征点(x′ 3,y′ 3)所在子块中的控制点的坐标,所述w为所述参考块的宽度,所述h为所述参考块的高度。
参见图3-h,图3-h举例示出了所述参考块的各子块中的控制点和特征点之间的一种可能位置关系,控制点位于子块的顶点,而相应的特征点位于子块的中心位置,当子块存在多个中心位置时,特征点则可位于子块的任意一个中心位置。
例如预测所述参考块采用的仿射运动模型所采用的控制点可包括所述参考块的左上顶点、左下顶点、右上顶点和右下顶点中的至少1个。在所述参考块的左上顶点位置坐标为(x 0,y 0),且所述参考块的宽为w,且所述参考块的高为h的情况下,
Figure PCTCN2018071351-appb-000030
其中,(x 1,y 1)为所述参考块的右上顶点的坐标,(x 2,y 2)为所述参考块的左下顶点的坐标,(x 3,y 3)为所述参考块的右下顶点的坐标。
当然,位于同一子块中的控制点和特征点之间的位置关系并不限于图3-h所示举例。
可以理解,所述至少两个特征点为其他情况的实现方式以此类推。
303、视频编码装置根据所述参考块的至少两个特征点的位置信息与运动信息,以及当前块的各子块的位置信息,计算得到所述当前块中各子块的运动信息。
其中,所述当前块中各子块的运动信息可作为相应子块内所有像素点的运动信息。所述当前块中的子块的中心像素点的位置信息可作为相应子块的位置信息。
具体例如,可参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息,
Figure PCTCN2018071351-appb-000031
或者,
Figure PCTCN2018071351-appb-000032
或者,
Figure PCTCN2018071351-appb-000033
其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点。
其中,所述vx 0为特征点(x′ 0,y′ 0)的水平运动矢量,所述vy 0为特征点(x′ 0,y′ 0)的竖直运动矢量;所述vx 1为特征点(x′ 1,y′ 1)的水平运动矢量,所述vy 1为特征点(x′ 1,y′ 1)的竖直运动矢量,其中,所述vy 2为特征点的(x′ 2,y′ 2)竖直运动矢量,所述vx 2为特征点(x′ 2,y′ 2)的水平运动矢量,所述vy 3为特征点的(x′ 3,y′ 3)竖直运动矢量,所述vx 3为特征点(x′ 3,y′ 3)的水平运动矢量。
其中,所述vx为所述当前块的坐标为(x,y)的子块的水平运动矢量,所述vy为所述当前块的坐标为(x,y)的子块的竖直运动矢量。
需要说明,本实施例中主要基于2个、3个和4个特征点的运动信息进行推导进行举例说明,其他情况可以此类推。
304、视频编码装置根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。具体的,利用当前块中的每个子块的运动信息获得每个子块中的各像素点的预测值,对当前块中的每个子块的各像素点的预测值进行运动补偿预测以得到当前块的预测块。
305、视频编码装置基于当前块的预测块得到当前块的预测残差。视频编码装置可将当前图像块的预测残差写入视频码流。
由上可见,本实施例方案中,由于视频编码装置是根据当前块的至少两个特征点的位置信息与运动信息,来计算得到当前块中各子块的运动信息,并且所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为预测所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;这使得视频编码装置计算当前块中各子块的运动信息所采用的参考块的特征点的位置信息与运动信息之间匹配度较高,实践发现,这样有利于提升当前块中各子块的运动信息计算准确性,进而提升利用参考块对当前块进行预测的精确性。
请参见图4,图4为本发明的另一个实施例提供的另一种图像预测方法的流程示意图。其中,图4举例所示,本发明的另一个实施例提供的另一种图像预测方法可以包括:
401、视频编码装置确定当前块中的参考块。
402、视频编码装置利用所述参考块的子块划分信息和参考块采用的仿射运动模型所采用的至少两个控制点的位置信息,推导出所述参考块中的至少两个特征点的位置信息。
步骤401和402的具体实现方式,可参考步骤301和302的相关描述,此处不在赘述。
403、视频编码装置根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息。其中,所述当前块中各子块的运动信息可作为相应子块内所有像素点的运动信息。所述当前块中的子块的中心像素点的位置信息可作为相应子块的位置信息。
具体例如,可参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息:
Figure PCTCN2018071351-appb-000034
Figure PCTCN2018071351-appb-000035
或者,
Figure PCTCN2018071351-appb-000036
Figure PCTCN2018071351-appb-000037
Figure PCTCN2018071351-appb-000038
或者,
Figure PCTCN2018071351-appb-000039
Figure PCTCN2018071351-appb-000040
Figure PCTCN2018071351-appb-000041
Figure PCTCN2018071351-appb-000042
其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点;
其中,当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)和(x 5,y 5)的控制点,或者所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)和(x 6,y 6)的控制点;或所述当前块采用的仿射运动模型所 采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)、(x 6,y 6)和(x 7,y 7)的控制点。
其中,所述vx 4为控制点(x 4,y 4)的水平运动矢量,所述vy 4为控制点(x 4,y 4)的竖直运动矢量,所述vx 5为控制点(x 5,y 5)的水平运动矢量,所述vy 5为控制点(x 5,y 5)的竖直运动矢量,所述vx 6为控制点(x 6,y 6)的水平运动矢量,所述vy 6为控制点(x 6,y 6)的竖直运动矢量,所述vx 7为控制点(x 7,y 7)的水平运动矢量,所述vy 7为控制点(x 7,y 7)的竖直运动矢量。
需要说明,本实施例中主要基于2个、3个和4个特征点的运动信息进行推导进行举例说明,其他情况可以此类推。
404、视频编码装置根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
例如可参考如下公式,根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息:
Figure PCTCN2018071351-appb-000043
或者,
Figure PCTCN2018071351-appb-000044
或者,
Figure PCTCN2018071351-appb-000045
其中,所述vx为所述当前块的坐标为(x,y)的子块的水平运动矢量,所述vy为所述当前块的坐标为(x,y)的子块的竖直运动矢量。
405、视频编码装置根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
具体的,利用当前块中的每个子块的运动信息获得每个子块中的各像素点的预测值,对当前块中的每个子块的各像素点的预测值进行运动补偿预测以得到当前块的预测块。
406、视频编码装置基于当前块的预测块得到当前块的预测残差。视频编码装置可将当前图像块的预测残差写入视频码流。
由上可见,本实施例方案中,由于视频编码装置是根据当前块的至少两个特征点的位置信息与运动信息,计算得到当前块采用的仿射运动模型所采用的至少两个控制点的运动信息,在基于当前块采用的仿射运动模型所采用的至少两个控制点的运动信息来计算得到当前块中各子块的运动信息,且所述至少两个特征点位于参考块的至少两个控制点所在子块,所述至少两个控制点为预测所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;这使得视频编码装置计算当前块中各子块的运动信息所采用的参考块的特征点的位置信息与运动信息之间匹配度可较高,实践发现,这样有利于提升当前块中各子块的运动信息计算准确性,进而提升利用参考块对当前块进行预测的精确性。
请参见图5,图5为本发明的另一个实施例提供的另一种图像预测方法的流程示意图。其中,图5举例所示,本发明的另一个实施例提供的另一种图像预测方法可以包括:
501、视频解码装置确定当前块中的参考块。
其中,参考块与当前块空间相邻,参考块采用仿射运动模型进行预测。
502、视频解码装置利用所述参考块的子块划分信息和参考块采用的仿射运动模型所采用的至少两个控制点的位置信息,推导出所述参考块中的至少两个特征点的位置信息。
所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述特征点的运动信息被作为这个特征点所在子块的运动信息。
需要说明的是,编码端和解码端可按相同子块划分方式进行参考块的子块划分,例如可以固定划分为4*4或8*8大小的子块,当然也可以通过参考块的尺寸信息、顶点运动信息等推导出相应的子块划分方式,在此不做限定。
503、视频解码装置根据所述参考块的至少两个特征点的位置信息与运动信息,以及当前块的各子块的位置信息,计算得到所述当前块中各子块的运动信息。
其中,所述当前块中各子块的运动信息可作为相应子块内所有像素点的运动信息。所述当前块中的子块的中心像素点的位置信息可作为相应子块的位置信息。
504、视频解码装置根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
具体的,利用当前块中的每个子块的运动信息获得每个子块中的各像素点的预测值,对当前块中的每个子块的各像素点的预测值进行运动补偿预测以得到当前块的预测块。
步骤501~504的具体实现方式,可参考步骤301和304的相关描述,此处不在赘述。
505、视频解码装置基于当前块的预测块和视频码流中的相应预测残差对当前块进行重建。
由上可见,本实施例方案中,由于视频解码装置是根据当前块的至少两个特征点的位置信息与运动信息,来计算得到当前块中各子块的运动信息,并且所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为预测所述参考块所采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;这使得视频解码装置计算当前块中各子块的运动信息所采用的参考块的特征点的位置信息与运动信息之间匹配度较高,实践发现,这样有利于提升当前块中各子块的运动信息计算准确性,进而提升利用参考块对当前块进行预测的精确性。
请参见图6,图6为本发明的另一个实施例提供的另一种图像预测方法的流程示意图。其中,图6举例所示,本发明的另一个实施例提供的另一种图像预测方法可以包括:
601、视频解码装置确定当前块中的参考块。其中,参考块与当前块空间相邻,参考块采用仿射运动模型进行预测。
602、视频解码装置利用所述参考块的子块划分信息和参考块采用的仿射运动模型所采用的至少两个控制点的位置信息,推导出所述参考块中的至少两个特征点的位置信息。
603、视频解码装置根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息。
其中,所述当前块中各子块的运动信息可作为相应子块内所有像素点的运动信息。所述当前块中的子块的中心像素点的位置信息可作为相应子块的位置信息。
604、视频解码装置根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
步骤601~604的具体实现方式,可参考步骤401和404的相关描述,此处不在赘述。
605、视频解码装置根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
具体的,利用当前块中的每个子块的运动信息获得每个子块中的各像素点的预测值,对当前块中的每个子块的各像素点的预测值进行运动补偿预测以得到当前块的预测块。
606、视频解码装置基于当前块的预测块和视频码流中的相应预测残差对当前块进行重建。
由上可见,本实施例方案中,由于视频解码装置根据当前块的至少两个特征点的位置信息与运动信息,计算得到当前块采用的仿射运动模型所采用的至少两个控制点的运动信息,在基于当前块采用的仿射运动模型所采用的至少两个控制点的运动信息来计算得到当前块中各子块的运动信息,且所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为预测所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;这使得视频解码装置计算当前块中各子块的运动信息所采用的参考块的特征点的位置信息与运动信息之间匹配度较高,实践发现,这样有利于提升当前块中各子块的运动信息计算准确性,进而提升利用参考块对当前块进行预测的精确性。
下面还提供用于实施上述方案的相关装置。
参见图7,本发明实施例提供一种图像预测装置,包括:
确定单元710,用于确定当前块的参考块,其中,所述参考块与所述当前块空间相邻,所述参考块采用仿射运动模型进行预测.
获取单元720,用于获取所述参考块之中的至少两个特征点的位置信息与运动信息,其中,所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为预测所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到。
计算单元730,用于根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息。
预测单元740,用于根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
在一些可能的实施方式中,所述特征点位于所述参考块的控制点所在子块的中心位置。
在一些可能的实施方式中,所述参考块中的特征点的位置信息,通过所述参考块中的控制点的位置信息进行如下方式的偏移而得到:
(x′,y′)=(x+a,y+b),其中,(x,y)为所述参考块的1个控制点的坐标,(x′,y′)为所述参考块的坐标为(x,y)的控制点所在子块中的特征点的坐标,其中,所述a为水平偏移量,所述b为垂直偏移量,所述a和所述b不等于0。
在一些可能的实施方式中,所述参考块的所述至少两个控制点包括所述参考块的左上顶点、右上顶点、左下顶点和右下顶点中的至少1个,其中,在所述参考块的左上顶点位置坐标为(x 0,y 0),且所述参考块的宽为w,且所述参考块的高为h的情况下,
Figure PCTCN2018071351-appb-000046
其中,(x 1,y 1)为所述参考块的右上顶点的坐标,(x 2,y 2)为所述参考块的左下顶点的坐标,(x 3,y 3)为所述参考块的右下顶点的坐标。
在一些可能的实施方式中,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,其中,
Figure PCTCN2018071351-appb-000047
或者,
Figure PCTCN2018071351-appb-000048
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,其中,所述w为所述参考块的宽度。
在一些可能的实施方式中,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
Figure PCTCN2018071351-appb-000049
或者,
Figure PCTCN2018071351-appb-000050
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度。(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标。(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标。(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标。所述w为所述参考块的宽度,所述h为所述参考块的高度。
在一些可能的实施方式中,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点,
Figure PCTCN2018071351-appb-000051
或者,
Figure PCTCN2018071351-appb-000052
其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度。(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标。(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标。(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标。其中,(x 3,y 3)为所述参考块中的特征点(x′ 3,y′ 3)所在子块中的控制点的坐标。所述w为所述参考块的宽度,所述h为所述参考块的高度。
在一些可能的实施方式中,所述计算单元具体用于,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
在一些可能的实施方式中,所述计算单元具体用于,参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息,
Figure PCTCN2018071351-appb-000053
或者,
Figure PCTCN2018071351-appb-000054
或者,
Figure PCTCN2018071351-appb-000055
其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点;
其中,所述vx 0为特征点(x′ 0,y′ 0)的水平运动矢量,所述vy 0为特征点(x′ 0,y′ 0)的竖直运动矢量;所述vx 1为特征点(x′ 1,y′ 1)的水平运动矢量,所述vy 1为特征点(x′ 1,y′ 1)的竖直运动矢量,其中,所述vy 2为特征点的(x′ 2,y′ 2)竖直运动矢量,所述vx 2为特征点(x′ 2,y′ 2)的水平运动矢量,所述vy 3为特征点的(x′ 3,y′ 3)竖直运动矢量,所述vx 3为特征点(x′ 3,y′ 3)的水平运动矢量;
其中,所述vx为所述当前块的坐标为(x,y)的子块的水平运动矢量,所述vy为所述当前块的坐标为(x,y)的子块的竖直运动矢量。
在一些可能的实施方式中,所述计算单元具体用于,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息;根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
在一些可能的实施方式中,在根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息的方面,所述计算单元用于参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息:
Figure PCTCN2018071351-appb-000056
Figure PCTCN2018071351-appb-000057
或者,
Figure PCTCN2018071351-appb-000058
Figure PCTCN2018071351-appb-000059
Figure PCTCN2018071351-appb-000060
或者,
Figure PCTCN2018071351-appb-000061
Figure PCTCN2018071351-appb-000062
Figure PCTCN2018071351-appb-000063
Figure PCTCN2018071351-appb-000064
其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点;
其中,所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)和(x 5,y 5)的控制点,或者所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)和(x 6,y 6)的控制点;或所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)、(x 6,y 6)和(x 7,y 7)的控制点;
其中,所述vx 4为控制点(x 4,y 4)的水平运动矢量,所述vy 4为控制点(x 4,y 4)的竖直运动矢量,所述vx 5为控制点(x 5,y 5)的水平运动矢量,所述vy 5为控制点(x 5,y 5)的竖直运动矢量,所述vx 6为控制点(x 6,y 6)的水平运动矢量,所述vy 6为控制点(x 6,y 6)的竖直运动矢量,所述vx 7为控制点(x 7,y 7)的 水平运动矢量,所述vy 7为控制点(x 7,y 7)的竖直运动矢量。
在一些可能的实施方式中,在根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息的方面,所述计算单元用于,参考如下公式,根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息:
Figure PCTCN2018071351-appb-000065
或者,
Figure PCTCN2018071351-appb-000066
或者,
Figure PCTCN2018071351-appb-000067
其中,所述vx为所述当前块的坐标为(x,y)子块的水平运动矢量,所述vy为所述当前块的坐标为(x,y)子块的竖直运动矢量。
其中,所述图像预测装置700可应用于视频编码装置中或应用于视频解码装置中。
参见图8,本申请实施例还提供一种图像预测装置800,可包括:存储部件810、及与所述存储部件耦合的处理器830。其中,所述存储部件810用于存储指令,所述处理器830用于执行所述指令。当所述处理器830在执行所述指令时可根据所述指令执行本申请上述实施例中的任意一种方法中由文件服务器执行的步骤。
处理器830还可称中央处理单元(CPU,Central Processing Unit)。存储部件810可以包括只读存储器和随机存取存储器,并向处理器830提供指令和数据等。存储部件810的一部分还可包括非易失性随机存取存储器。具体的应用中图像预测装置800的各组件例如通过总线系统耦合在一起。总线系统除了可包括数据总线之外,还可包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统840。上述本发明实施例揭示的方法可应用于处理器830中,或由处 理器830实现。处理器830可能是一种集成电路芯片,具有信号的处理能力。
在实现过程中,上述方法的各步骤可通过处理器830中的硬件的集成逻辑电路或者软件形式的指令完成。上述处理器830可以是通用处理器、数字信号处理器、专用集成电路、现成可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。处理器830可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等等本领域成熟的存储介质之中。该存储介质位于存储部件810,例如处理器830可读取存储部件810中的信息,结合其硬件完成上述方法的步骤。
举例来说,图像预测装置800可执行上述图2~图6所示实施例中对应的方法步骤。
其中,本申请实施例提供的所述图像预测装置应用于视频编码装置中或应用于视频解码装置中。其中,该视频编码装置或视频解码装置可以是任何需要输出或存储视频的装置,如笔记本电脑、平板电脑、个人电脑、手机或视频服务器等等设备。
此外,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储了程序代码。所述程序代码包括用于执行本发明实施例提供的任意一种图像预测方法的部分或全部步骤的指令。
本申请实施例还提供一种计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如以上各方法实施例中的方法的部分或全部步骤。
本申请实施例还提供一种应用发布平台,其中,所述应用发布平台用于发布计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如以上各方法实施例中的方法的部分或全部步骤。
参见图9-A,图9-A是本申请实施例可运用的视频编码器20的示意性框图,包括编码端预测模块201、变换量化模块202、熵编码模块203、编码重建模块204、编码端滤波模块205、图9-B是本申请实施例可运用的视频解码器30的示意性框图,包括解码端预测模块206、反变换反量化模块207、熵解码模块208、解码重建模块209、解码滤波模块210。
视频编码器20可用于实施本申请实施例的图像预测方法或视频编码方法。视频编码器30可用于实施本申请实施例的图像预测方法或视频解码方法。具体的:
编码端预测模块201和解码端预测模块206用于产生预测数据。视频编码器20可产生每一不再分割CU的一个或多个预测单元(PU)。CU的每一个PU可与CU的像素块内的不同像素块相关联。视频编码器20可针对CU的每一个PU产生预测性像素块。视频编码器20可使用帧内预测或帧间预测来产生PU的预测性像素块。如果视频编码器20使用帧内预测来产生PU的预测性像素块,则视频编码器20可基于与PU相关联的图片的解码后的像素来产生PU的预测性像素块。如果视频编码器20使用帧间预测来产生PU的预测性像素块,则视频编码器20可基于不同于与PU相关联的图片的一个或多个图片的解码后的像素来产生PU的预测性像素块。视频编码器20可基于CU的PU的预测性像素块来产生CU的残余像素块。CU的残余像素块可指示CU的PU的预测性像素块中的采样值与CU的初始像素块中的对应采样值之间的差。
变换量化模块202用于对经过预测的残差数据进行处理。视频编码器20可对CU的残余像素块执行递归四叉树分割以将CU的残余像素块分割成与CU的变换单元(TU)相关联的一个或多个较小残余像素块。 因为与TU相关联的像素块中的像素各自对应一个亮度采样及两个色度采样,所以每一个TU可与一个亮度的残余采样块及两个色度的残余采样块相关联。视频编码器20可将一个或多个变换应用于与TU相关联的残余采样块以产生系数块(即,系数的块)。变换可以是DCT变换或者它的变体。采用DCT的变换矩阵,通过在水平和竖直方向应用一维变换计算二维变换,获得所述系数块。视频编码器20可对系数块中的每一个系数执行量化程序。量化一般指系数经量化以减少用以表示系数的数据量,从而提供进一步压缩的过程。反变换反量化模块207执行的是变换量化模块202的逆过程。
视频编码器20可产生表示量化后系数块中的系数的语法元素的集合。视频编码器20通过熵编码模块203可将熵编码操作(例如,上下文自适应二进制算术译码(CABAC)操作)应用于上述语法元素中的部分或者全部。为将CABAC编码应用于语法元素,视频编码器20可将语法元素二进制化以形成包括一个或多个位(称作“二进位”)的二进制序列。视频编码器20可使用规则(regular)编码来编码二进位中的一部分,且可使用旁通(bypass)编码来编码二进位中的其它部分。
除熵编码系数块的语法元素外,视频编码器20通过编码重建模块204,可将逆量化及逆变换应用于变换后的系数块,以从变换后的系数块重建残余采样块。视频编码器20可将重建后的残余采样块加到一个或多个预测性采样块的对应采样块,以产生重建后的采样块。通过重建每一色彩分量的采样块,视频编码器20可重建与TU相关联的像素块。以此方式重建CU的每一TU的像素块,直到CU的整个像素块重建完成。
在视频编码器20重建构CU的像素块之后,视频编码器20通过编码端滤波模块205,执行消块滤波操作以减少与CU相关联的像素块的块效应。而在视频编码器20执行消块滤波操作之后,视频编码器20可使用采样自适应偏移(SAO)来修改图片的CTB的重建后的像素块。在执行这些操作之后,视频编码器20可将CU的重建后的像素块存储于解码图片缓冲器中以用于产生其它CU的预测性像素块。
视频解码器30可接收码流。所述码流以比特流的形式包含了由视频编码器20编码的视频数据的编码信息。视频解码器30通过熵解码模块208,解析所述码流以从所述码流提取语法元素。当视频解码器30执行CABAC解码时,视频解码器30可对部分二进位执行规则解码且可对其它部分的二进位执行旁通解码,码流中的二进位与语法元素具有映射关系,通过解析二进位获得语法元素。
其中,视频解码器30通过解码重建模块209,可基于从码流提取的语法元素来重建视频数据的图片。基于语法元素来重建视频数据的过程大体上与由视频编码器20执行以产生语法元素的过程互逆。举例来说,视频解码器30可基于与CU相关联的语法元素来产生CU的PU的预测性像素块。另外,视频解码器30可逆量化与CU的TU相关联的系数块。视频解码器30可对逆量化后的系数块执行逆变换以重建与CU的TU相关联的残余像素块。视频解码器30可基于预测性像素块及残余像素块来重建CU的像素块。
在视频解码器30重建CU的像素块之后,视频解码器30通过解码滤波模块210,执行消块滤波操作以减少与CU相关联的像素块的块效应。另外,基于一个或多个SAO语法元素,视频解码器30可执行与视频编码器20相同的SAO操作。在视频解码器30执行这些操作之后,视频解码器30可将CU的像素块存储于解码图片缓冲器中。解码图片缓冲器可以提供用于后续运动补偿、帧内预测及显示装置呈现的参考图片。图10和图11是电子装置50的两种示意性框图,电子装置50可并入本申请实施例可运用的编码解码器。图11是根据本申请实施例的用于视频编码的示意性装置图。下面将说明图10和图11中的单元。
电子装置50可以例如是无线通信系统的移动终端或者用户设备。应理解,可以在可能需要对视频图像进行编码和解码,或者编码,或者解码的任何电子设备或者装置内实施本申请的实施例。
装置50可以包括用于并入和保护设备的壳30。装置50还可以包括形式为液晶显示器的显示器32。在本申请的其它实施例中,显示器可以是适合于显示图像或者视频的任何适当的显示器技术。装置50还可以包括小键盘34。在本申请的其它实施例中,可以运用任何适当的数据或者用户接口机制。例如,可以实施用户接口为虚拟键盘或者数据录入系统作为触敏显示器的一部分。装置可以包括麦克风36或者任何适当的音频输入,该音频输入可以是数字或者模拟信号输入。装置50还可以包括如下音频输出设备,该音频输出设备在本申请的实施例中可以是以下各项中的任何一项:耳机38、扬声器或者模拟音频或者数字音频输出连接。装置50也可以包括电池40,在本申请的其它实施例中,设备可以由任何适当的移动能量设备,比如太阳能电池、燃料电池或者时钟机构生成器供电。装置还可以包括用于与其它设备的近程视线通信的红外线端口42。在其它实施例中,装置50还可以包括任何适当的近程通信解决方案,比如蓝牙无线连接或者USB/火线有线连接。
装置50可以包括用于控制装置50的控制器56或者处理器。控制器56可以连接到存储器58,该存储器在本申请的实施例中可以存储形式为图像的数据和音频的数据,和/或也可以存储用于在控制器56上实施的指令。控制器56还可以连接到适合于实现音频和/或视频数据的编码和解码或者由控制器56实现的辅助编码和解码的编码解码器电路54。
装置50还可以包括用于提供用户信息并且适合于提供用于在网络认证和授权用户的认证信息的读卡器48和智能卡46,例如UICC和UICC读取器。
装置50还可以包括无线电接口电路52,该无线电接口电路连接到控制器并且适合于生成例如用于与蜂窝通信网络、无线通信系统或者无线局域网通信的无线通信信号。装置50还可以包括天线44,该天线连接到无线电接口电路52用于向其它(多个)装置发送在无线电接口电路52生成的射频信号并且用于从其它(多个)装置接收射频信号。
在本申请的一些实施例中,装置50包括能够记录或者检测单帧的相机,编码解码器54或者控制器接收到这些单帧并对它们进行处理。在本申请一些实施例中,装置可在传输和/或存储之前从另一设备接收待处理的视频图像数据。在本申请的一些实施例中,装置50可以通过无线或者有线连接接收图像用于编码/解码。
本申请实施例方案可应用于各种电子装置中,示例性的,下面给出本申请实施例应用于电视设备和移动电话设备的例子。
图12是本申请实施例适用于电视机应用的示意性结构图。
电视设备900包括可天线901、调谐器902、多路解复用器903、解码器904、视频信号处理器905、显示单元906、音频信号处理器907、扬声器908、外部接口909、控制器910、用户接口911和总线912等。
其中,调谐器902从经天线901接收到的广播信号提取期望频道的信号,并且解调提取的信号。调谐器902随后将通过解调获得的编码比特流输出到多路解复用器903。也就是说调谐器902在接收编码图像的编码流的电视设备900中用作发送装置。
多路解复用器903从编码比特流分离将要观看的节目的视频流和音频流,且将分离的流输出到解码器904。多路解复用器903还从编码比特流提取辅助数据,例如电子节目指南,并且将提取的数据提供给控制器910。如果编码比特流被加扰,则多路解复用器903可对编码比特流进行解扰。
解码器904对从多路解复用器903输入的视频流和音频流进行解码。解码器904随后将通过解码产 生的视频数据输出到视频信号处理器905。解码器904还将通过解码产生的音频数据输出到音频信号处理器907。
视频信号处理器905再现从解码器904输入的视频数据,并且,在显示单元906上显示视频数据。视频信号处理器905还可在显示单元906上显示经网络提供的应用画面。另外,视频信号处理器905可根据设置对视频数据执行额外的处理,例如,噪声去除。视频信号处理器905还可产生GUI(图形用户界面)的图像并且将产生的图像叠加在输出图像上。
显示单元906由从视频信号处理器905提供的驱动信号驱动,并且在显示装置,例如液晶显示器、等离子体显示器或OELD(有机场致发光显示器)的视频屏幕上显示视频或图像。
音频信号处理器907对从解码器904输入的音频数据执行再现处理,例如,数模转换和放大等,并且通过扬声器908输出音频。另外,音频信号处理器907可以对音频数据执行额外的处理,例如噪声去除等。
外部接口909是用于连接电视设备900与外部装置或网络的接口。例如,经外部接口909接收的视频流或音频流可由解码器904解码。也就是说,外部接口909也在接收编码图像的编码流的电视设备900中用作发送装置。
控制器910包括处理器和存储器。存储器存储将要由处理器执行的程序、节目数据、辅助数据、经网络获取的数据等。例如,当电视设备900启动时,存储在存储器中的程序由处理器读取并且执行。处理器根据从用户接口911输入的控制信号控制电视设备900的操作。
其中,用户接口911连接到控制器910。例如,用户接口911包括用于使用户操作电视设备900的按钮和开关以及用于接收遥控信号的接收单元。用户接口911检测由用户经这些部件执行的操作,产生控制信号,并且将产生的控制信号输出到控制器910。
总线912将调谐器902、多路解复用器903、解码器904、视频信号处理器905、音频信号处理器907、外部接口909和控制器910彼此连接。
在具有这种结构的电视设备900中,解码器904可具有根据上述实施例的视频解码装置或图像预测装置的功能。例如解码器904可用于,确定当前块的参考块,所述参考块与所述当前块空间相邻,所述参考块采用仿射运动模型进行预测;获取所述参考块中的至少两个特征点的位置信息与运动信息,所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息;根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
图13是本申请实施例适用于移动电话应用的示意性结构图。移动电话装置920可以包括天线921、通信单元922、音频编解码器923、扬声器924、麦克风925、相机单元926、图像处理器927、多路解复用器928、记录/再现单元929、显示单元930、控制器931、操作单元932和总线933等。
天线921连接到通信单元922。扬声器924和麦克风925连接到音频编码解码器923。操作单元932连接到控制器931。总线933将通信单元922、音频编解码器923、相机单元926、图像处理器927、多路解复用器928、记录/再现单元929、显示单元930和控制器931彼此连接。
移动电话装置920在各种操作模式下执行操作,例如,音频信号的发送/接收、电子邮件和图像数 据的发送/接收、图像的拍摄、数据的记录等,所述各种操作模式包括语音呼叫模式、数据通信模式、成像模式和视频电话模式。
在语音呼叫模式下,由麦克风925产生的模拟音频信号被提供给音频编解码器923。音频编解码器923将模拟音频信号转换成音频数据,对转换的音频数据执行模数转换,并且压缩音频数据。音频编码解码器923随后将作为压缩结果得到的音频数据输出到通信单元922。通信单元922对音频数据进行编码和调制以产生待发送的信号。通信单元922随后经天线921将产生的待发送的信号发送给基站。通信单元922还放大经天线921接收到的无线电信号并且对经天线921接收到的无线电信号执行频率转换以获得接收到的信号。通信单元922随后对接收到的信号进行解调和解码以产生音频数据,并且将产生的音频数据输出到音频编解码器923。音频编解码器923解压缩音频数据并且对音频数据执行数模转换以产生模拟音频信号。音频编码解码器923随后将产生的音频信号提供给扬声器924以从扬声器924输出音频。
在数据通信模式下,例如,控制器931根据由用户经操作单元932的操作产生将要被包括在电子邮件中的文本数据。控制器931还在显示单元930上显示文本。控制器931还响应于经操作单元932来自用户的用于发送的指令产生电子邮件数据,并且将产生的电子邮件数据输出到通信单元922。通信单元922对电子邮件数据进行编码和调制以产生待发送的信号。通信单元922随后经天线921将产生的待发送的信号发送给基站。通信单元922还放大经天线921接收到的无线电信号并且对经天线921接收到的无线电信号执行频率转换以获得接收到的信号。通信单元922随后对接收到的信号进行解调和解码以恢复电子邮件数据,并且将恢复的电子邮件数据输出到控制器931。控制器931在显示单元930上显示电子邮件的内容,并且将电子邮件数据存储在记录/再现单元929的存储介质中。
记录/再现单元929包括可读/可写存储介质。例如,存储介质可以是内部存储介质,或者可以是在外部安装的存储介质,例如,硬盘、磁盘、磁光盘、USB(通用串行总线)存储器或存储卡。
在成像模式下,相机单元926对对象成像以产生图像数据,并且将产生的图像数据输出到图像处理器927。图像处理器927对从相机单元926输入的图像数据进行编码,并且将编码流存储在存储/再现单元929的存储介质中。
在视频电话模式下,多路解复用器928多路复用由图像处理器927编码的视频流和从音频编码解码器923输入的音频流,并且将多路复用流输出到通信单元922。通信单元922对多路复用流进行编码和调制以产生待发送的信号。通信单元922随后经天线921将产生的待发送的信号发送给基站。通信单元922还放大经天线921接收到的无线电信号并且对经天线921接收到的无线电信号执行频率转换以获得接收到的信号。待发送的信号和接收到的信号可包括编码比特流。通信单元922随后对接收到的信号进行解调和解码以恢复流,并且将恢复的流输出到多路解复用器928。多路解复用器928从输入流分离视频流和音频流,将视频流输出到图像处理器927并且将音频流输出到音频编解码器923。图像处理器927对视频流进行解码以产生视频数据。视频数据被提供给显示单元930,并且一系列图像由显示单元930显示。音频编解码器923解压缩音频流并且对音频流执行数模转换以产生模拟音频信号。音频编解码器923随后将产生的音频信号提供给扬声器924以从扬声器924输出音频。
在具有这种结构的移动电话装置920中,图像处理器927具有根据上述实施例的视频编码装置(视频编码器、图像预测装置)和/或视频解码装置(视频解码器)的功能。
例如图像处理器927可用于确定当前块的参考块,所述参考块与所述当前块空间相邻,所述参考块 采用仿射运动模型进行预测;获取所述参考块中的至少两个特征点的位置信息与运动信息,所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息;根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在本申请的各种实施例中,应理解,上述各过程的序号的大小并不意味着执行顺序的必然先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
另外,本文中术语“系统”和“网络”在本文中常可互换使用。应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
在本申请所提供的实施例中,应理解,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
在上述实施例中,可全部或部分地通过软件、硬件、固件或其任意组合来实现。当使用软件实现时,可全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(磁性介质例如可以是软盘、硬盘、磁带)、光介质(例如光盘)、或半导体介质(例如固态硬盘)等。在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可以通过其它的方式来实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或者讨论的相互之间的耦合或直接耦合或通信连接可以通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或 者也可以不是物理单元,即可位于一个地方,或者也可以分布到多个网络单元上。可根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或采用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本发明技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,其中,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (28)

  1. 一种图像预测方法,其特征在于,包括:
    确定当前块的参考块,所述参考块与所述当前块空间相邻,所述参考块采用仿射运动模型进行预测;
    获取所述参考块中的至少两个特征点的位置信息与运动信息,所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;
    根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息;根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
  2. 根据权利要求1所述的方法,其特征在于,所述特征点位于所述参考块的控制点所在子块的中心位置。
  3. 根据权利要求1或2所述的方法,其特征在于,
    所述参考块中的特征点的位置信息,通过所述参考块中的控制点的位置信息进行如下方式的偏移而得到:(x′,y′)=(x+a,y+b),其中,(x,y)为所述参考块的1个控制点的坐标,(x′,y′)为所述参考块的坐标为(x,y)的控制点所在子块中的特征点的坐标,其中,所述a为水平偏移量,所述b为垂直偏移量,所述a和所述b不等于0。
  4. 根据权利要求1或2或3所述的方法,其特征在于,所述参考块的所述至少两个控制点包括所述参考块的左上顶点、右上顶点、左下顶点和右下顶点中的至少两个,其中,在所述参考块的左上顶点位置坐标为(x 0,y 0),且所述参考块的宽为w,且所述参考块的高为h的情况下,
    Figure PCTCN2018071351-appb-100001
    其中,(x 1,y 1)为所述参考块的右上顶点的坐标,(x 2,y 2)为所述参考块的左下顶点的坐标,(x 3,y 3)为所述参考块的右下顶点的坐标。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,其中,
    Figure PCTCN2018071351-appb-100002
    或者,
    Figure PCTCN2018071351-appb-100003
    其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考 块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,其中,所述w为所述参考块的宽度。
  6. 根据权利要求1至4任一项所述方法,其特征在于,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
    Figure PCTCN2018071351-appb-100004
    或者,
    Figure PCTCN2018071351-appb-100005
    其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标,所述w为所述参考块的宽度,所述h为所述参考块的高度。
  7. 根据权利要求1至4任一项所述方法,其特征在于,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点,
    Figure PCTCN2018071351-appb-100006
    或者,
    Figure PCTCN2018071351-appb-100007
    其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标,其中,(x 3,y 3)为所述参考块中的特征点(x′ 3,y′ 3)所在子块中的控制点的坐标,所述w为所述参考块的宽度,所述h为所述参考块的高度。
  8. 根据权利要求5或6或7所述的方法,其特征在于,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息,包括:根据所述参考块中的所 述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息包括:
    参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息,
    Figure PCTCN2018071351-appb-100008
    或者,
    Figure PCTCN2018071351-appb-100009
    或者,
    Figure PCTCN2018071351-appb-100010
    其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
    或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点中的至少两个,
    或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点中的至少两个;
    其中,所述vx 0为特征点(x′ 0,y′ 0)的水平运动矢量,所述vy 0为特征点(x′ 0,y′ 0)的竖直运动矢量;所述vx 1为特征点(x′ 1,y′ 1)的水平运动矢量,所述vy 1为特征点(x′ 1,y′ 1)的竖直运动矢量,其中,所述vy 2为特征点的(x′ 2,y′ 2)竖直运动矢量,所述vx 2为特征点(x′ 2,y′ 2)的水平运动矢量,所述vy 3为特征点的(x′ 3,y′ 3)竖直运动矢量,所述vx 3为特征点(x′ 3,y′ 3)的水平运动矢量;
    其中,所述vx为所述当前块的坐标为(x,y)的子块的水平运动矢量,所述vy为所述当前块的坐标为(x,y)的子块的竖直运动矢量。
  10. 根据权利要求5或6或7所述的方法,其特征在于,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息,包括:根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息;
    根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
  11. 根据权利要求10所述的方法,其特征在于,所述根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息,包括:
    参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息:
    Figure PCTCN2018071351-appb-100011
    Figure PCTCN2018071351-appb-100012
    或者,
    Figure PCTCN2018071351-appb-100013
    Figure PCTCN2018071351-appb-100014
    Figure PCTCN2018071351-appb-100015
    或者,
    Figure PCTCN2018071351-appb-100016
    Figure PCTCN2018071351-appb-100017
    Figure PCTCN2018071351-appb-100018
    Figure PCTCN2018071351-appb-100019
    其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
    或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点中的至少 两个,
    或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点中的至少两个;
    所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)和(x 5,y 5)的控制点,或所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)和(x 6,y 6)的控制点中的至少两个;或所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)、(x 6,y 6)和(x 7,y 7)的控制点中的至少两个;
    其中,所述vx 4为控制点(x 4,y 4)的水平运动矢量,所述vy 4为控制点(x 4,y 4)的竖直运动矢量,所述vx 5为控制点(x 5,y 5)的水平运动矢量,所述vy 5为控制点(x 5,y 5)的竖直运动矢量,所述vx 6为控制点(x 6,y 6)的水平运动矢量,所述vy 6为控制点(x 6,y 6)的竖直运动矢量,所述vx 7为控制点(x 7,y 7)的水平运动矢量,所述vy 7为控制点(x 7,y 7)的竖直运动矢量。
  12. 根据权利要求11所述的方法,其特征在于,
    所述根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息,包括:
    参考如下公式,根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息:
    Figure PCTCN2018071351-appb-100020
    或者,
    Figure PCTCN2018071351-appb-100021
    或者,
    Figure PCTCN2018071351-appb-100022
    其中,所述vx为所述当前块的坐标为(x,y)的子块的水平运动矢量,所述vy为所述当前块的坐标 为(x,y)的子块的竖直运动矢量。
  13. 根据权利要求1至12任一项所述的方法,其特征在于,所述图像预测方法应用于视频编码过程中或应用于视频解码过程中。
  14. 一种图像预测装置,其特征在于,包括:
    确定单元,用于确定当前块的参考块,其中,所述参考块与所述当前块空间相邻,所述参考块采用仿射运动模型进行预测;
    获取单元,用于获取所述参考块之中的至少两个特征点的位置信息与运动信息,所述至少两个特征点位于所述参考块的至少两个控制点所在子块,所述至少两个控制点为所述参考块采用的仿射运动模型所采用的控制点,所述特征点所在子块的运动信息基于相应特征点的运动信息得到;
    计算单元,用于根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块中各子块的运动信息;
    预测单元,用于根据所述当前块中各子块的运动信息对所述当前块的各子块进行运动补偿预测以获得所述当前块的预测块。
  15. 根据权利要求14所述的装置,其特征在于,所述特征点位于所述参考块的控制点所在子块的中心位置。
  16. 根据权利要求14或15所述的装置,其特征在于,
    所述参考块中的特征点的位置信息,通过所述参考块中的控制点的位置信息进行如下方式的偏移而得到:(x′,y′)=(x+a,y+b),其中,(x,y)为所述参考块的1个控制点的坐标,(x′,y′)为所述参考块的坐标为(x,y)的控制点所在子块中的特征点的坐标,其中,所述a为水平偏移量,所述b为垂直偏移量,所述a和所述b不等于0。
  17. 根据权利要求14或15或16所述的装置,其特征在于,所述参考块的所述至少两个控制点包括所述参考块的左上顶点、右上顶点、左下顶点和右下顶点中的至少1个,其中,在所述参考块的左上顶点位置坐标为(x 0,y 0),且所述参考块的宽为w,且所述参考块的高为h的情况下,
    Figure PCTCN2018071351-appb-100023
    其中,(x 1,y 1)为所述参考块的右上顶点的坐标,(x 2,y 2)为所述参考块的左下顶点的坐标,(x 3,y 3)为所述参考块的右下顶点的坐标。
  18. 根据权利要求14至17任一项所述的装置,其特征在于,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,其中,
    Figure PCTCN2018071351-appb-100024
    或者,
    Figure PCTCN2018071351-appb-100025
    其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,其中,所述w为所述参考块的宽度。
  19. 根据权利要求14至17任一项所述装置,其特征在于,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点,
    Figure PCTCN2018071351-appb-100026
    或者,
    Figure PCTCN2018071351-appb-100027
    其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标,所述w为所述参考块的宽度,所述h为所述参考块的高度。
  20. 根据权利要求14至17任一项所述装置,其特征在于,所述至少两个特征点包括所述参考块中的坐标分别为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点,
    Figure PCTCN2018071351-appb-100028
    或者,
    Figure PCTCN2018071351-appb-100029
    其中,所述N 1为所述参考块中的控制点所在子块的宽度,所述N 2为所述参考块中的控制点所在子 块的高度,(x 0,y 0)为所述参考块中的特征点(x′ 0,y′ 0)所在子块中的控制点的坐标,(x 1,y 1)为所述参考块中的特征点(x′ 1,y′ 1)所在子块中的控制点的坐标,(x 2,y 2)为所述参考块中的特征点(x′ 2,y′ 2)所在子块中的控制点的坐标,其中,(x 3,y 3)为所述参考块中的特征点(x′ 3,y′ 3)所在子块中的控制点的坐标,所述w为所述参考块的宽度,所述h为所述参考块的高度。
  21. 根据权利要求18或19或20所述的装置,其特征在于,
    所述计算单元具体用于,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
  22. 根据权利要求21所述的装置,其特征在于,
    所述计算单元具体用于,参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息,
    Figure PCTCN2018071351-appb-100030
    或者,
    Figure PCTCN2018071351-appb-100031
    或者,
    Figure PCTCN2018071351-appb-100032
    其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
    或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点中的至少两个,
    或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点中的至少两个;
    其中,所述vx 0为特征点(x′ 0,y′ 0)的水平运动矢量,所述vy 0为特征点(x′ 0,y′ 0)的竖直运动矢量;所 述vx 1为特征点(x′ 1,y′ 1)的水平运动矢量,所述vy 1为特征点(x′ 1,y′ 1)的竖直运动矢量,其中,所述vy 2为特征点的(x′ 2,y′ 2)竖直运动矢量,所述vx 2为特征点(x′ 2,y′ 2)的水平运动矢量,所述vy 3为特征点的(x′ 3,y′ 3)竖直运动矢量,所述vx 3为特征点(x′ 3,y′ 3)的水平运动矢量;
    其中,所述vx为所述当前块的坐标为(x,y)的子块的水平运动矢量,所述vy为所述当前块的坐标为(x,y)的子块的竖直运动矢量。
  23. 根据权利要求18或19或20所述的装置,其特征在于,
    所述计算单元具体用于,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息;根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息。
  24. 根据权利要求23所述的装置,其特征在于,在根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息的方面,所述计算单元用于参考如下公式,根据所述参考块中的所述至少两个特征点的位置信息与运动信息,计算得到所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息:
    Figure PCTCN2018071351-appb-100033
    Figure PCTCN2018071351-appb-100034
    或者,
    Figure PCTCN2018071351-appb-100035
    Figure PCTCN2018071351-appb-100036
    Figure PCTCN2018071351-appb-100037
    或者,
    Figure PCTCN2018071351-appb-100038
    Figure PCTCN2018071351-appb-100039
    Figure PCTCN2018071351-appb-100040
    Figure PCTCN2018071351-appb-100041
    其中,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)和(x′ 1,y′ 1)的特征点,
    或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)和(x′ 2,y′ 2)的特征点中的至少 两个,
    或,所述至少两个特征点包括所述参考块中坐标为(x′ 0,y′ 0)、(x′ 1,y′ 1)、(x′ 2,y′ 2)和(x′ 3,y′ 3)的特征点中的至少两个;
    所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)和(x 5,y 5)的控制点,或所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)和(x 6,y 6)的控制点中的至少两个;或所述当前块采用的仿射运动模型所采用的至少两个控制点包括所述当前块中的坐标分别为(x 4,y 4)、(x 5,y 5)、(x 6,y 6)和(x 7,y 7)的控制点中的至少两个;
    其中,所述vx 4为控制点(x 4,y 4)的水平运动矢量,所述vy 4为控制点(x 4,y 4)的竖直运动矢量,所述vx 5为控制点(x 5,y 5)的水平运动矢量,所述vy 5为控制点(x 5,y 5)的竖直运动矢量,所述vx 6为控制点(x 6,y 6)的水平运动矢量,所述vy 6为控制点(x 6,y 6)的竖直运动矢量,所述vx 7为控制点(x 7,y 7)的水平运动矢量,所述vy 7为控制点(x 7,y 7)的竖直运动矢量。
  25. 根据权利要求24所述的装置,其特征在于,
    在根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息的方面,所述计算单元用于参考如下公式,根据所述当前块采用的仿射运动模型所采用的至少两个控制点的运动信息和位置信息,以及所述当前块中各子块的位置信息,计算得到所述当前块中各子块的运动信息:
    Figure PCTCN2018071351-appb-100042
    或者,
    Figure PCTCN2018071351-appb-100043
    或者,
    Figure PCTCN2018071351-appb-100044
    其中,所述vx为所述当前块的坐标为(x,y)子块的水平运动矢量,所述vy为所述当前块的坐标为 (x,y)子块的竖直运动矢量。
  26. 根据权利要求14至25任一项所述的装置,其特征在于,所述图像预测装置应用于视频编码装置中或应用于视频解码装置中。
  27. 一种图像预测装置,其特征在于,包括:
    相互耦合的处理器和存储部件;其中,所述处理器用于执行权利要求1至13任一项所述方法。
  28. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序用于指令相关硬件,执行权利要求1至13任一项所述方法。
PCT/CN2018/071351 2017-01-04 2018-01-04 图像预测方法和相关设备 WO2018127090A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18736299.1A EP3557874A4 (en) 2017-01-04 2018-01-04 IMAGE PREDICTION METHOD, AND ASSOCIATED DEVICE
US16/460,029 US11330285B2 (en) 2017-01-04 2019-07-02 Picture prediction method and related device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710005575.6A CN108271023B (zh) 2017-01-04 2017-01-04 图像预测方法和相关设备
CN201710005575.6 2017-01-04

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/460,029 Continuation US11330285B2 (en) 2017-01-04 2019-07-02 Picture prediction method and related device

Publications (1)

Publication Number Publication Date
WO2018127090A1 true WO2018127090A1 (zh) 2018-07-12

Family

ID=62771722

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/071351 WO2018127090A1 (zh) 2017-01-04 2018-01-04 图像预测方法和相关设备

Country Status (4)

Country Link
US (1) US11330285B2 (zh)
EP (1) EP3557874A4 (zh)
CN (1) CN108271023B (zh)
WO (1) WO2018127090A1 (zh)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019229683A1 (en) 2018-05-31 2019-12-05 Beijing Bytedance Network Technology Co., Ltd. Concept of interweaved prediction
CN110868602B (zh) * 2018-08-27 2024-04-12 华为技术有限公司 视频编码器、视频解码器及相应方法
CN110868587B (zh) 2018-08-27 2023-10-20 华为技术有限公司 一种视频图像预测方法及装置
WO2020043000A1 (zh) * 2018-08-28 2020-03-05 华为技术有限公司 候选运动信息列表的构建方法、帧间预测方法及装置
CN110944181B (zh) * 2018-09-23 2023-03-10 北京字节跳动网络技术有限公司 仿射模型的多个假设
TWI829769B (zh) * 2018-09-26 2024-01-21 大陸商北京字節跳動網絡技術有限公司 仿射的運動矢量訪問範圍
WO2020073928A1 (en) * 2018-10-09 2020-04-16 Huawei Technologies Co., Ltd. Inter prediction method and apparatus
CN111083485A (zh) 2018-10-22 2020-04-28 北京字节跳动网络技术有限公司 仿射模式的运动信息的利用
WO2020084512A1 (en) * 2018-10-23 2020-04-30 Beijing Bytedance Network Technology Co., Ltd. Affine motion information derivation from neighboring block
US11323748B2 (en) * 2018-12-19 2022-05-03 Qualcomm Incorporated Tree-based transform unit (TU) partition for video coding
CN113597760A (zh) * 2019-01-02 2021-11-02 北京字节跳动网络技术有限公司 视频处理的方法
EP3930327A4 (en) 2019-03-08 2022-06-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd. PREDICTION PROCESS, ENCODER, DECODER, AND COMPUTER STORAGE MEDIA
WO2021046692A1 (en) * 2019-09-09 2021-03-18 Alibaba Group Holding Limited Resolution-adaptive video coding with conditional interpolation filters

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102510498A (zh) * 2011-10-18 2012-06-20 清华大学 基于自适应仿射变换的三维动态网格压缩方法及装置
CN104363451A (zh) * 2014-10-27 2015-02-18 华为技术有限公司 图像预测方法及相关装置
CN104539966A (zh) * 2014-09-30 2015-04-22 华为技术有限公司 图像预测方法及相关装置
CN105163116A (zh) * 2015-08-29 2015-12-16 华为技术有限公司 图像预测的方法及设备
US9438910B1 (en) * 2014-03-11 2016-09-06 Google Inc. Affine motion prediction in video coding

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7734075B2 (en) * 2001-10-04 2010-06-08 Siemens Medical Solutions Usa, Inc. Contrast-invariant registration of cardiac and renal magnetic resonance perfusion images
CN102213762B (zh) * 2011-04-12 2012-11-28 中交第二公路勘察设计研究院有限公司 基于rfm模型的多源星载sar影像自动匹配方法
CN103051894B (zh) * 2012-10-22 2015-09-09 北京航空航天大学 一种基于分形和h.264的双目立体视频压缩与解压缩方法
WO2016008157A1 (en) * 2014-07-18 2016-01-21 Mediatek Singapore Pte. Ltd. Methods for motion compensation using high order motion model
JP6404487B2 (ja) 2015-03-10 2018-10-10 ホアウェイ・テクノロジーズ・カンパニー・リミテッド 画像予測方法および関連装置
CN106303543B (zh) 2015-05-15 2018-10-30 华为技术有限公司 视频图像编码和解码的方法、编码设备和解码设备
EP3334158A4 (en) * 2015-08-07 2019-03-20 LG Electronics Inc. METHOD AND DEVICE FOR INTERPRETING IN A VIDEO CODING SYSTEM
KR20230143623A (ko) * 2016-03-28 2023-10-12 로즈데일 다이나믹스 엘엘씨 인터 예측 모드 기반 영상 처리 방법 및 이를 위한 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102510498A (zh) * 2011-10-18 2012-06-20 清华大学 基于自适应仿射变换的三维动态网格压缩方法及装置
US9438910B1 (en) * 2014-03-11 2016-09-06 Google Inc. Affine motion prediction in video coding
CN104539966A (zh) * 2014-09-30 2015-04-22 华为技术有限公司 图像预测方法及相关装置
CN104363451A (zh) * 2014-10-27 2015-02-18 华为技术有限公司 图像预测方法及相关装置
CN105163116A (zh) * 2015-08-29 2015-12-16 华为技术有限公司 图像预测的方法及设备

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
CN108271023B (zh) 2021-11-19
EP3557874A1 (en) 2019-10-23
EP3557874A4 (en) 2020-01-15
US11330285B2 (en) 2022-05-10
US20190327483A1 (en) 2019-10-24
CN108271023A (zh) 2018-07-10

Similar Documents

Publication Publication Date Title
WO2018127090A1 (zh) 图像预测方法和相关设备
KR102431537B1 (ko) 루마 및 크로마 성분에 대한 ibc 전용 버퍼 및 디폴트 값 리프레싱을 사용하는 인코더, 디코더 및 대응하는 방법들
WO2018001207A1 (zh) 编解码的方法及装置
WO2017129023A1 (zh) 解码方法、编码方法、解码设备和编码设备
CN112823521A (zh) 使用基于历史的运动信息的图像编码方法及其装置
CN108810552B (zh) 图像预测方法和相关产品
CN113170202B (zh) 用于构建应用多假设预测的块的mpm列表的编码器、解码器及相应方法
WO2020103800A1 (zh) 视频解码方法和视频解码器
WO2019128716A1 (zh) 图像的预测方法、装置及编解码器
US20230037509A1 (en) Video coding method and system
CN115426494A (zh) 编码器,解码器和使用压缩mv存储的对应方法
KR20220127314A (ko) 적응적 루프 필터링을 위한 인코더, 디코더, 및 대응하는 방법
CN112352434B (zh) 用于帧内预测的基于宽高比滤波的方法和装置
EP3910955A1 (en) Inter-frame prediction method and device
CN111263166B (zh) 一种视频图像预测方法及装置
WO2019233423A1 (zh) 获取运动矢量的方法和装置
CN113727120B (zh) 译码方法、装置、编码器和解码器
EP3886438A1 (en) Flag bit context modeling method and device
US11553208B2 (en) Method and system of video coding using a subset of available intra prediction modes for multiple reference lines
US11363295B2 (en) Method and system for intra mode coding
RU2801326C2 (ru) Кодер, декодер и соответствующие способы, использующие выделенный буфер ibc, и значение по умолчанию, обновляющее компонент яркости и цветности

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018736299

Country of ref document: EP

Effective date: 20190719