CN110933419B - Method and equipment for determining motion vector and boundary strength - Google Patents

Method and equipment for determining motion vector and boundary strength Download PDF

Info

Publication number
CN110933419B
CN110933419B CN201811103477.7A CN201811103477A CN110933419B CN 110933419 B CN110933419 B CN 110933419B CN 201811103477 A CN201811103477 A CN 201811103477A CN 110933419 B CN110933419 B CN 110933419B
Authority
CN
China
Prior art keywords
image block
motion vector
boundary
adjacent image
boundary strength
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811103477.7A
Other languages
Chinese (zh)
Other versions
CN110933419A (en
Inventor
叶淑睿
陈方栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201811103477.7A priority Critical patent/CN110933419B/en
Publication of CN110933419A publication Critical patent/CN110933419A/en
Application granted granted Critical
Publication of CN110933419B publication Critical patent/CN110933419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Abstract

The application provides a motion vector determining method and a boundary strength determining device, wherein the method comprises the following steps: acquiring a motion vector to be adjusted of a current image block and a pre-adjustment motion vector corresponding to the motion vector to be adjusted; determining a first boundary strength according to the motion vector to be adjusted and the candidate motion vector of the adjacent image block of the current image block; determining a second boundary strength according to the pre-adjusted motion vector and the candidate motion vector; and determining to adopt the motion vector to be adjusted as the target motion vector of the current image block according to the first boundary strength and the second boundary strength, or adopting the pre-adjusted motion vector as the target motion vector of the current image block. By the technical scheme, correct boundary strength can be obtained, and blocking effect can be reduced.

Description

Method and equipment for determining motion vector and boundary strength
Technical Field
The present application relates to the field of video processing technologies, and in particular, to a method and an apparatus for determining a motion vector and determining a boundary strength.
Background
The square block effect is: in a video image, boundaries of image blocks are not continuous, and a compressed and reconstructed image has obvious blocking effect and seriously affects the quality of the image, so that Deblocking filtering (Deblocking filter) is required to be performed on the boundaries of a unit to be processed, and the Deblocking filtering may include filtering decision and filtering operation. In the filtering decision process, the filtering strength (such as no filtering, weak filtering or strong filtering) and the filtering parameter of the boundary can be obtained; during the filtering operation, the pixels may be modified according to the filtering strength and the filtering parameters.
Further, in the filtering decision process, the method may include the steps of obtaining the boundary strength, making a filtering switch decision, selecting filtering strength, and the like. In the step of obtaining the boundary strength, whether the boundary needs filtering and filtering parameters can be preliminarily judged according to the coding parameters; in the step of filter switch decision, the content of the video image can be analyzed to determine whether the boundary needs filtering; in the step of filtering strength selection, whether the boundary needs filtering or not and proper filtering strength can be selected according to the content and the coding parameters of the video image.
Further, in the obtaining of the Boundary Strength, the Boundary Strength (Boundary Strength) may be obtained using a motion vector of a neighboring image block of the Boundary, for example, using a difference value of motion vectors of two neighboring image blocks of the Boundary (hereinafter, referred to as a neighboring image block P and a neighboring image block Q).
With the development of video technology, it is possible to adjust the original motion vector of an image block to a fine motion vector and perform motion compensation on the image block using the fine motion vector, but the original motion vector is still stored at the encoding/decoding end instead of the fine motion vector. Based on this, when the boundary strength is obtained by using the difference between the motion vectors, only the original motion vector of the adjacent image block P and the original motion vector of the adjacent image block Q may be obtained, but the fine motion vector of the adjacent image block P and the fine motion vector of the adjacent image block Q may not be obtained, that is, only the original motion vector of the adjacent image block P and the original motion vector of the adjacent image block Q may be used to obtain the boundary strength, so that the result of obtaining the boundary strength may be incorrect.
Disclosure of Invention
The application provides a method and equipment for determining a motion vector and determining boundary strength, which solve the problem that the acquisition result of the boundary strength is wrong, so that correct boundary strength can be acquired.
The application provides a motion vector determination method, which is applied to an encoding end or a decoding end and comprises the following steps:
acquiring a motion vector to be adjusted of a current image block and a pre-adjustment motion vector corresponding to the motion vector to be adjusted; the pre-adjustment motion vector is obtained after pre-refinement operation is carried out on the motion vector to be adjusted; determining a first boundary strength according to the motion vector to be adjusted and the candidate motion vector of the image block adjacent to the current image block; determining a second boundary strength according to the pre-adjusted motion vector and the candidate motion vector; and determining to adopt the motion vector to be adjusted as a target motion vector of the current image block according to the first boundary strength and the second boundary strength, or adopting the pre-adjusted motion vector as the target motion vector of the current image block.
The application provides a boundary strength determination method, which is applied to an encoding end or a decoding end and comprises the following steps:
acquiring first operation information of a first adjacent image block of the boundary of a unit to be processed; the first operation information is used for indicating that the first adjacent image block is subjected to a refinement operation or not subjected to refinement; acquiring second operation information of a second adjacent image block of the boundary; the second operation information is used for indicating that the second adjacent image block is subjected to a refinement operation or not subjected to refinement; determining a boundary strength of the boundary according to the first operation information and the second operation information.
The application provides a coding end device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is configured to execute machine-executable instructions to perform the method steps described above.
The application provides a decoding side device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is configured to execute machine-executable instructions to perform the method steps described above.
According to the technical scheme, the problem that the boundary strength obtaining result is wrong can be solved, so that the correct boundary strength can be obtained, the condition that the boundary strength is misjudged only by storing the original motion vector can be corrected, and the blocking effect caused by motion vector adjustment can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIGS. 1A and 1B are schematic diagrams of adjacent image blocks in an embodiment of the present application;
FIG. 2 is a schematic diagram of obtaining boundary strength in one embodiment of the present application;
FIG. 3 is a flow diagram of a motion vector determination method in one embodiment of the present application;
FIG. 4 is a flow diagram of a boundary strength determination method in one embodiment of the present application;
FIGS. 5A-5F are schematic diagrams of a boundary strength determination method in one embodiment of the present application;
fig. 6 is a block diagram of a motion vector determination device according to an embodiment of the present application;
fig. 7 is a block diagram of a boundary strength determination apparatus according to an embodiment of the present application;
fig. 8 is a hardware configuration diagram of an encoding end device in an embodiment of the present application;
fig. 9 is a hardware configuration diagram of a decoding-side device according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides a method for determining a motion vector and determining boundary strength, which relates to the following concepts:
motion Vector (MV): in the inter-frame coding, a motion vector is used to represent the relative displacement between a current image block of a current frame video image and a reference image block of a reference frame video image, and each divided image block has a corresponding motion vector transmitted to a decoding end. If the motion vectors of each image block are encoded and transmitted independently, especially if divided into a large number of image blocks of small size, a considerable number of bits are consumed. In order to reduce the bit number for encoding the motion vector, the spatial correlation between adjacent image blocks can be utilized to predict the motion vector of the current image block to be encoded according to the motion vector of the adjacent encoded image block, and then the prediction difference is encoded, so that the bit number representing the motion vector can be effectively reduced.
Blocking effect: in a video image, the boundaries of image blocks are not continuous, and a compressed and reconstructed image has obvious blocking effect and seriously influences the quality of the image, so that the boundaries can be subjected to deblocking filtering.
Motion Compensation (MC): the current image block is predicted and compensated by the motion vector of the previous image block, and motion compensation is an effective method for reducing redundant information of frame sequence.
Deblocking filter (Deblocking filter): deblocking filtering, which may include filtering decisions and filtering operations, may be performed for all boundaries of Prediction Units (PUs) and Transform Units (TUs). In the filtering decision process, the boundary strength may be obtained, the filtering switch decision may be made, and the filtering strength is selected.
Boundary of unit to be processed: the units to be processed may be all prediction units and transformation units, in this embodiment, two adjacent image blocks to the boundary are mainly used, and these two adjacent image blocks may be referred to as an adjacent image block P and an adjacent image block Q, for example, the adjacent image block P is an image block on the upper side of the boundary, and the adjacent image block Q is an image block on the lower side of the boundary; alternatively, the adjacent image block P is an image block on the left side of the boundary, and the adjacent image block Q is an image block on the right side of the boundary. For example, referring to fig. 1A and 1B, the adjacent image block P and the adjacent image block Q are 4 × 4 size image blocks on both sides of the boundary, but of course, the adjacent image block P and the adjacent image block Q may have other sizes, which is not limited in this respect. In fig. 1A, for a vertical boundary of a unit to be processed, an adjacent image block P is an image block on the left side of the vertical boundary, and an adjacent image block Q is an image block on the right side of the vertical boundary. In fig. 1B, for the horizontal boundary of the unit to be processed, the adjacent image block P is the image block on the upper side of the horizontal boundary, and the adjacent image block Q is the image block on the lower side of the horizontal boundary.
Acquiring Boundary Strength (Boundary Strength): referring to fig. 2, a schematic diagram of obtaining the boundary strength is shown, of course, fig. 2 is only an example of obtaining the boundary strength, and the obtaining manner is not limited.
Firstly, judging whether an adjacent image block P or an adjacent image block Q adopts intra-frame prediction; if yes, determining the boundary strength to be 2; if not, judging whether the adjacent image block P or the adjacent image block Q has a non-zero transformation coefficient. If yes, determining the boundary strength to be 1; if not, judging whether the adjacent image block P and the adjacent image block Q use different reference frames. If yes, determining the boundary strength to be 1; if not, judging whether the number of the motion vectors of the adjacent image blocks P and Q is different; if yes, determining the boundary strength to be 1; if not, judging whether the absolute value of the motion vector difference value of the adjacent image block P and the adjacent image block Q is more than or equal to 4; if yes, determining the boundary strength to be 1; if not, the boundary strength is determined to be 0.
In one example, the boundary strength may be determined separately for the luminance component and the chrominance component, such as determining whether the absolute value of the motion vector difference between the luminance components of the neighboring image block P and the neighboring image block Q is greater than or equal to 4; if yes, determining the boundary strength to be 1; if not, determining the boundary strength to be 0; judging whether the absolute value of the motion vector difference value of the chrominance components of the adjacent image block P and the adjacent image block Q is more than or equal to 4; if yes, determining the boundary strength to be 1; if not, the boundary strength is determined to be 0.
Further, for the luminance component, if the boundary strength is 0, it indicates that the boundary does not need to be filtered, and no subsequent processing (such as filter switch decision, filter strength selection, filter operation, and the like) is performed. If the boundary strength is 1 or 2, subsequent processing is performed, and the value of the boundary strength influences the threshold value in subsequent filtering strength selection. For the chroma component, if the boundary strength is 0 or 1, it indicates that the boundary does not need to be filtered, and no further processing is performed. If the boundary strength is 2, the boundary is filtered (the subsequent filtering switch decision and filtering strength selection are not needed, and the boundary is directly filtered).
In summary, the value of the boundary strength can be determined by the above-described procedure, and in the determination process, the value of the boundary strength can be determined by using the motion vector of the adjacent image block P and the motion vector of the adjacent image block Q, that is, if the absolute value of the difference between the motion vector of the adjacent image block P and the motion vector of the adjacent image block Q is greater than or equal to 4, the boundary strength can be determined to be 1, and if the absolute value of the difference between the motion vector of the adjacent image block P and the motion vector of the adjacent image block Q is less than 4, the boundary strength can be determined to be 0.
In practical application, an original motion vector of an image block may be adjusted to be a fine motion vector, and the fine motion vector is used to perform motion compensation on the image block, but the encoding end/decoding end still stores the original motion vector (i.e., the motion vector to be adjusted in this embodiment may be referred to as an undefined motion vector), rather than the motion vector after the refinement operation (i.e., the pre-adjusted motion vector in this embodiment may be referred to as a refined motion vector). Based on this, when the boundary strength is obtained by using the difference between the motion vectors, only the original motion vector of the adjacent image block P and the original motion vector of the adjacent image block Q can be obtained, that is, only the original motion vector of the adjacent image block P and the original motion vector of the adjacent image block Q can be used to obtain the boundary strength, which may cause an error in the result of obtaining the boundary strength.
In view of the above findings, in the embodiment of the present application, the problem that an error occurs in the result of obtaining the boundary strength can be solved, so that a correct boundary strength can be obtained, and a situation that the boundary strength is misjudged only by storing an original motion vector can be corrected, so that a blocking effect caused by motion vector adjustment is reduced.
In one implementation, the adjustment operation of the motion vector may be constrained, and the adjustment range is limited so as not to affect the decision of the deblocking filtering, thereby avoiding the occurrence of an erroneous decision result of the deblocking filtering. Specifically, after the pre-refinement operation is performed on the motion vector to be adjusted and the pre-adjusted motion vector is obtained, if the boundary strength corresponding to the pre-adjusted motion vector is the same as the boundary strength corresponding to the motion vector to be adjusted, it is indicated that the boundary strength will not change when the motion vector to be adjusted is refined, and therefore, the pre-adjusted motion vector can be used as the target motion vector of the current image block. If the boundary strength corresponding to the pre-adjustment motion vector is different from the boundary strength corresponding to the motion vector to be adjusted, it is indicated that the boundary strength changes when the motion vector to be adjusted is subjected to fine operation, and therefore, the pre-adjustment motion vector is not allowed to be used as the target motion vector of the current image block, and the motion vector to be adjusted is used as the target motion vector of the current image block.
In another implementation, the flow of determining the boundary strength may be improved by modifying the deblocking filter decision, so as to avoid an erroneous deblocking filter decision.
The method of the examples of the present application will be described in detail below with reference to several specific examples.
The first embodiment is as follows:
the embodiment of the present application provides a motion vector determining method, which may be applied to an encoding end or a decoding end, and as shown in fig. 3, is a flow diagram of the method, and the method may include the following steps:
step 301, obtaining a motion vector to be adjusted of a current image block and a pre-adjustment motion vector corresponding to the motion vector to be adjusted; the pre-adjustment motion vector may be a motion vector obtained by performing pre-refinement on the motion vector to be adjusted, which is not limited herein. The size of the current tile may be larger than, equal to, or smaller than a size of a CTU (Coding Tree Unit), which is not limited herein.
In an example, for each image block, there is a motion vector to be adjusted, where the motion vector to be adjusted may be an original motion vector or another motion vector, and this is not limited to this, and the motion vector stored by the encoding end/decoding end for the image block may be the motion vector to be adjusted for the image block. The motion vector to be adjusted is a motion vector that has not undergone a refinement operation, and in a subsequent process, the motion vector to be adjusted may be refined, and therefore, it may be referred to as a motion vector to be adjusted.
In an example, for a motion vector to be adjusted of a current image block, in a subsequent process, a refinement operation may be performed on the motion vector to be adjusted, and if the refinement operation is performed on the motion vector to be adjusted, in this step, a refinement operation mode may be obtained, and a pre-refinement operation is performed on the motion vector to be adjusted in the refinement operation mode, so as to obtain a pre-adjusted motion vector corresponding to the motion vector to be adjusted.
In summary, the motion vector to be adjusted of the current image block (hereinafter referred to as the motion vector to be adjusted a) and the pre-adjustment motion vector of the current image block (hereinafter referred to as the pre-adjustment motion vector B) can be obtained.
Step 302, determining a first boundary strength according to the motion vector to be adjusted and the candidate motion vector of the image block adjacent to the current image block. Wherein the neighboring image blocks may include, but are not limited to: the adjacent image block on the upper side of the current image block, and/or the adjacent image block on the left side of the current image block.
Step 303, determining a second boundary strength according to the pre-adjusted motion vector and the candidate motion vector.
In steps 302 and 303, candidate motion vectors of adjacent image blocks are involved, so that, before steps 302 and 303, candidate motion vectors of adjacent image blocks may also be obtained, and specifically, operation markers corresponding to the adjacent image blocks may be obtained; if the flag value of the operation flag is the first flag, it may be determined that the candidate motion vector is a motion vector (e.g., one or more pre-adjustment motion vectors) in a set of candidate pre-adjustment motion vectors of neighboring image blocks corresponding to the motion vector to be adjusted. If the identifier value of the operation flag is the second identifier, it may be determined that the candidate motion vector is a motion vector to be adjusted of an adjacent image block.
In one example, an operation flag may be stored for each image block, and which motion vector is selected may be indicated by the operation flag. Specifically, since the adjacent image block is an adjacent image block on the upper side of the current image block and/or an adjacent image block on the left side of the current image block, and the encoding/decoding process is performed from left to right and from top to bottom, when the current image block is processed, the adjacent image block is already processed. When the adjacent image blocks are processed, if the pre-adjusted motion vector of the adjacent image blocks is used as the target motion vector of the adjacent image blocks, determining the identification value of the operation mark as a first identification, and storing the operation mark as the first identification; and if the motion vector to be adjusted of the adjacent image block is adopted as the target motion vector of the adjacent image block, determining the identification value of the operation mark as a second identification, and storing the operation mark as the second identification. Based on the processing, when the current image block is processed, if the identification value of the operation mark of the adjacent image block is the first identification, determining that the candidate motion vector is the motion vector in the candidate pre-adjustment motion vector set; and if the identification value of the operation marker is the second identification, determining that the candidate motion vector is the motion vector to be adjusted.
Further, when the current image block is processed, if the candidate motion vector is the to-be-adjusted motion vector of the adjacent image block, the to-be-adjusted motion vector of the adjacent image block can be directly obtained because the to-be-adjusted motion vector is stored for the adjacent image block. If the candidate motion vector is the pre-adjusted motion vector of the adjacent image block, the pre-adjusted motion vector of the adjacent image block needs to be acquired because the motion vector to be adjusted is stored in the adjacent image block, and this acquisition process will be described below.
In practical applications, since the encoding process/decoding process of the adjacent image block is already completed when the current image block is processed, it is not possible to know the refinement operation mode of the adjacent image block, for example, 4 refinement operation modes in total, which refinement operation mode is used to perform refinement operation on the motion vector to be adjusted of the adjacent image block. Based on this, in this step, when performing a refinement operation on the motion vector to be adjusted, the motion vector to be adjusted is respectively subjected to the refinement operation by using each refinement operation mode to obtain 4 pre-adjustment motion vectors, and the pre-adjustment motion vectors are stored in the candidate pre-adjustment motion vector set. In summary, the candidate motion vector of the neighboring image block may be a pre-adjustment motion vector, such as one or more pre-adjustment motion vectors, in the set of candidate pre-adjustment motion vectors.
In summary, candidate motion vectors of the neighboring image blocks may be obtained, where the candidate motion vectors are to-be-adjusted motion vectors of the neighboring image blocks (hereinafter referred to as to-be-adjusted motion vectors C), or the candidate motion vectors may be motion vectors in a set of candidate pre-adjusted motion vectors (hereinafter referred to as pre-adjusted motion vectors D1-D3).
In step 302, a first boundary strength is determined according to the motion vector to be adjusted and the candidate motion vector, which may include but is not limited to: determining a first difference value between the motion vector to be adjusted and the candidate motion vector, and determining a first boundary strength by using the first difference value; for example, if the absolute value of the first difference is 4 or more, the first boundary strength is determined to be 1, and if the absolute value of the first difference is less than 4, the first boundary strength is determined to be 0.
Specifically, the current image block may be determined as the image block Q, and an adjacent image block of the current image block may be determined as the image block P, so that the motion vector to be adjusted may be a motion vector to be adjusted of the image block Q, and the candidate motion vector may be a motion vector to be adjusted or a pre-adjustment motion vector of the image block P, and then, the flow shown in fig. 2 may be adopted to determine the first boundary strength, without limiting the determination manner.
In step 303, a second boundary strength is determined according to the pre-adjusted motion vector and the candidate motion vector, which may include but is not limited to: determining a second difference between the pre-adjusted motion vector and the candidate motion vector, and determining a second boundary strength using the second difference; for example, if the absolute value of the second difference is equal to or greater than 4, the second boundary strength is determined to be 1, and if the absolute value of the second difference is less than 4, the second boundary strength is determined to be 0.
Specifically, the current image block may be determined as the image block Q, and an adjacent image block of the current image block may be determined as the image block P, so that the pre-adjustment motion vector may be a pre-adjustment motion vector of the image block Q, and the candidate motion vector may be a to-be-adjusted motion vector or a pre-adjustment motion vector of the image block P, and then, the flow shown in fig. 2 may be adopted to determine the second boundary strength, and the determination manner is not limited.
And step 304, determining to adopt the motion vector to be adjusted as the target motion vector of the current image block according to the first boundary strength and the second boundary strength, or adopting a pre-adjusted motion vector as the target motion vector of the current image block. The target motion vector is a motion vector required for performing some operation on the current stage or the next stage of the current image block, and may be a motion vector required for performing motion compensation on the current image block, for example; of course, other motion vectors required for operation are also possible, and this is not a limitation.
In an example, if there is one candidate motion vector, when the first boundary strength is different from the second boundary strength, it may be determined to use the motion vector to be adjusted as the target motion vector of the current image block; when the first boundary strength is the same as the second boundary strength, it may be determined to adopt the pre-adjusted motion vector as the target motion vector of the current image block.
In another example, if there are a plurality of candidate motion vectors, when a first boundary strength corresponding to any one of the candidate motion vectors is different from a second boundary strength corresponding to the candidate motion vector, it may be determined to use the motion vector to be adjusted as the target motion vector of the current image block; otherwise, determining to adopt the pre-adjusted motion vector as the target motion vector of the current image block.
In another example, if there are multiple candidate motion vectors, for each candidate motion vector, it may be determined whether a first boundary strength corresponding to the candidate motion vector is the same as a second boundary strength corresponding to the candidate motion vector, and count the number of candidate motion vectors with different boundary strengths; then, it may be determined to use the motion vector to be adjusted as the target motion vector of the current image block according to the number, or to use the pre-adjusted motion vector as the target motion vector of the current image block. Specifically, if the number is greater than the number threshold, it may be determined that the motion vector to be adjusted is adopted as the target motion vector of the current image block; if the number is not greater than the number threshold, determining to adopt the pre-adjusted motion vector as a target motion vector of the current image block; or, if the ratio of the number to the total number of the candidate motion vectors is greater than a ratio threshold, determining to adopt the motion vector to be adjusted as the target motion vector of the current image block; if the ratio of the number to the total number of candidate motion vectors is not greater than the ratio threshold, it may be determined to use the pre-adjusted motion vector as the target motion vector of the current image block.
According to the technical scheme, in the embodiment of the application, the adjustment operation of the motion vector can be restricted, the adjustment range is limited, the decision of the deblocking filtering is not influenced, and the wrong decision result of the deblocking filtering is avoided. The problem that the boundary strength acquisition result is wrong can be solved, so that the correct boundary strength can be acquired, the condition that the boundary strength is misjudged only by storing the original motion vector can be corrected, and the blocking effect caused by the motion vector adjustment is reduced.
The following describes the above modes in detail with reference to several specific application scenarios.
Application scenario 1: suppose that the motion vector to be adjusted is a motion vector a to be adjusted, the pre-adjustment motion vector is a pre-adjustment motion vector B, and the candidate motion vector is a motion vector C to be adjusted. In this application scenario, the candidate motion vector is one, the first boundary strength 11 is determined based on the motion vector a to be adjusted and the motion vector C to be adjusted, and the second boundary strength 12 is determined based on the pre-adjusted motion vector B and the motion vector C to be adjusted. Further, when the first boundary strength 11 is different from the second boundary strength 12, determining to adopt the motion vector a to be adjusted as a target motion vector of the current image block; when the first boundary strength 11 is the same as the second boundary strength 12, it is determined to adopt the pre-adjusted motion vector B as the target motion vector of the current image block.
Application scenario 2: suppose the motion vector to be adjusted is the motion vector a to be adjusted, the pre-adjustment motion vector is the pre-adjustment motion vector B, and the candidate motion vectors are the pre-adjustment motion vectors D1-D3.
In this application scenario, the candidate motion vector is multiple, and the first boundary strength 21 may be determined based on the motion vector a to be adjusted and the motion vector D1 to be adjusted, and the second boundary strength 22 may be determined based on the pre-adjustment motion vector B and the motion vector D1 to be adjusted; determining a first boundary strength 23 based on the motion vector a to be adjusted and the motion vector D2 to be adjusted, and determining a second boundary strength 24 based on the pre-adjusted motion vector B and the motion vector D2 to be adjusted; the first boundary strength 25 is determined on the basis of the motion vector a to be adjusted and the motion vector D3 to be adjusted, and the second boundary strength 26 is determined on the basis of the pre-adjusted motion vector B and the motion vector D3 to be adjusted. When the first boundary strength 21 is different from the second boundary strength 22, or the first boundary strength 23 is different from the second boundary strength 24, or the first boundary strength 25 is different from the second boundary strength 26, determining to adopt the motion vector a to be adjusted as a target motion vector of the current image block; when the first boundary strength 21 is the same as the second boundary strength 22, the first boundary strength 23 is the same as the second boundary strength 24, and the first boundary strength 25 is the same as the second boundary strength 26, it is determined to adopt the pre-adjustment motion vector B as the target motion vector of the current image block.
Application scenario 3: suppose the motion vector to be adjusted is the motion vector a to be adjusted, the pre-adjustment motion vector is the pre-adjustment motion vector B, and the candidate motion vectors are the pre-adjustment motion vectors D1-D3.
In this application scenario, the candidate motion vector is multiple, and the first boundary strength 21 may be determined based on the motion vector a to be adjusted and the motion vector D1 to be adjusted, and the second boundary strength 22 may be determined based on the pre-adjustment motion vector B and the motion vector D1 to be adjusted; determining a first boundary strength 23 based on the motion vector a to be adjusted and the motion vector D2 to be adjusted, and determining a second boundary strength 24 based on the pre-adjusted motion vector B and the motion vector D2 to be adjusted; the first boundary strength 25 is determined on the basis of the motion vector a to be adjusted and the motion vector D3 to be adjusted, and the second boundary strength 26 is determined on the basis of the pre-adjusted motion vector B and the motion vector D3 to be adjusted.
It is determined whether the first boundary strength 21 is the same as the second boundary strength 22, whether the first boundary strength 23 is the same as the second boundary strength 24, whether the first boundary strength 25 is the same as the second boundary strength 26, and the number of the boundary strengths different is counted, and the number may be 2 provided that the first boundary strength 21 is different from the second boundary strength 22, the first boundary strength 23 is different from the second boundary strength 24, and the first boundary strength 25 is the same as the second boundary strength 26. If the number is larger than a number threshold (configured according to experience, such as 2, 3 and the like), determining to adopt the motion vector A to be adjusted as a target motion vector of the current image block; and if the number is not larger than the number threshold, determining to adopt the pre-adjusted motion vector B as the target motion vector of the current image block.
Application scenario 4: suppose the motion vector to be adjusted is the motion vector a to be adjusted, the pre-adjustment motion vector is the pre-adjustment motion vector B, and the candidate motion vectors are the pre-adjustment motion vectors D1-D3.
In this application scenario, the candidate motion vector is multiple, and the first boundary strength 21 may be determined based on the motion vector a to be adjusted and the motion vector D1 to be adjusted, and the second boundary strength 22 may be determined based on the pre-adjustment motion vector B and the motion vector D1 to be adjusted; determining a first boundary strength 23 based on the motion vector a to be adjusted and the motion vector D2 to be adjusted, and determining a second boundary strength 24 based on the pre-adjusted motion vector B and the motion vector D2 to be adjusted; the first boundary strength 25 is determined on the basis of the motion vector a to be adjusted and the motion vector D3 to be adjusted, and the second boundary strength 26 is determined on the basis of the pre-adjusted motion vector B and the motion vector D3 to be adjusted.
It is determined whether the first boundary strength 21 is the same as the second boundary strength 22, whether the first boundary strength 23 is the same as the second boundary strength 24, and whether the first boundary strength 25 is the same as the second boundary strength 26, and the number of differences in the boundary strengths is counted, assuming that the number is 2. Further, if the ratio of the number to the total number (i.e. the number 3) of the candidate motion vectors is greater than a ratio threshold, (which may be configured empirically, such as 50%), determining to use the motion vector a to be adjusted as the target motion vector of the current image block; and if the proportion is not larger than the proportion threshold, determining to adopt the pre-adjusted motion vector B as the target motion vector of the current image block.
In an example, the current image block may be provided with an operation flag, and therefore, if a pre-adjusted motion vector is adopted as a target motion vector of the current image block, an identification value of the operation flag is determined to be a first identification, and the operation flag is stored as the first identification; and if the motion vector to be adjusted is adopted as the target motion vector of the current image block, determining the identification value of the operation mark as a second identification, and storing the operation mark as the second identification.
In an example, the motion vector determination method may be applied to an encoding end and may also be applied to a decoding end, that is, the encoding end may determine to use a motion vector to be adjusted as a target motion vector of a current image block by using the method, or the decoding end may also determine to use the motion vector to be adjusted as a target motion vector of the current image block by using a pre-adjusted motion vector as a target motion vector of the current image block by using the method.
In another example, the motion vector determination method described above may be applied to the encoding end, that is, the encoding end may determine to use the motion vector to be adjusted as the target motion vector of the current image block or to use the pre-adjustment motion vector as the target motion vector of the current image block by using the method described above. Further, when the encoding end sends the encoded bitstream for the current image block to the decoding end, the encoded bitstream may further carry indication information, where the indication information is used to indicate that a motion vector to be adjusted is used as a target motion vector of the current image block, or that a pre-adjusted motion vector is used as a target motion vector of the current image block. After receiving the coded bit stream, the decoding end may parse the indication information from the coded bit stream, and determine to use the motion vector to be adjusted as the target motion vector of the current image block according to the indication information, or use the pre-adjusted motion vector as the target motion vector of the current image block.
For example, at the encoding end, if the pre-adjustment motion vector is adopted as the target motion vector of the current image block, the indication information is first indication information, and if the motion vector to be adjusted is adopted as the target motion vector of the current image block, the indication information is second indication information. At a decoding end, if first indication information is analyzed from the coded bit stream, determining to adopt a pre-adjusted motion vector as a target motion vector of a current image block according to the first indication information; and if the second indication information is analyzed from the coded bit stream, determining to adopt the motion vector to be adjusted as the target motion vector of the current image block according to the second indication information.
Example two:
the embodiment of the present application provides a boundary strength determining method, which may be applied to an encoding end or a decoding end, and as shown in fig. 4, is a flow diagram of the method, where the method may include the following steps:
step 401, acquiring first operation information of a first adjacent image block of a boundary of a unit to be processed; the first operation information is used for indicating that the first adjacent image block is subjected to a refinement operation or not subjected to refinement.
Step 402, acquiring second operation information of a second adjacent image block of the boundary; the second operation information is used for indicating that the second adjacent image block is subjected to refinement operation or not subjected to refinement.
And step 403, determining the boundary strength of the boundary according to the first operation information and the second operation information.
In one example, the to-be-processed units may be all of the prediction units and the transform units, the boundary of the to-be-processed units may be a vertical boundary or a horizontal boundary, the first adjacent image block includes an image block on an upper side of the boundary, and the second adjacent image block includes an image block on a lower side of the boundary; alternatively, the first adjacent image block comprises an image block to the left of the boundary and the second adjacent image block comprises an image block to the right of the boundary. For example, referring to fig. 1A and 1B, for a vertical boundary of a unit to be processed, a first adjacent image block (i.e., adjacent image block P) is an image block on the left side of the vertical boundary, and a second adjacent image block (i.e., adjacent image block Q) is an image block on the right side of the vertical boundary. In addition, for the horizontal boundary of the unit to be processed, the first adjacent image block is the image block on the upper side of the horizontal boundary, and the second adjacent image block is the image block on the lower side of the horizontal boundary.
In an example, for a first adjacent image block and a second adjacent image block, whether the first adjacent image block and the second adjacent image block perform a refinement operation or not may be known, for example, each image block may have a specific mark, and the specific mark is used to indicate whether the image block performs the refinement operation or not, based on which, whether the first adjacent image block performs the refinement operation or not may be known through the specific mark of the first adjacent image block, and whether the second adjacent image block performs the refinement operation or not may be known through the specific mark of the second adjacent image block; of course, the above manner is only an example, and is not limited thereto.
Further, after knowing whether the first adjacent image block is subjected to the refinement operation, first operation information of the first adjacent image block may be determined, where the first operation information is used to indicate that the first adjacent image block has been subjected to the refinement operation or has not been subjected to the refinement operation, for example, operation information a1 indicates that the first adjacent image block has been subjected to the refinement operation, and operation information a2 indicates that the first adjacent image block has not been subjected to the refinement operation.
In addition, after knowing whether the second adjacent image block is subjected to the refinement operation, second operation information of the second adjacent image block can be determined, where the second operation information is used to indicate that the second adjacent image block has been subjected to the refinement operation or has not been subjected to the refinement operation, for example, operation information B1 indicates that the second adjacent image block has been subjected to the refinement operation, and operation information B2 indicates that the second adjacent image block has not been subjected to the refinement operation.
After the first operation information and the second operation information are obtained, the boundary strength of the boundary may be determined according to the first operation information and the second operation information, for example, the boundary strength may be determined as follows:
in case one, if the first adjacent image block has been subjected to a refinement operation, or the second adjacent image block has been subjected to a refinement operation, the boundary strength of the boundary may be determined to be a first numerical value; or if the first adjacent image block is not subjected to the refinement operation and the second adjacent image block is not subjected to the refinement operation, determining a difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block, and determining the boundary strength of the boundary by using the difference value; or, if the first adjacent image block has been subjected to the refinement operation and the second adjacent image block has been subjected to the refinement operation, determining the boundary strength of the boundary as a second numerical value; or, if the first adjacent image block is not subjected to the refinement operation, or the second adjacent image block is not subjected to the refinement operation, the difference between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block may be determined, and the boundary strength of the boundary is determined by using the difference.
The first value is 1 or 2, and of course, the first value may be other values, which is not limited to this.
The second value is 1 or 2, and of course, the second value may be other values, which is not limited in this respect.
Determining the difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block; further, if the absolute value of the difference is greater than or equal to a preset threshold, then: when the first adjacent image block is subjected to the refinement operation or the second adjacent image block is subjected to the refinement operation, determining the boundary strength of the boundary to be a third numerical value; or, when the first adjacent image block is not subjected to the refinement operation and the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary as a fourth numerical value; or, when the first adjacent image block has been subjected to the refinement operation and the second adjacent image block has been subjected to the refinement operation, determining the boundary strength of the boundary as a fifth numerical value; or, when the first adjacent image block is not refined, or the second adjacent image block is not refined, the boundary strength of the boundary may be determined to be the sixth value.
The third value may be 0, the fourth value may be 1, the fifth value may be 0, and the sixth value may be 1. Of course, each of the above values may be other values, and is not limited thereto.
Determining the difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block; further, if the absolute value of the difference is smaller than a preset threshold, then:
when the first adjacent image block has been subjected to the refinement operation or the second adjacent image block has been subjected to the refinement operation, determining the boundary strength of the boundary to be a seventh numerical value; or, when the first adjacent image block is not subjected to the refinement operation and the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary as an eighth numerical value; or, when the first adjacent image block has been subjected to the refinement operation and the second adjacent image block has been subjected to the refinement operation, determining the boundary strength of the boundary as a ninth value; or, when the first adjacent image block is not subjected to the refinement operation, or the second adjacent image block is not subjected to the refinement operation, the boundary strength of the boundary may be determined to be the tenth value.
The seventh value may be 1 or 2, the eighth value may be 0, the ninth value may be 1 or 2, and the tenth value may be 0. Of course, each of the above values may be other values, and the values are not limited thereto.
In an example, the boundary strength determining method may be applied to an encoding end and may also be applied to a decoding end, that is, the encoding end may determine the boundary strength of the boundary of the unit to be processed by using the method, and the decoding end may also determine the boundary strength of the boundary of the unit to be processed by using the method.
According to the technical scheme, the determination process of the boundary strength can be improved, namely, the decision of the deblocking filtering is modified, so that the wrong decision result of the deblocking filtering can be avoided. The problem that the boundary strength acquisition result is wrong can be solved, so that the correct boundary strength can be acquired, the condition that the boundary strength is misjudged only by storing the original motion vector can be corrected, and the blocking effect caused by the motion vector adjustment is reduced.
The above modes are described in detail below with reference to several specific application scenarios.
Application scenario 1: referring to fig. 5A, which is a flowchart of a boundary strength determining method, a first adjacent tile is an adjacent tile P, and a second adjacent tile is an adjacent tile Q, the method may include:
step 511, determining whether the adjacent image block P or the adjacent image block Q employs intra prediction.
If so, the boundary strength may be determined to be 2; if not, step 512 may be performed.
Step 512, determine whether the adjacent image block P or the adjacent image block Q has a non-zero transform coefficient.
If so, the boundary strength may be determined to be 1; if not, step 513 may be performed.
In step 513, it is determined whether the adjacent image block P and the adjacent image block Q use different reference frames.
If so, the boundary strength may be determined to be 1; if not, step 514 may be performed.
In step 514, it is determined whether the number of motion vectors in the adjacent image block P is different from that in the adjacent image block Q.
If so, the boundary strength may be determined to be 1; if not, step 515 may be performed.
Step 515, determine whether the neighboring image block P or the neighboring image block Q has been refined.
If so, the boundary strength may be determined to be 1 or 2; if not, step 516 may be performed.
Step 516, determining whether the absolute value of the motion vector difference between the adjacent image block P and the adjacent image block Q is greater than or equal to 4; if yes, determining the boundary strength to be 1; if not, the boundary strength is determined to be 0.
The motion vector difference between the adjacent image block P and the adjacent image block Q is a difference between a motion vector to be adjusted of the adjacent image block P and a motion vector to be adjusted of the adjacent image block Q. In one example, there is one original motion vector for each image block, and the encoding/decoding end stores the motion vector for the image block, that is, the original motion vector of the image block. This original motion vector is a motion vector that has not been subjected to a refinement operation, and therefore, the original motion vector may be referred to as a motion vector to be adjusted.
Application scenario 2: referring to fig. 5B, which is a flowchart of a boundary strength determination method, a first adjacent image block is an adjacent image block P, and a second adjacent image block is an adjacent image block Q, the method may include:
step 521, determining whether the adjacent image block P or the adjacent image block Q employs intra prediction.
If so, the boundary strength may be determined to be 2; if not, step 522 may be performed.
In step 522, it is determined whether the adjacent image block P or the adjacent image block Q has a non-zero transform coefficient.
If so, the boundary strength may be determined to be 1; if not, step 523 may be performed.
Step 523, determine whether the adjacent image block P and the adjacent image block Q use different reference frames.
If so, the boundary strength may be determined to be 1; if not, step 524 may be performed.
Step 524, determine whether the numbers of motion vectors of the adjacent image blocks P and Q are different.
If so, the boundary strength may be determined to be 1; if not, step 525 may be performed.
In step 525, it is determined whether the neighboring image block P and the neighboring image block Q have been refined.
If so, the boundary strength may be determined to be 1 or 2; if not, step 526 may be performed.
Step 526, determining whether the absolute value of the motion vector difference between the adjacent image block P and the adjacent image block Q is greater than or equal to 4; if yes, determining the boundary strength to be 1; if not, the boundary strength is determined to be 0.
Application scenario 3: referring to fig. 5C, which is a flowchart of a boundary strength determining method, a first adjacent tile is an adjacent tile P, and a second adjacent tile is an adjacent tile Q, the method may include:
step 531, determining whether the adjacent image block P or the adjacent image block Q employs intra prediction.
If so, the boundary strength may be determined to be 2; if not, step 532 may be performed.
Step 532, determine whether the neighboring image block P or the neighboring image block Q has a non-zero transform coefficient.
If so, the boundary strength may be determined to be 1; if not, step 533 may be performed.
Step 533, determine whether the adjacent image block P and the adjacent image block Q use different reference frames.
If so, the boundary strength may be determined to be 1; if not, step 534 may be performed.
In step 534, it is determined whether the number of motion vectors in the adjacent image block P is different from that in the adjacent image block Q.
If so, the boundary strength may be determined to be 1; if not, step 535 may be performed.
Step 535, determining whether the absolute value of the motion vector difference between the neighboring image block P and the neighboring image block Q is greater than or equal to 4; if so, go to step 536; if not, the boundary strength is determined to be 0.
In step 536, it is determined whether the neighboring image block P or the neighboring image block Q has been refined.
If so, the boundary strength may be determined to be 0; if not, the boundary strength may be determined to be 1.
Application scenario 4: referring to fig. 5D, which is a flowchart of a boundary strength determination method, a first adjacent image block is an adjacent image block P, and a second adjacent image block is an adjacent image block Q, the method may include:
step 541, judging whether the adjacent image block P or the adjacent image block Q adopts intra-frame prediction.
If so, the boundary strength may be determined to be 2; if not, step 542 may be performed.
Step 542, determine whether the adjacent image block P or the adjacent image block Q has a non-zero transform coefficient.
If so, the boundary strength may be determined to be 1; if not, step 543 can be performed.
In step 543, it is determined whether the adjacent image blocks P and Q use different reference frames.
If so, the boundary strength may be determined to be 1; if not, step 544 may be performed.
In step 544, it is determined whether the numbers of motion vectors of the adjacent image blocks P and Q are different.
If so, the boundary strength may be determined to be 1; if not, step 545 can be performed.
Step 545, judging whether the absolute value of the motion vector difference between the adjacent image block P and the adjacent image block Q is more than or equal to 4; if so, go to step 546; if not, the boundary strength is determined to be 0.
In step 546, it is determined whether the neighboring image blocks P and Q have been refined.
If so, the boundary strength may be determined to be 0; if not, the boundary strength may be determined to be 1.
Application scenario 5: referring to fig. 5E, which is a flowchart of a boundary strength determination method, a first adjacent image block is an adjacent image block P, and a second adjacent image block is an adjacent image block Q, the method may include:
in step 551, it is determined whether the neighboring image block P or the neighboring image block Q employs intra prediction.
If so, the boundary strength may be determined to be 2; if not, step 552 may be performed.
In step 552, it is determined whether the adjacent image block P or the adjacent image block Q has a non-zero transform coefficient.
If so, the boundary strength may be determined to be 1; if not, step 553 may be performed.
In step 553, it is determined whether the neighboring image block P and the neighboring image block Q use different reference frames.
If so, the boundary strength may be determined to be 1; if not, step 554 may be performed.
In step 554, it is determined whether the number of motion vectors of the adjacent image block P is different from that of the adjacent image block Q.
If so, the boundary strength may be determined to be 1; if not, step 555 may be performed.
Step 555, judging whether the absolute value of the motion vector difference value of the adjacent image block P and the adjacent image block Q is more than or equal to 4; if yes, determining the boundary strength to be 1; if not, step 556 is performed.
In step 556, it is determined whether the neighboring image block P or the neighboring image block Q has been refined.
If so, the boundary strength may be determined to be 1 or 2; if not, the boundary strength may be determined to be 0.
Application scenario 6: referring to fig. 5F, which is a flowchart of a boundary strength determining method, a first adjacent tile is an adjacent tile P, and a second adjacent tile is an adjacent tile Q, the method may include:
step 561, determine whether the neighboring image block P or the neighboring image block Q employs intra prediction.
If so, the boundary strength may be determined to be 2; if not, step 562 may be performed.
Step 562, determine whether the adjacent image block P or the adjacent image block Q has a non-zero transform coefficient.
If so, the boundary strength may be determined to be 1; if not, step 563 may be performed.
Step 563, determine whether the neighboring image block P and the neighboring image block Q use different reference frames.
If so, the boundary strength may be determined to be 1; if not, step 564 may be performed.
In step 564, it is determined whether the numbers of motion vectors in the adjacent image blocks P and Q are different.
If so, the boundary strength may be determined to be 1; if not, step 565 can be performed.
Step 565, determining whether the absolute value of the motion vector difference between the adjacent image block P and the adjacent image block Q is greater than or equal to 4; if yes, determining the boundary strength to be 1; if not, step 566 is performed.
In step 566, it is determined whether the neighboring image blocks P and Q have been refined.
If so, the boundary strength may be determined to be 1 or 2; if not, the boundary strength may be determined to be 0.
Example three:
based on the same application concept as the method, an embodiment of the present application further provides a motion vector determining apparatus, applied to an encoding end or a decoding end, as shown in fig. 6, which is a structural diagram of the apparatus, including:
an obtaining module 61, configured to obtain a motion vector to be adjusted of a current image block and a pre-adjustment motion vector corresponding to the motion vector to be adjusted; the pre-adjustment motion vector is obtained after pre-refinement operation is carried out on the motion vector to be adjusted; a first determining module 62, configured to determine a first boundary strength according to the motion vector to be adjusted and a candidate motion vector of an image block adjacent to the current image block; determining a second boundary strength according to the pre-adjusted motion vector and the candidate motion vector;
a second determining module 63, configured to determine, according to the first boundary strength and the second boundary strength, to use the motion vector to be adjusted as the target motion vector of the current image block, or to use the pre-adjusted motion vector as the target motion vector of the current image block.
The obtaining module 61 is further configured to obtain candidate motion vectors of the adjacent image blocks; specifically, an operation mark corresponding to the adjacent image block is obtained; and if the identification value of the operation marker is the first identification, determining that the candidate motion vector is a motion vector in a candidate pre-adjustment motion vector set corresponding to the motion vector to be adjusted of the adjacent image block. And if the identification value of the operation marker is a second identification, determining that the candidate motion vector is the motion vector to be adjusted of the adjacent image block.
The first determining module 62 is specifically configured to, when determining the first boundary strength according to the motion vector to be adjusted and the candidate motion vector of the image block adjacent to the current image block: determining a first difference value between the motion vector to be adjusted and the candidate motion vector; determining the first boundary strength using the first difference;
the first determining module 62 is specifically configured to, when determining the second boundary strength according to the pre-adjusted motion vector and the candidate motion vector: determining a second difference value between the pre-adjusted motion vector and the candidate motion vector; determining the second boundary strength using the second difference.
If there is one candidate motion vector, the second determining module 63 determines, according to the first boundary strength and the second boundary strength, to use the motion vector to be adjusted as the target motion vector of the current image block, or specifically: if the first boundary strength is different from the second boundary strength, determining to adopt the motion vector to be adjusted as a target motion vector of the current image block; and if not, determining to adopt the pre-adjusted motion vector as the target motion vector of the current image block.
If there are multiple candidate motion vectors, the second determining module 63 determines, according to the first boundary strength and the second boundary strength, to use the motion vector to be adjusted as the target motion vector of the current image block, or specifically: if the first boundary strength corresponding to any candidate motion vector is different from the second boundary strength corresponding to the candidate motion vector, determining to adopt the motion vector to be adjusted as a target motion vector of the current image block; and if not, determining to adopt the pre-adjusted motion vector as the target motion vector of the current image block.
If there are multiple candidate motion vectors, the second determining module 63 determines, according to the first boundary strength and the second boundary strength, to use the motion vector to be adjusted as the target motion vector of the current image block, or specifically: for each candidate motion vector, determining whether a first boundary strength corresponding to the candidate motion vector is the same as a second boundary strength corresponding to the candidate motion vector, and counting the number of candidate motion vectors with different boundary strengths; determining to adopt the motion vector to be adjusted as a target motion vector of the current image block according to the number, or adopting the pre-adjusted motion vector as the target motion vector of the current image block; specifically, if the number is greater than a number threshold, determining to adopt the motion vector to be adjusted as a target motion vector of the current image block; if the number is not larger than a number threshold, determining to adopt the pre-adjusted motion vector as a target motion vector of the current image block; alternatively, the first and second electrodes may be,
if the ratio of the number to the total number of the candidate motion vectors is larger than a ratio threshold, determining to adopt the motion vector to be adjusted as a target motion vector of the current image block;
and if the ratio of the number to the total number of the candidate motion vectors is not larger than a ratio threshold, determining to adopt the pre-adjusted motion vector as a target motion vector of the current image block.
The second determining module 63 is further configured to:
if the pre-adjusted motion vector is adopted as the target motion vector of the current image block, determining the identification value of the operation mark as a first identification; and if the motion vector to be adjusted is adopted as the target motion vector of the current image block, determining the identification value of the operation mark as a second identification.
Example four:
based on the same application concept as the method, an embodiment of the present application further provides a boundary strength determining apparatus, applied to an encoding end or a decoding end, as shown in fig. 7, which is a structural diagram of the apparatus, including:
an obtaining module 71, configured to obtain first operation information of a first adjacent image block of a boundary of a unit to be processed; the first operation information is used for indicating that the first adjacent image block is subjected to refinement operation or not subjected to refinement; acquiring second operation information of a second adjacent image block of the boundary; the second operation information is used for indicating that the second adjacent image block is subjected to refinement operation or not subjected to refinement; a determining module 72, configured to determine a boundary strength of the boundary according to the first operation information and the second operation information.
The determining module 72 is specifically configured to, when determining the boundary strength of the boundary according to the first operation information and the second operation information: if the first adjacent image block is subjected to the refinement operation or the second adjacent image block is subjected to the refinement operation, determining the boundary strength of the boundary to be a first numerical value;
or if the first adjacent image block is not subjected to refinement operation and the second adjacent image block is not subjected to refinement operation, determining a difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block, and determining the boundary strength of the boundary by using the difference value;
or if the first adjacent image block is subjected to refinement operation and the second adjacent image block is subjected to refinement operation, determining the boundary strength of the boundary to be a second numerical value; alternatively, the first and second electrodes may be,
if the first adjacent image block is not subjected to the refinement operation, or the second adjacent image block is not subjected to the refinement operation, determining a difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block, and determining the boundary strength of the boundary by using the difference value.
The determining module 72 is specifically configured to, when determining the boundary strength of the boundary according to the first operation information and the second operation information: determining a difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block; if the absolute value of the difference is greater than or equal to a preset threshold value, then: determining the boundary strength of the boundary to be a third numerical value when the first adjacent image block is subjected to the refinement operation or the second adjacent image block is subjected to the refinement operation; alternatively, the first and second liquid crystal display panels may be,
when the first adjacent image block is not subjected to the refinement operation and the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary to be a fourth numerical value; alternatively, the first and second electrodes may be,
when the first adjacent image block is subjected to the refinement operation and the second adjacent image block is subjected to the refinement operation, determining the boundary strength of the boundary to be a fifth numerical value; alternatively, the first and second electrodes may be,
and when the first adjacent image block is not subjected to the refinement operation or the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary to be a sixth numerical value.
The determining module 72 is specifically configured to, when determining the boundary strength of the boundary according to the first operation information and the second operation information: determining a difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block; if the absolute value of the difference is smaller than a preset threshold value, then: determining the boundary strength of the boundary to be a seventh numerical value when the first adjacent image block is subjected to the refinement operation or the second adjacent image block is subjected to the refinement operation; alternatively, the first and second electrodes may be,
when the first adjacent image block is not subjected to the refinement operation and the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary to be an eighth numerical value; alternatively, the first and second liquid crystal display panels may be,
when the first adjacent image block is subjected to the refinement operation and the second adjacent image block is subjected to the refinement operation, determining the boundary strength of the boundary to be a ninth numerical value; alternatively, the first and second electrodes may be,
and when the first adjacent image block is not subjected to the refinement operation or the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary to be a tenth numerical value.
Example five:
as for the encoding end device provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture of the encoding end device may be as shown in fig. 8. The method comprises the following steps: a processor 81 and a machine-readable storage medium 82, the machine-readable storage medium 82 storing machine-executable instructions executable by the processor 81; the processor 81 is configured to execute machine executable instructions to implement the motion vector determination method or the boundary strength determination method described above.
Example six:
in terms of hardware, a hardware architecture diagram of the decoding-side device provided in the embodiment of the present application may be as shown in fig. 9. The method comprises the following steps: a processor 91 and a machine-readable storage medium 92, the machine-readable storage medium 92 storing machine-executable instructions executable by the processor 91; the processor 91 is configured to execute machine executable instructions to implement the motion vector determination method or the boundary strength determination method described above.
Example seven:
based on the same application concept as the method, embodiments of the present application further provide a machine-readable storage medium, where several computer instructions are stored, and when the computer instructions are executed by a processor, the method for determining a motion vector or the method for determining a boundary strength can be implemented.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (14)

1. A boundary strength determination method applied to an encoding end or a decoding end comprises the following steps:
acquiring first operation information of a first adjacent image block of the boundary of a unit to be processed; the first operation information is used for indicating that the first adjacent image block is subjected to a refinement operation or not subjected to refinement;
acquiring second operation information of a second adjacent image block of the boundary; the second operation information is used for indicating that the second adjacent image block is subjected to a refinement operation or not subjected to refinement;
determining the boundary strength of the boundary according to the first operation information and the second operation information;
if the first adjacent image block is subjected to refinement operation or the second adjacent image block is subjected to refinement operation, determining the boundary strength of the boundary to be a first numerical value;
or, if the first adjacent image block is subjected to the refinement operation and the second adjacent image block is subjected to the refinement operation, determining that the boundary strength of the boundary is a second numerical value.
2. The method of claim 1, wherein determining the boundary strength of the boundary according to the first operation information and the second operation information further comprises:
and if the first adjacent image block is not subjected to the fine operation and the second adjacent image block is not subjected to the fine operation, determining a difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block, and determining the boundary strength of the boundary by using the difference value.
3. The method of claim 1, wherein determining the boundary strength of the boundary according to the first operation information and the second operation information further comprises:
if the first adjacent image block is not subjected to the refinement operation, or the second adjacent image block is not subjected to the refinement operation, determining a difference value between the motion vector to be adjusted of the first adjacent image block and the motion vector to be adjusted of the second adjacent image block, and determining the boundary strength of the boundary by using the difference value.
4. The method according to any one of claims 1 to 3,
the first adjacent image block comprises an image block on the upper side of the boundary, and the second adjacent image block comprises an image block on the lower side of the boundary; or, the first adjacent image block includes an image block on the left side of the boundary, and the second adjacent image block includes an image block on the right side of the boundary.
5. A boundary strength determination method applied to an encoding end or a decoding end comprises the following steps:
acquiring first operation information of a first adjacent image block of the boundary of a unit to be processed; the first operation information is used for indicating that the first adjacent image block is subjected to a refinement operation or not subjected to refinement;
acquiring second operation information of a second adjacent image block of the boundary; the second operation information is used for indicating that the second adjacent image block is subjected to a refinement operation or not subjected to refinement;
determining the boundary strength of the boundary according to the first operation information and the second operation information;
determining a difference value between a motion vector to be adjusted of the first adjacent image block and a motion vector to be adjusted of the second adjacent image block; if the absolute value of the difference is greater than or equal to a preset threshold value, then:
determining the boundary strength of the boundary to be a third numerical value when the first adjacent image block is subjected to the refinement operation or the second adjacent image block is subjected to the refinement operation;
or, when the first adjacent image block has been subjected to the refinement operation and the second adjacent image block has been subjected to the refinement operation, determining that the boundary strength of the boundary is a fifth numerical value.
6. The method of claim 5, wherein determining the boundary strength of the boundary according to the first operation information and the second operation information further comprises:
and when the first adjacent image block is not subjected to the refinement operation and the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary to be a fourth numerical value.
7. The method of claim 5, wherein determining the boundary strength of the boundary according to the first operation information and the second operation information further comprises:
and when the first adjacent image block is not subjected to the refinement operation or the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary to be a sixth numerical value.
8. The method according to any one of claims 5 to 7,
the first adjacent image block comprises an image block on the upper side of the boundary, and the second adjacent image block comprises an image block on the lower side of the boundary; or, the first adjacent image block includes an image block on the left side of the boundary, and the second adjacent image block includes an image block on the right side of the boundary.
9. A boundary strength determination method applied to an encoding end or a decoding end comprises the following steps:
acquiring first operation information of a first adjacent image block of the boundary of a unit to be processed; the first operation information is used for indicating that the first adjacent image block is subjected to a refinement operation or not subjected to refinement;
acquiring second operation information of a second adjacent image block of the boundary; the second operation information is used for indicating that the second adjacent image block is subjected to refinement operation or not subjected to refinement;
determining the boundary strength of the boundary according to the first operation information and the second operation information;
determining a difference value between a motion vector to be adjusted of the first adjacent image block and a motion vector to be adjusted of the second adjacent image block; if the absolute value of the difference is smaller than a preset threshold value, then:
determining the boundary strength of the boundary to be a seventh numerical value when the first adjacent image block is subjected to the refinement operation or the second adjacent image block is subjected to the refinement operation;
or, when the first adjacent image block has been subjected to the refinement operation and the second adjacent image block has been subjected to the refinement operation, determining that the boundary strength of the boundary is a ninth value.
10. The method of claim 9, wherein determining the boundary strength of the boundary based on the first operational information and the second operational information further comprises:
and when the first adjacent image block is not subjected to the refinement operation and the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary to be an eighth numerical value.
11. The method of claim 9, wherein determining the boundary strength of the boundary according to the first operation information and the second operation information further comprises:
and when the first adjacent image block is not subjected to the refinement operation or the second adjacent image block is not subjected to the refinement operation, determining the boundary strength of the boundary to be a tenth numerical value.
12. The method according to any one of claims 9 to 11,
the first adjacent image block comprises an image block on the upper side of the boundary, and the second adjacent image block comprises an image block on the lower side of the boundary; or, the first adjacent image block includes an image block on the left side of the boundary, and the second adjacent image block includes an image block on the right side of the boundary.
13. An encoding side device, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is configured to execute machine executable instructions to perform the method steps of any of claims 1-12.
14. A decoding-side apparatus, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is configured to execute machine executable instructions to perform the method steps of any of claims 1-12.
CN201811103477.7A 2018-09-20 2018-09-20 Method and equipment for determining motion vector and boundary strength Active CN110933419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811103477.7A CN110933419B (en) 2018-09-20 2018-09-20 Method and equipment for determining motion vector and boundary strength

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811103477.7A CN110933419B (en) 2018-09-20 2018-09-20 Method and equipment for determining motion vector and boundary strength

Publications (2)

Publication Number Publication Date
CN110933419A CN110933419A (en) 2020-03-27
CN110933419B true CN110933419B (en) 2022-07-01

Family

ID=69856353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811103477.7A Active CN110933419B (en) 2018-09-20 2018-09-20 Method and equipment for determining motion vector and boundary strength

Country Status (1)

Country Link
CN (1) CN110933419B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104025593A (en) * 2011-11-04 2014-09-03 松下电器产业株式会社 Deblocking Filtering With Modified Image Block Boundary Strength Derivation
CN104918057A (en) * 2015-05-08 2015-09-16 上海交通大学 Motion vector post-processing system based on neighborhood motion information
CN105075265A (en) * 2013-03-19 2015-11-18 高通股份有限公司 Disparity vector derivation in 3D video coding for skip and direct modes
WO2017164645A2 (en) * 2016-03-24 2017-09-28 인텔렉추얼디스커버리 주식회사 Method and apparatus for encoding/decoding video signal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180199057A1 (en) * 2017-01-12 2018-07-12 Mediatek Inc. Method and Apparatus of Candidate Skipping for Predictor Refinement in Video Coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104025593A (en) * 2011-11-04 2014-09-03 松下电器产业株式会社 Deblocking Filtering With Modified Image Block Boundary Strength Derivation
CN105075265A (en) * 2013-03-19 2015-11-18 高通股份有限公司 Disparity vector derivation in 3D video coding for skip and direct modes
CN104918057A (en) * 2015-05-08 2015-09-16 上海交通大学 Motion vector post-processing system based on neighborhood motion information
WO2017164645A2 (en) * 2016-03-24 2017-09-28 인텔렉추얼디스커버리 주식회사 Method and apparatus for encoding/decoding video signal

Also Published As

Publication number Publication date
CN110933419A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
US20160044329A1 (en) Image Predictive Coding Method and Image Encoder
US20170171558A1 (en) Method of Temporal Derived Bi-Directional Motion Vector for Motion Vector Prediction
CN107046645B9 (en) Image coding and decoding method and device
US11889102B2 (en) Filtering method for removing blocking artifact and apparatus
US8649436B2 (en) Methods for efficient implementation of skip/direct modes in digital video compression algorithms
WO2017156705A1 (en) Affine prediction for video coding
CN109845263B (en) Apparatus and method for video encoding
EP3232663B1 (en) Decoding methods and devices
US11310535B2 (en) Deblocking filtering control for illumination compensation
EP2805510A1 (en) Method and apparatus for intra mode coding
US11445173B2 (en) Method and apparatus for Intra prediction fusion in image and video coding
CN109587491A (en) A kind of intra-frame prediction method, device and storage medium
US20190349606A1 (en) Deblocking filtering control
US9008358B2 (en) Encoding a specific area with higher quality than a non-specific area
CN108600755B (en) Image frame coding method and device
CN103530895A (en) Method and device for detecting mosaic
US20220417530A1 (en) Image decoding device, image decoding method, and program
CN110933419B (en) Method and equipment for determining motion vector and boundary strength
CN105992012B (en) Error concealment method and device
CN105812824B (en) A kind of video encoding method and device
US11729408B2 (en) Method for deriving constructed affine merge candidates
CN110769255B (en) Image coding method and device
CN116325727A (en) Intra-frame prediction method, encoder, decoder and storage medium
CN117857810A (en) Illumination compensation method, encoder, decoder and storage medium
EP2876884A1 (en) Motion compensation with moving window

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant