WO2020181542A1 - 一种视频编码或解码方法、装置、设备及存储介质 - Google Patents

一种视频编码或解码方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020181542A1
WO2020181542A1 PCT/CN2019/078054 CN2019078054W WO2020181542A1 WO 2020181542 A1 WO2020181542 A1 WO 2020181542A1 CN 2019078054 W CN2019078054 W CN 2019078054W WO 2020181542 A1 WO2020181542 A1 WO 2020181542A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion vector
image block
current image
vector value
accuracy
Prior art date
Application number
PCT/CN2019/078054
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 CN201980004958.9A priority Critical patent/CN111670578B/zh
Priority to PCT/CN2019/078054 priority patent/WO2020181542A1/zh
Publication of WO2020181542A1 publication Critical patent/WO2020181542A1/zh

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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • 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/523Motion estimation or motion compensation with sub-pixel accuracy
    • 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/573Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
    • 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/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures

Definitions

  • This specification relates to the field of video coding and decoding, and in particular to a video coding or decoding method, device, equipment and storage medium.
  • the motion vector candidate list of the current CU is usually constructed according to the motion vector of the coded neighboring block of the current coding unit (CU, Coding Unit).
  • CU coded neighboring block of the current coding unit
  • the current CU is split into two prediction units PU, and all the bi-predictive motions in the motion vector candidate list in each PU
  • the vector (Motion Vector, MV) is split into one direction.
  • the current triangle prediction PU only performs unidirectional prediction.
  • both PUs are triangles in the triangle prediction
  • the area only accounts for half of the CU, but in the specific implementation, the data is read during the motion compensation process. At this time, it is still necessary to read the information of the entire CU pointed to by the MV of the respective PU. Therefore, if the two PUs predicted by the triangle are both bi-predicted MVs, then during motion compensation, a triangle predicted CU needs to take the information of 4 CUs (each PU takes out two CUs pointed to by the MV), so that Compared with the CU in the ordinary bi-prediction mode (only the information of two CUs need to be fetched), the bandwidth consumption is doubled.
  • the current triangle prediction mode does not include the MV introduced by the HMVP (History-based Motion Vector Prediction), MMVD (Merge with MVD), and pairwise average technologies in the ordinary Merge mode, which will affect performance negative effect. Therefore, how to better improve the performance of video coding and decoding has become the focus of research.
  • HMVP History-based Motion Vector Prediction
  • MMVD Merge with MVD
  • pairwise average technologies in the ordinary Merge mode which will affect performance negative effect. Therefore, how to better improve the performance of video coding and decoding has become the focus of research.
  • the embodiments of this specification provide a video encoding or decoding method, device, equipment, and storage medium, which improve bandwidth utilization and hardware friendliness, simplify encoding or decoding operations, and improve encoding or decoding efficiency.
  • an embodiment of this specification provides a video encoding or decoding method, including:
  • an embodiment of this specification provides a video encoding and decoding device, including:
  • An obtaining module configured to obtain a first candidate motion information list of a current image block, wherein the first candidate motion information list includes predicted motion information, and the predicted motion information includes a motion vector value;
  • the conversion module is used to convert the accuracy of the motion vector value.
  • an embodiment of this specification provides a video encoding and decoding device, which is characterized in that it includes: a memory and a processor;
  • the memory is used to store program instructions
  • the processor is configured to call the program instructions, and when the program instructions are executed, to perform the following operations:
  • embodiments of this specification provide a computer-readable storage medium that stores a computer program that, when executed by a processor, realizes the video encoding or decoding described in the first aspect above method.
  • the video codec device can convert the accuracy of the motion vector values to achieve
  • the adjusted precision motion vector values in the first candidate motion information list are subjected to video encoding or decoding, thereby improving bandwidth utilization, simplifying encoding or decoding operations, and improving encoding or decoding efficiency.
  • FIG. 1 is a schematic diagram of a motion vector candidate block in Merge mode provided by an embodiment of this specification
  • FIG. 2 is a schematic diagram of divided prediction units of a triangular prediction mode provided by an embodiment of this specification
  • FIG. 3 is a schematic flowchart of a video encoding or decoding method provided by an embodiment of this specification
  • FIG. 4 is a schematic flowchart of another video encoding or decoding method provided by an embodiment of this specification.
  • FIG. 5 is a schematic flowchart of another video encoding or decoding method provided by an embodiment of this specification.
  • FIG. 6 is a schematic flowchart of another video encoding or decoding method provided by an embodiment of this specification.
  • FIG. 7 is a schematic flowchart of another video encoding or decoding method provided by an embodiment of this specification.
  • FIG. 8 is a schematic structural diagram of a video encoding and decoding device provided by an embodiment of this specification.
  • FIG. 9 is a schematic structural diagram of a video encoding and decoding device provided by an embodiment of this specification.
  • FIG. 10 is a schematic diagram of pixel interpolation provided by an embodiment of this specification.
  • Figure 11a is a schematic diagram of a processing coding unit for triangle prediction
  • Fig. 11b is a schematic diagram of another processing coding unit for triangle prediction
  • Fig. 12 is a schematic diagram of the principle of the MV scaling technology provided by an embodiment of the present specification.
  • the inter-frame prediction technology uses the time-domain correlation between adjacent frames of the video, uses the previously encoded reconstructed frame as a reference frame, and uses motion estimation and motion compensation to calculate the current frame (currently being encoded). Frames) are predicted to remove the temporal redundant information of the video.
  • Inter-frame prediction technologies mainly include forward prediction, backward prediction, bi-prediction, etc.
  • Forward prediction uses the previous reconstructed frame ("historical frame”) in time series to predict the current frame.
  • Backward prediction is to use frames after the current frame (“future frame”) to predict the current frame.
  • Bi-prediction uses not only "historical frames” but also "future frames” to predict the current frame.
  • bi-prediction may include using two forward frames for prediction ("front-forward prediction"), using two backward frames for prediction (“back-back prediction”), and using forward and backward frames for prediction ("Before and after forecast”).
  • Forward prediction means that if the best matching block of image block A is image block B, and the frame of image block B is the historical frame of the frame of image block A, then the MV of image block B relative to image block A is the image block The MV of A is the forward MV of image block A.
  • Backward prediction means that if the best matching block of image block A is image block B, and the frame of image block B is the future frame of the frame of image block A, then the MV of image block B relative to image block A is the image block The MV of A is the backward MV of image block A.
  • Bi-prediction means that the first best matching block of image block A is image block B1, and the frame where image block B1 is located is the historical frame of the frame where image block A is located.
  • the frame where the image block B2 is located is the future frame of the frame where the image block A is located: that is, the MV1 of the image block B1 relative to the image block A is obtained, and the MV2 of the B2 relative to the image block A is obtained, then MV1 and MV2 form a bidirectional MV group.
  • MV1 is the forward MV of image block A
  • MV2 is the backward MV of image block A.
  • One-way MV MVs that do not appear in the above-mentioned two-way MV group are one-way MVs; for example: (1)
  • the image block B1 in the historical frame of the frame where the image block A is obtained is relative to the MV1 of the image block A.
  • the image block B2 in the future frame of the frame where the image block A is located is relative to the MV2 of the image block A, then MV1 is called a one-way MV.
  • the image block B1 is the best matching block of the image block A.
  • Prediction refers to finding image data similar to the prediction block, which is also called the reference block of the prediction block. By encoding/compressing the difference between the prediction block and the reference block of the prediction block, the redundant information in the encoding/compression is reduced.
  • the difference between the prediction block and the reference block may be the residual obtained by subtracting the corresponding pixel values of the prediction block and the reference block.
  • Prediction includes intra prediction and inter prediction. Intra prediction refers to searching for the reference block of the prediction block in the frame where the prediction block is located, and inter prediction refers to searching for the reference block of the prediction block in other frames except the frame where the prediction block is located.
  • a prediction block refers to a basic unit used for prediction in a frame of image.
  • the prediction block is also called a prediction unit (PU).
  • PU prediction unit
  • the image is divided into multiple image blocks, each of the multiple image blocks can be divided into multiple image blocks again, and so on.
  • the number of division levels can be different, and the operation methods undertaken are also different.
  • the names of image blocks on the same level may be different.
  • each of the multiple image blocks that a frame of image is divided into for the first time is called a coding tree unit (CTU), such as 64 ⁇ 64, 128 ⁇ 128 in size;
  • Each coding tree unit can be further divided into square or rectangular coding units (CU); each CU looks for the most similar block in the reference frame (usually a reconstructed frame near the time domain) as the prediction block of the current CU .
  • the relative displacement between the current image block and similar blocks is MV.
  • the process of motion estimation is the process of obtaining a motion vector after searching and comparing the current coding block of the current frame in the reference frame.
  • Motion compensation is the process of using MV and reference frames to obtain the predicted frame. The predicted frame obtained by this process may be different from the original current frame.
  • the difference between the predicted frame and the current frame needs to be transferred after transformation and quantization.
  • the decoder can reconstruct the current frame through the difference between the MV, the reference frame, the predicted frame, and the current frame. This is the general idea and general process of inter prediction.
  • each coding unit can be divided into one, two, four, or other numbers of prediction units according to the prediction mode.
  • the prediction unit is the smallest unit in an image, and the prediction unit will not continue to be divided into multiple image blocks.
  • the "image block” or “current image block” mentioned below refers to a prediction unit (or a coding unit), and an image block can be further divided into multiple sub-image blocks, and each sub-image block can be further prediction.
  • AMVP Advanced Motion Vector Prediction
  • Skip mode the motion parameters need to be directly encoded, that is, MVD needs to be written into the code stream.
  • Merge mode the motion merging technology is used to process the motion parameters. Both the encoder and the decoder need to obtain the MV information of the neighboring blocks in the space and the time domain. The MV of the neighboring block is selected at the encoder, so there is no need to write MVD Enter the code stream, but only need to write the index of the selected adjacent block into the code stream.
  • Skip mode is a special Merge mode, which also needs to build a candidate list. The difference is that not only MVD is not required to be transmitted in skip mode, but also coefficient residuals are not required to be transmitted.
  • the video encoding or decoding method proposed in the embodiments of this specification can be applied to a video encoding and decoding device, and the video encoding and decoding device can be set in a terminal (such as a mobile phone, a tablet computer, a computer, a server, or other electronic equipment, etc.).
  • a terminal such as a mobile phone, a tablet computer, a computer, a server, or other electronic equipment, etc.
  • the embodiments of this specification can be applied to aircraft (such as unmanned aerial vehicles).
  • the embodiments of this specification can also be applied to other mobile platforms (such as unmanned ships, unmanned vehicles). , Robots, etc.), the embodiments of this specification do not make specific limitations.
  • the video encoding or decoding method can also be used in a handheld device (such as a handheld PTZ).
  • the video encoding or decoding method proposed in the embodiments of this specification is mainly aimed at improving the candidate motion information list for the current problems of the triangle prediction technology in inter-frame prediction.
  • the common Merge mode and the triangle prediction mode for constructing the motion information candidate list will be described as examples.
  • FIG. 1 is a schematic diagram of a motion vector candidate block in the Merge mode provided in an embodiment of this specification.
  • the spatial candidate list is obtained by sequentially obtaining the positions of the boxes 1-5 in the figure.
  • the candidate list is obtained from the positions of the boxes labeled 6 and 7 in Figure 1. Among them, if the motion vector value can be obtained from the position of 6, then the motion vector value is no longer obtained from the position of 7; if the motion vector value is not obtained from the position of 6, then the motion vector value is obtained from the position shown in 7 again.
  • FIG. 2 is a schematic diagram of a divided prediction unit of a triangle prediction mode provided in an embodiment of this specification.
  • the current image block is a coding unit CU
  • the coding unit CU needs to be divided into two triangular PUs.
  • the division method includes two division methods as shown in Figure 2. One is from the upper left corner to the lower right corner to obtain PU1 and PU2, the other is from the upper right to the lower left corner to obtain PU1 and PU2. .
  • the encoding device uses the previously encoded reconstructed frame as a reference frame, and predicts the current frame (the frame currently being encoded) through motion estimation and motion compensation, thereby removing the temporal redundant information of the video .
  • a frame of image it is first divided into a large coding area (Coding Tree Unit, CTU), such as 64x64 and 128x128.
  • CTU Coding Tree Unit
  • Each CTU can be further divided into square or rectangular coding units (CU).
  • CU square or rectangular coding units
  • each CU Based on the predicted MV of the CU, each CU searches for the most similar block in the reference frame (usually a reconstructed frame near the time domain) as the prediction block of the current CU.
  • the relative displacement between the current block and similar blocks is the motion vector (MV).
  • the process of motion estimation is the process of searching and comparing the current coding block of the current frame in the reference frame to obtain the MV.
  • Motion compensation is the process of using MV and reference frames to obtain the predicted frame.
  • the predicted frame obtained by this process may be different from the original current frame. Therefore, the difference between the predicted frame and the current frame needs to be transferred after transformation and quantization.
  • the MV information needs to be passed to the decoding device. In this way, the decoding end performs inverse quantization and inverse transformation to obtain the difference between the predicted frame and the current frame, and then the current frame can be reconstructed according to the difference between the MV, reference frame, predicted frame and the current frame.
  • the spatial candidate list is first obtained from the five spatial neighboring blocks 1-5 as shown in FIG. 1, which is different from the normal Merge mode.
  • the bi-predicted MVs in SMV1 can be converted into unidirectional predictions according to preset processing rules.
  • the preset processing rules are as follows:
  • the number of elements in the SMV2 list is fixed. In the steps 1 to 4 above, it is necessary to check whether the length of SMV2 reaches the preset value for each MV. Once it reaches the preset value, the process is terminated, and subsequent MVs will not perform the SMV2 list. .
  • the encoding end can select an MV for the sub-image block from the candidate list, and transmit the index value in the candidate list b where the selected MV is located and the triangle division method to the decoding end, or alternatively, the candidate list where the selected MV is located
  • the index value in b generates a combined index, and transmits the combined index to the decoding end, and the combined index can be further assigned a triangular division mode.
  • the above method can also be used to construct the final motion information candidate list for motion compensation.
  • the above is only for dividing the image block into triangular shapes.
  • the construction of the motion information candidate list is exemplified in the case of sub-image blocks.
  • this motion vector candidate list requires traversing all candidate MVs and reorganizing the dual MVs from dual MVs to single MVs (that is, one dual MV becomes two single MVs), and judging after the reorganization Whether the MV is repeated, and the unrepeated MV after the judgment needs to be added to the candidate list b.
  • two single MVs of a dual MV may be added to the candidate list b, which makes the encoding and decoding of the image block
  • the processing complexity is relatively high.
  • the conversion from the current motion information list SMV1 to the candidate motion information list SMV2 of the previous image block can be achieved through the following steps:
  • all or part of the heavy judging process can be removed.
  • the MV is added to the SMV2, it is not judged whether the same MV exists, or the number of traversal is reduced.
  • This scheme can remove the fourth step in the aforementioned SMV1 to SMV2 scheme, that is, only the aforementioned first, second, third, and fifth steps are retained, so that only three traversals are required.
  • This scheme can remove the fourth step in the aforementioned SMV1 conversion to SMV2 scheme, and at the same time, combine the second and third steps, that is, retain the aforementioned first step, the second and third combined steps, and the fifth step , So that only a second traversal is required.
  • the first to third steps in the aforementioned SMV1 conversion to SMV2 scheme are combined, that is, the steps after the aforementioned first to third steps are combined, the fourth step, and the fifth step are retained, so that only the second traversal is required.
  • This solution can combine the first, second, and third steps, while removing the fourth step, that is, the one-way MV of SMV1 is directly put into SMV2, and the two-way MV is split into two one-way MVs.
  • the fourth step in the scheme of converting SMV1 to SMV2 is removed, and only the first, second, third, and fifth steps mentioned above are retained, but SMV1 is not traversed.
  • the first step, the second and third merged steps, and the fifth step are not traversed, or only part of the steps are traversed.
  • the first motion information candidate list (SMV1) of the current image block in the first merge mode can be obtained; in the inter prediction mode, the second merge mode In mode, the first motion information candidate list (SMV1) of the current image block is obtained.
  • the first candidate MV list includes bidirectional MVs, the MVs in the first motion information candidate list (SMV1) are reorganized to obtain the second merge The second motion information candidate list (SMV2) of the current image block in mode.
  • inter-frame prediction modes for image blocks, including Merge mode (including Skip mode) and AMVP (advanced motion vector prediction) mode.
  • the first candidate MV list of the current image block in the first merge mode is acquired.
  • the first combining mode in this embodiment is a normal combining mode
  • the normal combining mode is a combining mode similar to the combining mode in the HEVC standard.
  • the construction of the first candidate MV list of the current image block in the first merge mode will be described below.
  • the spatial MVs of the K spatial candidate blocks of the current image block are acquired according to the preset spatial MV acquisition sequence. The specific acquisition method is a method in the prior art, which will not be repeated in this embodiment.
  • the preset spatial MV acquisition sequence is: the first image block adjacent to the first corner of the current image block and located on the first side of the current image block, and the first image block adjacent to the second corner of the current image block and The second image block located above the current image block, the third image block adjacent to the second corner of the current image block and located above the current image block, and the third image block adjacent to the first corner of the current image block and located in the current image block.
  • the first corner and the second corner are opposite corners.
  • the sequence of acquiring the spatial MV of each spatial candidate block is the first image block, the second image block, the third image block, the fourth image block, and the fifth image block in order.
  • the spatial MVs of the F time-domain candidate blocks of the current image block are acquired according to the preset time-domain MV acquisition order.
  • the preset time-domain MV acquisition sequence is: the sixth image block adjacent to the fourth corner of the current image block and located on the second side of the current image block, and the current image block is the co-located image block in the adjacent coded image.
  • the fourth corner and the third corner are opposite corners.
  • the order of acquiring the time domain MV of each time domain candidate block is the sixth image block, the co-located image block of the current image block in the adjacent coded image.
  • the preset filling vector may be a vector whose component is 0.
  • the inter prediction mode is the second merge mode
  • the first candidate MV list of the current image block is obtained. If the first candidate MV list includes bidirectional MVs, the MVs in the first candidate MV list are reorganized to obtain the second candidate MV list.
  • the second candidate MV list of the current image block in the merge mode is the triangle merging mode, and the triangle merging mode is the corresponding merging mode when the current image block is divided into two triangular image blocks.
  • Triangular prediction The corresponding prediction method when the current image block is divided into two triangular image blocks.
  • the current image block can be divided by the diagonal line from the upper left corner to the lower right corner of the current image block, or it can be divided by the diagonal line from the upper right corner to the lower left corner of the current image block , Get two prediction units (PU). If there is no two-way MV group in the first candidate MV list, and the number of MVs in the first candidate MV list is equal to the second preset threshold, it can be determined that the first candidate MV list is the second candidate MV list of the current image block .
  • the KL preset filling vector can be added to the first candidate MV list to obtain The second candidate MV list of the current image block.
  • the preset filling vector may be a vector with all zero elements. If there is no bidirectional MV group in the first candidate MV list, and the number L of MVs in the first candidate MV list is greater than the second preset threshold K:
  • the MVs in the first candidate MV list are reorganized to obtain the candidate MV list including all one-way MVs, wherein the reorganization method is the second merge
  • the reorganization method of the model in the VCC standard is the second merge
  • the MVs in the first candidate selection MV list are reorganized to obtain the second candidate MV list including all unidirectional MVs.
  • the order of the one-way MV in the first candidate MV list add the one-way MV to the second candidate MV list, and determine the relationship between the number of MVs in the current second candidate MV list and the second preset threshold ;
  • the first one after the one-way MV in the first candidate MV list is selected. Add to MV to the candidate MV list.
  • the forward MVs in the two-way MV group are added to the candidate MV list, and the number of MVs in the current second candidate MV list and the second preset are determined Threshold relationship;
  • the first bidirectional MV group after the bidirectional MV group Add to the MV to the current second candidate MV list.
  • the backward MV in the first two-way MV group after the two-way MV group Add to the current second candidate MV list.
  • the average value of the forward MV and the backward MV in the bidirectional MV group is added to the candidate MV list, and the MV in the current second candidate MV list is determined.
  • this solution also performs triangle prediction on CUs with W ⁇ H ⁇ 64, and converts all MVs (one-way MV and two-way MV) in the candidate motion information list into integer pixel accuracy for CUs of these sizes. , The reorganization process of the candidate motion information list is not carried out, thereby improving the performance of video coding and decoding.
  • FIG. 3 is a schematic flowchart of a video encoding or decoding method provided by an embodiment of this specification. The method can be applied to a video encoding and decoding device, where the explanation of the video encoding and decoding device is as described above and will not be repeated here. Specifically, the method of the embodiment of this specification includes the following steps.
  • S301 Acquire a first candidate motion information list of the current image block, where the first candidate motion information list includes predicted motion information, and the predicted motion information includes a motion vector value.
  • the video codec device may obtain the first candidate motion information list of the current image block, where the first candidate motion information list includes predicted motion information, and the predicted motion information includes reference image information and motion information.
  • Vector value may be a coding unit (CU).
  • the video codec device when the video codec device obtains the first candidate motion information list of the current image block, it may determine the first candidate motion information list of the current image block according to the merge mode; or, according to the triangle prediction The mode determines the first candidate motion information list of the current image block.
  • the current image block may be a coding unit CU
  • the video codec device may obtain the spatial domain of the Merge mode when determining the first candidate motion information list of the current image block according to the Merge mode A candidate list and a time domain candidate list, and according to the spatial domain candidate list and the time domain candidate list, the first candidate motion information list of the coding unit CU is determined.
  • the length of the first candidate motion information list (that is, the number of elements in the first candidate motion information list) is fixed to a preset value, such as the elements in the first candidate motion information list The number is fixed at 5.
  • Figure 1 can be used as an example for illustration.
  • the video coding and decoding device can select motion vector values as the spatial candidate list of the Merge mode from the positions adjacent to blocks 1-5 in the spatial domain in Figure 1, and the video coding and decoding The device may sequentially select the motion vector values from the positions of the time domain neighboring block 6 and the time domain neighboring block 7 in FIG. 1 as the time domain candidate list of the Merge mode. If the video codec device changes from the time domain in FIG. 1 If the motion vector value is obtained at the location of the neighboring block 6, the video codec device no longer obtains the motion vector value from the location of the time domain neighboring block 7 in FIG. 1.
  • the current image block may be a coding unit CU
  • the coding unit CU may be The prediction unit PU is divided into two triangles.
  • the video codec device may obtain the current motion information lists of the two triangular prediction units PU, and determine the first candidate motion information of the current image block according to the current motion information lists of the two prediction units PU List.
  • the video codec device may detect the current motion information list when determining the first candidate motion information list of the current image block according to the current motion information lists of the two prediction units PU Whether the current motion vector in the is a one-way prediction value, if the detection result is no, the current motion vector can be converted into a one-way prediction motion vector, and the current motion vector is determined according to the converted motion vector of the single prediction The first candidate motion information list of the image block.
  • the video codec device when it determines the current motion information list, it may obtain the spatial candidate list and the temporal candidate list in the Merge mode, and determine the spatial candidate list and the temporal candidate list according to the spatial candidate list and the temporal candidate list.
  • the difference between obtaining the first candidate motion information list in the triangle prediction mode and the foregoing first candidate motion information list in the Merge mode is that in the foregoing Merge mode, if the video codec device obtains The value of the motion vector at the position of 6 in Fig. 1 is no longer obtained, and the video codec device in the triangular prediction mode needs to obtain the adjacent block 6 in the time domain and the adjacent block 7 in the time domain in Fig. 1 The motion vector value of the position shown.
  • Figure 1 can be used as an example for illustration.
  • the video coding and decoding device can select the motion vector value as the spatial candidate list of the triangle prediction mode from the positions of adjacent blocks 1-5 in the spatial domain in sequence in Figure 1, and the video coding and decoding device
  • the motion vector value can be selected as the temporal candidate list of the triangular prediction mode from the positions of the temporal adjacent block 6 and the temporal adjacent block 7 in FIG. 1 in sequence.
  • the video coding and decoding device may determine the current motion information list according to the spatial domain candidate list and the time domain candidate list.
  • the positions of the seven candidate neighboring blocks 1-7 in FIG. 1 may be bi-predicted motion vector values, it is necessary to convert the bi-predicted motion vector values in the current motion information list. It is a unidirectionally predicted motion vector value to form the first candidate motion information list.
  • the video codec device may convert the bi-predicted motion vector value into a uni-directionally predicted motion vector value according to a preset processing rule to determine the first candidate motion of the current image block list of information.
  • the preset processing rules can be illustrated by an example. Assuming that the current motion information list is SMV1 and the first candidate motion information list is SMV2, the video codec device may calculate the unidirectionally predicted motion vector values MV in all SMV1 according to Put them in SMV2 in sequence. Then it detects whether the length of SMV2 reaches the preset value. If the detection result is yes, it is determined that the MV in SMV2 is full, and the conversion is stopped. If the detection result is no, the MV in the bi-predicted spatial candidate list in SMV1 can be followed Put SMV2 in order.
  • the video codec device can continue to detect whether the length of the SMV2 reaches a preset value, and if the detection result is yes, stop the conversion, and if the detection result is no, it can add the bi-predictive temporal candidate list in SMV1 MVs are placed in SMV2 in order. If the video codec device detects that the length of the SMV2 does not reach the preset value, it can put the average value of the two MVs in the bi-predicted spatial domain candidate list and the temporal domain candidate into SMV2 in sequence until the The length of SMV2 reaches the preset value.
  • the current motion vector is converted into a unidirectionally predicted motion vector, which can reduce that if the two PUs predicted by the triangle are both bi-predicted MVs during the motion compensation process, then a triangle predicted CU needs to take 4 CUs.
  • the information (each PU takes out two CUs pointed to by the MV), so compared to the ordinary bi-prediction mode CU (only need to take out the information of two CUs), the bandwidth consumption is doubled, and the bandwidth utilization is improved .
  • the video codec device can convert the accuracy of the motion vector value.
  • the converting the precision value of the motion vector includes converting a high-pixel precision motion vector value into a low-pixel precision motion vector value, for example, converting a 1/4-pixel precision motion vector into a half-precision motion vector Or integer precision motion vector.
  • the video codec device may convert the accuracy of the motion vector value according to the size of the current image block.
  • the size of the current image block may consist of the width and height of one coding unit CU, that is, the size of the current image block may be W ⁇ H.
  • the video processing device may convert the accuracy of motion vector values in the first candidate motion information list when constructing the first candidate motion information list.
  • the video processing device may adjust the value of the motion vector value in the first candidate motion information list when receiving a motion vector value call instruction. Accuracy.
  • the motion vector of the object between two adjacent frames may not be exactly an integer number of pixels.
  • a motion vector with 1/4 pixel accuracy is used for the motion estimation of the luminance component in HEVC.
  • the value of these fractional pixels must be approximately interpolated, that is, the line direction and the reference frame Perform K-fold interpolation in the column direction, and search in the image after interpolation.
  • the process of interpolating the current image block needs to use the pixels in the current image block and the pixels in the adjacent area.
  • FIG. 10 is a schematic diagram of a pixel interpolation provided in an embodiment of this specification.
  • a 0,0 and d 0,0 are 1/4 pixels
  • b 0,0 and h 0,0 are half pixels
  • c 0,0 and n 0,0 are 3/4 pixels. point.
  • the current image block is a 2 ⁇ 2 block A 0,0 ⁇ A 1,0 , A 0,0 ⁇ A 0,1 surrounded by 2 ⁇ 2 blocks, in order to calculate all the 2 ⁇ 2 image blocks Interpolation points need to use some points outside the 2 ⁇ 2, including 3 on the left, 4 on the right, 3 on the top, and 4 on the bottom.
  • the video codec device may determine whether the size of the current image block meets the first condition when converting the accuracy of the motion vector value according to the size of the current image block; if the result of the determination is yes , The bi-predicted motion vector value in the first candidate motion information list of the current image block is converted into integer pixel accuracy.
  • satisfying the first condition includes: the current image block has a bi-predicted motion vector, and the size of the current image block meets a first preset range threshold.
  • the meeting the first preset range threshold includes: the size of the current image block is greater than or equal to 64 pixels.
  • the first preset range threshold may also include other range values, which are not specifically limited in the embodiment of this specification.
  • the video codec device may convert all bi-predicted motion vector values in the first candidate motion information list into integer pixel accuracy.
  • the bandwidth pressure is reduced and the bandwidth utilization rate is improved.
  • the video codec device determines that the current image block does not satisfy the first condition, it can convert all the motion vector values in the first candidate motion information list of the current image block into integers. Pixel accuracy.
  • the video coding unit The decoding device may convert all the motion vector values in the first candidate motion information list into integer pixel accuracy.
  • the motion vector value includes a horizontal component and a vertical component; the video codec device may obtain the first candidate motion information list of the current image block when converting the accuracy of the motion vector value And convert the horizontal and vertical components of the motion vector value into integer pixel accuracy.
  • the video encoding and decoding device when it converts the horizontal component and the vertical component of the motion vector value into integer pixel accuracy, it may determine the conversion coefficient s according to the storage accuracy of the motion vector value, and Use the first preset conversion rule and the conversion coefficient s to convert the horizontal component of the predicted value of the motion vector into integer pixel accuracy; and use the second preset conversion rule and the conversion coefficient s to convert the motion vector The vertical component of the vector prediction value is converted to integer pixel accuracy.
  • the video coding and decoding device when the video coding and decoding device uses the first preset conversion rule and the conversion coefficient s to convert the horizontal component of the motion vector prediction value into an integer pixel accuracy, it can determine the horizontal component Whether it is greater than or equal to 0, if it is determined that the horizontal component is greater than or equal to 0, the difference between the conversion coefficient s and 1 can be shifted to the left by 1 bit to obtain the first shift value, and the first shift The sum of the value and the horizontal component is shifted to the right by s bits to obtain a second shift value, and the second shift value is shifted to the left by s bits to obtain the integral pixel accuracy of the horizontal component.
  • the first preset conversion rule may include:
  • MV2x ((MV1x+(1 ⁇ (s-1)))>>s) ⁇ s.
  • the " ⁇ ” is used to indicate left shift
  • the ">>” is used to indicate right shift
  • the "1 ⁇ (s-1)” is used to indicate the first shift value
  • the "(MV1x+(1 ⁇ (s-1)))>>s” is used to indicate the second shift value.
  • MV1x is shifted to the left by n bits
  • MV1x is shifted to the right by n bits
  • a positive integer if MV1x is shifted to the left by n bits, it means that MV1x is multiplied by 2 n , if MV1x is shifted to the right by n bits, it means that MV1x is divided by 2 n without counting the remainder, where n is greater than or equal to 1.
  • the video codec device may determine that the conversion coefficient s is 2, if the horizontal component MV1x is 3, and the binary value is "11" , the horizontal component MV1x is greater than 0, the calculation process of MV2x is as follows:
  • the video codec device can shift the difference 1 between the conversion coefficient 2 and 1 by 1 bit to the left to obtain the first shift value 2, and combine the first shift value 2 with the The sum 5 of the horizontal component 3 is shifted by 2 bits to the right to obtain a second shift value 1, and the second shift value 1 is shifted by 2 bits to the left, and the integral pixel precision MV2x of the horizontal component is obtained as 4.
  • the first preset conversion rule when the horizontal component is greater than or equal to 0, includes but is not limited to the above conversion rule, and may also be other conversion rules, and only needs to convert the horizontal component into The whole pixel is fine.
  • the first preset conversion rule may also be:
  • the video codec device may determine that the conversion coefficient s is 2, if the horizontal component MV1x is 5, and the binary value is "101" , the horizontal component MV1x is greater than 0, the calculation process of MV2x is as follows:
  • the video codec device can shift the MV1x, that is, 5 to the right by 2 to obtain 1, and then shift 1 to the left by 2 to obtain the integer pixel accuracy MV2x of the horizontal component as 4.
  • the video codec device may shift the difference between the first shift value and the horizontal component by s bits to the right to obtain a third shift value , And shift the third shift value to the left by s bits and take the opposite number to obtain the integer pixel accuracy of the horizontal component.
  • the first preset conversion rule includes:
  • MV2x -((-MV1x+(1 ⁇ (s-1)))>>s) ⁇ s.
  • the " ⁇ ” is used to indicate left shift
  • the ">>” is used to indicate right shift
  • the "-MV1x” indicates the inverse of MV1x
  • the "(-MV1x+(1 ⁇ (s -1)))>>s” is used to indicate the third shift value.
  • the video codec device may determine that the conversion coefficient s is 2, and if the horizontal component MV1x is -7, then the horizontal component MV1x Less than 0, the calculation process of MV2x is as follows:
  • the video encoding and decoding device can shift the difference 1 between the conversion coefficient 2 and 1 by 1 bit to the left to obtain the first shift value 2, and invert the horizontal component -7. 7. Shift the sum 9 of the first shift value 2 and 7 to the right by 2 bits to obtain a third shift value 2, and shift the third shift value 2 to the left by 2 bits and invert it to obtain the
  • the integral pixel precision MV2x of the horizontal component is -8.
  • the first preset conversion rule when the horizontal component is less than 0, includes, but is not limited to, the conversion rule described above, and may also be other rules. It is only necessary to convert the horizontal component into an integer pixel. can.
  • the first preset conversion rule may also be:
  • MV2x -(((-MV1x)>>s) ⁇ s).
  • the video codec device may determine that the conversion coefficient s is 2, and if the horizontal component MV1x is -5, then the horizontal component MV1x Less than 0, the calculation process of MV2x is as follows:
  • the video codec device can invert the MV1x that is -5 to get 5, shift 5 to the right by 2 to get 1, and then shift 1 to the left by 2 to get the integer pixel accuracy of the horizontal component.
  • MV2x is -4.
  • the video encoding and decoding device when the video encoding and decoding device uses the second preset conversion rule and the conversion coefficient s to convert the vertical component of the motion vector prediction value into integer pixel accuracy, it may determine the vertical Whether the straight component is greater than or equal to 0, if it is determined that the vertical component is greater than or equal to 0, the difference between the conversion coefficient s and 1 can be shifted to the left by 1 bit to obtain the fourth shift value, and the first The sum of the four shift values and the vertical component is shifted to the right by s bits to obtain a fifth shift value, and the fifth shift value is shifted to the left by s bits to obtain the integer pixel accuracy of the vertical component.
  • the second preset conversion rule may include:
  • MV2y ((MV1y+(1 ⁇ (s-1)))>>s) ⁇ s.
  • the second preset conversion rule when the vertical component is greater than or equal to 0, includes but is not limited to the above conversion rule, and may also be other rules, as long as the vertical component is converted It can be a whole pixel.
  • the second preset conversion rule may also be:
  • MV2y (MV1y>>s) ⁇ s.
  • the video codec device may shift the difference between the fourth shift value and the vertical component by s bits to the right to obtain a sixth shift.
  • Bit value shift the sixth shift value to the left by s bits and take the opposite number to obtain the integer pixel accuracy of the vertical component.
  • the second preset conversion rule includes:
  • MV2y -((-MV1y+(1 ⁇ (s-1)))>>s) ⁇ s.
  • the second preset conversion rule when the vertical component is less than 0, includes but is not limited to the above conversion rule, and may also be other rules, as long as the vertical component is converted into a whole Pixels.
  • the second preset conversion rule may also be:
  • the motion vector value includes a horizontal component; the video codec device may obtain the motion vector value in the first candidate motion information list of the current image block when converting the accuracy of the motion vector value And convert the horizontal component of the motion vector value into integer pixel accuracy.
  • the motion vector value includes a vertical component; the video codec device may obtain the motion vector in the first candidate motion information list of the current image block when converting the accuracy of the motion vector value And convert the vertical component of the motion vector value to integer pixel accuracy.
  • FIG. 11b is a schematic diagram of another processing coding unit for triangle prediction provided by the prior art .
  • the worst case of HEVC (1/4 pixel precision MV) is an 8 ⁇ 8 bidirectional inter prediction CU
  • VVC has increased by 47%, which also causes greater bandwidth pressure.
  • the method of converting the bi-predicted motion vector values into integer pixel accuracy in the embodiment of the present specification reduces bandwidth pressure and improves bandwidth utilization.
  • the video coding and decoding device may also re-establish the current motion vector value according to the converted accuracy.
  • the second candidate motion information list of the image so that when the video codec device receives the call instruction of the first candidate motion information list, it can directly call the converted motion vector values in the candidate running information list, thereby Improve the efficiency of video encoding or decoding.
  • the video codec device may obtain the first candidate motion information list of the current image block, and according to the size of the current image block, convert the accuracy of the motion vector value in the first candidate motion information list, so that Perform video encoding or decoding according to the converted first candidate motion information list.
  • bandwidth utilization can be improved, encoding or decoding operations can be simplified, and encoding or decoding efficiency can be improved.
  • the candidate motion information column may be a merge candidate list (merge candidate list), a triangle prediction merge candidate list (triangle merge candidate list), or other candidate lists for inter-frame prediction.
  • the candidate list can be established through the following steps: Step 1, the original triangle prediction merge candidate list construction process is modified to the construction process of the candidate list in the ordinary merge mode; this process combines the two candidate lists The construction is merged into one, and the reorganization process after the candidate list construction is not performed. Step 2: For the two-way MV that appears directly using the merge candidate list (merge candidate list), for the two one-way prediction MVs in it, select one of the one-way prediction MVs; the selection method can always select the first one, or The second one is always selected, or one of the two can be selected according to preset rules. That is, all or part of the merge candidate list (merge candidate list) can be used as the MV candidate list. Of course, this embodiment does not exclude MVs obtained in other ways as the candidate list.
  • the MV in the 0th list (List0) in the bi-directional prediction can be fixedly selected as the MV in the candidate list.
  • the MV in the first list (List1) in the bidirectional prediction can be fixedly selected as the MV in the candidate list.
  • the MV in the first list (List1) is scaled to List0 through the MV scaling technology, and then the MVs in the 0th list (List0) and the first list (List1) are averaged , Select the reference frame of list 0 (List0) as the reference frame.
  • the MV in the 0th list (List0) is scaled to List1 through the MV scaling technology, and then the MVs in the 1st list (List1) and the 0th list (List0) are averaged , Select the reference frame of the first list (List1) as the reference frame.
  • the MV in the first list (List1) is scaled to List0 through the MV scaling technology, and then the MVs in the 0th list (List0) and the first list (List1) are weighted and averaged , Select the reference frame of list 0 (List0) as the reference frame.
  • the weighting weight is determined by the following methods: (a) According to the reference frame corresponding to the existing MV in the current merge list, if there are more cases in list0, a higher weight is assigned to the MV in list0. This value can be fixed, for example A fixed value in the interval from 0.5 to 1; if there are more cases in list1, assign a higher weight to the MV of list1. This value can be fixed, such as a fixed value in the interval from 0.5 to 1; (b) According to the image block Set different weight values for the size; (c) Obtain the weight values according to statistics, or obtain the weight values of different lists through deep learning.
  • the MV in the 0th list (List0) is scaled to List1 through the MV scaling technology, and then the MVs in the 0th list (List0) and the 1st list (List1) are weighted and averaged , Select the reference frame of the first list (List1) as the reference frame.
  • the weighting weight is determined by the following methods: (a) According to the reference frame corresponding to the existing MV in the current merge list, if there are more cases in list0, a higher weight is assigned to the MV in list0. This value can be fixed, for example A fixed value in the interval from 0.5 to 1; if there are more cases in list1, assign a higher weight to the MV of list1. This value can be fixed, such as a fixed value in the interval from 0.5 to 1; (b) According to the image block Set different weight values for the size; (c) Obtain the weight values according to statistics, or obtain the weight values of different lists through deep learning.
  • adaptive selection can be performed in the following manner:
  • the solution corresponding to the first specific embodiment is used directly, if there are more cases in the first list (list1) , Just use the solution corresponding to the second specific embodiment of the method, if there are the same amount, use the solution corresponding to the third specific embodiment of the method or the solution corresponding to the fourth specific embodiment of the method.
  • Different thresholds can be set according to the block size of the current CU, and when a certain block threshold condition is met, the corresponding method is selected. For example, for a CU whose width and height are both smaller than 16, use the scheme corresponding to the first specific embodiment; for a CU whose width and height are both greater than 64, use the scheme corresponding to the second specific embodiment; for both width and height For CUs between 16 and 64, solutions corresponding to other specific embodiments are used.
  • the above methods can be pre-fixed on the encoding and decoding side, so as to avoid writing additional code streams, or making decisions on the encoding side and then writing the decision results to the decoding side.
  • the video codec device may also establish a second candidate motion information list according to the motion vector value after the conversion accuracy.
  • the video codec device may convert the accuracy of the motion vector value to integer pixel accuracy.
  • the video codec device may convert all or part of the motion vector value to integer pixel accuracy.
  • the video codec device may determine whether the size of the current image block meets a preset range. In some embodiments, the video codec device may perform different precision conversion operations on different types of the motion vector values according to the size range of the current image block.
  • the video codec device may convert the bi-predictive motion vector to integer pixel accuracy.
  • the horizontal direction component and/or the vertical direction component of the bi-predictive motion vector is converted to integer pixel accuracy.
  • the motion vector in one direction in the bi-predictive motion vector is converted to integer pixel accuracy.
  • the one-way motion vector value and/or the two-way motion vector value in the motion vector value is converted into integer pixel accuracy.
  • the video codec device may obtain the first candidate motion information list of the current image block according to the merge candidate list, the triangle prediction merge candidate list, or other candidate lists of inter-frame prediction.
  • the video codec device can directly select a unidirectional predicted MV of the bidirectional MV in the merge candidate list (merge candidate list).
  • the bidirectional motion vector value in the first candidate list is directly converted into integer pixel accuracy.
  • FIG. 4 is a schematic flowchart of another video encoding or decoding method provided by an embodiment of this specification.
  • the method can be applied to a video encoding and decoding device, wherein the specific explanation of the video encoding and decoding device is as described above Said.
  • the embodiment of this specification is an implementation process of converting the accuracy of the motion vector value in the first candidate motion information list when the call instruction of the motion vector value is received after the first candidate motion information list is established. Schematic description. Specifically, the method of the embodiment of this specification includes the following steps.
  • S401 Acquire a first candidate motion information list of the current image block.
  • the video codec device may obtain the first candidate motion information list of the current image block, and the first candidate motion information list includes the motion vector value.
  • the specific embodiments and examples are as described above. Repeat it again.
  • the candidate motion information column may be a merge candidate list (merge candidate list), or a triangle prediction merge candidate list (triangle merge candidate list).
  • the video coding and decoding device may obtain the size of the current image block.
  • the current image block may be a coding unit CU.
  • the size of the current image block may consist of the width and height of a coding unit CU, that is, the current image
  • the size of the block can be W ⁇ H.
  • the video encoding and decoding device may, upon receiving the call instruction of the motion vector value in the first candidate motion information list, according to the current The size of the image block converts the accuracy of the motion vector value.
  • the video codec device may also convert the accuracy of the motion vector value when receiving another call request for requesting the use of the motion vector value in the first candidate motion information list.
  • the video codec device may determine whether the size of the current image block satisfies the first condition when receiving the call instruction of the motion vector value in the first candidate motion information list; if so, then Converting the bi-predicted motion vector value in the first candidate motion information list of the current image block into integer pixel accuracy.
  • the video encoding and decoding device determines that the current image block does not satisfy the first condition, it converts all the motion vector values in the first candidate motion information list of the current image block into integer pixels Accuracy.
  • the specific embodiments are as described above, and will not be repeated here.
  • the video coding and decoding device can obtain the first candidate motion information list of the current image block, and obtain the size of the current image block.
  • the accuracy of the motion vector value is converted according to the size of the current image block.
  • FIG. 5 is a schematic flowchart of another video encoding or decoding method provided by an embodiment of this specification.
  • the method can be applied to a video encoding and decoding device, wherein the specific explanation of the video encoding and decoding device is as described above Said.
  • the embodiment of this specification schematically illustrates the implementation process of converting any one of the bi-predicted motion vector values in the first candidate motion information list into integer pixel accuracy.
  • the method of the embodiment of this specification includes the following steps.
  • S501 Acquire a first candidate motion information list of the current image block.
  • the video coding and decoding device may obtain the first candidate motion information list of the current image block.
  • the specific embodiments and examples are described above, and will not be repeated here.
  • the video codec device can determine whether the size of the current image block meets the second condition, if the determination result is yes, then execute step S503, if the judgment result is no, then execute step S504.
  • the second condition includes that the current image block has at least two bi-predicted motion vectors, and the size of the current image block meets a second preset range threshold.
  • the meeting the second preset range threshold includes, but is not limited to, the size of the current image block is less than 64 pixels; or, the size of the current image block is greater than 16 pixels and less than 64 pixels .
  • S503 Convert any one of the bi-predicted motion vector values in the first candidate motion information list of the current image block into integer pixel accuracy.
  • the video codec device determines that the size of the current image block satisfies the second condition, it can convert any bi-predicted motion vector value in the first candidate motion information list of the current image block It is the whole pixel precision.
  • the video codec device may detect the current image block's motion vector value before converting any bi-predicted motion vector value in the first candidate motion information list of the current image block into integer pixel accuracy. Whether there are at least two bi-predicted motion vector values in the first candidate motion information list, if it is detected that there are at least two bi-predicted motion vector values in the first candidate motion information list, the video codec device may The step of converting any bi-predicted motion vector value in the first candidate motion information list of the current image block into integer pixel accuracy is performed.
  • the video codec device can convert any bi-predicted motion vector value in the first candidate motion information list into integer pixel accuracy.
  • the bandwidth pressure is reduced to a certain extent, and the bandwidth utilization rate is improved.
  • S504 Convert all motion vector values in the first candidate motion information list of the current image block into integer pixel accuracy.
  • the video codec device may convert all the motion vector values in the first candidate motion information list of the current image block into integers. Pixel accuracy.
  • the video coding unit The decoding device may convert all the motion vector values in the first candidate motion information list into integer pixel accuracy.
  • the video codec device may obtain the first candidate motion information list of the current image block, and determine whether the size of the current image block meets the second condition, and if it is satisfied, the first candidate motion information list of the current image block may be Any motion vector value of the bi-prediction in a candidate motion information list is converted into integer pixel accuracy; if it is not satisfied, all the motion vector values in the first candidate motion information list of the current image block can be converted into integer pixel accuracy .
  • the bandwidth utilization rate is improved to a certain extent, the encoding or decoding operation is simplified, and the encoding or decoding efficiency is improved.
  • FIG. 6 is a schematic flowchart of another video encoding or decoding method provided by an embodiment of this specification.
  • the method can be applied to a video encoding and decoding device, wherein the specific explanation of the video encoding and decoding device is as before Said.
  • the embodiment of the present specification schematically illustrates the implementation process of converting the horizontal component of the motion vector value in the first candidate motion information list into integer pixel accuracy. Specifically, the method of the embodiment of this specification includes the following steps.
  • S601 Acquire a first candidate motion information list of the current image block.
  • the video coding and decoding device may obtain the first candidate motion information list of the current image block.
  • the specific embodiments and examples are described above, and will not be repeated here.
  • S602 Acquire the horizontal component of the motion vector value in the first candidate motion information list of the current image block.
  • the video codec device may obtain the horizontal component of the motion vector value in the first candidate motion information list of the current image block.
  • the video encoding and decoding device can convert the horizontal component of the motion vector value into an integer pixel accuracy.
  • the video codec device when the video codec device converts the horizontal component of the motion vector value to integer pixel accuracy, it may obtain the horizontal component of the motion vector value in the first candidate motion information list of the current image block , And convert the horizontal component of the motion vector value into integer pixel accuracy.
  • the video codec device may obtain the bi-predicted motion vector when converting the bi-predicted motion vector value in the first candidate motion information list of the current image block into integer precision. And convert the horizontal component of the bi-predicted motion vector value into integer pixel accuracy.
  • the video codec device may obtain the first candidate motion information list when converting all the motion vector values in the first candidate motion information list of the current image block into integer pixel accuracy. All the horizontal components of the motion vector values in, and convert all the horizontal components of the motion vector values into integer pixel accuracy.
  • the video encoding and decoding device when the video encoding and decoding device converts the horizontal component of the motion vector value into integer pixel accuracy, it may determine the conversion coefficient s according to the storage accuracy of the motion vector value, and use the first preset Suppose the conversion rule and the conversion coefficient s are used to convert the horizontal component of the motion vector prediction value into integer pixel accuracy. In some embodiments, the relationship between the conversion coefficient s and the storage accuracy of the motion vector value is as described above, and will not be repeated here.
  • the video coding and decoding device when the video coding and decoding device uses the first preset conversion rule and the conversion coefficient s to convert the horizontal component of the motion vector prediction value into an integer pixel accuracy, it can determine the horizontal component Whether it is greater than or equal to 0, if it is determined that the horizontal component is greater than or equal to 0, the difference between the conversion coefficient s and 1 can be shifted to the left by 1 bit to obtain the first shift value, and the first shift The sum of the value and the horizontal component is shifted to the right by s bits to obtain a second shift value, and the second shift value is shifted to the left by s bits to obtain the integral pixel accuracy of the horizontal component.
  • the first preset conversion rule is as described above, and will not be repeated here.
  • the first preset conversion rule when the horizontal component is greater than or equal to 0, includes but is not limited to the above conversion rule, and may also be other conversion rules, and only needs to convert the horizontal component into The whole pixel is fine. Specific embodiments and examples are described above.
  • the video codec device may shift the difference between the first shift value and the horizontal component by s bits to the right to obtain a third shift value , And shift the third shift value to the left by s bits and take the opposite number to obtain the integer pixel accuracy of the horizontal component.
  • the first preset conversion rule is as described above, and will not be repeated here.
  • the first preset conversion rule when the horizontal component is less than 0, includes, but is not limited to, the conversion rule described above, and may also be other rules. It is only necessary to convert the horizontal component into an integer pixel. can. The specific embodiments and examples are described above, and will not be repeated here.
  • the video codec device may obtain the first candidate motion information list of the current image block, and obtain the horizontal component of the motion vector value in the first candidate motion information list of the current image block, and convert the motion The horizontal component of the vector value is converted into the integer pixel precision, so that video encoding or decoding is performed according to the motion vector value after the horizontal component is converted to the integer pixel precision.
  • the bandwidth utilization rate is improved to a certain extent, the encoding or decoding operation is simplified, and the encoding or decoding efficiency is improved.
  • FIG. 7 is a schematic flowchart of another video encoding or decoding method provided by an embodiment of this specification.
  • the method can be applied to a video encoding and decoding device, wherein the specific explanation of the video encoding and decoding device is as described above Said.
  • the embodiment of the present specification schematically illustrates the implementation process of converting the vertical component of the motion vector value in the first candidate motion information list into integer pixel accuracy. Specifically, the method of the embodiment of this specification includes the following steps.
  • S701 Acquire a first candidate motion information list of the current image block.
  • the video encoding and decoding device can obtain the first candidate motion information list of the current image block.
  • the specific embodiments and examples are described above, and will not be repeated here.
  • the video codec device may obtain the vertical component of the motion vector value in the first candidate motion information list of the current image block.
  • the motion vector value in this specification is used as an optional embodiment.
  • the video codec device can obtain the first candidate motion information of the current image block when converting the vertical component of the motion vector value into integer pixel accuracy. List the vertical component of the motion vector value in the list, and convert the vertical component of the motion vector value into integer pixel accuracy.
  • the horizontal component of the motion vector value is variable or unchanged. More preferably, the pixel accuracy of the horizontal component of the motion vector value remains unchanged.
  • the video codec device may obtain the bi-predicted motion vector when converting the bi-predicted motion vector value in the first candidate motion information list of the current image block into integer precision. And convert the vertical component of the bi-predicted motion vector value into integer pixel accuracy.
  • the video codec device may obtain the first candidate motion information list when converting all the motion vector values in the first candidate motion information list of the current image block into integer pixel accuracy. All the vertical components of the motion vector values in, and convert all the vertical components of the motion vector values to integer pixel accuracy.
  • the video encoding and decoding device when it converts the vertical component of the motion vector value into integer pixel accuracy, it may determine the conversion coefficient s according to the storage accuracy of the motion vector value, and use the second preset Suppose the conversion rule and the conversion coefficient s are used to convert the vertical component of the motion vector prediction value into integer pixel accuracy.
  • the method for converting the vertical component of the motion vector prediction value into the integer pixel accuracy is as described above, and will not be repeated here.
  • the video encoding and decoding device when the video encoding and decoding device uses the second preset conversion rule and the conversion coefficient s to convert the vertical component of the motion vector prediction value into integer pixel accuracy, it may determine the vertical Whether the straight component is greater than or equal to 0, if it is determined that the vertical component is greater than or equal to 0, the difference between the conversion coefficient s and 1 can be shifted to the left by 1 bit to obtain the fourth shift value, and the first The sum of the four shift values and the vertical component is shifted to the right by s bits to obtain a fifth shift value, and the fifth shift value is shifted to the left by s bits to obtain the integer pixel accuracy of the vertical component.
  • the second preset conversion rule is as described above, and will not be repeated here.
  • the second preset conversion rule when the vertical component is greater than or equal to 0, includes but is not limited to the above conversion rule, and may also be other rules, as long as the vertical component is converted It only needs to be a whole pixel, and the specific embodiments are as described above, which will not be repeated here.
  • the video codec device may shift the difference between the fourth shift value and the vertical component by s bits to the right to obtain a sixth shift.
  • Bit value shift the sixth shift value to the left by s bits and take the opposite number to obtain the integer pixel accuracy of the vertical component.
  • the second preset conversion rule is as described above, and will not be repeated here.
  • the video codec device can obtain the first candidate motion information list of the current image block, and obtain the vertical component of the motion vector value in the first candidate motion information list of the current image block, and convert the The vertical component of the motion vector value is converted to integer pixel accuracy, so that video encoding or decoding is performed according to the motion vector value after the vertical component is converted to integer pixel accuracy.
  • the bandwidth utilization rate is improved to a certain extent, the encoding or decoding operation is simplified, and the encoding or decoding efficiency is improved.
  • FIG. 8 is a schematic structural diagram of a video encoding and decoding device provided by an embodiment of this specification. Specifically, the video encoding and decoding device is provided on the video encoding and decoding device, and the device includes: an acquisition module 801 and conversion module 802;
  • the obtaining module 801 is configured to obtain a first candidate motion information list of a current image block, where the first candidate motion information list includes predicted motion information, and the predicted motion information includes a motion vector value;
  • the conversion module 802 is used to convert the accuracy of the motion vector value.
  • the conversion module 802 converts the accuracy of the motion vector value, it is specifically used for:
  • the accuracy of the motion vector value is converted.
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the accuracy of the motion vector value is converted according to the size of the current image block.
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the bi-predicted motion vector value in the first candidate motion information list of the current image block is converted into integer pixel accuracy.
  • conversion module 802 is also used for:
  • all the motion vector values in the first candidate motion information list of the current image block are converted into integer pixel accuracy.
  • the first condition includes:
  • the current image block has a bi-predicted motion vector, and the size of the current image block meets a first preset range threshold.
  • the meeting the first preset range threshold includes: the size of the current image block is greater than or equal to 64 pixels.
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the motion vector value of at least one direction of the bi-prediction in the first candidate motion information list of the current image block is converted into integer pixel accuracy.
  • conversion module 802 is also used for:
  • all the motion vector values in the first candidate motion information list of the current image block are converted into integer pixel accuracy.
  • the second condition includes:
  • the meeting the second preset range threshold includes:
  • the size of the current image block is less than 64 pixels; or,
  • the size of the current image block is greater than 16 pixels and less than 64 pixels.
  • the motion vector value includes a horizontal component and a vertical component; when the conversion module 802 converts the accuracy of the motion vector value, it is specifically used for:
  • the conversion module 802 converts the horizontal component and the vertical component of the motion vector value into integer pixel precision, it is specifically used for:
  • the vertical component of the motion vector prediction value is converted into integer pixel accuracy.
  • the motion vector value includes a horizontal component; when the conversion module 802 converts the accuracy of the motion vector value, it is specifically used for:
  • the conversion module 802 converts the horizontal component of the motion vector value into integer pixel accuracy, it is specifically used for:
  • the horizontal component of the motion vector prediction value is converted into integer pixel accuracy.
  • the motion vector value includes a vertical component; when the conversion module 802 converts the accuracy of the motion vector value, it is specifically used to:
  • the conversion module 802 converts the vertical component of the motion vector value into integer pixel accuracy, it is specifically used for:
  • the vertical component of the motion vector prediction value is converted into integer pixel accuracy.
  • the conversion module 802 uses the first preset conversion rule and the conversion coefficient s to convert the horizontal component of the motion vector value into integer pixel accuracy, it is specifically used for:
  • the second shift value is shifted left by s bits to obtain the integer pixel accuracy of the horizontal component.
  • the horizontal component is MV1x
  • the integer pixel accuracy of the horizontal component is MV2x
  • the first preset conversion rule includes:
  • MV2x ((MV1x+(1 ⁇ (s-1)))>>s) ⁇ s.
  • conversion module 802 is also used for:
  • the horizontal component is MV1x
  • the integer pixel accuracy of the horizontal component is MV2x
  • the first preset conversion rule includes:
  • MV2x -((-MV1x+(1 ⁇ (s-1)))>>s) ⁇ s.
  • the conversion module 802 uses the second preset conversion rule and the conversion coefficient s to convert the vertical component of the motion vector value into integer pixel accuracy, it is specifically used for:
  • the vertical component is MV1y
  • the integer pixel accuracy of the vertical component is MV2y
  • the second preset conversion rule includes:
  • MV2y ((MV1y+(1 ⁇ (s-1)))>>s) ⁇ s.
  • conversion module 802 is also used for:
  • the vertical component is MV1y
  • the integer pixel accuracy of the vertical component is MV2y
  • the second preset conversion rule includes:
  • MV2y -((-MV1y+(1 ⁇ (s-1)))>>s) ⁇ s.
  • the acquiring module 801 acquires the first candidate motion information list of the current image block, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined according to the triangle prediction mode.
  • the current image block is a coding unit CU.
  • the acquiring module 801 determines the first candidate motion information list of the current image block according to the merge mode, it is specifically configured to:
  • the acquiring module 801 determines the first candidate motion information list of the current image block according to the triangle prediction mode, it is specifically used to:
  • the first candidate motion information list of the current image block is determined.
  • the acquiring module 801 determines the first candidate motion information list of the current image block according to the current motion information lists of the two prediction units PU, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined.
  • the acquiring module 801 acquires the first candidate motion information list of the current image block, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined according to the triangle prediction mode.
  • the current image block is a coding unit CU.
  • the acquiring module 801 determines the first candidate motion information list of the current image block according to the merge mode, it is specifically configured to:
  • the acquiring module 801 determines the first candidate motion information list of the current image block according to the triangle prediction mode, it is specifically used to:
  • the first candidate motion information list of the current image block is determined.
  • the acquiring module 801 determines the first candidate motion information list of the current image block according to the current motion information lists of the two prediction units PU, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined.
  • the conversion module 802 converts the accuracy of the motion vector value, it is further used for:
  • a second candidate motion information list is established.
  • the conversion module 802 converts the accuracy of the motion vector value, it is specifically used for:
  • the accuracy of the motion vector value is converted to an integer pixel accuracy.
  • the conversion module 802 converts the accuracy of the motion vector value to an integer pixel accuracy, it is specifically used for:
  • the conversion module 802 is also used to:
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the bi-predictive motion vector is converted to integer pixel accuracy.
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the horizontal direction component and/or the vertical direction component of the bi-predictive motion vector is converted to integer pixel accuracy.
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the motion vector in one direction in the bi-predictive motion vector is converted to integer pixel accuracy.
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the one-way motion vector value and/or the two-way motion vector value in the motion vector value is converted into integer pixel accuracy.
  • the conversion module 802 converts the unidirectional motion vector value in the motion vector value into an integer pixel precision, it is specifically used for:
  • the conversion module 802 converts the unidirectional motion vector value in the motion vector value into an integer pixel precision, it is specifically used for:
  • the conversion module 802 converts the unidirectional motion vector value in the motion vector value into an integer pixel precision, it is specifically used for:
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the motion vector in one direction in the bi-predictive motion vector is converted to integer pixel accuracy.
  • the conversion module 802 converts the accuracy of the motion vector value according to the size of the current image block, it is specifically used for:
  • the one-way motion vector value and/or the two-way motion vector value in the motion vector value is converted into integer pixel accuracy.
  • the conversion module 802 converts the unidirectional motion vector value in the motion vector value into an integer pixel precision, it is specifically used for:
  • the conversion module 802 converts the unidirectional motion vector value in the motion vector value into an integer pixel precision, it is specifically used for:
  • the conversion module 802 converts the unidirectional motion vector value in the motion vector value into an integer pixel precision, it is specifically used for:
  • the acquiring module 801 acquires the first candidate motion information list of the current image block, it is specifically configured to:
  • the first candidate motion information list of the current image block is obtained.
  • the acquiring module 801 acquires the first candidate motion information list of the current image block, it is specifically configured to:
  • the conversion module 801 converts the accuracy of the motion vector value, it is specifically used for:
  • the direct conversion of the bidirectional motion vector value into an integer pixel accuracy is to directly convert two unidirectional MVs into integer pixels without splitting the bidirectional MV.
  • the first candidate list includes two-way motion vector values from a triangle merge candidate list (triangle merge candidate list).
  • the acquisition module in the video encoding and decoding device can acquire the first candidate motion information list of the current image block, and the conversion module can convert the accuracy of the motion vector value, so as to determine the accuracy of the motion according to the conversion accuracy.
  • the vector value is video encoded or decoded.
  • FIG. 9 is a schematic structural diagram of a video encoding and decoding device according to an embodiment of this specification.
  • the video encoding and decoding device includes a memory 901, a processor 902 and a data interface 903.
  • the memory 901 may include a volatile memory (volatile memory); the memory 901 may also include a non-volatile memory (non-volatile memory); the memory 901 may also include a combination of the foregoing types of memories.
  • the processor 902 may be a central processing unit (CPU).
  • the processor 902 may further include a hardware video codec device.
  • the aforementioned hardware video coding and decoding device may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. For example, it may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), or any combination thereof.
  • the memory 901 is used to store program instructions.
  • the processor 902 can call the program instructions stored in the memory 901 to perform the following steps:
  • processor 902 converts the accuracy of the motion vector value, it is specifically configured to:
  • the accuracy of the motion vector value is converted.
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the accuracy of the motion vector value is converted according to the size of the current image block.
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the bi-predicted motion vector value in the first candidate motion information list of the current image block is converted into integer pixel accuracy.
  • processor 902 is further configured to:
  • all the motion vector values in the first candidate motion information list of the current image block are converted into integer pixel accuracy.
  • the first condition includes:
  • the current image block has a bi-predicted motion vector, and the size of the current image block meets a first preset range threshold.
  • the meeting the first preset range threshold includes: the size of the current image block is greater than or equal to 64 pixels.
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the motion vector value of at least one direction of the bi-prediction in the first candidate motion information list of the current image block is converted into integer pixel accuracy.
  • processor 902 is further configured to:
  • all the motion vector values in the first candidate motion information list of the current image block are converted into integer pixel accuracy.
  • the second condition includes:
  • the meeting the second preset range threshold includes:
  • the size of the current image block is less than 64 pixels; or,
  • the size of the current image block is greater than 16 pixels and less than 64 pixels.
  • the motion vector value includes a horizontal component and a vertical component; when the conversion module 802 converts the accuracy of the motion vector value, it is specifically used for:
  • processor 902 converts the horizontal component and the vertical component of the motion vector value into integer pixel precision, it is specifically used for:
  • the vertical component of the motion vector prediction value is converted into integer pixel accuracy.
  • the motion vector value includes a horizontal component; when the conversion module 802 converts the accuracy of the motion vector value, it is specifically used for:
  • processor 902 converts the horizontal component of the motion vector value into integer pixel precision, it is specifically used for:
  • the horizontal component of the motion vector prediction value is converted into integer pixel accuracy.
  • the motion vector value includes a vertical component; when the conversion module 802 converts the accuracy of the motion vector value, it is specifically used to:
  • the processor 902 converts the vertical component of the motion vector value into integer pixel accuracy, it is specifically used for:
  • the vertical component of the motion vector prediction value is converted into integer pixel accuracy.
  • the processor 902 uses the first preset conversion rule and the conversion coefficient s to convert the horizontal component of the motion vector value into integer pixel accuracy, it is specifically used for:
  • the second shift value is shifted left by s bits to obtain the integer pixel accuracy of the horizontal component.
  • the horizontal component is MV1x
  • the integer pixel accuracy of the horizontal component is MV2x
  • the first preset conversion rule includes:
  • MV2x ((MV1x+(1 ⁇ (s-1)))>>s) ⁇ s.
  • processor 902 is further configured to:
  • the horizontal component is MV1x
  • the integer pixel accuracy of the horizontal component is MV2x
  • the first preset conversion rule includes:
  • MV2x -((-MV1x+(1 ⁇ (s-1)))>>s) ⁇ s.
  • the processor 902 uses the second preset conversion rule and the conversion coefficient s to convert the vertical component of the motion vector value to integer pixel accuracy, it is specifically used for:
  • the vertical component is MV1y
  • the integer pixel accuracy of the vertical component is MV2y
  • the second preset conversion rule includes:
  • MV2y ((MV1y+(1 ⁇ (s-1)))>>s) ⁇ s.
  • processor 902 is further configured to:
  • the vertical component is MV1y
  • the integer pixel accuracy of the vertical component is MV2y
  • the second preset conversion rule includes:
  • MV2y -((-MV1y+(1 ⁇ (s-1)))>>s) ⁇ s.
  • processor 902 obtains the first candidate motion information list of the current image block, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined according to the triangle prediction mode.
  • the current image block is a coding unit CU.
  • processor 902 determines the first candidate motion information list of the current image block according to the merge mode, it is specifically configured to:
  • processor 902 determines the first candidate motion information list of the current image block according to the triangle prediction mode, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined.
  • the processor 902 determines the first candidate motion information list of the current image block according to the current motion information lists of the two prediction units PU, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined.
  • processor 902 obtains the first candidate motion information list of the current image block, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined according to the triangle prediction mode.
  • the current image block is a coding unit CU.
  • processor 902 determines the first candidate motion information list of the current image block according to the merge mode, it is specifically configured to:
  • processor 902 determines the first candidate motion information list of the current image block according to the triangle prediction mode, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined.
  • the processor 902 determines the first candidate motion information list of the current image block according to the current motion information lists of the two prediction units PU, it is specifically configured to:
  • the first candidate motion information list of the current image block is determined.
  • processor 902 converts the accuracy of the motion vector value, it is further configured to:
  • a second candidate motion information list is established.
  • processor 902 converts the accuracy of the motion vector value, it is specifically configured to:
  • the accuracy of the motion vector value is converted to an integer pixel accuracy.
  • the processor 902 converts the accuracy of the motion vector value into an integer pixel accuracy, it is specifically configured to:
  • processor 902 is further configured to: before converting the accuracy of the motion vector value according to the size of the current image block:
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the bi-predictive motion vector is converted to integer pixel accuracy.
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the horizontal direction component and/or the vertical direction component of the bi-predictive motion vector is converted to integer pixel accuracy.
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the motion vector in one direction in the bi-predictive motion vector is converted to integer pixel accuracy.
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the one-way motion vector value and/or the two-way motion vector value in the motion vector value is converted into integer pixel accuracy.
  • the processor 902 converts the unidirectional motion vector value in the motion vector value into integer pixel precision, it is specifically used for:
  • the processor 902 converts the unidirectional motion vector value in the motion vector value into integer pixel precision, it is specifically used for:
  • the processor 902 converts the unidirectional motion vector value in the motion vector value into integer pixel precision, it is specifically used for:
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the motion vector in one direction in the bi-predictive motion vector is converted to integer pixel accuracy.
  • processor 902 is specifically configured to: when converting the accuracy of the motion vector value according to the size of the current image block:
  • the one-way motion vector value and/or the two-way motion vector value in the motion vector value is converted into integer pixel accuracy.
  • the processor 902 converts the unidirectional motion vector value in the motion vector value into integer pixel precision, it is specifically used for:
  • the processor 902 converts the unidirectional motion vector value in the motion vector value into integer pixel precision, it is specifically used for:
  • the processor 902 converts the unidirectional motion vector value in the motion vector value into integer pixel precision, it is specifically used for:
  • processor 902 obtains the first candidate motion information list of the current image block, it is specifically configured to:
  • the first candidate motion information list of the current image block is obtained.
  • processor 902 obtains the first candidate motion information list of the current image block, it is specifically configured to:
  • processor 902 converts the accuracy of the motion vector value, it is specifically configured to:
  • the direct conversion of the bidirectional motion vector value into an integer pixel accuracy is to directly convert two unidirectional MVs into integer pixels without splitting the bidirectional MV.
  • the first candidate list includes two-way motion vector values from a triangle merge candidate list (triangle merge candidate list).
  • the video coding and decoding device may obtain the candidate motion information list of the current image block, and convert the accuracy of the motion vector value, so as to perform video encoding or decoding according to the motion vector value after the conversion accuracy.
  • bandwidth utilization can be improved, encoding or decoding operations can be simplified, and encoding or decoding efficiency can be improved.
  • MV scaling technology will be used in the process of obtaining the candidate MVP in the time domain.
  • the MVP in the time domain will obtain the MV of the co-located PU of the current CU in the adjacent encoded image.
  • curr_pic represents the current frame
  • curr_ref represents the reference frame of the current frame
  • col_pic represents the co-located frame where the co-located CU of the current CU is located
  • col_ref represents the reference frame of the co-located frame
  • the MV of the co-located CU (colMV, real The line arrow, pointing from col_pic to col_ref) may point to a block in col_ref.
  • the current CU wants to obtain the MV of the co-located CU, it needs to scale this MV to the position of the dotted line, that is, if you have seen the scaled MV.
  • the reference frame of this MVP is curr_ref, and the MV is shown by the dashed line (curMV).
  • the scaling formula is as follows:
  • curMV (td/tb)*colMV.
  • a computer-readable storage medium is also provided, and the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the embodiment of this specification is realized.
  • the video encoding or decoding method described in FIG. 5, FIG. 6 or FIG. 7 can also implement the video encoding and decoding device according to the embodiment corresponding to this specification described in FIG. 8, and will not be repeated here.
  • the computer-readable storage medium may be an internal storage unit of the device described in any of the foregoing embodiments, such as a hard disk or memory of the device.
  • the computer-readable storage medium may also be an external storage device of the device, such as a plug-in hard disk equipped on the device, a Smart Media Card (SMC), or a Secure Digital (SD) card. , Flash Card, etc.
  • the computer-readable storage medium may also include both an internal storage unit of the device and an external storage device.
  • the computer-readable storage medium is used to store the computer program and other programs and data required by the device.
  • the computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
  • the program can be stored in a computer readable storage medium. During execution, it may include the procedures of the above-mentioned method embodiments.
  • the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

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

Abstract

本说明书实施例提供了一种视频编码或解码方法、装置、设备及存储介质,其中,该方法包括:获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;转换所述运动矢量值的精度。通过利用调整精度的运动矢量值进行视频编码或解码,可以提高带宽利用率,简化编码或解码操作,提高编码或解码的效率。

Description

一种视频编码或解码方法、装置、设备及存储介质 技术领域
本说明书涉及视频编解码领域,尤其涉及一种视频编码或解码方法、装置、设备及存储介质。
背景技术
目前,对于通用视频编码(Versatile Video Coding,VVC)上帧间预测部分,通常根据当前编码单元(CU,Coding Unit)的已编码的邻近块的运动矢量,构建当前CU的运动矢量候选列表。当前在利用三角形预测模式获取运动矢量候选列表时,为了使三角形预测不带来带宽压力,将当前CU拆分成两个预测单元PU,且将各PU中的运动矢量候选列表中所有双预测运动矢量(Motion Vector,MV)拆分成单向。其中,当前三角形预测的PU只进行单向预测的原因是,在三角形预测中虽然两个PU都是三角形,面积只占CU的一半,但是在具体实现中,在运动补偿过程进行数据读取的时候,仍然需要读取各自PU的MV所指向的整个CU的信息。因此,如果三角形预测的两个PU都是双预测的MV,那么在运动补偿的时候,一个三角形预测的CU需要取4个CU的信息(每个PU取出两个MV指向的CU),这样相比于普通双预测模式的CU(只需要取出两个CU的信息),带宽消耗量提高一倍。
除此之外,当前在三角形预测模式下获取运动矢量候选列表需要进行重组,候选列表构建过程复杂。当前三角形预测模式没有加入普通Merge模式下HMVP(History-based Motion Vector Prediction,基于历史信息的运动矢量预测技术)、MMVD(Merge with MVD)以及pairwise average等技术所引入的MV,这样会对性能产生不利的影响。因此,如何更好地提高视频编解码的性能成为研究的重点。
发明内容
本说明书实施例提供了一种视频编码或解码方法、装置、设备及存储介质,提高了带宽利用率,和硬件友好性,简化了编码或解码操作,提高了编码或解码的效率。
第一方面,本说明书实施例提供了一种视频编码或解码方法,包括:
获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;
转换所述运动矢量值的精度。
第二方面,本说明书实施例提供了一种视频编解码装置,包括:
获取模块,用于获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;
转换模块,用于转换所述运动矢量值的精度。
第三方面,本说明书实施例提供了一种视频编解码设备,其特征在于,包括:存储器和处理器;
所述存储器,用于存储程序指令;
所述处理器,用于调用所述程序指令,当所述程序指令被执行时,用于执行以下操作:
获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;
转换所述运动矢量值的精度。
第四方面,本说明书实施例提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时实现如上述第一方面所述的视频编码或解码方法。
本说明书实施例,通过获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包括运动矢量值,视频编解码设备可以转换所述运动矢量值的精度,以实现根据所述第一候选运动信息列表中调整精度后的运动矢量值进行视频编码或解码,从而提高带宽利用率,简化编码或解码操作,提高编码或解码的效率。
附图说明
为了更清楚地说明本说明书实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本说明书实施例提供的一种Merge模式的运动矢量候选块的示意图;
图2是本说明书实施例提供的一种三角形预测模式的划分预测单元的示意图;
图3是本说明书实施例提供的一种视频编码或解码方法的流程示意图;
图4是本说明书实施例提供的另一种视频编码或解码方法的流程示意图;
图5是本说明书实施例提供的又一种视频编码或解码方法的流程示意图;
图6是本说明书实施例提供的又一种视频编码或解码方法的流程示意图;
图7是本说明书实施例提供的又一种视频编码或解码方法的流程示意图;
图8是本说明书实施例提供的一种视频编解码装置的结构示意图;
图9是本说明书实施例提供的一种视频编解码设备的结构示意图;
图10是本说明书实施例提供的像素插值的示意图;
图11a是三角形预测的处理编码单元的示意图;
图11b是另一种三角形预测的处理编码单元的示意图;
图12是本说明书实施例提供的MV缩放技术原理示意图。
具体实施方式
下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本说明书保护的范围。
下面结合附图,对本说明书的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
在视频编解码中,帧间预测技术利用视频相邻帧之间的时域相关性,使用先前已经编码的重构帧作为参考帧,通过运动估计和运动补偿的方法对当前帧(当前正在编码的帧)进行预测,从而去除视频的时间冗余信息。
帧间预测技术主要包括前向预测、后向预测、双预测等。前向预测是利用时序上的前一重构帧(“历史帧”)对当前帧进行预测。后向预测是利用当前帧之后的帧(“将来帧”)对当前帧进行预测。双预测是不仅利用“历史帧”也利用 “将来帧”对当前帧进行预测。具体地,双预测可以包括利用两个前向帧进行预测(“前前预测”),利用两个后向帧进行预测(“后后预测”),以及利用前向帧和后向帧进行预测(“前后预测”)。前向预测是指若图像块A的最佳匹配块为图像块B,图像块B所在的帧为图像块A所在帧的历史帧,则图像块B相对于图像块A的MV即为图像块A的MV,也就是图像块A的前向MV。后向预测是指若图像块A的最佳匹配块为图像块B,图像块B所在的帧为图像块A所在帧的将来帧,则图像块B相对于图像块A的MV即为图像块A的MV,也就是图像块A的后向MV。双预测是指图像块A的第一最佳匹配块为图像块B1,图像块B1所在的帧为图像块A所在帧的历史帧,若图像块A的第二最佳匹配块为图像块B2,图像块B2所在的帧为图像块A所在帧的将来帧:即获取了图像块B1相对于图像块A的MV1,又获取了B2相对于图像块A的MV2,则MV1和MV2组成了双向MV组。MV1为图像块A的前向MV,MV2为图像块A的后向MV。单向MV:不以上述的双向MV组出现的MV即为单向MV;比如:(1)获取了图像块A所在帧的历史帧中的图像块B1相对于图像块A的MV1,没有获取图像块A所在帧的将来帧中的图像块B2相对于图像块A的MV2,则MV1称为单向MV。其中,图像块B1为图像块A的最佳匹配块。(2)获取了图像块A所在帧的将来帧中的图像块B2相对于图像块A的MV2,没有获取图像块A所在帧的历史帧中的图像块B1相对于图像块A的MV1,则MV2称为单向MV;其中,图像块B2为图像块A的最佳匹配块。预测指的是查找与该预测块相似的图像数据,也称为该预测块的参考块。通过对该预测块和该预测块的参考块之间的差异进行编码/压缩,以减少编码/压缩中的冗余信息。其中,预测块与参考块的差异可以是由该预测块与该参考块的相应像素值相减得到的残差。预测包括帧内预测和帧间预测。帧内预测指的是在预测块所在帧内查找该预测块的参考块,帧间预测指的是在除预测块所在帧以外的其他帧内查找该预测块的参考块。
预测块指的是一帧图像中用于预测的基本单元,在一些标准中,该预测块也称为预测单元(Prediction Unit,PU)。在对一帧图像进行编码/压缩之前,图像被分成多个图像块,该多个图像块中的每一个图像块可以再次被分成多个图像块,以此类推。不同的编码方法中,分割的层级数量可以不同,所承担的操作方法也不同。不同的编码标准中,对同一层级上的图像块的名称可能不同。
在一些视频标准中,一帧图像第一次被分割成的多个图像块中的每个图像块称为编码树单元(Coding Tree Unit,CTU),例如64×64、128×128大小;每个编码树单元可以进一步划分成方形或矩形的编码单元(Coding Unit,CU);每个CU在参考帧中(一般为时域附近的已重构帧)寻找最相似块作为当前CU的预测块。当前图像块与相似块之间的相对位移为MV。运动估计的过程就是将当前帧的当前编码块在参考帧中经过搜索、比较后得到运动矢量的过程。运动补偿就是利用MV和参考帧得到预测帧的过程,此过程得到的预测帧可能和原始的当前帧有一定的差别,因此需要将预测帧和当前帧的差值经过变换、量化等过程之后传递到解码端,除此之外还需要将MV的信息传递到解码端。这样解码端通过MV、参考帧、预测帧和当前帧的差值,就可以重构出当前帧。这就是帧间预测的大致思想和大致流程。
在一些视频标准中,每个编码单元可以根据预测方式分割成一个、两个、四个或者其他数量的预测单元。在现有的一些视频标准中,预测单元是图像中最小的单元,预测单元不会继续被划分成多个图像块。下文中所提到的“图像块”或“当前图像块”指的是一个预测单元(或一个编码单元),而且一个图像块可以被继续划分成多个子图像块,每个子图像块可以进一步做预测。
在视频压缩标准(High Efficiency Video Coding,HEVC)中有三种帧间预测的模式,即高级运动向量预测(Advanced Motion Vector Prediction,AMVP)模式、Skip模式和Merge模式。AMVP模式下,需要对运动参数直接进行编码,也就是需要将MVD写入码流。在Merge模式下,采用运动合并技术处理运动参数,需要编码端和解码端都获取空间临近块和时域临近块的MV信息,在编码端选择使用哪个临近块的MV,因此不需要将MVD写入码流,而是只需要将选择的临近块的索引写入码流。Skip模式是一种特殊的Merge模式,同样需要构建候选列表,不同的是skip模式下不仅不需要传递MVD,也不需要传递系数残差。
本说明书实施例提出的视频编码或解码方法可以应用于视频编解码设备,所述视频编解码设备可以设置在终端中(如手机、平板电脑、电脑、服务器、或者其他电子设备等)上。在某些实施例中,本说明书实施例可应用于飞行器(如无人机)上,在其他实施例中,本说明书实施例还可以应用于其他可移动平台(如无人船、无人汽车、机器人等)上,本说明书实施例不做具体限定。 在某些实施例中,视频编码或解码方法还可以用于手持设备中(如手持云台)。
本说明书实施例提出的视频编码或解码方法主要是针对帧间预测中三角形预测技术目前存在的问题,对候选运动信息列表进行的改进。下面在说明本方案之前先对构建运动信息候选列表的普通Merge模式和三角形预测模式进行举例说明。
首先,结合图1对在普通Merge模式下获取候选运动信息列表进行举例说明,图1是本说明书实施例提供的一种Merge模式的运动矢量候选块的示意图。在普通Merge模式下获取候选运动信息列表时,需要获取空域候选列表和时域候选列表,如图1所示,空域候选列表是通过依次从图中1-5的方框所在位置获取,时域候选列表是从图1中标号为6、7的方框所在位置获取。其中,如果可以从6所在位置获取到运动矢量值,则不再从7所在位置获取运动矢量值;如果从6所在位置没有获取到运动矢量值,则再从7所示位置获取运动矢量值。
其次,结合图1和图2对在三角形预测模式下获取候选运动信息列表进行举例说明,图2是本说明书实施例提供的一种三角形预测模式的划分预测单元的示意图。如果当前图像块为一个编码单元CU,则在三角形预测模式下获取候选运动信息列表时,首先需要将编码单元CU划分成两个三角形的PU。其中,划分方式包括如图2所示的两种划分方式,一种是从左上角到右下角的对角划分得到PU1和PU2,一种是从右上到左下的对角划分方式得到PU1和PU2。
在帧间预测技术中,编码装置使用先前已经编码的重构帧作为参考帧,通过运动估计和运动补偿的方法对当前帧(当前正在编码的帧)进行预测,从而去除视频的时间冗余信息。对于一帧图像,先划分成大的编码区域(Coding Tree Unit,CTU),例如64x64、128x128大小。每个CTU可以进一步划分成方形或矩形的编码单元(Coding Unit,CU)。每个CU基于该CU的预测MV,在参考帧中(一般为时域附近的已重构帧)寻找最相似块作为当前CU的预测块。当前块与相似块之间的相对位移为运动矢量(MV)。运动估计的过程就是将当前帧的当前编码块在参考帧中经过搜索、比较后得到MV的过程。运动补偿就是利用MV和参考帧得到预测帧的过程,此过程得到的预测帧可能和原始的当前帧有一定的差别,因此需要将预测帧和当前帧的差值经过变换、量化等过程之后传递到解码装置,除此之外还需要将MV的信息传递到解码装置。这样解 码端进行反量化、反变换得到预测帧和当前帧的差值,然后根据MV、参考帧、预测帧和当前帧的差值就可以重构出当前帧。在某些实施例中,三角形预测模式只用在Merge模式和Skip模式,且只用于W×H>=64的CU,并且三角形划分后得到的PU1和PU2有各自独立的MV和参考帧索引,并且PU1和PU2都必须是单向预测,也就是说其Merge候选列表中的运动矢量都是单向预测的运动矢量。在某些实施例中,在三角形预测模式下构建候选运动信息列表时,首先从如图1所示1-5这五个空域相邻块中得到空域候选列表,此处与普通Merge模式不同是,在三角形预测模式下获取时域候选列表时,需要从6和7所示的时域临近块获取MV,组成时域候选列表,由空域候选列表和时域候选列表组成当前运动信息列表SMV1。
由于从图1中临近块1-7所在位置获取到的MV有可能是双预测的MV,因此在三角形预测模式下可以根据预设处理规则,将SMV1中的双预测MV转化成了单向预测的MV,以供两个三角形PU1和PU2选择。假设最终得到的当前图像块的候选运动信息列表为SMV2,所述预设处理规则如下,
(1)将所有SMV1中单向预测的MV,按照顺序逐个放入SMV2中;
(2)将SMV1中双预测List0中的MV按照顺序逐个放入SMV2;
(3)将SMV1中双预测List1中的MV按照顺序逐个放入SMV2;
(4)将SMV1中双预测List0和List1中的两个MV的平均值逐个放入SMV2中。
其中,SMV2列表中元素数目固定,上述1~4的步骤,每放入一个MV都需要检测SMV2的长度是否达到预设值,一旦达到,就终止此过程,后续的MV将不会进行SMV2列表。
编码端可以从候选列表中分别为子图像块选择一个MV,并将选择的MV所在候选列表b中的索引值以及三角形的划分方式分别传送到解码端,或者,也可以选择的MV所在候选列表b中的索引值生成一个组合索引,将该组合索引传送到解码端,组合索引可以进一步赋予有三角形的划分方式。其中,可以理解,由于用于运动补偿过程中的最终确定的运动信息候选列表的构建方式不同,则基于该构建方式的不同,同一个图像块选择的MV可以从不同的运动信息候选列表中获取,从而在确定选择的MV对应的索引值时,可以依据最终确定的运动信息候选列表。
当然,可以理解,对于图像块划分为多个具有其它形状的子图像块的情形,也可以采用上述方式构建最终用于运动补偿的运动信息候选列表,上述只是针对将图像块划分为具有三角形形状的子图像块的情况进行运动信息候选列表的构建的示例性说明。
然而,这种运动矢量候选列表的构建方式需要对所有候选的MV进行遍历以及对双MV进行从双MV到单MV的重组(也即一个双MV变为两个单MV),并判断重组后的MV是否重复,并需要将判断之后的且未重复的MV加入到候选列表b中,同时,一个双MV的两个单MV都有可能加入到候选列表b中,则使得图像块的编解码的处理复杂度较高。通常,由当前运动信息列表SMV1转化为前图像块的候选运动信息列表SMV2,可以通过如下步骤实现:
第一,遍历当前运动信息列表SMV1,将单MV全部取出放入SMV2中。
第二,遍历当前运动信息列表SMV1,将所有双MV的list0的MV取出放进SMV2中。
第三,遍历当前运动信息列表SMV1,将所有双MV的list1的MV取出放进SMV2中。
第四,遍历当前运动信息列表SMV1,将所有双MV的list0和list1的MV取出放进SMV2中。
第五,添加0MV。
在上述过程中,相当于遍历了四次SMV1。向SMV2里面添加MV的过程中,只要发现SMV2达到5个,就不再进行后续步骤。而在第一至第四的过程中,对于每一个添加进SMV2的MV,都需要判断和SMV2已有的MV是否重复,如果重复就不添加进去。
对于上述过程,可以去除全部或者部分判重的过程,在MV加入到SMV2里面的时候,不判断其是否存在相同的MV,或者减少遍历的次数。
减少遍历次数可以采用如下方案:
a)方案,将四次遍历改为三次遍历。
该方案可以将前述SMV1转化SMV2方案中的第四步去除,即只保留前述的第一、第二、第三、第五步骤,这样只需要进行三次遍历。
或者,将前述SMV1转化SMV2方案中的第二和第三步进行合并,即将 一个双MV的list0和list1依次放入SMV2中,这样只需要进行三次遍历。
b)方案,将四次遍历改为二次遍历。
该方案可以将前述SMV1转化SMV2方案中的第四步去除,同时,将第二和第三步进行合并,即保留前述的第一步骤,第二与第三合并合并后的步骤,第五步骤,这样只需要进行二次遍历。
或者,将前述SMV1转化SMV2方案中的第一至第三步骤合并,即保留前述的第一至第三步骤合并后的步骤,第四步骤,第五步骤,这样只需要进行二次遍历。
c)方案,将四次遍历改为一次遍历。
该方案可以将第一、第二、第三步骤合并,同时,去除第四步骤,即将SMV1的单向MV直接放入SMV2,双向MV拆成两个单向MV放入。
或者,将第一、第二、第三、第四步骤合并,也就是只需一次遍历,其中将单向MV直接放入,双向MV拆分成两个单向MV放入,以及将SMV1中双预测List0和List1中的两个MV的平均值逐个放入SMV2中。
在上述过程中,不判断其是否存在相同的MV与减少遍历的次数可以组合进行使用。
例如,a)方案中,将SMV1转化SMV2方案中的第四步去除,只保留前述的第一、第二、第三、第五步骤,但是不对SMV1进行遍历。
以及,将SMV1转化SMV2方案中的第二和第三步进行合并之后,不对合并后的各个步骤进行遍历,或者只对部分步骤进行遍历
同样的,在b)方案中,不对第一步骤,第二与第三合并合并后的步骤,第五步骤进行遍历,或者只对部分步骤进行遍历。作为候选列表的构建方式,可以在帧间预测模式为第一合并模式时,获取第一合并模式下的当前图像块的第一运动信息候选列表(SMV1);在帧间预测模式为第二合并模式时,获取当前图像块的第一运动信息候选列表(SMV1),若第一候选MV列表中包括双向MV,则对第一运动信息候选列表(SMV1)中的MV进行重组,得到第二合并模式下的当前图像块的第二运动信息候选列表(SMV2)。
就第一合并模式和第二合并模式而言,在VVC标准中,对于图像块存在帧间预测模式,包括Merge模式(包括Skip模式)和AMVP(advanced motion vector prediction)模式。
在一个可选的实施例中,在帧间预测模式为第一合并模式时,获取第一合并模式下的当前图像块的第一候选MV列表。具体地,本实施例中的第一合并模式为普通合并模式,普通合并模式为与HEVC标准中的合并模式相类似的合并模式。下面对第一合并模式下当前图像块的第一候选MV列表的构建进行说明。按照预设的空域MV获取顺序获取当前图像块的K个空域候选块的空域MV。具体的获取方法为现有技术中的方法,本实施例中不再赘述。具体地,预设的空域MV获取顺序依次为:与当前图像块的第一角相邻的且位于当前图像块第一侧的第一图像块、与当前图像块的第二角相邻的且位于当前图像块上方的第二图像块、与当前图像块的第二角相邻的且位于当前图像块上方的第三图像块、与当前图像块的第一角相邻的且位于当前图像块第一侧的第四图像块、与当前图像块的第三角相邻的且位于当前图像块第一侧的第五图像块。其中,第一角和第二角为对角。即获取各空域候选块的空域MV的顺序依次为第一图像块、第二图像块、第三图像块、第四图像块、第五图像块。按照预设的时域MV获取顺序获取当前图像块的F个时域候选块的空域MV。预设的时域MV获取顺序依次为:当前图像块的第四角相邻的且位于当前图像块第二侧的第六图像块,当前图像块在邻近已编码图像中的同位图像块。其中,第四角和第三角为对角。即获取各时域候选块的时域MV的顺序依次为第六图像块、当前图像块在邻近已编码图像中的同位图像块。按照预设的空域MV获取顺序将获取到的各空域MV添加至第一候选MV列表中,按照预设的时域MV获取顺序将获取到的各时域MV添加至第一候选MV列表中,得到包括的MV的数量为第一预设阈值的当前图像块的第一候选MV列表,或者,包括的MV的数量与预设填充向量之后为第二预设阈值的第一候选MV列表。其中,预设填充向量可为分量为0的向量。
在帧间预测模式为第二合并模式时,获取当前图像块的第一候选MV列表,若第一候选MV列表中包括双向MV,则对第一候选MV列表中的MV进行重组,得到第二合并模式下的当前图像块的第二候选MV列表。具体地,本实施例中的第二合并模式为三角形合并模式,在三角形合并模式中为将当前图像块均分成两个三角形图像块时所对应的合并模式。
三角形预测将当前图像块均分成两个三角形图像块时所对应的预测方法。在三角形预测方法中,当前图像块可被从当前图像块的左上角到右下的角的对 角线所划分,也可被从当前图像块的右上角到左下的角的对角线所划分,得到两个预测单元(prediction unit,PU)。若第一候选MV列表中不存在双向MV组,且第一候选MV列表中的MV的数量等于第二预设阈值时,则可确定第一候选MV列表为当前图像块的第二候选MV列表。若该第一候选MV列表中不存在双向MV组,且第一候选MV列表中的MV的数量L小于第二预设阈值K时,可添加K-L预设填充向量至第一候选MV列表,得到当前图像块的第二候选MV列表。其中,预设填充向量可为元素均为0的向量。若该第一候选选MV列表中不存在双向MV组,且第一候选MV列表中的MV的数量L大于第二预设阈值K时:
(1)删除第一候选MV列表中第K+1至第L个MV,确定更新后的第一候选MV列表为当前图像块的第二候选MV列表。
(2)提取第一候选MV列表中排序位于前K的K个MV,得到当前图像块的第二候选MV列表,即当前图像块的第二候选MV列表中包括第一候选选MV列表中排序位于前K的K个MV。
若该第一候选MV列表中存在双向MV组,则对该第一候选选MV列表中的MV进行重组,得到包括的MV均为单向MV的该候选MV列表,其中重组方法为第二合并模式在VCC标准中的重组方法。对该第一候选选MV列表中的MV进行重组,得到包括的MV均为单向MV的第二候选MV列表的具体实现如下:
对于第一候选MV列表中的每个单向MV:
按照单向MV在第一候选选MV列表中的顺序,将该单向MV添加至第二候选MV列表中,并确定当前第二候选MV列表中的MV的数量与第二预设阈值的关系;
1、若当前第二候选MV列表中的MV的数量等于第二预设阈值,则停止添加MV至候选MV列表。
2、若当前第二候选MV列表中的MV的数量小于第二预设阈值且该单向MV之后存在单向MV,则将第一候选选MV列表中该单向MV之后的第一个单向MV添加至候选MV列表。
3、若当前第二候选MV列表中的MV的数量小于第二预设阈值、该单向MV之后不存在单向MV,对于第一候选选MV列表中的每个双向MV组:
按照双向MV组在第一候选选MV列表中的顺序,将该双向MV组中的前向 MV添加至候选MV列表中,并确定当前第二候选MV列表中的MV的数量与第二预设阈值的关系;
31、若当前第二候选MV列表中的MV的数量等于第二预设阈值,则停止添加MV至候选MV列表。
32、若当前第二候选MV列表中的MV的数量小于第二预设阈值且该双向MV组之后存在双向MV组,则将该双向MV组之后的第一个双向MV组的MV中的前向MV添加至该当前第二候选MV列表。
33、若当前第二候选MV列表中的MV的数量小于第二预设阈值且该双向MV组之后不存在双向MV组,对于第一候选选MV列表中的每个双向MV组:
按照双向MV组在第一候选选MV列表中的顺序,将该双向MV组中的后向MV添加至候选MV列表中,并确定当前第二候选MV列表中的MV的数量与第二预设阈值的关系;
331、若当前第二候选MV列表中的MV的数量等于第二预设阈值,则停止添加MV至候选MV列表;
332、若当前第二候选MV列表中的MV的数量小于第二预设阈值且该双向MV组之后存在双向MV组,则将该双向MV组之后的第一个双向MV组中的后向MV添加至该当前第二候选MV列表。
333、若当前第二候选MV列表中的MV的数量小于第二预设阈值且该双向MV组之后不存在双向MV组,对于第一候选选MV列表中的每个双向MV组:
按照双向MV组在第一候选选MV列表中的顺序,将该双向MV组中的前向MV和后向MV的平均值添加至候选MV列表中,并确定当前第二候选MV列表中的MV的数量与第二预设阈值的关系;
3331、若当前第二候选MV列表中的MV的数量等于第二预设阈值,则停止添加MV至候选MV列表;
3332、若当前第二候选MV列表中的MV的数量小于第二预设阈值且该双向MV组之后存在双向MV组,则将该组双向预测MV之后的第一个双向MV组的MV中的中前向MV和后向MV的平均值添加至该当前第二候选MV列表。
3333、若当前第二候选MV列表中的MV的数量小于第二预设阈值且该双向MV组之后不存在双向MV组:添加至少一个预设填充向量至候选MV列表,得到包括的MV的数量与预设填充向量的数量之和为第二预设阈值的候 选MV列表。本说明书实施例提供了两种方案来构建运动信息候选列表,方案一,本方案在现有三角形预测模式的基础上获取候选运动信息列表,并对于W×H>=64的CU,将所述候选运动信息列表中所有的双预测的MV转化为整像素精度,同时不需要进行MV的重组,也就是不需要将双向MV拆分成单向,简化了MV候选列表构建的过程。除此之外,本方案对W×H<64的CU也进行三角形预测,并针对这些大小的CU,将所述候选运动信息列表中所有MV(单向MV和双向MV)转化为整像素精度,也不进行候选运动信息列表的重组过程,从而提高了视频编解码的性能。
方案二,本方案在普通合并(Merge)模式的基础上获取候选运动信息列表,不同之处在于,本方案对于W×H>=64的CU,将所述候选运动信息列表中的双预测的MV全部转化为整像素精度,同时,对W×H<64或者16<W×H<64的CU也进行三角形预测,并针对这些大小的CU,将所述候选列表中的所有MV转化为整像素精度。这样不需要为三角形预测维护独立的候选列表,同时普通Merge模式下由其他技术引入的MV也可以在三角形预测中使用,提高了视频编解码的性能。
下面结合附图对本说明书实施例提供的视频编码或解码方法进行示意性说明。
具体请参见图3,图3是本说明书实施例提供的一种视频编码或解码方法的流程示意图。所述方法可以应用于视频编解码设备,其中,所述视频编解码设备的解释如前所述,此处不再赘述。具体地,本说明书实施例的所述方法包括如下步骤。
S301:获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值。
本说明书实施例中,视频编解码设备可以是获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括参考图像信息和运动矢量值。在某些可选的实施例中,所述当前图像块可以为一个编码单元(CU)。在一些实施例中,视频编解码设备在获取当前图像块的第一候选运动信息列表时,可以根据合并(Merge)模式确定所述当前图像块的第一候选运动信息列表;或者,根据三角形预测模式确定所述 当前图像块的第一候选运动信息列表。
在一个实施例中,所述当前图像块可以为编码单元CU,所述视频编解码设备在根据Merge模式确定所述当前图像块的第一候选运动信息列表时,可以获取所述Merge模式的空域候选列表和时域候选列表,并根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。在某些实施例中,在根据Merge模式确定所述编码单元CU的第一候选运动信息列表的过程中,不需要对第一候选运动信息列表进行重组,从而简化了第一候选运动信息列表的构建过程。在某些实施例中,所述第一候选运动信息列表的长度(即所述第一候选运动信息列表中的元素数目)固定为预设值,如所述第一候选运动信息列表中的元素数目固定为5。
具体可以图1为例进行说明,所述视频编解码设备可以依次从图1中空域临近块1-5所在的位置,选取运动矢量值作为所述Merge模式的空域候选列表,所述视频编解码设备可以依次从图1中时域临近块6和时域临近块7所在的位置,选取运动矢量值作为所述Merge模式的时域候选列表,如果所述视频编解码设备从图1中时域临近块6所在的位置获取到运动矢量值,则所述视频编解码设备不再从图1中时域临近块7所在的位置获取运动矢量值。
在一些实施例中,所述当前图像块可以为编码单元CU,所述视频编解码设备在根据三角形预测模式确定所述当前图像块的第一候选运动信息列表时,可以将所述编码单元CU划分成两个三角形的预测单元PU。所述视频编解码设备可以获取所述两个三角形的预测单元PU的当前运动信息列表,并根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表。
在一些实施例中,所述视频编解码设备在根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表时,可以检测所述当前运动信息列表中的当前运动矢量是否为单向预测值,如果检测结果为否,则可以将所述当前运动矢量转换为单向预测的运动矢量,并根据转换后的单项预测的运动矢量,确定所述当前图像块的第一候选运动信息列表。
在一个实施例中,所述视频编解码设备在确定当前运动信息列表时,可以获取Merge模式的空域候选列表和时域候选列表,并根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。在某些实施 例中,所述三角形预测模式下获取第一候选运动信息列表与前述在Merge模式下获取第一候选运动信息列表不同的是,前述在Merge模式下,视频编解码设备如果获取到图1中6所在位置的运动矢量值,则不再获取7所在位置的运动矢量值,而三角形预测模式下所述视频编解码设备需要获取图1中时域临近块6和时域临近块7所示位置的运动矢量值。
具体可以图1为例进行说明,所述视频编解码设备可以依次从图1中空域临近块1-5所在的位置,选取运动矢量值作为三角形预测模式的空域候选列表,所述视频编解码设备可以依次从图1中时域临近块6和时域临近块7所在的位置,选取运动矢量值作为所述三角形预测模式的时域候选列表。所述视频编解码设备可以根据所述空域候选列表和所述时域候选列表,确定出所述当前运动信息列表。
在一些实施例中,由于图1中1-7这七个候选临近块所在的位置有可能是双预测的运动矢量值,因此需要将所述当前运动信息列表中的双预测的运动矢量值转化为单向预测的运动矢量值,从而组成第一候选运动信息列表。在某些实施例中,所述视频编解码设备可以根据预设处理规则将所述双预测的运动矢量值转化为单向预测的运动矢量值,以确定所述当前图像块的第一候选运动信息列表。
所述预设处理规则可以举例说明,假设所述当前运动信息列表为SMV1,第一候选运动信息列表为SMV2,所述视频编解码设备可以将所有SMV1中单向预测的运动矢量值MV,按照顺序依次放入SMV2中。然后检测SMV2的长度是否达到预设值,如果检测结果为是,则确定SMV2中的MV已满,停止转换,如果检测结果为否,则可以将SMV1中双预测的空域候选列表中的MV按照顺序依次放入SMV2。所述视频编解码设备可以继续检测所述SMV2的长度是否达到预设值,如果检测结果为是,则停止转换,如果检测结果为否,则可以将SMV1中双预测的时域候选列表中的MV按照顺序依次放入SMV2。如果所述视频编解码设备检测到所述SMV2的长度没有达到预设值,则可以将所述双预测的空域候选列表和时域候选中两个MV的平均值依次放入SMV2,直至所述SMV2的长度到达预设值。
通过该实施方式,将当前运动矢量转换为单向预测的运动矢量,可以降低在运动补偿过程中如果三角形预测的两个PU都是双预测的MV,那么一个三 角形预测的CU需要取4个CU的信息(每个PU取出两个MV指向的CU),这样相比于普通双预测模式的CU(只需要取出两个CU的信息),带宽消耗量提高一倍的问题,提高了带宽利用率。
S302:转换所述运动矢量值的精度。
本说明书实施例中,视频编解码设备可以转换所述运动矢量值的精度。在某些实施例中,所述转换所述运动矢量的精度值包括将高像素精度运动矢量值转换为低像素精度运动矢量值,例如,将1/4像素精度运动矢量转换为半精度运动矢量或者整精度运动矢量。
在某些实施例中,所述视频编解码设备可以根据所述当前图像块的大小,转换所述运动矢量值的精度。
在某些实施例中,所述当前图像块的大小可以由一个编码单元CU的宽度和高度组成,即所述当前图像块的大小可以为W×H。在某些实施例中,所述视频处理设备可以在构建所述第一候选运动信息列表时转换所述第一候选运动信息列表中运动矢量值的精度。在某些实施例中,所述视频处理设备可以在构建所述第一候选运动信息列表后,接收到运动矢量值的调用指令时,再调整所述第一候选运动信息列表中运动矢量值的精度。
在运动估计的过程,由于自然物体运动的连续性,物体在相邻两帧之间的运动矢量不一定刚好是整数个像素单位。为了提高运动矢量的精确程度,在HEVC中对亮度分量的运动估计采用1/4像素精度的运动矢量。但是在数字视频中并不存在分数像素处的样值,一般来说,为了实现1/K像素精度估计,必须将这些分像素点的值近似内插出来,也就是对参考帧的行方向和列方向进行K倍内插,在插值之后的图像中进行搜索。对当前图像块进行插值的过程,需要用到当前图像块中的像素点及其相邻区域的像素点。
在1/4像素插值的过程中,对于一个8×8/4×8/4×4/8×4大小的图像块,会用到块外部左侧的3个点和右侧的4个点来产生内插点的像素值,如图10所示,图10是本说明书实施例提供的一种像素插值的示意图。如图10所示,a 0,0和d 0,0为1/4像素点,b 0,0和h 0,0为半像素点,c 0,0和n 0,0为3/4像素点。假如说当前像块为2×2的块A 0,0~A 1,0,A 0,0~A 0,1围成的2×2块,为了计算这个2×2的图像块中所有的内插点,需要用到2×2外部的一些点,包括左边3个,右边4个,上边3个,下边4个。
在一个实施例中,视频编解码设备在根据所述当前图像块的大小,转换所述运动矢量值的精度时,可以判断所述当前图像块的大小是否满足第一条件;若判断结果为是,则将所述当前图像块的第一候选运动信息列表中的双预测的运动矢量值转换成整像素精度。
在某些实施例中,所述满足第一条件包括:所述当前图像块存在双预测的运动矢量,以及所述当前图像块的大小满足第一预设范围阈值。在某些实施例中,所述满足第一预设范围阈值包括:所述当前图像块的大小大于或等于64个像素。在其他实施例中,所述第一预设范围阈值还可以包括其他范围值,本说明书实施例不做具体限定。
例如,假设所述当前图像块为一个编码单元CU,且所述编码单元CU的大小为8x8,因此所述编码单元CU的大小8×8等于64,如果检测到所述当前图像块的第一候选运动信息列表中存在双预测的运动矢量值,则所述视频编解码设备可以将所述第一候选运动信息列表中的所有的双预测的运动矢量值转化为整像素精度。
如果采用现有三角形预测模式,由于当前三角形预测只对W×H≥64(W代表CU的像素宽度,H代表CU的像素高度)的CU,当前三角形预测只用于W×H≥64的CU的原因,也和带宽消耗有关系。以图11a为例,图11a是现有技术提供的一种三角形预测的处理编码单元的示意图,假设HEVC最坏情况(1/4像素精度MV)为8×8的双向帧间预测CU,参考像素点为(8+7)*(8+7)x2=450。Versatile Video Coding,VVC的三角形预测如果将最小处理CU设置为4x4,最坏情况(1/4像素精度MV)下的4x4双向帧间预测的CU,参考像素点数为(4+7)*(4+7)*2*4=968,相比于HEVC,VVC增加了115%,造成了较大的带宽压力。又例如,如果将三角形预测最小处理的CU设置为4×8或8×4,则HEVC最坏情况(1/4像素精度MV)为8x8的双向帧间预测CU,参考像素点为(8+7)*(8+7)×2=450。VVC的三角形预测如果将最小处理CU设置为4×8/8×4,最坏情况(1/4像素精度MV)下的4×8/8×4双向帧间预测的CU,参考像素点数为(8+7)*(4+7)*2*4=660,相比于HEVC,VVC增加了47%,也造成了较大的带宽压力。
因此,通过本说明书实施例中这种允许三角预测模式进行双预测,以及对双预测的运动矢量值进行整像素精度转化,降低了带宽压力,提高了带宽利用 率。
在一个实施例中,如果视频编解码设备判断出所述当前图像块不满足所述第一条件,则可以将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
例如,假设所述当前图像块为一个编码单元CU,且所述编码单元CU的大小为4×8,因此所述编码单元CU的大小4×8等于32,32小于64,则所述视频编解码设备可以将所述第一候选运动信息列表中的所有的运动矢量值转化为整像素精度。
通过本说明书实施例提供的这种将不满足所述第一条件的当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度,可以避免现有三角形预测模式中只用于大于或等于64个像素的图像块的限制,提升了视频编解码的性能。
在一个实施例中,所述运动矢量值包括水平分量和竖直分量;所述视频编解码设备在转换所述运动矢量值的精度时,可以获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量和竖直分量,并将所述运动矢量值的水平分量和竖直分量转化为整像素精度。
在一个实施例中,所述视频编解码设备在将所述运动矢量值的水平分量和竖直分量转化为整像素精度时,可以根据所述运动矢量值的存储精度,确定转化系数s,并利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度;以及,利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
在某些实施例中,所述转化系数s与所述运动矢量值的存储精度之间的关系可以举例说明,假设所述运动矢量值的存储精度为1/m,如果m=2 n,则可以确定s=n。例如,假设所述运动矢量值的存储精度为1/16=1/2 4,则可以确定所述转化系数为4。
在一个实施例中,所述视频编解码设备在利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度时,可以判断所述水平分量是否大于或等于0,如果判断出所述水平分量大于或等于0,则可以将所述转化系数s与1之差左移1位,得到第一移位值,并将所述第一移位值与所述水平分量之和右移s位,得到第二移位值,以及将所述第二移位值左 移s位,得到所述水平分量的整像素精度。
在某些实施例中,当所述水平分量大于或等于0时,假设所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,则所述第一预设转化规则可以包括:
如果MV1x>=0,MV2x=((MV1x+(1<<(s-1)))>>s)<<s。
其中,所述“<<”用于表示左移,所述“>>”用于表示右移,所述“1<<(s-1)”用于表示第一移位值,所述“(MV1x+(1<<(s-1)))>>s”用于表示第二移位值。在某些实施例中,如果MV1x左移n位,则表示MV1x乘以2 n,如果MV1x右移n位,则表示MV1x除以2 n不计余数所得的商,其中,n为大于或等于1的正整数。
例如,假设所述运动矢量值的存储精度为1/4,则所述视频编解码设备可以确定出所述转化系数s为2,如果所述水平分量MV1x为3,且二进制值为“11”,其水平分量MV1x大于0,MV2x的计算过程如下:
计算“s-1”,当s=2时,s-1=2-1=1;
计算“1<<(s-1)”,1<<1的结果为二进制数10,十进制数2;
计算“MV1x+(1<<(s-1))”,当MV1x=3时,MV1x+(1<<(s-1))=11+10=101;
计算“(MV1x+(1<<(s-1)))>>s”,根据之前结果,将5的二进制数值101右移动2位,101>>2=1;
最后计算“((MV1x+(1<<(s-1)))>>s)<<s”,MV2x=1<<2=100。
可见,在上述过程中,所述视频编解码设备可以将所述转化系数2与1之差1左移1位,得到第一移位值2,并将所述第一移位值2与所述水平分量3之和5右移2位,得到第二移位值1,以及将所述第二移位值1左移2位,得到所述水平分量的整像素精度MV2x为4。
在其他实施例中,当所述水平分量大于或等于0时,所述第一预设转化规则包括但不限定于上述转化规则,还可以是其他转化规则,只需要将所述水平分量转化为整像素即可。例如,所述第一预设转化规则还可以为:
如果MV1x>=0,如果MV1x>=0,MV2x=(MV1x>>s)<<s。
例如,假设所述运动矢量值的存储精度为1/4,则所述视频编解码设备可以确定出所述转化系数s为2,如果所述水平分量MV1x为5,且二进制值为 “101”,其所述水平分量MV1x大于0,MV2x的计算过程如下:
计算“MV1x>>s”,当MV1x=5时,5>>2的结果为二进制数001,十进制数1;
计算“(MV1x>>s)<<s”,MV2x=1<<2的结果为二进制数100,十进制数4。
可见,在上述过程中,所述视频编解码设备可以将所述MV1x即5右移2,得到1,再将1左移2得到所述水平分量的整像素精度MV2x为4。
在一些实施例中,所述视频编解码设备如果判断出所述水平分量小于0,则可以将所述第一移位值与所述水平分量之差右移s位,得到第三移位值,并将所述第三移位值左移s位并取相反数,得到所述水平分量的整像素精度。在某些实施例中,当所述水平分量小于0时,假设所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
如果MV1x<0,MV2x=-((-MV1x+(1<<(s-1)))>>s)<<s。
其中,所述“<<”用于表示左移,所述“>>”用于表示右移,所述“-MV1x”表示对MV1x取反,所述“(-MV1x+(1<<(s-1)))>>s”用于表示第三移位值。
例如,假设所述运动矢量值的存储精度为1/4,则所述视频编解码设备可以确定出所述转化系数s为2,如果所述水平分量MV1x为-7,则所述水平分量MV1x小于0,MV2x的计算过程如下:
计算“s-1”,当s=2时,s-1=2-1=1;
计算“1<<(s-1)”,1<<1的结果为二进制数10,十进制数2;
计算“-MV1x+(1<<(s-1))”,当MV1x=-7时,-MV1x+(1<<(s-1))=111+10=1001;
计算“(-MV1x+(1<<(s-1)))>>s”,根据之前结果,将9的二进制数值1001右移动2位,1001>>2=2;
最后计算“-((-MV1x+(1<<(s-1)))>>s)<<s”,MV2x=-2<<2=-8。
可见,在上述过程中,所述视频编解码设备可以将所述转化系数2与1之差1左移1位,得到第一移位值2,并对所述水平分量-7取反得到的7,将所述第一移位值2与7之和9右移2位,得到第三移位值2,以及将所述第三移位值2左移2位并取反,得到所述水平分量的整像素精度MV2x为-8。
在其他实施例中,当所述水平分量小于0时,所述第一预设转化规则包括但不限定于上述转化规则,还可以是其他规则,只需要将所述水平分量转化为整像素即可。例如,所述第一预设转化规则还可以为:
如果MV1x<0,MV2x=-(((-MV1x)>>s)<<s)。
例如,假设所述运动矢量值的存储精度为1/4,则所述视频编解码设备可以确定出所述转化系数s为2,如果所述水平分量MV1x为-5,则所述水平分量MV1x小于0,MV2x的计算过程如下:
计算“-MV1x>>s”,当MV1x=-5时,5>>2的结果为二进制数001,十进制数1;
计算“(-MV1x>>s)<<s”,1<<2的结果为二进制数100,十进制数4。
计算“-(((-MV1x)>>s)<<s)”,MV2x=-4。
可见,在上述过程中,所述视频编解码设备可以将所述MV1x即-5取反得到5,将5右移2,得到1,再将1左移2得到所述水平分量的整像素精度MV2x为-4。
在一个实施例中,所述视频编解码设备在利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度时,可以判断所述竖直分量是否大于或等于0,如果判断出所述竖直分量大于或等于0,则可以将所述转化系数s与1之差左移1位,得到第四移位值,并将所述第四移位值与所述竖直分量之和右移s位,得到第五移位值,以及将所述第五移位值左移s位,得到所述竖直分量的整像素精度。在某些实施例中,当所述竖直分量大于或等于0时,假设所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,则所述第二预设转化规则可以包括:
如果MV1y>=0,MV2y=((MV1y+(1<<(s-1)))>>s)<<s。
其中,具体实施例举例如前所述,此处不再赘述。
在其他实施例中,当所述竖直分量大于或等于0时,所述第二预设转化规则包括但不限定于上述转化规则,还可以是其他规则,只需要将所述竖直分量转化为整像素即可。例如,所述第二预设转化规则还可以为:
如果MV1y>=0,MV2y=(MV1y>>s)<<s。
其中,具体实施例举例如前所述,此处不再赘述。
在一个实施例中,所述视频编解码设备如果判断出所述竖直分量小于0, 则可以将所述第四移位值与所述竖直分量之差右移s位,得到第六移位值,将所述第六移位值左移s位并取相反数,得到所述竖直分量的整像素精度。在某些实施例中,当所述竖直分量小于0时,假设所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
如果MV1y<0,MV2y=-((-MV1y+(1<<(s-1)))>>s)<<s。
在其他实施例中,当所述竖直分量小于0时,所述第二预设转化规则包括但不限定于上述转化规则,还可以是其他规则,只需要将所述竖直分量转化为整像素即可。例如,所述第二预设转化规则还可以为:
如果MV1y<0,MV2y=-(((-MV1y)>>s)<<s)。
其中,具体实施例举例如前所述,此处不再赘述。
在一个实施例中,所述运动矢量值包括水平分量;所述视频编解码设备在转换所述运动矢量值的精度时,可以获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量,并将所述运动矢量值的水平分量转化为整像素精度。具体实施例举例如前所述,此处不再赘述。
在一个实施例中,所述运动矢量值包括竖直分量;所述视频编解码设备在转换所述运动矢量值的精度时,可以获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量,并将所述运动矢量值的竖直分量转化为整像素精度。具体实施例举例如前所述,此处不再赘述。
如果采用现有三角形预测模式,将三角形预测最小处理的CU设置为4×8或8×4,如图11b所示,图11b是现有技术提供的另一种三角形预测的处理编码单元的示意图,假设HEVC最坏情况(1/4像素精度MV)为8x8的双向帧间预测CU,参考像素点为(8+7)*(8+7)×2=450。VVC的三角形预测如果将最小处理CU设置为4×8/8×4,最坏情况(1/4像素精度MV)下的4×8/8×4双向帧间预测的CU,参考像素点数为(8+7)*(4+7)*2*4=660,相比于HEVC,VVC增加了47%,也造成了较大的带宽压力。
因此,通过本说明书实施例中这种将双预测的运动矢量值进行整像素精度转化的方式,降低了带宽压力,提高了带宽利用率。
在一个实施例中,所述视频编解码设备在根据所述当前图像块的大小,转换所述运动矢量值的精度之后,还可以根据转换精度后的所述运动矢量值,重新建立所述当前图像的第二候选运动信息列表,以便所述视频编解码设备在接 收到第一候选运动信息列表的调用指令时,可以直接调用所述候选运行信息列表中转换整精度后的运动矢量值,从而提高视频编码或解码的效率。
本说明书实施例中,视频编解码设备可以获取当前图像块的第一候选运动信息列表,并根据所述当前图像块的大小,转换所述第一候选运动信息列表中运动矢量值的精度,以便根据转换精度后的第一候选运动信息列表进行视频编码或解码。通过这种实施方式可以提高带宽利用率,简化编码或解码操作,提高编码或解码的效率。
在本说明书的实施例中,候选运动信息列可以是合并候选列表(merge candidate list),三角形预测合并候选列表(triangle merge candidate list),或者其它帧间预测的候选列表。
作为一个可选的实施例,候选列表可以通过如下步骤建立:步骤一,将原始的三角形预测merge候选列表的构建过程修改为普通merge模式下候选列表的构建过程;该过程将两个候选列表的构建合并为一个,不进行候选列表构建之后的重组过程。步骤二,对于直接使用合并候选列表(merge candidate list)出现的双向MV,对于其中具有的两个单向预测MV,选择其中一个单向预测MV;选择的方式可以固定都选第一个,或者固定都选第二个,也可以根据预设规则在二者中选取一个。即,可以使用合并候选列表(merge candidate list)的全部或者部分列表作为MV的候选列表,当然,本实施例并不排斥通过其他方式获得的MV作为候选列表。
在第一个具体的实施例中,将双向预测MV转为单向预测MV可以通过固定选择双向预测中第0列表(List0)中的MV作为候选列表中的MV。
在第二个具体的实施例中,将双向预测MV转为单向预测MV可以通过固定选择双向预测中第1列表(List1)中的MV作为候选列表中的MV。
在第三个具体的实施例中,通过MV缩放技术将第1列表(List1)中的MV缩放到List0上,然后将第0列表(List0)和第1列表(List1)中的MV取平均值,选取第0列表(List0)的参考帧作为参考帧。
在第四个具体的实施例中,通过MV缩放技术将第0列表(List0)中的MV缩放到List1上,然后将第1列表(List1)和第0列表(List0)中的MV取平均值,选取第1列表(List1)的参考帧作为参考帧。
在第五个具体的实施例中,通过MV缩放技术将第1列表(List1)中的 MV缩放到List0上,然后将第0列表(List0)和第1列表(List1)中的MV进行加权平均,选取第0列表(List0)的参考帧作为参考帧。加权的权重通过如下方式确定:(a)根据当前merge list里面已有的MV对应的参考帧,如果list0的情况比较多,则为list0的MV分配更高权重,这个数值可以是固定的,例如0.5到1区间内的固定值;如果list1的情况比较多,则为list1的MV分配更高权重,这个数值可以是固定的,例如0.5到1区间内的固定值;(b)根据图像块的大小设定不同的权重值;(c)根据统计学方式获得权重值,或者通过深度学习的方式获得不同列表的权重值。
在第六个具体的实施例中,通过MV缩放技术将第0列表(List0)中的MV缩放到List1上,然后将第0列表(List0)和第1列表(List1)中的MV进行加权平均,选取第1列表(List1)的参考帧作为参考帧。加权的权重通过如下方式确定:(a)根据当前merge list里面已有的MV对应的参考帧,如果list0的情况比较多,则为list0的MV分配更高权重,这个数值可以是固定的,例如0.5到1区间内的固定值;如果list1的情况比较多,则为list1的MV分配更高权重,这个数值可以是固定的,例如0.5到1区间内的固定值;(b)根据图像块的大小设定不同的权重值;(c)根据统计学方式获得权重值,或者通过深度学习的方式获得不同列表的权重值。
对于以上几种具体的实施例,可以通过如下方式进行自适应选择:
根据当前merge list里面已有的MV对应的参考帧,如果第一列表(list0)的情况比较多,就直接使用第一个具体实施例对应的方案,如果第一列表(list1)的情况比较多,就直接使用方法第二个具体实施例对应的方案,如果一样多就使用方法第三个具体实施例对应的方案或者第四个具体实施例对应的方案。
可以根据当前CU的块大小设定不同的阈值,满足一定块阈值条件的情况下,就选择其对应的方式。例如,对于宽和高都小于16的CU,使用第一个具体实施例对应的方案;对于宽和高都大于64的CU,使用第二个具体实施例对应的方案;对于宽和高都在16与64之间的CU,使用其它具体实施例对应的方案。
还可以通过深度学习的方法,提取当前CU的信息,比如纹理信息等来决策使用那种具体的实施例。
对于编解码过程而言,以上的方式可以在编解码端均予以预先固定,如此避免写入额外的码流,也可以在编码端进行决策,然后将决策结果写入解码端。
在某些实施例中,所述视频编解码设备在转换所述运动矢量值的精度之后,还可以根据所述转换精度后的所述运动矢量值,建立第二候选运动信息列表。在某些实施例中,所述视频编解码设备可以将所述运动矢量值的精度转换为整像素精度。在某些实施例中,所述视频编解码设备可以将所述运动矢量值的全部或者部分转换为整像素精度。在某些实施例中,所述视频编解码设备可以判断所述当前图像块的大小是否满足预设范围。在某些实施例中,所述视频编解码设备可以根据所述当前图像块的大小范围,对不同类型的所述运动矢量值进行不同的精度转换操作。在某些实施例中,当所述当前图像块的大小满足第一条件时,所述视频编解码设备可以将双预测运动矢量转换为整像素精度。当所述当前图像块的大小满足第一条件时,将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。当所述当前图像块的大小满足第一条件时,将双预测运动矢量中一个方向上的运动矢量转换为整像素精度。当所述当前图像块的大小不满足第一条件时,将运动矢量值中的单向运动矢量值和/或双向运动矢量值转换为整像素精度。将单向预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。将双预测运动矢量中至少一个方向的运动矢量转换为整像素精度。将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
在某些实施例中,视频编解码设备可以根据合并候选列表,三角形预测合并候选列表,或者其它帧间预测的候选列表,获得所述当前图像块的第一候选运动信息列表。视频编解码设备可以直接选择合并候选列表(merge candidate list)中双向MV的一个单向预测MV。将所述第一候选列表中的双向运动矢量值直接转换为整像素精度。
请参见图4,图4是本说明书实施例提供的另一种视频编码或解码方法的流程示意图,所述方法可以应用于视频编解码设备,其中,所述视频编解码设备的具体解释如前所述。本说明书实施例是对建立第一候选运动信息列表后,当接收到运动矢量值的调用指令时,对所述第一候选运动信息列表中的运动矢量值的精度进行转换的这种实施过程进行示意性说明。具体地,本说明书实施例的所述方法包括如下步骤。
S401:获取当前图像块的第一候选运动信息列表。
本说明书实施例中,视频编解码设备可以获取当前图像块的第一候选运动信息列表,所述第一候选运动信息列表中包括运动矢量值,具体实施例及举例如前所述,此处不再赘述。
在可选的实施例中,候选运动信息列可以是合并候选列表(merge candidate list),三角形预测合并候选列表(triangle merge candidate list)。
S402:获取所述当前图像块的大小。
本说明书实施例中,视频编解码设备可以获取所述当前图像块的大小。在某些实施例中,所述当前图像块可以为一个编码单元CU,在某些实施例中,所述当前图像块的大小可以由一个编码单元CU的宽度和高度组成,即所述当前图像块的大小可以为W×H。
S403:当接收到所述第一候选运动信息列表中的运动矢量值的调用指令时,根据所述当前图像块的大小,转换所述运动矢量值的精度。
本说明书实施例中,视频编解码设备在获取当前图像块的第一候选运动信息列表后,可以在接收到所述第一候选运动信息列表中的运动矢量值的调用指令时,根据所述当前图像块的大小,转换所述运动矢量值的精度。在某些实施例中,所述视频编解码设备也可以在接收到其他用于请求使用所述第一候选运动信息列表中的运动矢量值的调用请求时,转换所述运动矢量值的精度。
通过这种在调用第一候选运动信息列表时,对第一候选运动信息列表中的运动矢量值进行整像素转换的实施方式,可以实现根据需求对运动矢量值进行整像素转换。
在一个实施例中,视频编解码设备在在接收到所述第一候选运动信息列表中的运动矢量值的调用指令时,可以判断所述当前图像块的大小是否满足第一条件;若是,则将所述当前图像块的第一候选运动信息列表中的双预测的运动矢量值转换成整像素精度。具体实施例举例如前所述,此处不再赘述。
在一个实施例中,视频编解码设备如果判断出所述当前图像块不满足所述第一条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。具体实施例举例如前所述,此处不再赘述。
本说明书实施例中,视频编解码设备可以获取当前图像块的第一候选运动信息列表,并获取所述当前图像块的大小,当接收到所述第一候选运动信息列 表中的运动矢量值的调用指令时,根据所述当前图像块的大小,转换所述运动矢量值的精度。通过这种在调用第一候选运动信息列表时,对第一候选运动信息列表中的运动矢量值进行整像素转换的实施方式,可以实现根据需求对运动矢量值进行整像素转换,在提高带宽利用率,简化编码或解码操作,提高编码或解码的效率的同时,提升了用户体验。
请参见图5,图5是本说明书实施例提供的又一种视频编码或解码方法的流程示意图,所述方法可以应用于视频编解码设备,其中,所述视频编解码设备的具体解释如前所述。本说明书实施例是对将第一候选运动信息列表中双预测的任意一个运动矢量值转化为整像素精度的这种实施过程进行示意性说明。具体地,本说明书实施例的所述方法包括如下步骤。
S501:获取当前图像块的第一候选运动信息列表。
本说明书实施例中,视频编解码设备可以获取当前图像块的第一候选运动信息列表,具体实施例及举例如前所述,此处不再赘述。
S502:判断所述当前图像块的大小是否满足第二条件,若是,则执行步骤S503,若否,则执行步骤S504。
本说明书实施例中,视频编解码设备可以判断所述当前图像块的大小是否满足第二条件,如果判断结果为是,则执行步骤S503,如果判断结果为否,则执行步骤S504。在某些实施例中,所述第二条件包括所述当前图像块存在至少两个双预测的运动矢量,以及所述当前图像块的大小满足第二预设范围阈值。在某些实施例中,所述满足第二预设范围阈值包括但不限于所述当前图像块的大小小于64个像素;或者,所述当前图像块的大小大于16个像素且小于64个像素。具体实施例及举例如前所述,此处不再赘述。
S503:将所述当前图像块的第一候选运动信息列表中双预测的任意一个运动矢量值转化为整像素精度。
本说明书实施例中,视频编解码设备如果判断出所述当前图像块的大小满足第二条件,则可以将所述当前图像块的第一候选运动信息列表中双预测的任意一个运动矢量值转化为整像素精度。
在一个实施例中,所述视频编解码设备在将所述当前图像块的第一候选运动信息列表中双预测的任意一个运动矢量值转化为整像素精度之前,可以检测 所述当前图像块的第一候选运动信息列表中是否存在至少两个双预测的运动矢量值,如果检测到所述第一候选运动信息列表中存在至少两个双预测的运动矢量值,则所述视频编解码设备可以执行所述将所述当前图像块的第一候选运动信息列表中双预测的任意一个运动矢量值转化为整像素精度的步骤。
例如,假设所述当前图像块为一个编码单元CU,且所述编码单元CU的大小为8x8,因此所述编码单元CU的大小8×8等于64,如果检测到所述当前图像块的第一候选运动信息列表中存在2个双预测的运动矢量值,则所述视频编解码设备可以将所述第一候选运动信息列表中的任意一个双预测的运动矢量值转化为整像素精度。
本说明书该实施方式,通过对任意一个双预测的运动矢量值进行整像素精度转化,在一定程度上降低了带宽压力,提高了带宽利用率。
S504:将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
本说明书实施例中,视频编解码设备如果判断出所述当前图像块的大小不满足第二条件,则可以将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。具体实施例及举例如前所述,此处不再赘述。
例如,假设所述当前图像块为一个编码单元CU,且所述编码单元CU的大小为4×8,因此所述编码单元CU的大小4×8等于32,32小于64,则所述视频编解码设备可以将所述第一候选运动信息列表中的所有的运动矢量值转化为整像素精度。
通过这种将不满足第二条件的当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度,可以避免现有三角形预测模式中只用于大于或等于64个像素的图像块的限制,提升了三角预测模式的性能。
本说明书实施例中,视频编解码设备可以获取当前图像块的第一候选运动信息列表,并判断所述当前图像块的大小是否满足第二条件,若满足则可以将所述当前图像块的第一候选运动信息列表中双预测的任意一个运动矢量值转化为整像素精度;若不满足,则可以将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。通过这种实施方式,在一定程度上提高了带宽利用率,简化了编码或解码操作,提高了编码或解码的效率。
请参见图6,图6是本说明书实施例提供的又一种视频编码或解码方法的流程示意图,所述方法可以应用于视频编解码设备,其中,所述视频编解码设备的具体解释如前所述。本说明书实施例是对将第一候选运动信息列表中运动矢量值的水平分量转化为整像素精度的这种实施过程进行示意性说明。具体地,本说明书实施例的所述方法包括如下步骤。
S601:获取当前图像块的第一候选运动信息列表。
本说明书实施例中,视频编解码设备可以获取当前图像块的第一候选运动信息列表,具体实施例及举例如前所述,此处不再赘述。
S602:获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量。
本说明书实施例中,视频编解码设备可以获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量。
S603:将所述运动矢量值的水平分量转化为整像素精度。
本说明书实施例中,视频编解码设备可以将所述运动矢量值的水平分量转化为整像素精度。
在一个实施例中,所述视频编解码设备在将所述运动矢量值的水平分量转化为整像素精度时,可以获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量,并将所述运动矢量值的水平分量转化为整像素精度。
在某些实施例中,所述视频编解码设备在将所述当前图像块的第一候选运动信息列表中双预测的运动矢量值转化为整像素精度时,可以获取所述双预测的运动矢量值的水平分量,并将所述双预测的运动矢量值的水平分量转化为整像素精度。
在某些实施例中,所述视频编解码设备在将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度时,可以获取所述第一候选运动信息列表中所有的运动矢量值的水平分量,并将所有的运动矢量值的水平分量转化为整像素精度。
在一个实施例中,所述视频编解码设备在将所述运动矢量值的水平分量转化为整像素精度时,可以根据所述运动矢量值的存储精度,确定转化系数s,并利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度。在某些实施例中,所述转化系数s与所述运动矢量值的存 储精度之间的关系如前所述,此处不再赘述。
在一个实施例中,所述视频编解码设备在利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度时,可以判断所述水平分量是否大于或等于0,如果判断出所述水平分量大于或等于0,则可以将所述转化系数s与1之差左移1位,得到第一移位值,并将所述第一移位值与所述水平分量之和右移s位,得到第二移位值,以及将所述第二移位值左移s位,得到所述水平分量的整像素精度。在某些实施例中,当所述水平分量大于或等于0时,所述第一预设转化规则如前所述,此处不再赘述。
在其他实施例中,当所述水平分量大于或等于0时,所述第一预设转化规则包括但不限定于上述转化规则,还可以是其他转化规则,只需要将所述水平分量转化为整像素即可。具体实施例及举例如前所述。
在一些实施例中,所述视频编解码设备如果判断出所述水平分量小于0,则可以将所述第一移位值与所述水平分量之差右移s位,得到第三移位值,并将所述第三移位值左移s位并取相反数,得到所述水平分量的整像素精度。在某些实施例中,当所述水平分量小于0时,所述第一预设转化规则如前所述,此处不再赘述。
在其他实施例中,当所述水平分量小于0时,所述第一预设转化规则包括但不限定于上述转化规则,还可以是其他规则,只需要将所述水平分量转化为整像素即可。具体实施例及举例如前所述,此处不再赘述。
本说明书实施例中,视频编解码设备可以获取当前图像块的第一候选运动信息列表,并获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量,以及将所述运动矢量值的水平分量转化为整像素精度,以便根据转化水平分量为整像素精度后的所述运动矢量值进行视频编码或解码。通过这种实施方式,在一定程度上提高了带宽利用率,简化了编码或解码操作,提高了编码或解码的效率。
请参见图7,图7是本说明书实施例提供的又一种视频编码或解码方法的流程示意图,所述方法可以应用于视频编解码设备,其中,所述视频编解码设备的具体解释如前所述。本说明书实施例是对将第一候选运动信息列表中运动矢量值的竖直分量转化为整像素精度的这种实施过程进行示意性说明。具体 地,本说明书实施例的所述方法包括如下步骤。
S701:获取当前图像块的第一候选运动信息列表。
本说明书作为一个可选的实施例,视频编解码设备可以获取当前图像块的第一候选运动信息列表,具体实施例及举例如前所述,此处不再赘述。
S702:获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量。
本说明书作为一个可选的实施例,视频编解码设备可以获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量。
S703:将所述运动矢量值的竖直分量转化为整像素精度。
本说明书运动矢量值作为一个可选的实施例,所述视频编解码设备在将所述运动矢量值的竖直分量转化为整像素精度时,可以获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量,并将所述运动矢量值的竖直分量转化为整像素精度。所述运动矢量值的水平分量可变或者不变。更加优选的,所述运动矢量值的水平分量的像素精度保持不变。
在某些实施例中,所述视频编解码设备在将所述当前图像块的第一候选运动信息列表中双预测的运动矢量值转化为整像素精度时,可以获取所述双预测的运动矢量值的竖直分量,并将所述双预测的运动矢量值的竖直分量转化为整像素精度。
在某些实施例中,所述视频编解码设备在将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度时,可以获取所述第一候选运动信息列表中所有的运动矢量值的竖直分量,并将所有的运动矢量值的竖直分量转化为整像素精度。
在一个实施例中,所述视频编解码设备将所述运动矢量值的竖直分量转化为整像素精度时,可以根据所述运动矢量值的存储精度,确定转化系数s,并利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。所述将所述动矢量预测值的竖直分量转化为整像素精度的方式如前所述,此处不再赘述。
在一个实施例中,所述视频编解码设备在利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度时,可以判断所述竖直分量是否大于或等于0,如果判断出所述竖直分量大于或等于0,则可 以将所述转化系数s与1之差左移1位,得到第四移位值,并将所述第四移位值与所述竖直分量之和右移s位,得到第五移位值,以及将所述第五移位值左移s位,得到所述竖直分量的整像素精度。在某些实施例中,当所述竖直分量大于或等于0时,所述第二预设转化规则如前所述,此处不再赘述。
在其他实施例中,当所述竖直分量大于或等于0时,所述第二预设转化规则包括但不限定于上述转化规则,还可以是其他规则,只需要将所述竖直分量转化为整像素即可,具体实施例举例如前所述,此处不再赘述。
在一个实施例中,所述视频编解码设备如果判断出所述竖直分量小于0,则可以将所述第四移位值与所述竖直分量之差右移s位,得到第六移位值,将所述第六移位值左移s位并取相反数,得到所述竖直分量的整像素精度。在某些实施例中,当所述竖直分量小于0时,所述第二预设转化规则如前所述,此处不再赘述。
本说明书实施例中,视频编解码设备可以获取当前图像块的第一候选运动信息列表,并获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量,以及将所述运动矢量值的竖直分量转化为整像素精度,以便根据转化竖直分量为整像素精度后的运动矢量值进行视频编码或解码。通过这种实施方式,在一定程度上提高了带宽利用率,简化了编码或解码操作,提高了编码或解码的效率。
请参见图8,图8是本说明书实施例提供的一种视频编解码装置的结构示意图,具体的,所述视频编解码装置设置于所述视频编解码设备上,所述装置包括:获取模块801和转换模块802;
所述获取模块801,用于获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;
所述转换模块802,用于转换所述运动矢量值的精度。
进一步地,所述转换模块802转换所述运动矢量值的精度时,具体用于:
根据所述当前图像块的大小,转换所述运动矢量值的精度。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
获取所述当前图像块的大小;
当接收到所述第一候选运动信息列表中的运动矢量值的调用指令时,根据所述当前图像块的大小,转换所述运动矢量值的精度。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
判断所述当前图像块的大小是否满足第一条件;
若是,则将所述当前图像块的第一候选运动信息列表中的双预测的运动矢量值转换成整像素精度。
进一步地,所述转换模块802还用于:
若判断出所述当前图像块不满足所述第一条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
进一步地,所述第一条件,包括:
所述当前图像块存在双预测的运动矢量,以及所述当前图像块的大小满足第一预设范围阈值。
进一步地,所述满足第一预设范围阈值,包括:所述当前图像块的大小大于或等于64个像素。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
判断所述当前图像块的大小是否满足第二条件;
若是,则将所述当前图像块的第一候选运动信息列表中双预测的至少一个方向的运动矢量值转换成整像素精度。
进一步地,所述转换模块802还用于:
若判断出所述当前图像块不满足所述第二条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
进一步地,所述第二条件,包括:
所述当前图像块存在至少两个双预测的运动矢量,以及所述当前图像块的大小满足第二预设范围阈值。
进一步地,所述满足第二预设范围阈值,包括:
所述当前图像块的大小小于64个像素;或者,
所述当前图像块的大小大于16个像素且小于64个像素。
进一步地,所述运动矢量值包括水平分量和竖直分量;所述转换模块802转换所述运动矢量值的精度时,具体用于:
获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量和竖直分量;
将所述运动矢量值的水平分量和竖直分量转化为整像素精度。
进一步地,所述转换模块802将所述运动矢量值的水平分量和竖直分量转化为整像素精度时,具体用于:
根据所述运动矢量值的存储精度,确定转化系数s;
利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度;以及,
利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
进一步地,所述运动矢量值包括水平分量;所述转换模块802转换所述运动矢量值的精度时,具体用于:
获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量;
将所述运动矢量值的水平分量转化为整像素精度。
进一步地,所述转换模块802将所述运动矢量值的水平分量转化为整像素精度时,具体用于:
根据所述运动矢量值的存储精度,确定转化系数s;
利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度。
进一步地,所述运动矢量值包括竖直分量;所述转换模块802转换所述运动矢量值的精度时,具体用于:
获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量;
将所述运动矢量值的竖直分量转化为整像素精度。
进一步地,所述转换模块802将所述运动矢量值的竖直分量转化为整像素精度时,具体用于:
根据所述运动矢量值的存储精度,确定转化系数s;
利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
进一步地,所述转换模块802利用第一预设转化规则和所述转化系数s,将所述运动矢量值的水平分量转化为整像素精度时,具体用于:
如果所述水平分量大于或等于0,则将所述转化系数s与1之差左移1位,得到第一移位值;
将所述第一移位值与所述水平分量之和右移s位,得到第二移位值;
将所述第二移位值左移s位,得到所述水平分量的整像素精度。
进一步地,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
如果MV1x>=0,MV2x=((MV1x+(1<<(s-1)))>>s)<<s。
进一步地,所述转换模块802还用于:
如果所述水平分量小于0,则将所述第一移位值与所述水平分量之差右移s位,得到第三移位值;
将所述第三移位值左移s位并取相反数,得到所述水平分量的整像素精度。
进一步地,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
如果MV1x<0,MV2x=-((-MV1x+(1<<(s-1)))>>s)<<s。
进一步地,所述转换模块802利用第二预设转化规则和所述转化系数s,将所述运动矢量值的竖直分量转化为整像素精度时,具体用于:
如果所述竖直分量大于或等于0,则将所述转化系数s与1之差左移1位,得到第四移位值;
将所述第四移位值与所述竖直分量之和右移s位,得到第五移位值;
将所述第五移位值左移s位,得到所述竖直分量的整像素精度。
进一步地,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
如果MV1y>=0,MV2y=((MV1y+(1<<(s-1)))>>s)<<s。
进一步地,所述转换模块802还用于:
如果所述竖直分量小于0,则将所述第四移位值与所述竖直分量之差右移s位,得到第六移位值;
将所述第六移位值左移s位并取相反数,得到所述竖直分量的整像素精 度。
进一步地,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
如果MV1y<0,MV2y=-((-MV1y+(1<<(s-1)))>>s)<<s。
进一步地,所述获取模块801获取当前图像块的第一候选运动信息列表时,具体用于:
根据合并Merge模式确定所述当前图像块的第一候选运动信息列表;或者,
根据三角形预测模式确定所述当前图像块的第一候选运动信息列表。
进一步地,所述当前图像块为一个编码单元CU。
进一步地,所述获取模块801根据合并Merge模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
获取所述合并(Merge)模式的空域候选列表和时域候选列表;
根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。
进一步地,所述获取模块801根据三角形预测模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
对所述编码单元CU进行划分,得到两个三角形的预测单元PU;
获取所述两个预测单元PU的当前运动信息列表;
根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表。
进一步地,所述获取模块801根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表时,具体用于:
检测所述当前运动信息列表中的当前运动矢量是否为单向预测值;
如果检测结果为否,则将所述当前运动矢量转换为单向预测的运动矢量;
根据转换后的单项预测的运动矢量,确定所述当前图像块的第一候选运动信息列表。
进一步地,所述获取模块801获取当前图像块的第一候选运动信息列表时,具体用于:
根据合并Merge模式确定所述当前图像块的第一候选运动信息列表;或 者,
根据三角形预测模式确定所述当前图像块的第一候选运动信息列表。
进一步地,所述当前图像块为一个编码单元CU。
进一步地,所述获取模块801根据合并Merge模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
获取所述合并(Merge)模式的空域候选列表和时域候选列表;
根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。
进一步地,所述获取模块801根据三角形预测模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
对所述编码单元CU进行划分,得到两个三角形的预测单元PU;
获取所述两个预测单元PU的当前运动信息列表;
根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表。
进一步地,所述获取模块801根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表时,具体用于:
检测所述当前运动信息列表中的当前运动矢量是否为单向预测值;
如果检测结果为否,则将所述当前运动矢量转换为单向预测的运动矢量;
根据转换后的单项预测的运动矢量,确定所述当前图像块的第一候选运动信息列表。
进一步地,所述转换模块802转换所述运动矢量值的精度之后,还用于:
根据所述转换精度后的所述运动矢量值,建立第二候选运动信息列表。
进一步地,所述转换模块802转换所述运动矢量值的精度时,具体用于:
将所述运动矢量值的精度转换为整像素精度。
进一步地,所述转换模块802将所述运动矢量值的精度转换为整像素精度时,具体用于:
将所述运动矢量值的全部或者部分转换为整像素精度。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度之前,还用于:
判断所述当前图像块的大小是否满足预设范围。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
根据所述当前图像块的大小范围,对不同类型的所述运动矢量值进行不同的精度转换操作。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小满足第一条件时,将双预测运动矢量转换为整像素精度。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小满足第一条件时,将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小满足第一条件时,将双预测运动矢量中一个方向上的运动矢量转换为整像素精度。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小不满足第一条件时,将运动矢量值中的单向运动矢量值和/或双向运动矢量值转换为整像素精度。
进一步地,所述转换模块802将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将单向预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
进一步地,所述转换模块802将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将双预测运动矢量中至少一个方向的运动矢量转换为整像素精度。
进一步地,所述转换模块802将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精 度。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小满足第一条件时,将双预测运动矢量中一个方向上的运动矢量转换为整像素精度。
进一步地,所述转换模块802根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小不满足第一条件时,将运动矢量值中的单向运动矢量值和/或双向运动矢量值转换为整像素精度。
进一步地,所述转换模块802将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将单向预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
进一步地,所述转换模块802将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将双预测运动矢量中至少一个方向的运动矢量转换为整像素精度。
进一步地,所述转换模块802将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
进一步地,所述获取模块801获取当前图像块的第一候选运动信息列表时,具体用于:
根据合并候选列表(merge candidate list),三角形预测合并候选列表(triangle merge candidate list),或者其它帧间预测的候选列表,获得所述当前图像块的第一候选运动信息列表。
进一步地,所述获取模块801获取当前图像块的第一候选运动信息列表时,具体用于:
直接选择合并候选列表(merge candidate list)中双向MV的一个单向预测MV。
进一步地,所述转换模块801转换所述运动矢量值的精度时,具体用于:
将所述第一候选列表中的双向运动矢量值直接转换为整像素精度;
其中,所述双向运动矢量值直接转换为整像素精度是把两个单向MV直接转为整像素,而无需拆分双向MV。
进一步地,所述第一候选列表包括来自三角形预测合并候选列表(triangle merge candidate list)的双向运动矢量值。
本说明书实施例中,视频编解码装置中的获取模块可以获取当前图像块的第一候选运动信息列表,转换模块可以转换所述运动矢量值的精度,以便根据所述转换精度后的所述运动矢量值进行视频编码或解码。通过这种实施方式,可以提高带宽利用率,简化编码或解码操作,提高编码或解码的效率。
请参见图9,图9是本说明书实施例提供的一种视频编解码设备的结构示意图,具体的,所述视频编解码设备包括:存储器901、处理器902以及数据接口903。
所述存储器901可以包括易失性存储器(volatile memory);存储器901也可以包括非易失性存储器(non-volatile memory);存储器901还可以包括上述种类的存储器的组合。所述处理器902可以是中央处理器(central processing unit,CPU)。所述处理器902还可以进一步包括硬件视频编解码设备。上述硬件视频编解码设备可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。具体例如可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA)或其任意组合。
进一步地,所述存储器901用于存储程序指令,当程序指令被执行时所述处理器902可以调用存储器901中存储的程序指令,用于执行如下步骤:
获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;
转换所述运动矢量值的精度。
进一步地,所述处理器902转换所述运动矢量值的精度时,具体用于:
根据所述当前图像块的大小,转换所述运动矢量值的精度。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
获取所述当前图像块的大小;
当接收到所述第一候选运动信息列表中的运动矢量值的调用指令时,根据所述当前图像块的大小,转换所述运动矢量值的精度。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
判断所述当前图像块的大小是否满足第一条件;
若是,则将所述当前图像块的第一候选运动信息列表中的双预测的运动矢量值转换成整像素精度。
进一步地,所述处理器902还用于:
若判断出所述当前图像块不满足所述第一条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
进一步地,所述第一条件,包括:
所述当前图像块存在双预测的运动矢量,以及所述当前图像块的大小满足第一预设范围阈值。
进一步地,所述满足第一预设范围阈值,包括:所述当前图像块的大小大于或等于64个像素。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
判断所述当前图像块的大小是否满足第二条件;
若是,则将所述当前图像块的第一候选运动信息列表中双预测的至少一个方向的运动矢量值转换成整像素精度。
进一步地,所述处理器902还用于:
若判断出所述当前图像块不满足所述第二条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
进一步地,所述第二条件,包括:
所述当前图像块存在至少两个双预测的运动矢量,以及所述当前图像块的大小满足第二预设范围阈值。
进一步地,所述满足第二预设范围阈值,包括:
所述当前图像块的大小小于64个像素;或者,
所述当前图像块的大小大于16个像素且小于64个像素。
进一步地,所述运动矢量值包括水平分量和竖直分量;所述转换模块802转换所述运动矢量值的精度时,具体用于:
获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量和竖直分量;
将所述运动矢量值的水平分量和竖直分量转化为整像素精度。
进一步地,所述处理器902将所述运动矢量值的水平分量和竖直分量转化为整像素精度时,具体用于:
根据所述运动矢量值的存储精度,确定转化系数s;
利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度;以及,
利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
进一步地,所述运动矢量值包括水平分量;所述转换模块802转换所述运动矢量值的精度时,具体用于:
获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量;
将所述运动矢量值的水平分量转化为整像素精度。
进一步地,所述处理器902将所述运动矢量值的水平分量转化为整像素精度时,具体用于:
根据所述运动矢量值的存储精度,确定转化系数s;
利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度。
进一步地,所述运动矢量值包括竖直分量;所述转换模块802转换所述运动矢量值的精度时,具体用于:
获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量;
将所述运动矢量值的竖直分量转化为整像素精度。
进一步地,所述处理器902将所述运动矢量值的竖直分量转化为整像素精度时,具体用于:
根据所述运动矢量值的存储精度,确定转化系数s;
利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
进一步地,所述处理器902利用第一预设转化规则和所述转化系数s,将所述运动矢量值的水平分量转化为整像素精度时,具体用于:
如果所述水平分量大于或等于0,则将所述转化系数s与1之差左移1位,得到第一移位值;
将所述第一移位值与所述水平分量之和右移s位,得到第二移位值;
将所述第二移位值左移s位,得到所述水平分量的整像素精度。
进一步地,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
如果MV1x>=0,MV2x=((MV1x+(1<<(s-1)))>>s)<<s。
进一步地,所述处理器902还用于:
如果所述水平分量小于0,则将所述第一移位值与所述水平分量之差右移s位,得到第三移位值;
将所述第三移位值左移s位并取相反数,得到所述水平分量的整像素精度。
进一步地,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
如果MV1x<0,MV2x=-((-MV1x+(1<<(s-1)))>>s)<<s。
进一步地,所述处理器902利用第二预设转化规则和所述转化系数s,将所述运动矢量值的竖直分量转化为整像素精度时,具体用于:
如果所述竖直分量大于或等于0,则将所述转化系数s与1之差左移1位,得到第四移位值;
将所述第四移位值与所述竖直分量之和右移s位,得到第五移位值;
将所述第五移位值左移s位,得到所述竖直分量的整像素精度。
进一步地,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
如果MV1y>=0,MV2y=((MV1y+(1<<(s-1)))>>s)<<s。
进一步地,所述处理器902还用于:
如果所述竖直分量小于0,则将所述第四移位值与所述竖直分量之差右移s位,得到第六移位值;
将所述第六移位值左移s位并取相反数,得到所述竖直分量的整像素精 度。
进一步地,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
如果MV1y<0,MV2y=-((-MV1y+(1<<(s-1)))>>s)<<s。
进一步地,所述处理器902获取当前图像块的第一候选运动信息列表时,具体用于:
根据合并Merge模式确定所述当前图像块的第一候选运动信息列表;或者,
根据三角形预测模式确定所述当前图像块的第一候选运动信息列表。
进一步地,所述当前图像块为一个编码单元CU。
进一步地,所述处理器902根据合并Merge模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
获取所述合并(Merge)模式的空域候选列表和时域候选列表;
根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。
进一步地,所述处理器902根据三角形预测模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
对所述编码单元CU进行划分,得到两个三角形的预测单元PU;
获取所述两个预测单元PU的当前运动信息列表;
根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表。
进一步地,所述处理器902根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表时,具体用于:
检测所述当前运动信息列表中的当前运动矢量是否为单向预测值;
如果检测结果为否,则将所述当前运动矢量转换为单向预测的运动矢量;
根据转换后的单项预测的运动矢量,确定所述当前图像块的第一候选运动信息列表。
进一步地,所述处理器902获取当前图像块的第一候选运动信息列表时,具体用于:
根据合并Merge模式确定所述当前图像块的第一候选运动信息列表;或 者,
根据三角形预测模式确定所述当前图像块的第一候选运动信息列表。
进一步地,所述当前图像块为一个编码单元CU。
进一步地,所述处理器902根据合并Merge模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
获取所述合并(Merge)模式的空域候选列表和时域候选列表;
根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。
进一步地,所述处理器902根据三角形预测模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
对所述编码单元CU进行划分,得到两个三角形的预测单元PU;
获取所述两个预测单元PU的当前运动信息列表;
根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表。
进一步地,所述处理器902根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表时,具体用于:
检测所述当前运动信息列表中的当前运动矢量是否为单向预测值;
如果检测结果为否,则将所述当前运动矢量转换为单向预测的运动矢量;
根据转换后的单项预测的运动矢量,确定所述当前图像块的第一候选运动信息列表。
进一步地,所述处理器902转换所述运动矢量值的精度之后,还用于:
根据所述转换精度后的所述运动矢量值,建立第二候选运动信息列表。
进一步地,所述处理器902转换所述运动矢量值的精度时,具体用于:
将所述运动矢量值的精度转换为整像素精度。
进一步地,所述处理器902将所述运动矢量值的精度转换为整像素精度时,具体用于:
将所述运动矢量值的全部或者部分转换为整像素精度。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度之前,还用于:
判断所述当前图像块的大小是否满足预设范围。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
根据所述当前图像块的大小范围,对不同类型的所述运动矢量值进行不同的精度转换操作。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小满足第一条件时,将双预测运动矢量转换为整像素精度。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小满足第一条件时,将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小满足第一条件时,将双预测运动矢量中一个方向上的运动矢量转换为整像素精度。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小不满足第一条件时,将运动矢量值中的单向运动矢量值和/或双向运动矢量值转换为整像素精度。
进一步地,所述处理器902将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将单向预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
进一步地,所述处理器902将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将双预测运动矢量中至少一个方向的运动矢量转换为整像素精度。
进一步地,所述处理器902将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精 度。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小满足第一条件时,将双预测运动矢量中一个方向上的运动矢量转换为整像素精度。
进一步地,所述处理器902根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
当所述当前图像块的大小不满足第一条件时,将运动矢量值中的单向运动矢量值和/或双向运动矢量值转换为整像素精度。
进一步地,所述处理器902将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将单向预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
进一步地,所述处理器902将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将双预测运动矢量中至少一个方向的运动矢量转换为整像素精度。
进一步地,所述处理器902将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
进一步地,所述处理器902获取当前图像块的第一候选运动信息列表时,具体用于:
根据合并候选列表(merge candidate list),三角形预测合并候选列表(triangle merge candidate list),或者其它帧间预测的候选列表,获得所述当前图像块的第一候选运动信息列表。
进一步地,所述处理器902获取当前图像块的第一候选运动信息列表时,具体用于:
直接选择合并候选列表(merge candidate list)中双向MV的一个单向预测MV。
进一步地,所述处理器902转换所述运动矢量值的精度时,具体用于:
将所述第一候选列表中的双向运动矢量值直接转换为整像素精度;
其中,所述双向运动矢量值直接转换为整像素精度是把两个单向MV直接转为整像素,而无需拆分双向MV。
进一步地,所述第一候选列表包括来自三角形预测合并候选列表(triangle merge candidate list)的双向运动矢量值。
本说明书实施例中,视频编解码设备可以获取当前图像块的候选运动信息列表,并转换所述运动矢量值的精度,以便根据所述转换精度后的所述运动矢量值进行视频编码或解码。通过这种实施方式,可以提高带宽利用率,简化编码或解码操作,提高编码或解码的效率。
在本说明书实施例中,提供一种MV缩放技术原理示意图。MV缩放技术会在获取时域候选MVP的过程中用到,时域MVP会获取当前CU在临近已编码图像中的同位PU的MV。具体如图12所示,其中curr_pic代表当前帧,curr_ref代表当前帧的参考帧,col_pic代表当前CU的同位CU所处的同位帧,col_ref代表同位帧的参考帧,同位CU的MV(colMV,实线箭头,从col_pic指向col_ref)指向的可能是col_ref中的一个块,因此当前CU想要获得同位CU的MV,需要将这个MV缩放到虚线这个位置,也就是说,见过缩放之后的MV,作为一个MVP加入到候选列表中,这个MVP的参考帧为curr_ref,MV为虚线线头(curMV)所示,缩放的公式如下:
curMV=(td/tb)*colMV。在本说明书的实施例中还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现本说明书实施例图3、图4、图5、图6或图7中描述的视频编码或解码方法方式,也可实现图8所述本说明书所对应实施例的视频编解码设备,在此不再赘述。
所述计算机可读存储介质可以是前述任一项实施例所述的设备的内部存储单元,例如设备的硬盘或内存。所述计算机可读存储介质也可以是所述设备的外部存储设备,例如所述设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述计算机可读存储介质还可以既包括所述设备的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以及所述设备所需的其他程序和数据。所述计算机可读存储介质还可以用于暂时 地存储已经输出或者将要输出的数据。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本说明书部分实施例而已,当然不能以此来限定本说明书之权利范围,因此依本说明书权利要求所作的等同变化,仍属本说明书所涵盖的范围。

Claims (139)

  1. 一种视频编码或解码方法,其特征在于,包括:
    获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;
    转换所述运动矢量值的精度。
  2. 根据权利要求1所述的方法,其特征在于,所述转换所述运动矢量值的精度,包括:
    根据所述当前图像块的大小,转换所述运动矢量值的精度。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述当前图像块的大小,转换所述运动矢量值的精度,包括:
    获取所述当前图像块的大小;
    当接收到所述第一候选运动信息列表中的运动矢量值的调用指令时,根据所述当前图像块的大小,转换所述运动矢量值的精度。
  4. 根据权利要求2所述的方法,其特征在于,所述根据所述当前图像块的大小,转换所述运动矢量值的精度,包括:
    判断所述当前图像块的大小是否满足第一条件;
    若是,则将所述当前图像块的第一候选运动信息列表中的双预测的运动矢量值转换成整像素精度。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    若判断出所述当前图像块不满足所述第一条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
  6. 根据权利要求5所述的方法,其特征在于,所述第一条件,包括:
    所述当前图像块存在双预测的运动矢量,以及所述当前图像块的大小满足第一预设范围阈值。
  7. 根据权利要求6所述的方法,其特征在于,所述满足第一预设范围阈值,包括:所述当前图像块的大小大于或等于64个像素。
  8. 根据权利要求2所述的方法,其特征在于,所述根据所述当前图像块的大小,转换所述运动矢量值的精度,包括:
    判断所述当前图像块的大小是否满足第二条件;
    若是,则将所述当前图像块的第一候选运动信息列表中双预测的至少一个方向的运动矢量值转换成整像素精度。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    若判断出所述当前图像块不满足所述第二条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
  10. 根据权利要求9所述的方法,其特征在于,所述第二条件,包括:
    所述当前图像块存在至少两个双预测的运动矢量,以及所述当前图像块的大小满足第二预设范围阈值。
  11. 根据权利要求10所述的方法,其特征在于,所述满足第二预设范围阈值,包括:
    所述当前图像块的大小小于64个像素;或者,
    所述当前图像块的大小大于16个像素且小于64个像素。
  12. 根据权利要求1所述的方法,其特征在于,所述运动矢量值包括水平分量和竖直分量;所述转换所述运动矢量值的精度,包括:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量和竖直分量;
    将所述运动矢量值的水平分量和竖直分量转化为整像素精度。
  13. 根据权利要求12所述的方法,其特征在于,所述将所述运动矢量值 的水平分量和竖直分量转化为整像素精度,包括:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度;以及,
    利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
  14. 根据权利要求1所述的方法,其特征在于,所述运动矢量值包括水平分量;所述转换所述运动矢量值的精度,包括:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量;
    将所述运动矢量值的水平分量转化为整像素精度。
  15. 根据权利要求14所述的方法,其特征在于,所述将所述运动矢量值的水平分量转化为整像素精度,包括:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度。
  16. 根据权利要求1所述的方法,其特征在于,所述运动矢量值包括竖直分量;所述转换所述运动矢量值的精度,包括:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量;
    将所述运动矢量值的竖直分量转化为整像素精度。
  17. 根据权利要求16所述的方法,其特征在于,所述将所述运动矢量值的竖直分量转化为整像素精度,包括:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
  18. 根据权利要求13或15所述的方法,其特征在于,所述利用第一预设 转化规则和所述转化系数s,将所述运动矢量值的水平分量转化为整像素精度,包括:
    如果所述水平分量大于或等于0,则将所述转化系数s与1之差左移1位,得到第一移位值;
    将所述第一移位值与所述水平分量之和右移s位,得到第二移位值;
    将所述第二移位值左移s位,得到所述水平分量的整像素精度。
  19. 根据权利要求18所述的方法,其特征在于,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
    如果MV1x>=0,MV2x=((MV1x+(1<<(s-1)))>>s)<<s。
  20. 根据权利要求18所述的方法,其特征在于,所述方法还包括:
    如果所述水平分量小于0,则将所述第一移位值与所述水平分量之差右移s位,得到第三移位值;
    将所述第三移位值左移s位并取相反数,得到所述水平分量的整像素精度。
  21. 根据权利要求20所述的方法,其特征在于,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
    如果MV1x<0,MV2x=-((-MV1x+(1<<(s-1)))>>s)<<s。
  22. 根据权利要求13或17所述的方法,其特征在于,所述利用第二预设转化规则和所述转化系数s,将所述运动矢量值的竖直分量转化为整像素精度,包括:
    如果所述竖直分量大于或等于0,则将所述转化系数s与1之差左移1位,得到第四移位值;
    将所述第四移位值与所述竖直分量之和右移s位,得到第五移位值;
    将所述第五移位值左移s位,得到所述竖直分量的整像素精度。
  23. 根据权利要求22所述的方法,其特征在于,所述竖直分量为MV1y, 所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
    如果MV1y>=0,MV2y=((MV1y+(1<<(s-1)))>>s)<<s。
  24. 根据权利要求22所述的方法,其特征在于,所述方法还包括:
    如果所述竖直分量小于0,则将所述第四移位值与所述竖直分量之差右移s位,得到第六移位值;
    将所述第六移位值左移s位并取相反数,得到所述竖直分量的整像素精度。
  25. 根据权利要求24所述的方法,其特征在于,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
    如果MV1y<0,MV2y=-((-MV1y+(1<<(s-1)))>>s)<<s。
  26. 根据权利要求1所述的方法,其特征在于,所述获取当前图像块的第一候选运动信息列表,包括:
    根据合并Merge模式确定所述当前图像块的第一候选运动信息列表;或者,
    根据三角形预测模式确定所述当前图像块的第一候选运动信息列表。
  27. 根据权利要求26所述的方法,其特征在于,所述当前图像块为一个编码单元CU。
  28. 根据权利要求27所述的方法,其特征在于,所述根据合并Merge模式确定所述当前图像块的第一候选运动信息列表,包括:
    获取所述合并(Merge)模式的空域候选列表和时域候选列表;
    根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。
  29. 根据权利要求27所述的方法,其特征在于,所述根据三角形预测模式确定所述当前图像块的第一候选运动信息列表,包括:
    对所述编码单元CU进行划分,得到两个三角形的预测单元PU;
    获取所述两个预测单元PU的当前运动信息列表;
    根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表。
  30. 根据权利要求29所述的方法,其特征在于,所述根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表,包括:
    检测所述当前运动信息列表中的当前运动矢量是否为单向预测值;
    如果检测结果为否,则将所述当前运动矢量转换为单向预测的运动矢量;
    根据转换后的单项预测的运动矢量,确定所述当前图像块的第一候选运动信息列表。
  31. 根据权利要求1所述的方法,其特征在于,所述转换所述运动矢量值的精度之后,还包括:
    根据所述转换精度后的所述运动矢量值,建立第二候选运动信息列表。
  32. 根据权利要求1所述的方法,其特征在于,所述转换所述运动矢量值的精度,包括:
    将所述运动矢量值的精度转换为整像素精度。
  33. 根据权利要求32所述的方法,其特征在于,所述将所述运动矢量值的精度转换为整像素精度,包括:
    将所述运动矢量值的全部或者部分转换为整像素精度。
  34. 根据权利要求1所述的方法,其特征在于,所述根据所述当前图像块的大小,转换所述运动矢量值的精度之前,还包括:
    判断所述当前图像块的大小是否满足预设范围。
  35. 根据权利要求1所述的方法,其特征在于,所述根据所述当前图像块 的大小,转换所述运动矢量值的精度,包括:
    根据所述当前图像块的大小范围,对不同类型的所述运动矢量值进行不同的精度转换操作。
  36. 根据权利要求1所述的方法,其特征在于,所述根据所述当前图像块的大小,转换所述运动矢量值的精度,包括:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量转换为整像素精度。
  37. 根据权利要求1所述的方法,其特征在于,所述根据所述当前图像块的大小,转换所述运动矢量值的精度,包括:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  38. 根据权利要求1所述的方法,其特征在于,所述根据所述当前图像块的大小,转换所述运动矢量值的精度,包括:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量中一个方向上的运动矢量转换为整像素精度。
  39. 根据权利要求1所述的方法,其特征在于,所述根据所述当前图像块的大小,转换所述运动矢量值的精度,包括:
    当所述当前图像块的大小不满足第一条件时,将运动矢量值中的单向运动矢量值和/或双向运动矢量值转换为整像素精度。
  40. 根据权利要求39所述的方法,其特征在于,所述将运动矢量值中的单向运动矢量值转换为整像素精度,包括:
    将单向预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  41. 根据权利要求39所述的方法,其特征在于,所述将运动矢量值中的 双向运动矢量值转换为整像素精度,包括:
    将双预测运动矢量中至少一个方向的运动矢量转换为整像素精度。
  42. 根据权利要求39所述的方法,其特征在于,所述将运动矢量值中的双向运动矢量值转换为整像素精度,包括:
    将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  43. 根据权利要求1所述的方法,其特征在于,所述获取当前图像块的第一候选运动信息列表,包括:
    根据合并候选列表(merge candidate list),三角形预测合并候选列表(triangle merge candidate list),或者其它帧间预测的候选列表,获得所述当前图像块的第一候选运动信息列表。
  44. 根据权利要求43所述的方法,其特征在于,所述获取当前图像块的第一候选运动信息列表,包括:
    直接选择合并候选列表(merge candidate list)中双向MV的一个单向预测MV。
  45. 根据权利要求1所述的方法,其特征在于,所述转换所述运动矢量值的精度,包括:
    将所述第一候选列表中的双向运动矢量值直接转换为整像素精度;
    其中,所述双向运动矢量值直接转换为整像素精度是把两个单向MV直接转为整像素,而无需拆分双向MV。
  46. 根据权利要求45所述的方法,其特征在于,所述第一候选列表包括来自三角形预测合并候选列表(triangle merge candidate list)的双向运动矢量值。
  47. 一种视频编解码装置,其特征在于,包括:
    获取模块,用于获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;
    转换模块,用于转换所述运动矢量值的精度。
  48. 根据权利要求47所述的装置,其特征在于,所述转换模块转换所述运动矢量值的精度时,具体用于:
    根据所述当前图像块的大小,转换所述运动矢量值的精度。
  49. 根据权利要求48所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    获取所述当前图像块的大小;
    当接收到所述第一候选运动信息列表中的运动矢量值的调用指令时,根据所述当前图像块的大小,转换所述运动矢量值的精度。
  50. 根据权利要求48所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    判断所述当前图像块的大小是否满足第一条件;
    若是,则将所述当前图像块的第一候选运动信息列表中的双预测的运动矢量值转换成整像素精度。
  51. 根据权利要求50所述的装置,其特征在于,所述转换模块还用于:
    若判断出所述当前图像块不满足所述第一条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
  52. 根据权利要求51所述的装置,其特征在于,所述第一条件,包括:
    所述当前图像块存在双预测的运动矢量,以及所述当前图像块的大小满足第一预设范围阈值。
  53. 根据权利要求52所述的装置,其特征在于,所述满足第一预设范围阈值,包括:所述当前图像块的大小大于或等于64个像素。
  54. 根据权利要求48所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    判断所述当前图像块的大小是否满足第二条件;
    若是,则将所述当前图像块的第一候选运动信息列表中双预测的至少一个方向的运动矢量值转换成整像素精度。
  55. 根据权利要求54所述的装置,其特征在于,所述转换模块还用于:
    若判断出所述当前图像块不满足所述第二条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
  56. 根据权利要求55所述的装置,其特征在于,所述第二条件,包括:
    所述当前图像块存在至少两个双预测的运动矢量,以及所述当前图像块的大小满足第二预设范围阈值。
  57. 根据权利要求56所述的装置,其特征在于,所述满足第二预设范围阈值,包括:
    所述当前图像块的大小小于64个像素;或者,
    所述当前图像块的大小大于16个像素且小于64个像素。
  58. 根据权利要求47所述的装置,其特征在于,所述运动矢量值包括水平分量和竖直分量;所述转换模块转换所述运动矢量值的精度时,具体用于:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量和竖直分量;
    将所述运动矢量值的水平分量和竖直分量转化为整像素精度。
  59. 根据权利要求58所述的装置,其特征在于,所述转换模块将所述运动矢量值的水平分量和竖直分量转化为整像素精度时,具体用于:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分 量转化为整像素精度;以及,
    利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
  60. 根据权利要求47所述的装置,其特征在于,所述运动矢量值包括水平分量;所述转换模块转换所述运动矢量值的精度时,具体用于:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量;
    将所述运动矢量值的水平分量转化为整像素精度。
  61. 根据权利要求60所述的装置,其特征在于,所述转换模块将所述运动矢量值的水平分量转化为整像素精度时,具体用于:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度。
  62. 根据权利要求47所述的装置,其特征在于,所述运动矢量值包括竖直分量;所述转换模块转换所述运动矢量值的精度时,具体用于:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量;
    将所述运动矢量值的竖直分量转化为整像素精度。
  63. 根据权利要求62所述的装置,其特征在于,所述转换模块将所述运动矢量值的竖直分量转化为整像素精度时,具体用于:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
  64. 根据权利要求59或61所述的装置,其特征在于,所述转换模块利用第一预设转化规则和所述转化系数s,将所述运动矢量值的水平分量转化为整像素精度时,具体用于:
    如果所述水平分量大于或等于0,则将所述转化系数s与1之差左移1位, 得到第一移位值;
    将所述第一移位值与所述水平分量之和右移s位,得到第二移位值;
    将所述第二移位值左移s位,得到所述水平分量的整像素精度。
  65. 根据权利要求64所述的装置,其特征在于,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
    如果MV1x>=0,MV2x=((MV1x+(1<<(s-1)))>>s)<<s。
  66. 根据权利要求64所述的装置,其特征在于,所述转换模块还用于:
    如果所述水平分量小于0,则将所述第一移位值与所述水平分量之差右移s位,得到第三移位值;
    将所述第三移位值左移s位并取相反数,得到所述水平分量的整像素精度。
  67. 根据权利要求66所述的装置,其特征在于,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
    如果MV1x<0,MV2x=-((-MV1x+(1<<(s-1)))>>s)<<s。
  68. 根据权利要求59或63所述的装置,其特征在于,所述转换模块利用第二预设转化规则和所述转化系数s,将所述运动矢量值的竖直分量转化为整像素精度时,具体用于:
    如果所述竖直分量大于或等于0,则将所述转化系数s与1之差左移1位,得到第四移位值;
    将所述第四移位值与所述竖直分量之和右移s位,得到第五移位值;
    将所述第五移位值左移s位,得到所述竖直分量的整像素精度。
  69. 根据权利要求68所述的装置,其特征在于,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
    如果MV1y>=0,MV2y=((MV1y+(1<<(s-1)))>>s)<<s。
  70. 根据权利要求68所述的装置,其特征在于,所述转换模块还用于:
    如果所述竖直分量小于0,则将所述第四移位值与所述竖直分量之差右移s位,得到第六移位值;
    将所述第六移位值左移s位并取相反数,得到所述竖直分量的整像素精度。
  71. 根据权利要求70所述的装置,其特征在于,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
    如果MV1y<0,MV2y=-((-MV1y+(1<<(s-1)))>>s)<<s。
  72. 根据权利要求47所述的装置,其特征在于,所述获取模块获取当前图像块的第一候选运动信息列表时,具体用于:
    根据合并Merge模式确定所述当前图像块的第一候选运动信息列表;或者,
    根据三角形预测模式确定所述当前图像块的第一候选运动信息列表。
  73. 根据权利要求72所述的装置,其特征在于,所述当前图像块为一个编码单元CU。
  74. 根据权利要求73所述的装置,其特征在于,所述获取模块根据合并Merge模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
    获取所述合并(Merge)模式的空域候选列表和时域候选列表;
    根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。
  75. 根据权利要求73所述的装置,其特征在于,所述获取模块根据三角形预测模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
    对所述编码单元CU进行划分,得到两个三角形的预测单元PU;
    获取所述两个预测单元PU的当前运动信息列表;
    根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的 第一候选运动信息列表。
  76. 根据权利要求75所述的装置,其特征在于,所述获取模块根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表时,具体用于:
    检测所述当前运动信息列表中的当前运动矢量是否为单向预测值;
    如果检测结果为否,则将所述当前运动矢量转换为单向预测的运动矢量;
    根据转换后的单项预测的运动矢量,确定所述当前图像块的第一候选运动信息列表。
  77. 根据权利要求47所述的装置,其特征在于,所述转换模块转换所述运动矢量值的精度之后,还用于:
    根据所述转换精度后的所述运动矢量值,建立第二候选运动信息列表。
  78. 根据权利要求47所述的装置,其特征在于,所述转换模块转换所述运动矢量值的精度时,具体用于:
    将所述运动矢量值的精度转换为整像素精度。
  79. 根据权利要求78所述的装置,其特征在于,所述转换模块将所述运动矢量值的精度转换为整像素精度时,具体用于:
    将所述运动矢量值的全部或者部分转换为整像素精度。
  80. 根据权利要求47所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度之前,还用于:
    判断所述当前图像块的大小是否满足预设范围。
  81. 根据权利要求47所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    根据所述当前图像块的大小范围,对不同类型的所述运动矢量值进行不同的精度转换操作。
  82. 根据权利要求47所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量转换为整像素精度。
  83. 根据权利要求47所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  84. 根据权利要求47所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量中一个方向上的运动矢量转换为整像素精度。
  85. 根据权利要求47所述的装置,其特征在于,所述转换模块根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    当所述当前图像块的大小不满足第一条件时,将运动矢量值中的单向运动矢量值和/或双向运动矢量值转换为整像素精度。
  86. 根据权利要求85所述的装置,其特征在于,所述转换模块将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
    将单向预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  87. 根据权利要求85所述的装置,其特征在于,所述转换模块将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
    将双预测运动矢量中至少一个方向的运动矢量转换为整像素精度。
  88. 根据权利要求85所述的装置,其特征在于,所述转换模块将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
    将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  89. 根据权利要求47所述的装置,其特征在于,所述获取模块获取当前图像块的第一候选运动信息列表时,具体用于:
    根据合并候选列表(merge candidate list),三角形预测合并候选列表(triangle merge candidate list),或者其它帧间预测的候选列表,获得所述当前图像块的第一候选运动信息列表。
  90. 根据权利要求89所述的装置,其特征在于,所述获取模块获取当前图像块的第一候选运动信息列表时,具体用于:
    直接选择合并候选列表(merge candidate list)中双向MV的一个单向预测MV。
  91. 根据权利要求47所述的装置,其特征在于,所述转换模块转换所述运动矢量值的精度时,具体用于:
    将所述第一候选列表中的双向运动矢量值直接转换为整像素精度;
    其中,所述双向运动矢量值直接转换为整像素精度是把两个单向MV直接转为整像素,而无需拆分双向MV。
  92. 根据权利要求91所述的装置,其特征在于,所述第一候选列表包括来自三角形预测合并候选列表(triangle merge candidate list)的双向运动矢量值。
  93. 一种视频编解码设备,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序指令;
    所述处理器,用于调用所述程序指令,当所述程序指令被执行时,用于执行以下操作:
    获取当前图像块的第一候选运动信息列表,其中,所述第一候选运动信息列表包含预测运动信息,所述预测运动信息包括运动矢量值;
    转换所述运动矢量值的精度。
  94. 根据权利要求93所述的设备,其特征在于,所述处理器转换所述运动矢量值的精度时,具体用于:
    根据所述当前图像块的大小,转换所述运动矢量值的精度。
  95. 根据权利要求94所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    获取所述当前图像块的大小;
    当接收到所述第一候选运动信息列表中的运动矢量值的调用指令时,根据所述当前图像块的大小,转换所述运动矢量值的精度。
  96. 根据权利要求94所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    判断所述当前图像块的大小是否满足第一条件;
    若是,则将所述当前图像块的第一候选运动信息列表中的双预测的运动矢量值转换成整像素精度。
  97. 根据权利要求96所述的设备,其特征在于,所述处理器还用于:
    若判断出所述当前图像块不满足所述第一条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
  98. 根据权利要求97所述的设备,其特征在于,所述第一条件,包括:
    所述当前图像块存在双预测的运动矢量,以及所述当前图像块的大小满足第一预设范围阈值。
  99. 根据权利要求98所述的设备,其特征在于,所述满足第一预设范围阈值,包括:所述当前图像块的大小大于或等于64个像素。
  100. 根据权利要求94所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    判断所述当前图像块的大小是否满足第二条件;
    若是,则将所述当前图像块的第一候选运动信息列表中双预测的至少一个方向的运动矢量值转换成整像素精度。
  101. 根据权利要求100所述的设备,其特征在于,所述处理器还用于:
    若判断出所述当前图像块不满足所述第二条件,则将所述当前图像块的第一候选运动信息列表中所有的运动矢量值转化为整像素精度。
  102. 根据权利要求101所述的设备,其特征在于,所述第二条件,包括:
    所述当前图像块存在至少两个双预测的运动矢量,以及所述当前图像块的大小满足第二预设范围阈值。
  103. 根据权利要求102所述的设备,其特征在于,所述满足第二预设范围阈值,包括:
    所述当前图像块的大小小于64个像素;或者,
    所述当前图像块的大小大于16个像素且小于64个像素。
  104. 根据权利要求93所述的设备,其特征在于,所述运动矢量值包括水平分量和竖直分量;所述处理器转换所述运动矢量值的精度时,具体用于:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量和竖直分量;
    将所述运动矢量值的水平分量和竖直分量转化为整像素精度。
  105. 根据权利要求104所述的设备,其特征在于,所述处理器将所述运动矢量值的水平分量和竖直分量转化为整像素精度时,具体用于:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分 量转化为整像素精度;以及,
    利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
  106. 根据权利要求93所述的设备,其特征在于,所述运动矢量值包括水平分量;所述处理器转换所述运动矢量值的精度时,具体用于:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的水平分量;
    将所述运动矢量值的水平分量转化为整像素精度。
  107. 根据权利要求106所述的设备,其特征在于,所述处理器将所述运动矢量值的水平分量转化为整像素精度时,具体用于:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第一预设转化规则和所述转化系数s,将所述动矢量预测值的水平分量转化为整像素精度。
  108. 根据权利要求93所述的设备,其特征在于,所述运动矢量值包括竖直分量;所述处理器转换所述运动矢量值的精度时,具体用于:
    获取所述当前图像块的第一候选运动信息列表中运动矢量值的竖直分量;
    将所述运动矢量值的竖直分量转化为整像素精度。
  109. 根据权利要求108所述的设备,其特征在于,所述处理器将所述运动矢量值的竖直分量转化为整像素精度时,具体用于:
    根据所述运动矢量值的存储精度,确定转化系数s;
    利用第二预设转化规则和所述转化系数s,将所述动矢量预测值的竖直分量转化为整像素精度。
  110. 根据权利要求105或107所述的设备,其特征在于,所述处理器利用第一预设转化规则和所述转化系数s,将所述运动矢量值的水平分量转化为整像素精度时,具体用于:
    如果所述水平分量大于或等于0,则将所述转化系数s与1之差左移1位, 得到第一移位值;
    将所述第一移位值与所述水平分量之和右移s位,得到第二移位值;
    将所述第二移位值左移s位,得到所述水平分量的整像素精度。
  111. 根据权利要求110所述的设备,其特征在于,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
    如果MV1x>=0,MV2x=((MV1x+(1<<(s-1)))>>s)<<s。
  112. 根据权利要求110所述的设备,其特征在于,所述处理器还用于:
    如果所述水平分量小于0,则将所述第一移位值与所述水平分量之差右移s位,得到第三移位值;
    将所述第三移位值左移s位并取相反数,得到所述水平分量的整像素精度。
  113. 根据权利要求112所述的设备,其特征在于,所述水平分量为MV1x,所述水平分量的整像素精度为MV2x,所述第一预设转化规则包括:
    如果MV1x<0,MV2x=-((-MV1x+(1<<(s-1)))>>s)<<s。
  114. 根据权利要求105或109所述的设备,其特征在于,所述处理器利用第二预设转化规则和所述转化系数s,将所述运动矢量值的竖直分量转化为整像素精度时,具体用于:
    如果所述竖直分量大于或等于0,则将所述转化系数s与1之差左移1位,得到第四移位值;
    将所述第四移位值与所述竖直分量之和右移s位,得到第五移位值;
    将所述第五移位值左移s位,得到所述竖直分量的整像素精度。
  115. 根据权利要求114所述的设备,其特征在于,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
    如果MV1y>=0,MV2y=((MV1y+(1<<(s-1)))>>s)<<s。
  116. 根据权利要求114所述的设备,其特征在于,所述处理器还用于:
    如果所述竖直分量小于0,则将所述第四移位值与所述竖直分量之差右移s位,得到第六移位值;
    将所述第六移位值左移s位并取相反数,得到所述竖直分量的整像素精度。
  117. 根据权利要求116所述的设备,其特征在于,所述竖直分量为MV1y,所述竖直分量的整像素精度为MV2y,所述第二预设转化规则包括:
    如果MV1y<0,MV2y=-((-MV1y+(1<<(s-1)))>>s)<<s。
  118. 根据权利要求93所述的设备,其特征在于,所述处理器获取当前图像块的第一候选运动信息列表时,具体用于:
    根据合并Merge模式确定所述当前图像块的第一候选运动信息列表;或者,
    根据三角形预测模式确定所述当前图像块的第一候选运动信息列表。
  119. 根据权利要求118所述的设备,其特征在于,所述当前图像块为一个编码单元CU。
  120. 根据权利要求119所述的设备,其特征在于,所述处理器根据合并Merge模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
    获取所述合并(Merge)模式的空域候选列表和时域候选列表;
    根据所述空域候选列表和时域候选列表,确定所述编码单元CU的第一候选运动信息列表。
  121. 根据权利要求119所述的设备,其特征在于,所述处理器根据三角形预测模式确定所述当前图像块的第一候选运动信息列表时,具体用于:
    对所述编码单元CU进行划分,得到两个三角形的预测单元PU;
    获取所述两个预测单元PU的当前运动信息列表;
    根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的 第一候选运动信息列表。
  122. 根据权利要求121所述的设备,其特征在于,所述处理器根据所述两个预测单元PU的当前运动信息列表,确定所述当前图像块的第一候选运动信息列表时,具体用于:
    检测所述当前运动信息列表中的当前运动矢量是否为单向预测值;
    如果检测结果为否,则将所述当前运动矢量转换为单向预测的运动矢量;
    根据转换后的单项预测的运动矢量,确定所述当前图像块的第一候选运动信息列表。
  123. 根据权利要求93所述的设备,其特征在于,所述处理器转换所述运动矢量值的精度之后,还用于:
    根据所述转换精度后的所述运动矢量值,建立第二候选运动信息列表。
  124. 根据权利要求93所述的设备,其特征在于,所述处理器转换所述运动矢量值的精度时,具体用于:
    将所述运动矢量值的精度转换为整像素精度。
  125. 根据权利要求124所述的设备,其特征在于,所述处理器将所述运动矢量值的精度转换为整像素精度时,具体用于:
    将所述运动矢量值的全部或者部分转换为整像素精度。
  126. 根据权利要求93所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度之前,还用于:
    判断所述当前图像块的大小是否满足预设范围。
  127. 根据权利要求93所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    根据所述当前图像块的大小范围,对不同类型的所述运动矢量值进行不同的精度转换操作。
  128. 根据权利要求93所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量转换为整像素精度。
  129. 根据权利要求93所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  130. 根据权利要求93所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    当所述当前图像块的大小满足第一条件时,将双预测运动矢量中一个方向上的运动矢量转换为整像素精度。
  131. 根据权利要求93所述的设备,其特征在于,所述处理器根据所述当前图像块的大小,转换所述运动矢量值的精度时,具体用于:
    当所述当前图像块的大小不满足第一条件时,将运动矢量值中的单向运动矢量值和/或双向运动矢量值转换为整像素精度。
  132. 根据权利要求131所述的设备,其特征在于,所述处理器将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
    将单向预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  133. 根据权利要求131所述的设备,其特征在于,所述处理器将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
    将双预测运动矢量中至少一个方向的运动矢量转换为整像素精度。
  134. 根据权利要求131所述的设备,其特征在于,所述处理器将运动矢量值中的单向运动矢量值转换为整像素精度时,具体用于:
    将双预测运动矢量的水平方向分量和/或垂直方向分量转换为整像素精度。
  135. 根据权利要求93所述的设备,其特征在于,所述处理器获取当前图像块的第一候选运动信息列表时,具体用于:
    根据合并候选列表(merge candidate list),三角形预测合并候选列表(triangle merge candidate list),或者其它帧间预测的候选列表,获得所述当前图像块的第一候选运动信息列表。
  136. 根据权利要求135所述的设备,其特征在于,所述处理器获取当前图像块的第一候选运动信息列表时,具体用于:
    直接选择合并候选列表(merge candidate list)中双向MV的一个单向预测MV。
  137. 根据权利要求93所述的设备,其特征在于,所述处理器转换所述运动矢量值的精度时,具体用于:
    将所述第一候选列表中的双向运动矢量值直接转换为整像素精度;
    其中,所述双向运动矢量值直接转换为整像素精度是把两个单向MV直接转为整像素,而无需拆分双向MV。
  138. 根据权利要求137所述的设备,其特征在于,所述第一候选列表包括来自三角形预测合并候选列表(triangle merge candidate list)的双向运动矢量值。
  139. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至46任一项所述方法。
PCT/CN2019/078054 2019-03-13 2019-03-13 一种视频编码或解码方法、装置、设备及存储介质 WO2020181542A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980004958.9A CN111670578B (zh) 2019-03-13 2019-03-13 一种视频编码或解码方法、装置、设备及存储介质
PCT/CN2019/078054 WO2020181542A1 (zh) 2019-03-13 2019-03-13 一种视频编码或解码方法、装置、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/078054 WO2020181542A1 (zh) 2019-03-13 2019-03-13 一种视频编码或解码方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020181542A1 true WO2020181542A1 (zh) 2020-09-17

Family

ID=72382521

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/078054 WO2020181542A1 (zh) 2019-03-13 2019-03-13 一种视频编码或解码方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111670578B (zh)
WO (1) WO2020181542A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11212523B2 (en) * 2020-01-12 2021-12-28 Mediatek Inc. Video processing methods and apparatuses of merge number signaling in video coding systems

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102823251A (zh) * 2010-03-31 2012-12-12 Jvc建伍株式会社 动图像编码装置、动图像编码方法及动图像编码程序、以及动图像解码装置、动图像解码方法及动图像解码程序
CN104335586A (zh) * 2012-04-11 2015-02-04 高通股份有限公司 运动向量舍入
CN109218733A (zh) * 2017-06-30 2019-01-15 华为技术有限公司 一种确定运动矢量预测值的方法以及相关设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10560718B2 (en) * 2016-05-13 2020-02-11 Qualcomm Incorporated Merge candidates for motion vector prediction for video coding
CN116708783A (zh) * 2016-07-12 2023-09-05 韩国电子通信研究院 图像编码/解码方法以及用于该方法的记录介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102823251A (zh) * 2010-03-31 2012-12-12 Jvc建伍株式会社 动图像编码装置、动图像编码方法及动图像编码程序、以及动图像解码装置、动图像解码方法及动图像解码程序
CN104335586A (zh) * 2012-04-11 2015-02-04 高通股份有限公司 运动向量舍入
CN109218733A (zh) * 2017-06-30 2019-01-15 华为技术有限公司 一种确定运动矢量预测值的方法以及相关设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11212523B2 (en) * 2020-01-12 2021-12-28 Mediatek Inc. Video processing methods and apparatuses of merge number signaling in video coding systems

Also Published As

Publication number Publication date
CN111670578A (zh) 2020-09-15
CN111670578B (zh) 2023-02-21

Similar Documents

Publication Publication Date Title
US11563968B2 (en) Video encoding and decoding
CN112823518B (zh) 用于译码块的几何划分块的帧间预测的装置及方法
US20190058896A1 (en) Method and apparatus of video coding with affine motion compensation
KR101596409B1 (ko) 저 메모리 액세스 모션 벡터 유도
CN111279701B (zh) 视频处理方法和设备
KR100619377B1 (ko) 움직임 추정 방법 및 장치
KR20220000917A (ko) 다중 참조 예측을 위한 움직임 벡터 개선
TW201742465A (zh) 用於視訊寫碼之仿射運動預測
TW201924345A (zh) 寫碼用於視頻寫碼之仿射預測移動資訊
US20160142728A1 (en) P frame-based multi-hypothesis motion compensation method
TWI738081B (zh) 視訊編碼系統中結合多重預測子用於區塊預測之方法和裝置
JP7279154B2 (ja) アフィン動きモデルに基づく動きベクトル予測方法および装置
CN101326550A (zh) 利用预测指导的抽取搜索的运动估计
KR102621958B1 (ko) 후보 모션 벡터 리스트 획득 방법, 장치, 인코더 및 디코더
JP7318007B2 (ja) インター予測方法および装置
CN116405696A (zh) 合并模式的编码器、解码器及对应方法
CN113383550A (zh) 光流修正的提前终止
US20140219355A1 (en) Motion estimation device
WO2020181542A1 (zh) 一种视频编码或解码方法、装置、设备及存储介质
CN114339261A (zh) 帧间预测方法、视频编码方法、视频解码方法及装置
CN110958452B (zh) 视频解码方法及视频解码器
CN112449197A (zh) 视频编解码的方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19918931

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19918931

Country of ref document: EP

Kind code of ref document: A1