High-precision coding mode encoding method and high-precision coding mode decoding method

By adopting progressive motion prediction and cross-precision motion compensation in video encoding and decoding technology, the problem of high-precision motion vectors being unable to be used across macroblocks is solved, and efficient coding compression rate improvement is achieved.

CN118381933BActive Publication Date: 2024-09-13BEIJING VIMICRO ARTIFICIAL INTELLIGENCE CHIP TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410800086.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-13
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

The use of high-precision motion vectors in existing video coding and decoding technology is inefficient and cannot be used across macroblocks, resulting in a low improvement in coding compression rate.

Method used

The use of progressive motion prediction enable flags and cross-precision motion compensation enables high-precision motion vectors to be deduplicated and superimposed during the encoding and decoding processes, generating candidate motion compensation data sets, and realizing the storage and reuse of high-precision motion vectors.

Benefits of technology

Through the effective use of high-precision motion vectors and the progressive improvement of accuracy, the use of cross-macroblocks and cross-modes is achieved, significantly improving the encoding compression rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118381933B
    Figure CN118381933B
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a high-precision coding mode encoding method and a high-precision coding mode decoding method. A specific implementation of the method includes: generating a first candidate motion compensation data group according to each high-precision motion vector corresponding to the third high-precision motion vector set; in response to the cross-precision motion compensation enable flag being 1, by superimposing a number of micro-motion vectors with a step size of 2 and different directions with an accuracy of a high-precision prediction accuracy value on a specific motion vector or a predicted motion vector, a number of high-precision motion vectors are obtained as candidate high-precision motion vector groups; based on the candidate high-precision motion vector group, a second candidate motion compensation data group is generated; based on the first candidate motion compensation data group and the second candidate motion compensation data group, a coding operation is performed. This implementation achieves the purpose of high-precision coding by storing and reusing high-precision motion vectors. It realizes cross-macroblock use, cross-mode use, and improves the coding compression rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of video coding and decoding, and specifically to a high-precision coding mode encoding method and a high-precision coding mode decoding method. Background Art

[0002] With the widespread application of video media, video coding and decoding technology has gradually received widespread attention and application. Video coding and decoding compression technology has been widely used in Internet video, mobile video, high-definition television, video surveillance and other fields, providing strong support for the transmission and storage of video media. At present, video coding and decoding technology is developing towards higher efficiency, faster speed and higher quality.

[0003] Video images are transmitted after being encoded. Complete video encoding usually includes prediction, transformation, quantization, entropy coding, filtering and other processes. The prediction process can include intra-frame prediction and inter-frame prediction. Inter-frame prediction refers to the use of the correlation in the video time domain to use the pixels of the adjacent encoded images to predict the current pixel, so as to effectively remove the redundancy in the video time domain.

[0004] During the encoding process, some methods use motion vectors with higher accuracy than the basic accuracy of the encoding system (the basic accuracy of the original encoding system is 1 / 4, and the above methods can expand the accuracy to 1 / 8 or 1 / 16), thereby improving the video encoding compression rate.

[0005] However, the use of high-precision motion vectors is inefficient and cannot be used across macroblocks. For example, UPMV with cross-precision motion compensation is only used in the encoding process of the current macroblock and is not used in the encoding of subsequent adjacent macroblocks; high-precision motion vectors are relatively scattered and have low accuracy, and cannot be improved progressively, so the improvement in encoding compression rate is not high.

[0006] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention

[0007] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0008] Some embodiments of the present disclosure propose a high-precision coding mode encoding method and a high-precision coding mode decoding method, device, electronic device and computer-readable medium to solve one or more of the technical problems mentioned in the above background technology part.

[0009] In a first aspect, some embodiments of the present disclosure provide a high-precision coding mode encoding method, which is applied to an encoder, wherein a progressive motion prediction enable flag is added to the encoder, and the method comprises: in response to determining that the high-precision coding mode enable flag is 1, determining a high-precision prediction accuracy value; in response to determining that the progressive motion prediction enable flag is 1, obtaining a high-precision motion vector contained in each macroblock in a neighborhood macroblock set that has been encoded; converting the high-precision motion vector contained in each macroblock in the neighborhood macroblock set into a high-precision prediction accuracy value to obtain a converted high-precision motion vector set as a first high-precision motion vector set; deduplicating the first high-precision motion vector set to obtain a deduplicated first high-precision motion vector set as a second high-precision motion vector set; in response to determining the second high-precision motion vector set The elements in the vector set are not 0, the high-precision reference existence flag is set to 1, and a preset number of second high-precision motion vectors are taken out from the above-mentioned second high-precision motion vector set in turn as the third high-precision motion vector set; according to the respective high-precision motion vectors corresponding to the above-mentioned third high-precision motion vector set, a first candidate motion compensation data group is generated; in response to the cross-precision motion compensation enable flag being 1, by superimposing a number of micro-motion vectors with a step size of 2 and different directions with an accuracy of the high-precision prediction accuracy value on a specific motion vector or a predicted motion vector, a number of high-precision motion vectors are obtained as a candidate high-precision motion vector group; according to the above-mentioned candidate high-precision motion vector group, a second candidate motion compensation data group is generated; according to the first candidate motion compensation data group and the second candidate motion compensation data group, an encoding operation is performed.

[0010] In a second aspect, some embodiments of the present disclosure provide a high-precision coding mode decoding method, which is applied to a decoder, the method comprising: in response to receiving a code stream, decoding a coded high-precision coding mode flag corresponding to the above code stream to obtain a high-precision coding mode flag; in response to determining that the high-precision coding mode flag is 0, decoding the above code stream according to a preset standard; in response to determining that the high-precision coding mode flag is 1, performing the following decoding steps: obtaining a second high-precision motion vector set and a high-precision reference existence flag corresponding to the above code stream; in response to determining that the above high-precision reference existence flag is 1, decoding a progressive motion prediction flag corresponding to the above code stream; in response to determining that the above high-precision reference existence flag is 0, setting the decoded progressive motion prediction flag to 0; in response to the decoded progressive motion prediction flag being set to 1, decoding the coded set overlay flag to obtain a set overlay flag; in response to the set overlay flag being 1, decoding a first coded element index value to obtain a first element index value; in response to the decoded progressive motion prediction flag being set to 0, decoding a second coded element index value to obtain a second element index value.

[0011] In a third aspect, some embodiments of the present disclosure provide a high-precision coding mode encoding device, which is applied to an encoder, wherein a progressive motion prediction enable flag is added to the above-mentioned encoder, and the device includes: a determination unit, configured to determine a high-precision prediction accuracy value in response to determining that the high-precision coding mode enable flag is 1; an acquisition unit, configured to acquire the high-precision motion vector corresponding to each macroblock in the encoded neighborhood macroblock set in response to determining that the progressive motion prediction enable flag is 1; a conversion unit, configured to convert the high-precision motion vector corresponding to each macroblock in the above-mentioned neighborhood macroblock set into a high-precision prediction accuracy value, and obtain a converted high-precision motion vector set as a first high-precision motion vector set; a deduplication unit, configured to deduplicate the above-mentioned first high-precision motion vector set, and obtain a deduplicated first high-precision motion vector set as a second high-precision motion vector set; a setting unit, configured to determine the second high-precision The elements in the motion vector set are not 0, the high-precision reference existence flag is set to 1, and a preset number of second high-precision motion vectors are taken out in sequence from the above-mentioned second high-precision motion vector set as the third high-precision motion vector set; the first generation unit is configured to generate a first candidate motion compensation data group according to each high-precision motion vector corresponding to the above-mentioned third high-precision motion vector set; the superposition unit is configured to respond to the cross-precision motion compensation enable flag being 1, by superimposing a number of micro-motion vectors with a step size of 2 and different directions with an accuracy of high-precision prediction accuracy value on a specific motion vector or predicted motion vector, to obtain a number of high-precision motion vectors as a candidate high-precision motion vector group; the second generation unit is configured to generate a second candidate motion compensation data group according to the above-mentioned candidate high-precision motion vector group; the encoding unit is configured to perform encoding operations according to the first candidate motion compensation data group and the second candidate motion compensation data group.

[0012] In a fourth aspect, some embodiments of the present disclosure provide a high-precision coding mode decoding device, which is applied to a decoder, and the device includes: a first decoding unit, configured to, in response to receiving a code stream, decode the encoded high-precision coding mode flag corresponding to the above code stream to obtain the high-precision coding mode flag; a second decoding unit, configured to, in response to determining that the high-precision coding mode flag is 0, decode the above code stream according to a preset standard; a third decoding unit, configured to, in response to determining that the high-precision coding mode flag is 1, perform the following decoding steps: obtain a second high-precision motion vector set corresponding to the above code stream and a high-precision reference memory; In the flag; in response to determining that the above-mentioned high-precision reference existence flag is 1, the progressive motion prediction flag corresponding to the above-mentioned code stream is decoded; in response to determining that the above-mentioned high-precision reference existence flag is 0, the decoded progressive motion prediction flag is set to 0; in response to the decoded progressive motion prediction flag being set to 1, the encoded set superposition flag is decoded to obtain the set superposition flag; in response to the set superposition flag being 1, the first encoded element index value is decoded to obtain the first element index value; in response to the decoded progressive motion prediction flag being set to 0, the second encoded element index value is decoded to obtain the second element index value.

[0013] In a fifth aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first or second aspect above.

[0014] In a sixth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation of the first aspect or the second aspect is implemented.

[0015] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: The present disclosure proposes a method for efficient use of existing high-precision motion vectors and gradual improvement of accuracy. The gradual improvement of accuracy is mainly achieved by using adjacent high-precision vectors as references for predicted images, and using a preset number of new vectors superimposed with micro-motion vector offsets to generate predicted images, performing rate-distortion calculations respectively, and then comparing and selecting the better one. Since the high-precision motion vector is stored after the calculation of each macroblock is completed and applied to the prediction of subsequent macroblocks, a gradual improvement in accuracy can be achieved. The purpose of high-precision encoding is achieved by storing and reusing high-precision motion vectors. It realizes cross-macroblock use, cross-mode use, and improves the encoding compression rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0017] Figure 1 is a flowchart of some embodiments of the high-precision coding mode encoding method according to the present disclosure;

[0018] Figure 2 is a schematic diagram of sample positions of a motion compensation algorithm at 1 / 4 precision according to some embodiments of the high precision coding mode encoding method disclosed in the present invention;

[0019] Figure 3 is a schematic diagram of the position of 1 / 16 precision predicted brightness samples according to some embodiments of the high precision coding mode encoding method disclosed in the present invention;

[0020] Figure 4 It is a schematic diagram of the positions of integer pixel samples and sub-pixel samples predicted with 1 / 16 precision according to some embodiments of the high-precision coding mode coding method disclosed in the present invention;

[0021] Figure 5 is a flowchart of some embodiments of the high-precision coding mode decoding method according to the present disclosure;

[0022] Figure 6 is a schematic diagram of the structure of some embodiments of the high-precision coding mode encoding device according to the present disclosure;

[0023] Figure 7 is a schematic structural diagram of some embodiments of a high-precision coding mode decoding device according to the present disclosure;

[0024] Figure 8 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0025] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0026] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0031] Figure 1 1 is a flowchart of some embodiments of the high-precision coding mode encoding method according to the present disclosure. A flow chart 100 of some embodiments of the high-precision coding mode encoding method according to the present disclosure is shown. The high-precision coding mode encoding method is applied to an encoder, and a progressive motion prediction enable flag is added to the encoder, comprising the following steps:

[0032] The following are the professional terms involved in this application:

[0033] The progressive motion prediction enable flag may refer to an enable flag of progressive motion prediction (PMP, Progressive Motion Prediction).

[0034] The high-precision coding mode enable flag may refer to an enable flag of a high-precision coding mode (HPCM, High-PrecisionCoding Mode).

[0035] MV (Motion Vector), motion vector;

[0036] MC (Motion Compensation), motion compensation, usually implemented using an interpolation filter algorithm;

[0037] MVP (Motion Vector Prediction), the predicted value of the motion vector;

[0038] MVD (Motion Vector Difference), motion vector difference;

[0039] The precision of motion vector refers to the number of integer samples in the basic unit of motion vector.

[0040] Precision of Motion Compensation, the minimum precision corresponding to the interpolation filter algorithm;

[0041] Cross-Precision Motion Compensation (CPMC) is a method that can perform motion compensation at different precisions given a motion vector; the characteristics are: the precision of motion compensation is different from the precision of the corresponding motion vector, including both improved and reduced precision. For example, when the motion vector precision is 1 / 4, by adding some parameters, the corresponding motion compensation precision can be other precisions, such as 1 / 16, 1 / 8, 1 / 2, 1, 2.

[0042] Micro-motion Vector (MMV) is the unit motion vector added.

[0043] Step 101, in response to determining that the high-precision encoding mode enable flag is 1, determining a high-precision prediction accuracy value.

[0044] In some embodiments, the execution subject (e.g., encoder) of the high-precision coding mode coding method may determine the high-precision prediction accuracy value in response to determining that the high-precision coding mode enable flag is 1. The high-precision prediction accuracy value may be the accuracy value P (H) of the high-precision prediction when the high-precision coding mode enable flag is preset to 1. The accuracy level difference between P (H) and the ordinary accuracy P is Q. For example, P (H) represents 1 / 16 prediction accuracy, P represents 1 / 4 prediction accuracy, and the accuracy level difference Q is 2. Q is a positive integer.

[0045] Step 102: In response to determining that the progressive motion prediction enable flag is 1, a high-precision motion vector included in each macroblock in the encoded neighborhood macroblock set is obtained.

[0046] In some embodiments, the execution subject may obtain a high-precision motion vector contained in each macroblock in the encoded neighborhood macroblock set in response to determining that the progressive motion prediction enable flag is 1. Each macroblock in the neighborhood macroblock set may correspond to the same image, and each macroblock is adjacent. The high-precision motion vector may be an HPMV (High-Precision Motion Vector).

[0047] Each macroblock is encoded differently, for example:

[0048] Macroblock A: Only 1 / 4 precision motion vector coding can be used. The prediction vector is recorded as normal MV(A).

[0049] Macroblock B: With MV(A) as a reference, the precision can be extended to 1 / 16 through the cross-precision motion compensation mode (CPMC). Since 64 positions need to be compared from 1 / 4 to 1 / 16 precision, all calculations are very time-consuming. At this time, only a part of the positions needs to be selected for comparison. The present invention compares 8 positions with 1 / 8 precision (the step size is 2 at 1 / 16 precision). Although the precision is 1 / 16, the accuracy of the prediction vector HPMV(B) at position B is not high.

[0050] Macroblock C: Taking HPMV(B) as a reference, HPMV(B) is compared with the vector after superimposing 8 unit directions to obtain a more accurate HPMV(C).

[0051] Macroblock D: Taking HPMV(C) as a reference, a more accurate high-precision vector HPMV(D)… is obtained.

[0052] Because high-precision motion vectors are used, the above macroblocks may use HPCM or other encoding modes.

[0053] If the above macroblock adopts the high precision coding mode (HPCM), HPMV is calculated by the MV and HPMMV stored in the normal precision memory space.

[0054] HPMV=(MV<<2)+ HPMMV; HPMMV may refer to a high-precision micro-motion vector.

[0055] If the macroblocks in the neighborhood macroblock set use other high-precision coding modes (UMVE fusion coding mode), the HPMV is obtained according to the convention of the corresponding coding mode.

[0056] Step 103: convert the high-precision motion vector contained in each macroblock in the above-mentioned neighborhood macroblock set into a high-precision prediction accuracy value to obtain a converted high-precision motion vector set as a first high-precision motion vector set.

[0057] In some embodiments, the execution subject converts the high-precision motion vector contained in each macroblock in the neighborhood macroblock set into a high-precision prediction accuracy value to obtain a converted high-precision motion vector set as the first high-precision motion vector set. That is, the high-precision motion vector corresponding to each macroblock can be converted into a high-precision motion vector corresponding to the accuracy value P (H). The converted high-precision motion vector set is obtained as the first high-precision motion vector set.

[0058] Step 104 , performing deduplication processing on the first high-precision motion vector set to obtain a deduplicated first high-precision motion vector set as the second high-precision motion vector set.

[0059] In some embodiments, the execution subject may perform deduplication processing on the first high-precision motion vector set to obtain a deduplicated first high-precision motion vector set as the second high-precision motion vector set.

[0060] Step 105, in response to determining that the elements in the second high-precision motion vector set are not 0, setting the high-precision reference existence flag to 1, and sequentially taking a preset number of second high-precision motion vectors from the above second high-precision motion vector set as the third high-precision motion vector set.

[0061] In some embodiments, in response to determining that an element in the second high-precision motion vector set is not 0, the execution subject may set a high-precision reference existence flag to 1, and sequentially extract a preset number of second high-precision motion vectors from the second high-precision motion vector set as a third high-precision motion vector set. The high-precision reference existence flag may be represented by has-pmp.

[0062] Step 106: Generate a first candidate motion compensation data group according to each high-precision motion vector corresponding to the third high-precision motion vector set.

[0063] In some embodiments, the execution entity may generate a first candidate motion compensation data group according to each high-precision motion vector corresponding to the third high-precision motion vector set.

[0064] In practice, the above execution subject may generate the first candidate motion compensation data group through the following steps:

[0065] In the first step, for each high-precision motion vector in the above-mentioned third high-precision motion vector set, a number of micro-motion vectors with a step size of 1 and different directions and a high-precision prediction accuracy value d are superimposed to generate a superimposed high-precision motion vector and obtain a superimposed high-precision motion vector group.

[0066] For example, the third high-precision motion vector set may be A3, and for each high-precision motion vector hpmv-A3 in A3, a number of micro-motion vectors MMV1 with a step size of 1 and different directions with a superimposed accuracy of P (H) are superimposed to obtain a number of new motion vectors hpmv-A3' as a superimposed high-precision motion vector group. hpmv may refer to HPMV.

[0067] Specifically, MMV1 takes one of {0,-1}, {0,1}, {-1,0}, {1,0}, {-1,-1}, {-1,1}, {1,-1}, {1,1} according to different indexes.

[0068] In the second step, the third high-precision motion vector set is combined with the superimposed high-precision motion vector group to obtain a first high-precision motion vector set.

[0069] As an example, the preset number m is 2, A3 has 2 elements,

[0070] {hpmv-A3} is {(a1,b1),(a2,b2)},

[0071] {hpmv-A3'} further expands each element of hpmv-A3 into a group, assuming there are 8 elements, namely {(a1,b1-1),(a1,b1+1)…(a1+1,b1+1),(a2,b2-1),…(a2+1,b2+1)}. The number of elements in hpmv-A3' is 8 times the number of elements in hpmv-A3, which is 16 in this example.

[0072] To obtain the first high-precision motion vector set, it is necessary to first merge the two sets {hpmv-A3} and {hpmv-A3'} together to form a new set N with 18 elements, and then calculate these elements to obtain the first high-precision motion vector set.

[0073] The index values ​​of the first high-precision motion vector set are allocated according to the protocol agreement, for example, 18 elements are allocated from 0 to 17 respectively.

[0074] The third step is to perform interpolation calculation on the first high-precision motion vector set based on a preset high-precision interpolation filter coefficient table to generate a first candidate motion compensation data group.

[0075] Optionally, in response to determining that an element in the second high-precision motion vector set is 0, a high-precision reference existence flag is set to 0.

[0076] Step 107, in response to the cross-precision motion compensation enable flag being 1, by superimposing a number of micro-motion vectors with a step size of 2 and different directions whose accuracy is the high-precision prediction accuracy value on a specific motion vector or a predicted motion vector, a number of high-precision motion vectors are obtained as candidate high-precision motion vector groups.

[0077] In some embodiments, the execution subject may obtain several high-precision motion vectors as a candidate high-precision motion vector group by superimposing several micro-motion vectors with a step size of 2 and different directions and an accuracy of a high-precision prediction accuracy value on a specific motion vector or a predicted motion vector in response to the cross-precision motion compensation enable flag being 1. The cross-precision motion compensation enable flag can be represented by cpmc-en. cpmc also represents cross-precision motion compensation. For example, a specific motion vector corresponds to a base motion vector in an advanced motion vector expression. In the step size index of the advanced motion vector expression, a preset number of indexes with a step size of 0 are added, and other index values ​​are shifted back a preset number. The predicted motion vector may refer to a predicted value of a motion vector.

[0078] As an example, by superimposing a number of fine motion vectors MMV2 with a step size of 2 and different directions and an accuracy of P (H) on a specific motion vector or a predicted motion vector, a candidate high-precision motion vector group consisting of a number of high-precision motion vectors hpmv-B is obtained.

[0079] Specifically, MMV2 takes one of {0,-2}, {0,2}, {-2,0}, {2,0}, {-2,-2}, {-2,2}, {2,-2}, {2,2} according to different indexes.

[0080] Step 108: Generate a second candidate motion compensation data group based on the above candidate high-precision motion vector group.

[0081] In some embodiments, the execution subject may generate a second candidate motion compensation data set based on the candidate high-precision motion vector set. The candidate high-precision motion vector set may be interpolated using a high-precision interpolation filter coefficient table to obtain a motion compensation data set as the second candidate motion compensation data set.

[0082] The following is an example of interpolation calculation:

[0083] Take the motion compensation algorithm with 1 / 4 accuracy as an example:

[0084] Figure 2 , gives the positions of the initial integer samples, 1 / 2 samples, and 1 / 4 samples in the brightness sample matrix, where the integer sample positions are marked with capital letters, and the 1 / 2 and 1 / 4 sample positions are marked with lowercase letters. The corresponding relationship between these sample positions and their coordinates (fx, fy) in the 1 / 4 precision brightness sample matrix is ​​shown in Table 1, where xFracl is equal to fx&3, and yFracl is equal to fy&3. Table 1, as shown below: .

[0085] Sample location a 0,0 , b0,0 , and c 0,0 The predicted value is obtained by filtering the 8 integer values ​​closest to the interpolation point in the horizontal direction. The predicted value is obtained as follows:

[0086] a0,0=Clip1((−A −3,0 +4*A −2,0 -10*A −1,0 +58*A 0,0 +17*A 1,0 -5*A 2,0 +A 3,0 -A 4,0 +32)>>6);

[0087] b 0,0 =Clip1((-A −3,0 +4*A −2,0 -11*A −1,0 +40*A 0,0 +40*A 1,0 -11*A 2,0 +4*A 3,0 -A 4,0 +32)>>6);

[0088] c 0,0 =Clip1((-A −3,0 +A −2,0 -5*A −1,0 +17*A 0,0 +58*A 1,0 -10*A 2,0 +4*A 3,0 -A 4,0 +32)>>6).

[0089] Sample position d 0,0 ,h 0,0 , and n 0,0 The predicted value is obtained by filtering the 8 integer values ​​closest to the interpolation point in the vertical direction. The predicted value is obtained as follows:

[0090] d 0,0 =Clip1((-A 0,−3 +4*A 0,−2 -10*A 0,−1 +58*A 0,0 +17*A 0,1 -5*A 0,2 +A 0,3 -A 0,4 +32)>>6);

[0091] h 0,0 =Clip1((-A 0,-3 +4*A0,-2 -11*A 0,-1 +40*A 0,0 +40*A 0,1 -11*A 0,2 +4*A 0,3 -A 0,4 +32)>>6);

[0092] n 0,0 = Clip1((-A 0,-3 +A 0,-2 -5*A 0,-1 +17*A 0,0 +58*A 0,1 -10*A 0,2 +4*A 0,3 −A 0,4 +32)>>6).

[0093] Where Clip1(n)=(((n)>(2 BitDepth-1 ))?(2 BitDepth-1 ):(((n)<(0))?(0):(n))). BitDepth is the encoding sample precision and its value is 8 or 10.

[0094] Sample location 0,0 ,i 0,0 , p 0,0 , f 0,0 , j 0,0 ,q 0,0 , g 0,0 , k 0,0 and r 0,0 The predicted value of is obtained as follows:

[0095] e 0,0 =Clip1((-a' 0,-3 +4*a' 0,-2 -10*a' 0,-1 +58*a' 0,0 +17*a' 0,1 -5*a' 0,2 +a' 0,3 -a' 0,4 +(1<<19-BitDepth))>>(20-BitDepth));

[0096] i 0,0 =Clip1((-a' 0,-3 +4*a' 0,-2 -11*a' 0,-1 +40*a' 0,0 +40*a' 0,1 -11*a' 0,2+4*a' 0,3 -a' 0,4 +(1<<19-BitDepth))>>(20-BitDepth));

[0097] p 0,0 =Clip1((-a' 0,-3 +a' 0,-2 -5*a' 0,-1 +17*a' 0,0 +58*a' 0,1 -10*a' 0,2 +4*a' 0,3 -a' 0,4 +(1<<19-BitDepth))>>(20-BitDepth));

[0098] f 0,0 =Clip1((-b' 0,-3 +4*b' 0,-2 -10*b' 0,-1 +58*b' 0,0 +17*b' 0,1 -5*b' 0,2 +b' 0,3 -b' 0,4 +(1<<19-BitDepth))>>(20-BitDepth));

[0099] j 0,0 =Clip1((-b' 0,-3 +4*b' 0,-2 -11*b' 0,-1 +40*b' 0,0 +40*b' 0,1 -11*b' 0,2 +4*b' 0,3 -b' 0,4 +(1<<19-BitDepth))>>(20-BitDepth));

[0100] q 0,0 =Clip1((-b' 0,-3 +b' 0,-2 -5*b' 0,−1 +17*b' 0,0 +58*b' 0,1− 10*b' 0,2 +4*b' 0,3− b' 0,4 +(1<<19-BitDepth))>>(20-BitDepth));

[0101] g0,0 =Clip1((-c' 0,-3 +4*c' 0,-2 -10*c' 0,-1 +58*c' 0,0 +17*c' 0,1 -5*c' 0,2 +c' 0,3 -c' 0,4 +(1<<19 - BitDepth))>>(20 - BitDepth));

[0102] k 0,0 =Clip1((-c' 0,-3 +4*c' 0,-2 -11*c' 0,-1 +40*c' 0,0 +40*c' 0,1 -11*c' 0,2 +4*c' 0,3 -c' 0,4 +(1<<19 - BitDepth))>>(20 - BitDepth));

[0103] r 0,0 =Clip1((-c' 0,-3 +c' 0,-2 -5*c' 0,-1 +17*c' 0,0 +58*c' 0,1 -10*c' 0,2 +4*c' 0,3 -c' 0,4 +(1<<19 - BitDepth))>>(20 - BitDepth)。

[0104] Among them:

[0105] a' 0,i = (-A −3,i +4*A −2,i -10*A −1,i +58*A 0,i +17*A 1,i -5*A 2,i +A 3,i -A 4,i +((1<<BitDepth - 8)>>1))>>(BitDepth - 8);

[0106] b' 0,i =(-A −3,i +4*A −2,i -11*A −1,i +40*A 0,i+40*A 1,i− 11*A 2,i +4*A 3,i− A 4,i +((1<<BitDepth-8)> >1))>>(BitDepth-8);

[0107] c' 0,i =(−A −3,i +A −2,i -5*A −1,i +17*A 0,i +58*A 1,i -10*A 2,i +4*A 3,i −A 4,i +((1<<BitDepth-8)> >1))>>(BitDepth-8).

[0108] Then the filter coefficients only need to be defined as Table 2 below: .

[0109] As an example, the following is the process of motion compensation with 1 / 16 accuracy:

[0110] The sample positions in the reference image brightness sample matrix are shown in Figure 3 , A, B, C, D are the adjacent initial integer pixel samples, dx and dy are the horizontal and vertical distances between the sub-pixel sample a(dx,dy) around the integer pixel sample A and A, dx is equal to fx&15, dy is equal to fy&15. Among them, (fx,fy) is the coordinate of the sub-pixel sample in the 1 / 16 precision brightness sample matrix. The specific positions of the integer pixel Ax,y and the surrounding 255 sub-pixel samples ax,y(dx,dy) are shown in Figure 4 .

[0111] The sample position ax,0 (x=1~15) is filtered by the 8 integer values ​​closest to the interpolation point in the horizontal direction. The predicted value is obtained as follows:

[0112] a x,0 =Clip1((f L [x][0]*A −3,0 +f L [x][1]*A −2,0 +f L [x][2]*A −1,0 +f L [x][3]*A 0,0 +f L [x][4]*A 1,0 +f L [x][5]*A 2,0 +fL [x][6]*A 3,0 +f L [x][7]*A 4,0 +32)>>6).

[0113] Sample location a 0,y (y=1~15) is obtained by filtering the 8 integer values ​​closest to the interpolation point in the vertical direction. The predicted value is obtained as follows:

[0114] a 0,y =Clip1((f L [y][0]*A 0,−3 +f L [y][1]*A 0,−2 +f L [y][2]*A 0,−1 +f L [y][3]*A 0,0 +f L [y][4]*A 0,1 +f L [y][5]*A 0,2 +f L [y][6]*A 0,3 +f L [y][7]*A 0,4 +32)>>6).

[0115] Sample location a x,y The predicted value of (x=1~15, y=1~15) is obtained as follows:

[0116] a x,y =Clip1((f L [y][0]*a' x,y-3 +f L [y][1]*a' x,y-2 +f L [y][2]*a' x,y-1 +f L [y][3]*a' x,y +f L [y][4]*a' x,y+1 +f L [y][5]*a' x,y+2 +f L [y][6]*a' x,y+3 +f L [y][7]*a' x,y+4 +(1<<(19-BitDepth)))>>(20-BitDepth)).

[0117] in:

[0118] a' x,y =(f L [x][0]*A −3,y +f L [x][1]*A −2,y +f L [x][2]*A −1,y +f L [x][3]*A 0,y +f L [x][4]*A 1,y +f L [x][5]*A 2,y +f L [x][6]*A 3,y +f L [x][7]*A 4,y +((1<<(BitDepth-8))>>1))>>(BitDepth-8).

[0119] The interpolation filter coefficients are shown in Table 3 below: .

[0120] By operating on the integer pixels with different filter coefficients, the predicted pixel values ​​of different vectors can be interpolated.

[0121] At 1 / 16 accuracy, the offset accuracy of the vector is 1 / 16, and the motion vector corresponds to 15 sets of filter coefficients; when the offset accuracy of the vector is 1 / 8, the motion vector corresponds to 7 sets of filter coefficients; when the offset accuracy of the vector is 1 / 4, the motion vector corresponds to 3 sets of filter coefficients.

[0122] In order to achieve expansion from low precision to high precision, the interpolation filter needs to be expanded first. For an encoder, for example, if the highest precision of the vector is 1 / 4, the filter coefficients only need to be defined as Table 2.

[0123] In order to achieve high-precision interpolation filtering, the filter coefficient table needs to be expanded. If UPMC (1) is used, the accuracy is increased by 1 level to 1 / 8. At this time, the interpolation filter coefficient also needs to be expanded by one level. For example, the following table 4:

[0124] .

[0125] Furthermore, in CPMC, if UPMC (2) is used, the accuracy is increased by 2 levels to 1 / 16. In this case, the interpolation filter coefficients need to be expanded by one level. For example, Table 3.

[0126] In order to achieve higher-precision cross-precision motion compensation, it is necessary to add the definition of corresponding high-precision filter coefficients in the standard definition of the encoding algorithm.

[0127] In the fusion mode or the independent implementation, if high-precision motion compensation is used in the manner of precision expansion, it is necessary to add an interpolation filter coefficient table defining the corresponding precision in the coding specification.

[0128] The second step is to calculate the CPMV at a higher level of precision:

[0129] If the motion vector accuracy is increased by 1 level in the fusion mode, that is, UPMV (1), then the newly obtained high-precision motion vector is expressed as: CPMV = MVP*2 + MMV.

[0130] If the motion vector accuracy is increased by 2 levels in the fusion mode, that is, UPMV (2), then the newly obtained high-precision motion vector is expressed as: CPMV = MVP*4 + MMV.

[0131] For different index values ​​p, the MMVs are (1,0), (0,-1), (-1,0), (0,1), (1,-1), (-1,1), (-1,1), and (1,1).

[0132] The third step is to obtain the precision compensation data: specifically, to calculate CPMC, that is, to use the CPMV obtained in the second step and the high-precision interpolation filter coefficient table to perform interpolation calculation.

[0133] For example, in response to the cross-precision motion compensation enable flag being 1, and the cross-precision motion compensation mode including the reduced precision compensation mode, and in response to determining that the cross-precision support mode includes the first mode, a number of new motion vectors are obtained by rounding off a specific motion vector based on a number of reduced precision levels; in response to determining that the cross-precision support mode includes the second mode, a number of new motion vectors are obtained by rounding off a predicted motion vector based on a number of reduced precision levels. According to the new motion vector, interpolation calculation is performed based on the original interpolation filter coefficient table to obtain reduced precision compensation data.

[0134] It should be noted that different cpmc_pmodes selected by the current user may correspond to different cross-precision CPMC supports, as shown in Table 5: .

[0135] First, for the selected cpmc_pmode, traverse all indexes p to obtain the cross-precision compensation mode (UPMC or DPMC) and index i, and then calculate the CPMV.

[0136] Specifically, when cpmc_pmode=0, corresponding to upmv(1), i=1; p is 0~3, and the corresponding MMV angle value is 0~3.

[0137] When cpmc_pmode=1, p is 0~3, corresponding to upmv(2), i=2; the corresponding MMV angle value is 0~3. p is 4~7, corresponding to upmv(1), i=1; the corresponding MMV angle value is 0~3.

[0138] When cpmc_pmode=2, it corresponds to upmv(1), i=1; p is 0~7, and the corresponding MMV angle value is 0~7.

[0139] When cpmc_pmode=3, it corresponds to upmv(1) and DPMV[4], p is 0~3, corresponding to the MMV angle value of UPMV 0~3, and p is 4~7, corresponding to the four precisions of DPMV[4].

[0140] Among them, DPMV(i)=round(MVP,i).

[0141] Then, the method to obtain the UPMV up-precision motion vector is: the predicted value of the MVP motion vector plus the micro-motion vector MMV;

[0142] Among them, UPMV(i)=(MVP< <i)+MMV(angle)。

[0143] When angle is 0~3, the MMV is (1,0), (0,-1), (-1,0), (0,1) respectively.

[0144] When angle is 4~7, the MMV is (1,-1), (-1,1), (-1,1), (1,1) respectively.

[0145] Step 109: performing an encoding operation according to the first candidate motion compensation data set and the second candidate motion compensation data set.

[0146] In some embodiments, the execution entity may perform an encoding operation according to the first candidate motion compensation data group and the second candidate motion compensation data group.

[0147] In practice, the above execution subject can perform the encoding operation through the following steps:

[0148] In the first step, in response to determining that the rate-distortion value corresponding to the motion compensation data corresponding to the first candidate motion compensation data group and the second candidate motion compensation data group in the prediction data set is the smallest, the high-precision coding mode flag is set to 1. The above-mentioned prediction data set includes: the first candidate motion compensation data group, the second candidate motion compensation data group, and other prediction data groups. Other prediction data groups can be motion compensation data under other encoding methods. That is, determine whether the rate-distortion value corresponding to the motion compensation data in the first candidate motion compensation data group and the second candidate motion compensation data group is the smallest in this large set of prediction data sets. The rate-distortion value can be the rate-distortion value between the motion compensation data and the corresponding macroblock.

[0149] In the second step, in response to determining that the rate distortion value corresponding to the first candidate motion compensation data in the first candidate motion compensation data group is the smallest, setting the progressive motion prediction flag to 1.

[0150] In the third step, for the first candidate motion compensation data with the smallest rate distortion value, the following processing steps are performed:

[0151] 1. In response to determining that the first candidate motion compensation data corresponds to a high-precision motion vector superimposed with the micro-motion vector, set the superposition flag to 1, and encode the first element index value corresponding to the first candidate motion compensation data. Here, the encoding method can be an encoding method provided by the encoder.

[0152] 2. In response to determining that the first candidate motion compensation data does not correspond to the high-precision motion vector of the superimposed fine motion vector, the superimposition flag is set to 0, and the first element index value corresponding to the first candidate motion compensation data is encoded. For example, the first element index value i1 corresponds to an index in the first high-precision motion vector set, and takes a value from 0 to 17. The first element index value may refer to the element index value corresponding to the first candidate motion compensation data.

[0153] As an example, "the first element index value i1 corresponds to the high-precision motion vector hpmv-A3' with the superimposed micro-motion vector" means that the value of i1 is "2 to 17", and i1' can be obtained by subtracting 2 from i1 (2 represents the number of elements of {hpmv-A3}). The range of i1' is 0 to 15, corresponding to the index of {hpmv-A3'}.

[0154] "i1 corresponds to the high-precision motion vector hpmv-A3 without superimposed vectors" means that the value of i1 is "0 to 1", corresponding to the index of {hpmv-A3}. ​​If there are more than one element in {hpmv-A3}, the index value of {hpmv-A3} needs to be encoded here. It should be added that i1' needs to be encoded, and the value of i1'' is i1.

[0155] In step 4, in response to determining that the rate-distortion value corresponding to the second candidate motion compensation data in the second candidate motion compensation data group is the smallest, the progressive motion prediction flag is set to 0, and the second element index value corresponding to the second candidate motion compensation data with the smallest rate-distortion value is encoded. The second element index value may refer to the element index value corresponding to the second candidate motion compensation data.

[0156] Optionally, in response to determining that the high-precision encoding mode flag is 1, the high-precision motion vector corresponding to the macroblock is right-shifted by Q bits to obtain a motion vector under normal precision.

[0157] In some embodiments, the execution subject may right shift the high-precision motion vector corresponding to the macroblock by Q bits in response to determining that the high-precision coding mode flag is 1, to obtain a motion vector under normal precision, wherein the precision level difference between the high-precision motion vector and the normal precision motion vector is Q.

[0158] Optionally, the last Q bits of the high-precision motion vector corresponding to the macroblock are intercepted to obtain a high-precision micro-vector.

[0159] In some embodiments, the execution subject may intercept the last two bits of the high-precision motion vector corresponding to the macroblock to obtain a high-precision micro-vector.

[0160] Optionally, the motion vector and the high-precision micro-vector are stored.

[0161] In some embodiments, the execution entity may store the motion vector and the high-precision micro vector.

[0162] Optionally, the above-mentioned high-precision encoding mode flag is encoded.

[0163] In some embodiments, the execution entity may encode the high-precision encoding mode flag.

[0164] Optionally, in response to determining that the high-precision encoding mode flag is 1, the following encoding steps are performed:

[0165] In the first step, in response to the high-precision reference presence flag being 1, a progressive motion prediction flag is encoded.

[0166] In the second step, in response to the high-precision reference existence flag being 0, the progressive motion prediction flag is set to 0.

[0167] In the third step, in response to the progressive motion prediction flag being 1, the set overlap flag is encoded.

[0168] In the fourth step, in response to setting the overlap flag to 1, encoding the element index value corresponding to the first candidate motion compensation data with the smallest rate-distortion value.

[0169] In a fifth step, in response to determining that the progressive motion prediction flag is 0, encoding the element index value corresponding to the second candidate motion compensation data with the smallest rate-distortion value.

[0170] Therefore, the purpose of high-precision encoding is achieved through the storage and reuse of high-precision motion vectors, which enables cross-macroblock and cross-mode use and improves the encoding compression rate.

[0171] Figure 5 5 is a flowchart of some embodiments of the high-precision coding mode decoding method according to the present disclosure. A flowchart 500 of some embodiments of the high-precision coding mode decoding method according to the present disclosure is shown. The high-precision coding mode decoding method, applied to a decoder, comprises the following steps:

[0172] Step 501: In response to receiving a code stream, a high-precision coding mode flag corresponding to the code stream is decoded to obtain a high-precision coding mode flag.

[0173] In some embodiments, the execution subject (eg, decoder) of the high-precision coding mode decoding method may decode the high-precision coding mode flag corresponding to the code stream in response to receiving the code stream to obtain the high-precision coding mode flag. The code stream may be a code stream of a coded image sent by an encoder.

[0174] Step 502: In response to determining that the high-precision coding mode flag is 0, the code stream is decoded according to a preset standard.

[0175] In some embodiments, the execution subject may decode the code stream according to a preset standard in response to determining that the high-precision coding mode flag is 0.

[0176] Step 503, in response to determining that the high-precision coding mode flag is 1, performing the following decoding steps:

[0177] Step 5031, obtaining a second high-precision motion vector set and a high-precision reference existence flag corresponding to the above code stream.

[0178] In some embodiments, the execution subject may obtain the second high-precision motion vector set and the high-precision reference existence flag corresponding to the code stream, that is, the code stream carries the second high-precision motion vector set and the high-precision reference existence flag.

[0179] Step 5032: In response to determining that the high-precision reference existence flag is 1, decode the progressive motion prediction flag corresponding to the bitstream.

[0180] In some embodiments, the execution subject may decode the progressive motion prediction flag corresponding to the bitstream in response to determining that the high-precision reference existence flag is 1.

[0181] Step 5033: In response to determining that the high-precision reference existence flag is 0, the decoded progressive motion prediction flag is set to 0.

[0182] In some embodiments, the execution entity may set the decoded progressive motion prediction flag to 0 in response to determining that the high-precision reference existence flag is 0.

[0183] Step 5034: in response to the decoded progressive motion prediction flag being set to 1, the encoded set overlap flag is decoded to obtain the set overlap flag.

[0184] In some embodiments, the execution subject may decode the encoded set overlay flag in response to the decoded progressive motion prediction flag being set to 1 to obtain the set overlay flag.

[0185] Step 5035, in response to setting the overlay flag to 1, decode the first coded element index value to obtain the first element index value.

[0186] In some embodiments, the execution subject may decode the first coded element index value in response to setting the overlay flag to 1 to obtain the first element index value.

[0187] Step 5036: In response to the decoded progressive motion prediction flag being set to 0, the second coding element index value is decoded to obtain the second element index value.

[0188] In some embodiments, the execution subject may decode the second coding element index value in response to the decoded progressive motion prediction flag being set to 0 to obtain the second element index value.

[0189] Optionally, in response to determining that the high-precision encoding mode flag is 1, a high-precision motion vector is obtained according to the progressive motion prediction flag, the set overlay flag, the first element index value and the second element index value.

[0190] In some embodiments, the execution entity may obtain a high-precision motion vector in response to determining that the high-precision coding mode flag is 1 according to the progressive motion prediction flag, the set overlay flag, the first element index value, and the second element index value.

[0191] As an example, if the high-precision coding mode flag PMP-flag is 1, hpmv is obtained by the second high-precision motion vector set A2, the set superimposition flag mvd-flag, and the first element index value i1'.

[0192] Otherwise, if the high-precision coding mode flag PMP-flag is 0, hpmv is obtained by the second high-precision motion vector set A2, the set superposition flag mvd-flag, and the first element index value i1'.

[0193] If the high-precision coding mode flag PMP-flag is 0, hpmv is obtained from the candidate high-precision motion vector group B2 and the second element index value i2.

[0194] Optionally, according to the above-mentioned high-precision motion vector, interpolation calculation is performed based on a high-precision interpolation filter coefficient table to obtain motion compensation data as a predicted image.

[0195] In some embodiments, the execution subject may perform interpolation calculation according to the high-precision motion vector and based on a high-precision interpolation filter coefficient table to obtain motion compensation data as a predicted image.

[0196] Optionally, in response to the high precision coding mode flag HPCM-flag being 1.

[0197] Shift the high-precision motion vector hpmv right by Q bits to obtain the motion vector mv at normal precision P. Store mv for reference of motion vector at normal precision. Mv=hpmv>>2;

[0198] The last 2 bits of the high-precision motion vector hpmv are truncated to obtain the high-precision micro vector hpmmv under the high-precision P (H). hpmmv is stored for high-precision motion vector reconstruction of PMP. Hpmmv = hpmv & 3.

[0199] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a high-precision coding mode coding device, and these high-precision coding mode coding device embodiments are Figure 1 Corresponding to the method embodiments shown, the high-precision coding mode encoding device can be specifically applied to various electronic devices.

[0200] like Figure 6As shown, the high-precision coding mode encoding device 600 of some embodiments includes: a determination unit 601, an acquisition unit 602, a conversion unit 603, a deduplication unit 604, a setting unit 605, a first generation unit 606, a superposition unit 607, a second generation unit 608 and an encoding unit 609. Among them, the determination unit 601 is configured to determine the high-precision prediction accuracy value in response to determining that the high-precision encoding mode enable flag is 1; the acquisition unit 602 is configured to obtain the high-precision motion vector contained in each macroblock in the encoded neighborhood macroblock set in response to determining that the progressive motion prediction enable flag is 1; the conversion unit 603 is configured to convert the high-precision motion vector contained in each macroblock in the above-mentioned neighborhood macroblock set into a high-precision prediction accuracy value, and obtain a converted high-precision motion vector set as a first high-precision motion vector set; the deduplication unit 604 is configured to deduplicate the above-mentioned first high-precision motion vector set, and obtain a deduplicated first high-precision motion vector set as a second high-precision motion vector set; the setting unit 605 is configured to set the high-precision reference existence flag to 1 in response to determining that the elements in the second high-precision motion vector set are not 0, and A preset number of second high-precision motion vectors are sequentially taken out from the above-mentioned second high-precision motion vector set as a third high-precision motion vector set; a first generation unit 606 is configured to generate a first candidate motion compensation data group according to each high-precision motion vector corresponding to the above-mentioned third high-precision motion vector set; a superposition unit 607 is configured to respond to the cross-precision motion compensation enable flag being 1, by superimposing a number of micro-motion vectors with a step size of 2 and different directions with an accuracy of a high-precision prediction accuracy value on a specific motion vector or a predicted motion vector, to obtain a number of high-precision motion vectors as a candidate high-precision motion vector group; a second generation unit 608 is configured to generate a second candidate motion compensation data group according to the above-mentioned candidate high-precision motion vector group; an encoding unit 609 is configured to perform encoding operations according to the first candidate motion compensation data group and the second candidate motion compensation data group.

[0201] It can be understood that the units recorded in the high-precision coding mode encoding device 600 are similar to the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the high-precision coding mode encoding device 600 and the units included therein, and will not be described in detail here.

[0202] Further references Figure 7 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a high-precision coding mode decoding device. These high-precision coding mode decoding device embodiments are Figure 5 Corresponding to the method embodiments shown, the high-precision coding mode decoding device can be specifically applied to various electronic devices.

[0203] like Figure 7 As shown, the high-precision coding mode decoding device 700 of some embodiments includes: a first decoding unit 701, a second decoding unit 702 and a third decoding unit 709. The first decoding unit 701 is configured to decode the encoded high-precision coding mode flag corresponding to the above-mentioned code stream in response to receiving the code stream, and obtain the high-precision coding mode flag; the second decoding unit 702 is configured to decode the above-mentioned code stream according to a preset standard in response to determining that the high-precision coding mode flag is 0; the third decoding unit 703 is configured to perform the following decoding steps in response to determining that the high-precision coding mode flag is 1: obtain the second high-precision motion vector set and the high-precision reference existence flag corresponding to the above-mentioned code stream; in response to determining that the above-mentioned high-precision reference The existence flag is 1, and the progressive motion prediction flag corresponding to the above-mentioned code stream is decoded; in response to determining that the above-mentioned high-precision reference existence flag is 0, the decoded progressive motion prediction flag is set to 0; in response to the decoded progressive motion prediction flag being set to 1, the encoded set superposition flag is decoded to obtain the set superposition flag; in response to the set superposition flag being 1, the first encoded element index value is decoded to obtain the first element index value; in response to the decoded progressive motion prediction flag being set to 0, the second encoded element index value is decoded to obtain the second element index value.

[0204] It can be understood that the units described in the high-precision coding mode decoding device 700 are similar to those described in the reference Figure 5 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the high-precision coding mode decoding device 700 and the units included therein, and will not be described in detail here.

[0205] Reference below Figure 8 , which shows a schematic diagram of the structure of an electronic device 800 (e.g., an encoder and a decoder) suitable for implementing some embodiments of the present disclosure. The electronic devices in some embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0206] like Figure 8As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0207] Typically, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 8 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0208] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0209] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0210] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0211] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to determining that the high-precision coding mode enable flag is 1, determines a high-precision prediction accuracy value; in response to determining that the progressive motion prediction enable flag is 1, obtains the high-precision motion vector contained in each macroblock in the encoded neighborhood macroblock set; converts the high-precision motion vector contained in each macroblock in the neighborhood macroblock set into a high-precision prediction accuracy value to obtain a converted high-precision motion vector set as a first high-precision motion vector set; performs deduplication processing on the first high-precision motion vector set to obtain a deduplicated first high-precision motion vector set as a second high-precision motion vector set; in response to determining that the elements in the second high-precision motion vector set are not is 0, sets the high-precision reference existence flag to 1, and sequentially takes out a preset number of second high-precision motion vectors from the above-mentioned second high-precision motion vector set as the third high-precision motion vector set; generates a first candidate motion compensation data group according to each high-precision motion vector corresponding to the above-mentioned third high-precision motion vector set; in response to the cross-precision motion compensation enable flag being 1, obtains several high-precision motion vectors as a candidate high-precision motion vector group by superimposing several micro-motion vectors with a step size of 2 and different directions whose accuracy is the high-precision prediction accuracy value on a specific motion vector or predicted motion vector; generates a second candidate motion compensation data group according to the above-mentioned candidate high-precision motion vector group; performs encoding operations according to the first candidate motion compensation data group and the second candidate motion compensation data group.

[0212] Or the electronic device is configured to: in response to receiving a code stream, decode the encoded high-precision encoding mode flag corresponding to the code stream to obtain a high-precision encoding mode flag; in response to determining that the high-precision encoding mode flag is 0, decode the code stream according to a preset standard; in response to determining that the high-precision encoding mode flag is 1, perform the following decoding steps: obtain a second high-precision motion vector set and a high-precision reference existence flag corresponding to the code stream; in response to determining that the high-precision reference existence flag is 1, decode the progressive motion prediction flag corresponding to the code stream; in response to determining that the high-precision reference existence flag is 0, set the decoded progressive motion prediction flag to 0; in response to the decoded progressive motion prediction flag being set to 1, decode the encoded set overlay flag to obtain a set overlay flag; in response to the set overlay flag being 1, decode the first encoded element index value to obtain the first element index value; in response to the decoded progressive motion prediction flag being set to 0, decode the second encoded element index value to obtain the second element index value.

[0213] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0214] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0215] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0216] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure.

Claims

1. A high-precision coding mode encoding method, applied to an encoder, wherein a progressive motion prediction enable flag is added to the encoder, and the method include: In response to determining that the high-precision encoding mode enable flag is 1, determining a high-precision prediction accuracy value; In response to determining that the progressive motion prediction enable flag is 1, obtaining a high-precision motion vector included in each macroblock in the encoded neighborhood macroblock set; Converting the high-precision motion vector contained in each macroblock in the neighborhood macroblock set into a high-precision prediction accuracy value to obtain a converted high-precision motion vector set as a first high-precision motion vector set; Performing deduplication processing on the first high-precision motion vector set to obtain a deduplicated first high-precision motion vector set as a second high-precision motion vector set; In response to determining that an element in the second high-precision motion vector set is not 0, setting a high-precision reference existence flag to 1, and sequentially taking a preset number of second high-precision motion vectors from the second high-precision motion vector set as a third high-precision motion vector set; generating a first candidate motion compensation data group according to each high-precision motion vector corresponding to the third high-precision motion vector set; In response to the cross-precision motion compensation enable flag being 1, a plurality of high-precision motion vectors are obtained as a candidate high-precision motion vector group by superimposing a plurality of fine motion vectors with a step size of 2 and different directions and an accuracy equal to the high-precision prediction accuracy value on a specific motion vector or a predicted motion vector; generating a second candidate motion compensation data group according to the candidate high-precision motion vector group; Performing an encoding operation according to the first candidate motion compensation data group and the second candidate motion compensation data group; The step of generating a first candidate motion compensation data group according to each high-precision motion vector corresponding to the third high-precision motion vector set includes: For each high-precision motion vector in the third high-precision motion vector set, a plurality of fine motion vectors with a step size of 1 and different directions whose precision is the high-precision prediction precision value d are superimposed to generate a superimposed high-precision motion vector, thereby obtaining a superimposed high-precision motion vector group; Merging the third high-precision motion vector set with the superimposed high-precision motion vector group to obtain a first high-precision motion vector set; Based on a preset high-precision interpolation filter coefficient table, interpolating the first high-precision motion vector set to generate a first candidate motion compensation data group; The performing of the encoding operation according to the first candidate motion compensation data group and the second candidate motion compensation data group includes: In response to determining that the rate-distortion value corresponding to the motion compensation data corresponding to the first candidate motion compensation data group and the second candidate motion compensation data group in the prediction data set is the smallest, setting the high-precision coding mode flag to 1, wherein the prediction data set includes: the first candidate motion compensation data group, the second candidate motion compensation data group, and other prediction data groups; In response to determining that the rate-distortion value corresponding to the first candidate motion compensation data in the first candidate motion compensation data group is the smallest, setting the progressive motion prediction flag to 1; For the first candidate motion compensation data with the smallest rate distortion value, the following processing steps are performed: In response to determining that the first candidate motion compensation data corresponds to a high-precision motion vector superimposed with the fine motion vector, setting an overlay flag to 1, and encoding a first element index value corresponding to the first candidate motion compensation data; In response to determining that the first candidate motion compensation data does not correspond to the high-precision motion vector superimposed with the fine motion vector, setting the superimposition flag to 0, and encoding the first element index value corresponding to the first candidate motion compensation data; In response to determining that the rate distortion value corresponding to the second candidate motion compensation data in the second candidate motion compensation data group is the smallest, the progressive motion prediction flag is set to 0, and the second element index value corresponding to the second candidate motion compensation data with the smallest rate distortion value is encoded.

2. The high-precision coding mode encoding method according to claim 1, in, The method further comprises: In response to determining that the high-precision encoding mode flag is 1, the high-precision motion vector corresponding to the macroblock is right-shifted by Q bits to obtain a motion vector under normal precision, wherein the precision level difference between the high-precision motion vector and the normal precision motion vector is Q; The last Q bits of the high-precision motion vector corresponding to the macroblock are intercepted to obtain a high-precision micro-vector; The motion vector and the high-precision micro vector are stored.

3. A high-precision coding mode decoding method applied to the high-precision coding mode encoding method according to claim 1, applied to a decoder, the method include: In response to receiving a code stream, decoding a high-precision coding mode flag corresponding to the code stream to obtain a high-precision coding mode flag; In response to determining that the high-precision coding mode flag is 0, decoding the code stream according to a preset standard; In response to determining that the high-precision encoding mode flag is 1, the following decoding steps are performed: Acquire a second high-precision motion vector set and a high-precision reference existence flag corresponding to the code stream; In response to determining that the high-precision reference existence flag is 1, decoding a progressive motion prediction flag corresponding to the bitstream; In response to determining that the high-precision reference existence flag is 0, setting the decoded progressive motion prediction flag to 0; In response to the decoded progressive motion prediction flag being set to 1, decoding the encoded set overlap flag to obtain the set overlap flag; In response to setting the superposition flag to 1, decoding the first coded element index value to obtain a first element index value; In response to the decoded progressive motion prediction flag being set to 0, the second coding element index value is decoded to obtain a second element index value.

4. The high-precision coding mode decoding method according to claim 3, in, The method further comprises: In response to determining that the high-precision coding mode flag is 1, obtaining a high-precision motion vector according to the progressive motion prediction flag, the set overlay flag, the first element index value, and the second element index value; According to the high-precision motion vector, interpolation calculation is performed based on a high-precision interpolation filter coefficient table to obtain motion compensation data as a predicted image.

5. A high-precision coding mode encoding device, applied to the high-precision coding mode encoding method according to claim 1, applied to an encoder, wherein a progressive motion prediction enable flag is added to the encoder, include: a determining unit configured to determine a high-precision prediction accuracy value in response to determining that the high-precision encoding mode enable flag is 1; an acquisition unit, configured to, in response to determining that the progressive motion prediction enable flag is 1, acquire a high-precision motion vector included in each macroblock in the encoded neighborhood macroblock set; A conversion unit is configured to convert the high-precision motion vector included in each macroblock in the neighborhood macroblock set into a high-precision prediction accuracy value to obtain a converted high-precision motion vector set as a first high-precision motion vector set; a deduplication unit configured to perform deduplication processing on the first high-precision motion vector set to obtain a deduplication first high-precision motion vector set as a second high-precision motion vector set; a setting unit configured to, in response to determining that an element in the second high-precision motion vector set is not 0, set a high-precision reference existence flag to 1, and sequentially take out a preset number of second high-precision motion vectors from the second high-precision motion vector set as a third high-precision motion vector set; A first generating unit is configured to generate a first candidate motion compensation data group according to each high-precision motion vector corresponding to the third high-precision motion vector set; a superposition unit configured to obtain, in response to the cross-precision motion compensation enable flag being 1, a plurality of fine motion vectors having a step size of 2 and different directions and having an accuracy of a high-precision prediction accuracy value on a specific motion vector or a predicted motion vector, as a candidate high-precision motion vector group; A second generating unit is configured to generate a second candidate motion compensation data group according to the candidate high-precision motion vector group; The encoding unit is configured to perform an encoding operation according to the first candidate motion compensation data group and the second candidate motion compensation data group.

6. A high-precision coding mode decoding device, applied to the high-precision coding mode decoding method as claimed in claim 3, applied to a decoder, include: A first decoding unit is configured to, in response to receiving a code stream, decode a high-precision coding mode flag corresponding to the code stream to obtain a high-precision coding mode flag; A second decoding unit is configured to decode the code stream according to a preset standard in response to determining that the high-precision coding mode flag is 0; The third decoding unit is configured to, in response to determining that the high-precision coding mode flag is 1, perform the following decoding steps: obtain a second high-precision motion vector set and a high-precision reference existence flag corresponding to the code stream; in response to determining that the high-precision reference existence flag is 1, decode the progressive motion prediction flag corresponding to the code stream; in response to determining that the high-precision reference existence flag is 0, set the decoded progressive motion prediction flag to 0; in response to the decoded progressive motion prediction flag being set to 1, decode the encoded set overlay flag to obtain the set overlay flag; in response to the set overlay flag being 1, decode the first encoded element index value to obtain the first element index value; in response to the decoded progressive motion prediction flag being set to 0, decode the second encoded element index value to obtain the second element index value.

7. An electronic device, include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-2 or 3-4.

8. A computer readable medium having a computer program stored thereon, in, When the program is executed by a processor, the method according to any one of claims 1-2 or 3-4 is implemented.