CN106375764B - A kind of bonding position prediction and block replicate the video intra-frame encoding method of prediction - Google Patents

A kind of bonding position prediction and block replicate the video intra-frame encoding method of prediction Download PDF

Info

Publication number
CN106375764B
CN106375764B CN201610795564.8A CN201610795564A CN106375764B CN 106375764 B CN106375764 B CN 106375764B CN 201610795564 A CN201610795564 A CN 201610795564A CN 106375764 B CN106375764 B CN 106375764B
Authority
CN
China
Prior art keywords
prediction
block
ibc
dip
sub
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
CN201610795564.8A
Other languages
Chinese (zh)
Other versions
CN106375764A (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.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
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 University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN201610795564.8A priority Critical patent/CN106375764B/en
Publication of CN106375764A publication Critical patent/CN106375764A/en
Application granted granted Critical
Publication of CN106375764B publication Critical patent/CN106375764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses the video intra-frame encoding method that a kind of prediction of bonding position and block replicate prediction, encoding block is divided into two sub-blocks by this method by flexible block partitioning scheme, same piece of predictive content is allowd to include local message and non-local information simultaneously, then RDO determines the prediction of each piece of Least-cost.Quick RDO and complete RDO combination are devised simultaneously, on the premise of coding efficiency is not influenceed, reduce encoder complexity.General effect is not increase decoding end complexity substantially, and obtains higher compression efficiency.

Description

Video intra-frame coding method combining direction prediction and block copy prediction
Technical Field
The invention relates to the technical field of video coding, in particular to a video intra-frame coding method combining direction prediction and block copy prediction.
Background
In recent years, with the rapid development of the internet, the application demand for videos in the internet is increasing, and the data volume of the videos is very large, so that the problem that needs to be solved in order to transmit the videos in the internet with limited bandwidth is the problem of video compression coding.
The established video coding standards all belong to the hybrid video coding framework. So-called hybrid video coding, generally consists of the following parts: prediction (Prediction), transformation (Transform), quantization (Quantization) and Entropy Coding (Entropy Coding). Among them, prediction is generally classified into intra prediction and inter prediction. Video frames that can only use intra-prediction mode are called I-frames, and video frames that can use either intra-prediction mode or inter-prediction mode are called P-frames or B-frames. The intra-frame prediction mode removes spatial redundancy by using pixels which are in the same frame as a current coding block and are reconstructed as a reference. The inter-frame prediction mode removes temporal redundancy by using the reconstructed pixels of other frames as references. Generally, inter-frame prediction has a higher accuracy, but the first frame of video or a random access frame provided for random access must be an I frame, and only intra-frame prediction can be used. Further improving the accuracy of intra-frame prediction, thereby improving the compression efficiency of I-frames, is a very urgent need in video coding.
Currently, the latest standard for general Video Coding is High Efficiency Video Coding (HEVC). Intra prediction of HEVC has 35 modes in common. Where the mode 0 indicates prediction using the Planar method, 1 indicates prediction using the DC method, and 2 to 34 indicate the use of the directional extrapolation mode. The common feature of these modes is extrapolation based on the reconstructed pixels in the immediate vicinity of the current coding block, which will be referred to as Directional Intra Prediction (DIP) hereinafter.
In addition, there are some work that suggests other intra prediction methods, such as:
extrapolation predictions in both directions are combined (Y.Ye and M.Karczewicz, "Improved h.264intra coded base on bi-directional intra prediction, directional transform, and adaptive coeffective scanning," Image Processing,2008.ICIP 2008.15th IEEE International reference, san Diego, CA,2008, pp.2116-2119.). However, directional prediction in HEVC, or combined two-directionally weighted prediction, only considers local correlation in video frames and not non-local correlation.
Edge (Edge) -based prediction (Liu, d., sun, x., wu, f., & Zhang, y.q. (2008). Edge-oriented uniform prediction image Processing, IEEE Transactions, 17 (10), 1827-1836.). Prediction based on template matching (T.K.Tan, C.S.Boon, and Y.Suzuki, "Intra prediction bytecode matching," in Image Processing,2006IEEEInternational reference, oct 2006, pp.1693-1696.). However, edge-based prediction or template matching-based prediction has a high complexity at the decoding end.
Prediction based on Intra block copy (Intra block copy) (Siu-Leong Yu and Christos Chrysafis, "Intra-prediction Intra-macroblock motion compensation," Oct.2006, U.S. Pat. No. 7,120,196.). The intra-frame block copy prediction technology finds a most similar reference block for a current coding block in a reconstructed area of a current frame to be used as prediction, and encodes a spatial motion vector between the found most similar reference block and the current block; it is well suited for the case where there are repetitive texture patterns in a frame. This technique is used in subsequent extension versions of HEVC: the Screen Content Coding (SCC) is adopted because some repetitive patterns of regular shapes, such as characters, etc., often appear in such videos. Block copy prediction techniques work well in SCC but not well in natural video. This is mainly because natural video capture angles are complex, noise is large, even if there are repetitive textures, they are largely irregular shapes, and are rarely aligned with square coding units, so that similar reference blocks cannot be searched.
Disclosure of Invention
The invention aims to provide a video intra-frame coding method combining direction prediction and block copy prediction, which can consider local correlation and non-local correlation in a video frame and ensure that the complexity of a decoding end is lower.
The purpose of the invention is realized by the following technical scheme:
a method of video intra-coding combining directional prediction and block copy prediction, comprising:
dividing a current coding block by utilizing a predefined division template containing a plurality of division types, wherein each division type divides the current coding block into two sub-blocks;
intra block copy IBC prediction for all sub-blocks: determining a search range of IBC prediction, performing IBC prediction on all subblocks by using each reference block in the search range, determining an optimal motion vector of each subblock, and recording a prediction error of each subblock, which is obtained by predicting the optimal motion vector;
carrying out DIP prediction on all the subblocks to obtain the optimal prediction direction of each subblock, and recording the prediction error of each subblock, which is obtained by predicting the optimal prediction direction;
after prediction errors of all subblocks under IBC prediction and DIP prediction are obtained, determining optimal partition and corresponding prediction combination in all partition types through rapid Rate Distortion Optimization (RDO);
and through complete RDO comparison, the coding cost of IBC prediction on the current coding block, the coding cost of DIP prediction on the current coding block and the coding cost of optimal division and corresponding prediction combination are selected, and the prediction mode with the minimum coding cost is selected as the final prediction mode of the current coding block.
Further, the plurality of partition types include:
the method comprises the following steps of (1) covering 28 division types of a horizontal direction, a vertical direction, a diagonal direction from top right to bottom left and a diagonal direction from top left to bottom right, wherein each direction has 7 division types, the division types of the horizontal direction and the vertical direction are collectively called rectangular division, and the division types of the diagonal direction from top right to bottom left and the diagonal direction from top left to bottom right are collectively called triangular division;
or, the two partitioning modes include 7 partitioning types with an L-shape at the top left and 7 partitioning types with an L-shape at the top right, where both partitioning modes are to partition the current coding block into two sub-blocks: one sub-block is a square block, and the other sub-block is an L-shaped block formed by two adjacent rectangular blocks.
Further, if the multiple partition types are 28 partition types in total covering a horizontal direction, a vertical direction, a diagonal direction from top right to bottom left, and a diagonal direction from top left to bottom right, determining an optimal motion vector of each sub-block when performing intra-block copy IBC prediction on all sub-blocks, and recording a prediction error of each sub-block, which is predicted by the optimal motion vector, includes:
marking 7 divisions in the horizontal direction as H1-H7, and 7 divisions in the vertical direction as V1-V7; 7 types of partitions in the diagonal direction from the upper right to the lower left are recorded as T1 to T7, and 7 types of partitions in the diagonal direction from the upper left to the lower right are recorded as D1 to D7;
after the search of each reference block in the search range is completed, the minimum prediction error and the corresponding optimal motion vector of each sub-block in each partition are obtained, and the following marks are carried out:
the optimal motion vectors MV of the upper and lower sub-blocks of the 1 st division type H1 in the horizontal direction are respectively recorded as MV _ IBC _ H1_1 and MV _ IBC _ H1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ H1_1 and SAD _ IBC _ H1_2; by analogy, the optimal motion vectors MV of the upper and lower sub-blocks of the 7 th partition type H7 are respectively recorded as MV _ IBC _ H7_1 and MV _ IBC _ H7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ H7_1 and SAD _ IBC _ H7_2;
the optimal motion vectors MV of the left sub-block and the right sub-block of the 1 st division type V1 in the vertical direction are respectively recorded as MV _ IBC _ V1_1 and MV _ IBC _ V1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ V1_1 and SAD _ IBC _ V1_2; by analogy, the optimal motion vectors MV of the two sub-blocks of the 7 th division type V7 left and right are respectively recorded as MV _ IBC _ V7_1 and MV _ IBC _ V7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ V7_1 and SAD _ IBC _ V7_2;
the optimal motion vectors MV of the upper left sub-block and the lower right sub-block of the 1 st division type T1 in the diagonal direction from the upper right to the lower left are respectively recorded as MV _ IBC _ T1_1 and MV _ IBC _ T1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ T1_1 and SAD _ IBC _ T1_2; by analogy, the optimal motion vectors MV of the upper left sub-block and the lower right sub-block of the 7 th partition type T7 are respectively recorded as MV _ IBC _ T7_1 and MV _ IBC _ T7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ T7_1 and SAD _ IBC _ T7_2;
the optimal motion vectors MV of the two sub-blocks at the upper right and lower left of the 1 st division type D1 in the diagonal direction from the upper left to the lower right are respectively recorded as MV _ IBC _ D1_1 and MV _ IBC _ D1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ D1_1 and SAD _ IBC _ D1_2; by analogy, the optimal motion vectors MV of the upper right sub-block and the lower left sub-block of the 7 th partition type T7 are denoted as MV _ IBC _ D7_1 and MV _ IBC _ D7_2, respectively, and the corresponding prediction errors are denoted as SAD _ IBC _ D7_1 and SAD _ IBC _ D7_2.
Further, the performing DIP prediction on all the subblocks to obtain the optimal prediction direction of each subblock, and recording the prediction error of each subblock, which is obtained by predicting the optimal prediction direction, includes:
the DIP prediction is that the optimal prediction direction is determined in 35 kinds of intra-frame prediction of HEVC, and after a predicted value in each direction is generated, the prediction error of each sub-block between a predicted block and a current coding block is calculated; after completing the traversal of 35 prediction directions, the minimum prediction error and corresponding intra prediction direction of each sub-block in each partition are obtained, and the following labels are performed:
the optimal prediction directions of the upper and lower sub-blocks of the 1 st partition type H1 in the horizontal direction are respectively recorded as Mode _ DIP _ H1_1 and Mode _ DIP _ H1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ H1_1 and SAD _ DIP _ H1_2; by analogy, the optimal prediction directions of the upper and lower sub-blocks of the 7 th partition type H7 are respectively denoted as Mode _ DIP _ H7_1 and Mode _ DIP _ H7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ H7_1 and SAD _ DIP _ H7_2;
the optimal prediction directions of the left and right sub-blocks of the 1 st division type V1 in the vertical direction are respectively recorded as Mode _ DIP _ V1_1 and Mode _ DIP _ V1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ V1_1 and SAD _ DIP _ V1_2; by analogy, the optimal prediction directions of the left and right sub-blocks of the 7 th partition type H7 are respectively denoted as Mode _ DIP _ V7_1 and Mode _ DIP _ V7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ V7_1 and SAD _ DIP _ V7_2;
the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 1 st partition type T1 in the diagonal direction from the upper right to the lower left are respectively denoted as Mode _ DIP _ T1_1 and Mode _ DIP _ T1_2, and the corresponding prediction errors are denoted as SAD _ DIP _ T1_1 and SAD _ DIP _ T1_2; by analogy, the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 7 th partition type T7 are respectively recorded as Mode _ DIP _ T7_1 and Mode _ DIP _ T7_2, and the corresponding prediction errors are recorded as SAD _ DIP _ T7_1 and SAD _ DIP _ T7_2;
the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 1 st partition type D1 in the diagonal direction from the upper left to the lower right are respectively denoted as Mode _ DIP _ D1_1 and Mode _ DIP _ D1_2, and the corresponding prediction errors are denoted as SAD _ DIP _ D1_1 and SAD _ DIP _ D1_2; by analogy, the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 7 th partition type T7 are denoted as Mode _ DIP _ D7_1 and Mode _ DIP _ D7_2, respectively, and the corresponding prediction errors are denoted as SAD _ DIP _ D7_1 and SAD _ DIP _ D7_2.
Further, the determining the optimal partition and the corresponding prediction combination in all partition types through the fast rate distortion optimization RDO includes:
determining the partitioning and predicting combination with the minimum total cost in 7 partitioning types in the horizontal direction, the vertical direction, the diagonal direction from the top right to the bottom left and the diagonal direction from the top left to the bottom right respectively, wherein the process comprises the following steps:
of the 7 division types in the horizontal directions H1 to H7, there are 14 combinations, and the corresponding costs are:
in the above formula, i =1, 2., 7; λ is a lagrange multiplier determined by a parameter specified by the encoder, and the Bits function is an estimate of the number of Bits consumed for entropy coding the MV and DIP directions; finding out the minimum combination of C _ H _ i _1 and C _H _i _, 2, and marking as C _ H _ k1_ p1, and marking the corresponding prediction mode as (k 1, p 1), wherein k1 is one number of 1 to 7, which indicates that the partition type is Hk1; p1 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that IBC prediction is carried out on the left part, DIP prediction is carried out on the right part, and 2 is vice versa;
in the 7 division types of the vertical directions V1 to V7, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination of C _ V _ i _1 and C _V _i _ _2from the above formula, and marking as C _ V _ k2_ p2, and marking as (k 2, p 2) the corresponding prediction mode, wherein k2 is one number from 1 to 7, which indicates that the division type is Vk2; p2 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that IBC prediction is carried out on the upper part, DIP prediction is carried out on the lower part, and 2 is vice versa;
in 7 divisions of the diagonal directions T1 to T7 from the top right to the bottom left, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination of C _ T _ i _1 and C _T _i _2 from the above formula, marking as C _ T _ k3_ p3, marking the corresponding prediction mode as (k 3, p 3), wherein k3 is one number from 1 to 7, and indicating that the partition type is Tk3; p3 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that IBC prediction is carried out on the upper left part, DIP prediction is carried out on the lower right part, and the other way is not carried out on the right part;
in the 7 divisions of the diagonal directions D1 to D7 from the top left to the bottom right, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination of C _ D _ i _1 and C _D _i _2 from the above formula, and marking as C _ D _ k4_ p4, and marking the corresponding prediction mode as (k 4, p 4), wherein k4 is one number of 1 to 7, which indicates that the partition type is Dk4; p4 is one of 1 to 2, indicating the prediction combination mode, 1 means that IBC prediction is carried out on the upper right part, DIP prediction is carried out on the lower left part, and the other way is not carried out on 2.
Further, the selecting, through complete RDO comparison, a prediction mode with the minimum coding cost as a final prediction mode of the current coding block includes:
carrying out DIP prediction on a current coding block, and recording the coding cost calculated by complete RDO as C _ DIP;
IBC prediction is carried out on the current coding block, and the coding cost calculated by complete RDO is recorded as C _ IBC;
for the horizontal direction, intra prediction is performed in the prediction mode (k 1, p 1) based on the corresponding motion vector MV _ IBC _ Hk1_ p1DirectionGenerating a prediction block of the current block by the partitioning type Hk1, and recording the coding cost calculated by the complete RDO as C _ H; wherein the content of the first and second substances,
for the vertical direction, from the prediction mode (k 2, p 2), according to the corresponding motion vector MV _ IBC _ Vk2_ p2, intra prediction directionDividing the type Vk2 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ V; wherein, the first and the second end of the pipe are connected with each other,
for diagonal directions from top right to bottom left, the intra prediction direction is determined by the prediction mode (k 3, p 3) according to the corresponding motion vector MV _ IBC _ Tk3_ p3And dividing the type Tk3 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ T; wherein, the first and the second end of the pipe are connected with each other,
for diagonal directions from top left to bottom right, the intra prediction direction is determined by the prediction mode (k 4, p 4) based on the corresponding motion vector MV _ IBC _ Dk4_ p4And dividing the type Dk4 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ D;
and comparing the sizes of the C _ DIP, the C _ IBC, the C _ H, the C _ V, the C _ T and the C _ D, and taking the prediction mode corresponding to the minimum coding cost as the final prediction mode of the current coding block.
Further, if the multiple partition types include 7 partition types with an L-shape at the top left and 7 partition types with an L-shape at the top right, determining the optimal motion vector of each sub-block when performing intra block copy IBC prediction on all sub-blocks, and recording a prediction error of each sub-block, which is predicted by the optimal motion vector, includes:
recording 7 division types with L-shaped upper left as L1-L7, and recording 7 division types with L-shaped upper right as R1-R7;
after each reference block in the search range is searched, the minimum prediction error and corresponding optimal motion vector of each sub-block in each partition are obtained, and the following steps are performed:
the optimal motion vectors MV of the upper left sub-block and the lower right sub-block of the 1 st division type L1 in the L type at the upper left are respectively recorded as MV _ IBC _ L1_1 and MV _ IBC _ L1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ L1_1 and SAD _ IBC _ L1_2; by analogy, the optimal motion vectors MV of the two sub-blocks at the upper left and the lower right of the 7 th division type L7 are respectively recorded as MV _ IBC _ L7_1 and MV _ IBC _ L7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ L7_1 and SAD _ IBC _ L7_2;
the optimal motion vectors MV of the upper right sub-block and the lower left sub-block of the 1 st division type R1 in the L type at the upper right are respectively recorded as MV _ IBC _ R1_1 and MV _ IBC _ R1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ R1_1 and SAD _ IBC _ R1_2; by analogy, the optimal motion vectors MV of the two sub-blocks at the upper right and lower left of the 7 th division type R7 are respectively denoted as MV _ IBC _ R7_1 and MV _ IBC _ R7_2, and the corresponding prediction errors are denoted as SAD _ IBC _ R7_1 and SAD _ IBC _ R7_2.
Further, the performing DIP prediction on all sub-blocks to obtain an optimal prediction direction of each sub-block, and recording a prediction error of each sub-block, which is obtained by predicting the optimal prediction direction, includes:
the DIP prediction is that the optimal prediction direction is determined in 35 intra-frame predictions of HEVC, and after a predicted value in each direction is generated, the prediction error of each sub-block between a predicted block and a current coding block is calculated; after completing the traversal of 35 prediction directions, the minimum prediction error and corresponding intra prediction direction of each sub-block in each partition are obtained, and marked as follows:
the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 1 st partition type L1 in the L-type at the upper left are respectively recorded as Mode _ DIP _ L1_1 and Mode _ DIP _ L1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ L1_1 and SAD _ DIP _ L1_2; by analogy, the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 7 th partition type L7 are respectively denoted as Mode _ DIP _ L7_1 and Mode _ DIP _ L7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ L7_1 and SAD _ DIP _ L7_2;
the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 1 st partition type R1 in the L-type at the upper right are respectively recorded as Mode _ DIP _ R1_1 and Mode _ DIP _ R1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ R1_1 and SAD _ DIP _ R1_2; by analogy, the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 7 th partition type R7 are respectively denoted as Mode _ DIP _ R7_1 and Mode _ DIP _ R7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ R7_1 and SAD _ DIP _ R7_2.
Further, the determining the optimal partition and the corresponding prediction combination in all partition types through the fast rate distortion optimization RDO includes:
determining the partition and prediction combination with the minimum overall cost in 7 partition types of L-shaped at the upper left and L-shaped at the upper right, wherein the process is as follows:
in the 7 division types of L-type L1 to L7 at the top left, there are 14 combinations, and the corresponding costs are:
in the above formula, i =1, 2., 7; the Bits function is an estimate of the number of Bits consumed for entropy coding of MV and DIP directions; finding out the minimum combination in C _ L _ i _1 and C _L _i _ _2, marking as C _ L _ k1_ p1, marking as (k 1, p 1) the corresponding prediction mode, wherein k1 is one number from 1 to 7, and indicating that the division type is Lk1; p1 is one of 1 to 2, which indicates the prediction combination mode, 1 means that the upper left L-shaped part performs IBC prediction, the lower right square part performs DIP prediction, and 2 is the opposite;
in the 7 division types of L-type R1 to R7 at the top right, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination in C _ R _ i _1 and C _R _i _ _2, and marking as C _ R _ k2_ p2, and marking as (k 2, p 2) the corresponding prediction mode, wherein k2 is a number from 1 to 7, and the division position is Rk2; p2 is one of 1 to 2, indicating the prediction combination mode, 1 means that the upper right L-shaped part is subjected to IBC prediction, the lower left square part is subjected to DIP prediction, and 2 is the opposite.
Further, the selecting, through complete RDO comparison, a coding cost for IBC prediction of a current coding block, a coding cost for DIP prediction of the current coding block, and a coding cost of an optimal partition and a corresponding prediction combination as a final prediction mode of the current coding block includes:
carrying out DIP prediction on a current coding block, and recording the coding cost calculated by complete RDO as C _ DIP;
IBC prediction is carried out on the current coding block, and the coding cost calculated through complete RDO is recorded as C _ IBC;
for the partition type with L-shaped upper left, the prediction mode (k 1, p 1) is used to predict the direction in the frame according to the corresponding motion vector MV _ IBC _ Lk1_ p1And dividing the type Lk1 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ L; wherein the content of the first and second substances,
for the partition type with L-shaped upper right, the prediction mode (k 2, p 2) is used to predict the direction in the frame according to the corresponding motion vector MV _ IBC _ Rk2_ p2And dividing the type Rk2 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ R; wherein, the first and the second end of the pipe are connected with each other,
and comparing the sizes of the C _ DIP, the C _ IBC, the C _ L and the C _ R, and taking the prediction mode corresponding to the minimum coding cost as the final prediction mode of the current coding block.
According to the technical scheme provided by the invention, the coding block is divided into two sub-blocks through a flexible block division mode, so that the prediction content of the same block can simultaneously contain local information and non-local information, and then the RDO decides the prediction with the minimum cost of each block. Meanwhile, the combination of the rapid RDO and the complete RDO is designed, and the coding complexity is reduced on the premise of not influencing the coding performance. The overall effect is to achieve higher compression efficiency without substantially increasing the complexity at the decoding end.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a video intra-coding method combining directional prediction and block copy prediction according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the division of V1, V2, \ 8230;, V7 in the vertical direction provided by the embodiment of the present invention;
FIG. 3 is a schematic diagram of the division of H1, H2, \ 8230;, H7 in the horizontal direction according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating the division of T1, T2, \ 8230;, T7 in diagonal directions from top right to bottom left according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the division of D1, D2, \ 8230;, D7 in diagonal directions from top left to bottom right provided by an embodiment of the present invention;
FIG. 6 is a schematic illustration of IBC prediction provided by an embodiment of the present invention;
FIG. 7 is a schematic diagram of the L1, L2, \ 8230;, L7 partitioning in the upper left L-shaped partitioning type according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of the R1, R2, \ 8230;, R7 partitioning in the upper right L-shaped partitioning type according to an embodiment of the present invention;
fig. 9 is a schematic diagram of coding performance after being tested according to the scheme of the first embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a video intra-coding method combining directional prediction and block copy prediction according to an embodiment of the present invention, as shown in fig. 1, which mainly includes the following steps:
1) The current coding block is divided by utilizing a predefined division template containing a plurality of division types, and each division type divides the current coding block into two sub-blocks.
2) Intra Block Copy (IBC) prediction for all sub-blocks: determining a search range of IBC prediction, then IBC prediction is carried out on all subblocks by utilizing each reference block in the search range, determining the optimal motion vector of each subblock, and recording the prediction error of each subblock, which is obtained by the optimal motion vector prediction.
3) And carrying out DIP prediction (intra-frame direction prediction) on all the sub-blocks to obtain the optimal prediction direction of each sub-block, and recording the prediction error of each sub-block, which is obtained by predicting the optimal prediction direction.
4) After prediction errors of all subblocks under IBC prediction and DIP prediction are obtained, the optimal partition and the corresponding prediction combination are determined in all partition types through fast Rate Distortion Optimization (RDO).
5) And through complete RDO comparison, carrying out IBC prediction on the current coding block, carrying out DIP prediction on the current coding block, optimally dividing and corresponding prediction combination coding costs, and selecting the prediction mode with the minimum coding cost as the final prediction mode of the current coding block.
The step 2) and the step 3) are not executed in sequence, and in addition, corresponding IBC prediction and DIP prediction can be simultaneously carried out on the whole coding block when the step 2) and the step 3) are executed.
In the embodiment of the present invention, since the number of partition types is related to the types of predictions, that is, the more flexible the partition types are, the more the types of predictions are, but the higher the coding complexity is, the coding performance and complexity are considered comprehensively in the embodiment, and two types of partition modes are proposed: the first type is 28 division types which cover the horizontal direction, the vertical direction, the diagonal direction from the upper right to the lower left and the diagonal direction from the upper left to the lower right, wherein, each direction has 7 division types, the division types in the horizontal direction and the vertical direction are collectively called rectangular division, and the division types in the diagonal direction from the upper right to the lower left and the diagonal direction from the upper left to the lower right are collectively called triangular division; the second type is that 7 partition types with L-shaped upper left and 7 partition types with L-shaped upper right are included, and the two partition modes are that the current coding block is divided into two sub-blocks: one sub-block is a square block, and the other sub-block is an L-shaped block formed by two adjacent rectangular blocks.
For the sake of easy understanding, the following describes the process of performing the above steps 1) to 5) for the above two division modes in detail with reference to two embodiments.
Example one
The video intra-frame coding method combining the direction prediction and the block copy prediction provided by the embodiment comprises the following steps:
firstly, determining a division type.
In this embodiment, the plurality of partition types are 28 partition types in total, which cover a horizontal direction, a vertical direction, a diagonal direction from top right to bottom left, and a diagonal direction from top left to bottom right.
Marking 7 divisions in the horizontal direction as H1-H7, and 7 divisions in the vertical direction as V1-V7; the 7 kinds of divisions in the diagonal direction from the upper right to the lower left are denoted as T1 to T7, and the 7 kinds of divisions in the diagonal direction from the upper left to the lower right are denoted as D1 to D7.
FIG. 2 shows the division of V1, V2, \ 8230;, V7. A square in V1 represents a current coding block, the square is divided into a left rectangle and a right rectangle, the heights of the two rectangles are the same, and the width of the left rectangle accounts for 1/8 of the width of the whole square; the width of the right rectangle accounts for 7/8 of the width of the whole square; in V2, a square is divided into a left rectangle and a right rectangle, the heights of the two rectangles are the same, and the width of the left rectangle accounts for 2/8 of the width of the whole square; the width of the right rectangle accounts for 6/8 of the width of the whole square; similarly, the width of the left rectangle in V7 accounts for 7/8 of the width of the whole square; the width of the right rectangle accounts for 1/8 of the width of the whole square. H1, H2, \ 8230;, H7 corresponds to V1, V2, \ 8230;, V7, except that the former is horizontal and the latter is vertical. The H1, H2, \ 8230;, H7 division is shown in FIG. 3.
The diagonal direction division from the upper right to the lower left in the triangular division is described, and the T1, T2, T3 and T4 divide a square into an isosceles right triangle at the upper left corner and the rest part at the lower right corner; t5, T6 and T7 divide the remaining part of the isosceles right triangle that divides a square into the lower right corner and the upper left corner. As shown in fig. 4, in the T1 division, the base side length of the isosceles right triangle is 1/4 of the side length of the square; in the T2 division, the length of the bottom side of the isosceles right triangle is 2/4 of the length of the square side; in the same way of T4 division, the length of the bottom side of the isosceles right triangle is 4/4 of the length of the square side, namely equal to the length of the square side. The T5, T6, T7 divisions are similar to the divisions T1 to T4. D1, D2, \ 8230, D7, with a division T1, T2, \ 8230, the T7 division is symmetrical about the vertical direction, as shown in fig. 5.
And secondly, after the current coding block is divided according to the division template of the division type, intra Block Copy (IBC) prediction needs to be carried out on all the sub blocks.
The search range needs to be determined prior to the search, and may be less than or equal to the reconstructed portion of the current frame. If the search range is set to be larger, the search complexity is higher, and meanwhile, a better prediction value can be found for the current block. The search is started after the search range is determined,
the present embodiment employs a full search, i.e. for each reference block within the search range, a prediction error with each sub-block is calculated, e.g. (SAD, sum of absolute differences). Since the optimal prediction mode needs to be determined later by RDO (Rate Distortion Optimization), SAD of different shapes between the reference block and the current encoding block is calculated here.
Fig. 6 is a schematic diagram of a certain step in the IBC process, where a rectangular area (i.e. a rectangular area where a current coding Block is located) shown by a dotted line is an un-coded portion, a peripheral portion thereof is a reconstructed portion in the current frame, the current coding Block is searched within a search range to reach one of blocks, and arrows indicate BV (Block Vector, which represents a coordinate difference between a reference Block and a current Block, and is similar to a Motion Vector during inter-frame Motion estimation, i.e. a Motion Vector, and hereinafter, BV is represented by MV, which is a customary expression. As can be seen from the foregoing, there are 28 division modes in the current coding block, each division mode divides the current coding block into two sub-blocks, and the SAD of each sub-block needs to be calculated, so that the SAD of 56 division blocks plus the SAD of the whole coding block needs to be calculated, namely 57 division modes. Since the sum of the two sub-block SADs obtained by each of the 28 kinds of divisions is equal to the SAD of the entire block, 29 SADs are actually calculated (the remaining 28 SADs can be obtained by subtracting the SAD of the corresponding small block from the SAD of the large block).
After each reference block in the search range is searched, the minimum prediction error and corresponding optimal motion vector of each sub-block in each partition are obtained, and the following steps are performed:
the optimal motion vectors MV of the upper and lower sub-blocks of the 1 st partition type H1 in the horizontal direction are respectively recorded as MV _ IBC _ H1_1 and MV _ IBC _ H1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ H1_1 and SAD _ IBC _ H1_2; by analogy, the optimal motion vectors MV of the upper and lower sub-blocks of the 7 th partition type H7 are respectively recorded as MV _ IBC _ H7_1 and MV _ IBC _ H7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ H7_1 and SAD _ IBC _ H7_2;
the optimal motion vectors MV of the left sub-block and the right sub-block of the 1 st division type V1 in the vertical direction are respectively recorded as MV _ IBC _ V1_1 and MV _ IBC _ V1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ V1_1 and SAD _ IBC _ V1_2; by analogy, the optimal motion vectors MV of the two sub-blocks at the left and right of the 7 th partition type V7 are respectively recorded as MV _ IBC _ V7_1 and MV _ IBC _ V7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ V7_1 and SAD _ IBC _ V7_2;
the optimal motion vectors MV of the upper left sub-block and the lower right sub-block of the 1 st division type T1 in the diagonal direction from the upper right to the lower left are respectively denoted as MV _ IBC _ T1_1 and MV _ IBC _ T1_2, and the corresponding prediction errors are denoted as SAD _ IBC _ T1_1 and SAD _ IBC _ T1_2; by analogy, the optimal motion vectors MV of the upper left sub-block and the lower right sub-block of the 7 th division type T7 are respectively recorded as MV _ IBC _ T7_1 and MV _ IBC _ T7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ T7_1 and SAD _ IBC _ T7_2;
the optimal motion vectors MV of the two sub-blocks at the upper right and lower left of the 1 st division type D1 in the diagonal direction from the upper left to the lower right are respectively recorded as MV _ IBC _ D1_1 and MV _ IBC _ D1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ D1_1 and SAD _ IBC _ D1_2; by analogy, the optimal motion vectors MV of the upper right sub-block and the lower left sub-block of the 7 th partition type T7 are denoted as MV _ IBC _ D7_1 and MV _ IBC _ D7_2, respectively, and the corresponding prediction errors are denoted as SAD _ IBC _ D7_1 and SAD _ IBC _ D7_2.
And thirdly, carrying out DIP prediction on all the subblocks to obtain the optimal prediction direction of each subblock, and recording the prediction error of each subblock, which is obtained by predicting the optimal prediction direction.
The DIP prediction is to determine the optimal prediction direction in 35 intra-frame predictions of HEVC, and because the optimal partition mode of the current coding unit cannot be determined before RDO is performed, we need to find the optimal prediction direction for each part in each partition, and record the SAD of each part in the optimal prediction direction at the same time. Calculating a prediction error (i.e., SAD) of each sub-block between the prediction block and the current coding block after the prediction value of each direction is generated; as can be seen from the foregoing, it is necessary to calculate the SAD of 56 divided sub-blocks plus the SAD of the entire coding block, i.e., 57 kinds.
After completing the traversal of 35 prediction directions, the minimum prediction error and corresponding intra prediction direction of each sub-block in each partition are obtained, and marked as follows:
the optimal prediction directions of the upper and lower sub-blocks of the 1 st partition type H1 in the horizontal direction are respectively recorded as Mode _ DIP _ H1_1 and Mode _ DIP _ H1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ H1_1 and SAD _ DIP _ H1_2; by analogy, the optimal prediction directions of the upper and lower sub-blocks of the 7 th partition type H7 are respectively denoted as Mode _ DIP _ H7_1 and Mode _ DIP _ H7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ H7_1 and SAD _ DIP _ H7_2;
the optimal prediction directions of the left and right sub-blocks of the 1 st partition type V1 in the vertical direction are respectively recorded as Mode _ DIP _ V1_1 and Mode _ DIP _ V1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ V1_1 and SAD _ DIP _ V1_2; by analogy, the optimal prediction directions of the left and right sub-blocks of the 7 th partition type H7 are respectively recorded as Mode _ DIP _ V7_1 and Mode _ DIP _ V7_2, and the corresponding prediction errors are recorded as SAD _ DIP _ V7_1 and SAD _ DIP _ V7_2;
the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 1 st partition type T1 in the diagonal direction from the upper right to the lower left are respectively denoted as Mode _ DIP _ T1_1 and Mode _ DIP _ T1_2, and the corresponding prediction errors are denoted as SAD _ DIP _ T1_1 and SAD _ DIP _ T1_2; by analogy, the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 7 th partition type T7 are respectively denoted as Mode _ DIP _ T7_1 and Mode _ DIP _ T7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ T7_1 and SAD _ DIP _ T7_2;
the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 1 st division type D1 in the diagonal direction from the top left to the bottom right are respectively recorded as Mode _ DIP _ D1_1 and Mode _ DIP _ D1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ D1_1 and SAD _ DIP _ D1_2; by analogy, the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 7 th partition type T7 are respectively denoted as Mode _ DIP _ D7_1 and Mode _ DIP _ D7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ D7_1 and SAD _ DIP _ D7_2.
And fourthly, determining the optimal partition and the corresponding prediction combination in all partition types through the fast Rate Distortion Optimization (RDO).
Determining the partition and prediction combination with the minimum total cost in 7 partition types in the horizontal direction, the vertical direction, the diagonal direction from the top right to the bottom left and the diagonal direction from the top left to the bottom right respectively, wherein the process is as follows:
of the 7 division types in the horizontal directions H1 to H7, there are 14 combinations, and the corresponding costs are:
in the above formula, i =1, 2., 7; λ is a lagrange multiplier determined by a parameter specified by the encoder, and the Bits function is an estimate of the number of Bits consumed for entropy coding the MV and DIP directions; finding out the minimum combination of C _ H _ i _1 and C _H _i _, 2, and marking as C _ H _ k1_ p1, and marking the corresponding prediction mode as (k 1, p 1), wherein k1 is one number of 1 to 7, which indicates that the partition type is Hk1; p1 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that the left part performs IBC prediction, the right part performs DIP prediction, and 2 is the opposite;
in the 7 division types of the vertical directions V1 to V7, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination of C _ V _ i _1 and C _V _i _ _2from the above formula, and marking as C _ V _ k2_ p2, and marking as (k 2, p 2) the corresponding prediction mode, wherein k2 is one number from 1 to 7, which indicates that the division type is Vk2; p2 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that IBC prediction is carried out on the upper part, DIP prediction is carried out on the lower part, and 2 is vice versa;
in 7 divisions of the diagonal directions T1 to T7 from the top right to the bottom left, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination of C _ T _ i _1 and C _T _i _2 from the above formula, marking as C _ T _ k3_ p3, marking the corresponding prediction mode as (k 3, p 3), wherein k3 is one number from 1 to 7, and indicating that the partition type is Tk3; p3 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that IBC prediction is carried out on the upper left part, DIP prediction is carried out on the lower right part, and the other way is vice versa;
in the 7 divisions of the diagonal directions D1 to D7 from the top left to the bottom right, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination in C _ D _ i _1 and C _D _i _ _2from the above formula, and marking as C _ D _ k4_ p4, and marking as (k 4, p 4) the corresponding prediction mode, wherein k4 is one of 1 to 7, which indicates that the division type is Dk4; p4 is one of 1 to 2, indicating the prediction combination mode, 1 means that IBC prediction is carried out on the upper right part, DIP prediction is carried out on the lower left part, and the other way is not carried out on 2.
And fifthly, comparing the coding cost of IBC prediction of the current coding block, the coding cost of DIP prediction of the current coding block and the coding cost of optimal division and corresponding prediction combination through complete RDO, and selecting the prediction mode with the minimum coding cost as the final prediction mode of the current coding block.
Carrying out DIP prediction on a current coding block, and recording the coding cost calculated by complete RDO as C _ DIP;
IBC prediction is carried out on the current coding block, and the coding cost calculated through complete RDO is recorded as C _ IBC;
for the horizontal direction, byPrediction modes (k 1, p 1) based on the corresponding motion vectors MV _ IBC _ Hk1_ p1 and intra prediction directionsGenerating a prediction block of the current block by the partitioning type Hk1, and recording the coding cost calculated by the complete RDO as C _ H; wherein, the first and the second end of the pipe are connected with each other,
for the vertical direction, from the prediction mode (k 2, p 2), according to the corresponding motion vector MV _ IBC _ Vk2_ p2, intra prediction directionDividing the type Vk2 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ V; wherein the content of the first and second substances,
for diagonal directions from top right to bottom left, the prediction modes (k 3, p 3) predict directions in the frame according to the corresponding motion vectors MV _ IBC _ Tk3_ p3And dividing the type Tk3 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ T; wherein the content of the first and second substances,
for diagonal directions from top left to bottom right, the intra prediction direction is determined by the prediction mode (k 4, p 4) according to the corresponding motion vector MV _ IBC _ Dk4_ p4And dividing the type Dk4 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ D;
and comparing the sizes of the C _ DIP, the C _ IBC, the C _ H, the C _ V, the C _ T and the C _ D, and taking the prediction mode corresponding to the minimum coding cost as the final prediction mode of the current coding block.
Example two
The video intra-frame coding method combining the direction prediction and the block copy prediction provided by the embodiment comprises the following steps:
firstly, determining a division type.
In this embodiment, the plurality of partition types include 7 partition types of L-shaped upper left and 7 partition types of L-shaped upper right.
Recording 7 division types with L-shaped upper left as L1-L7, and recording 7 division types with L-shaped upper right as R1-R7;
FIG. 7 shows the division of L1, L2, \ 8230;, L7. In the L1, a square is divided into an upper left L-shaped square and a lower right square, and the width of the upper left L-shaped square accounts for 1/8 of the width of the whole square; the width of the lower right square accounts for 7/8 of the width of the whole square; in the L2, one square is divided into an upper left L-shaped square and a lower right square, and the width of the upper left L-shaped square accounts for 2/8 of the width of the whole square; the width of the lower right square accounts for 6/8 of the width of the whole square; similarly, one square in the L7 is divided into an upper left L-shaped square and a lower right square, and the width of the upper left L-shaped square accounts for 7/8 of the width of the whole square; the width of the lower right square accounts for 1/8 of the width of the whole square. R1, R2, \ 8230, R7 has a division symmetrical to L1, L2, \ 8230, L7 division with respect to the vertical direction, as shown in FIG. 8.
And secondly, after the current coding block is divided according to the division template of the division type, intra-frame block copy (IBC) prediction needs to be carried out on all sub-blocks.
The calculation principle of this step is consistent with that of the second step in the first embodiment, and therefore, the description is omitted, and the difference between the two steps is mainly that the marks of the sub-blocks are not consistent.
In this embodiment, after the search of each reference block in the search range is completed, the minimum prediction error and the corresponding optimal motion vector of each sub-block in each partition are obtained, and the following flags are performed:
the optimal motion vectors MV of the upper left sub-block and the lower right sub-block of the 1 st division type L1 in the L type at the upper left are respectively recorded as MV _ IBC _ L1_1 and MV _ IBC _ L1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ L1_1 and SAD _ IBC _ L1_2; by analogy, the optimal motion vectors MV of the two sub-blocks at the upper left and the lower right of the 7 th division type L7 are respectively recorded as MV _ IBC _ L7_1 and MV _ IBC _ L7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ L7_1 and SAD _ IBC _ L7_2;
the optimal motion vectors MV of the upper right sub-block and the lower left sub-block of the 1 st division type R1 in the L type at the upper right are respectively recorded as MV _ IBC _ R1_1 and MV _ IBC _ R1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ R1_1 and SAD _ IBC _ R1_2; by analogy, the optimal motion vectors MV of the two sub-blocks at the upper right and lower left of the 7 th division type R7 are respectively denoted as MV _ IBC _ R7_1 and MV _ IBC _ R7_2, and the corresponding prediction errors are denoted as SAD _ IBC _ R7_1 and SAD _ IBC _ R7_2.
And thirdly, carrying out DIP prediction on all the subblocks to obtain the optimal prediction direction of each subblock, and recording the prediction error of each subblock, which is obtained by predicting the optimal prediction direction.
The calculation principle of this step is consistent with that of the second step in the first embodiment, and therefore, the description is omitted, and the difference between the two steps is mainly that the marks of the sub-blocks are not consistent.
In this embodiment, after traversing 35 prediction directions, the minimum prediction error and the corresponding intra-frame prediction direction of each sub-block in each partition are obtained, and the following flags are performed:
the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 1 st partition type L1 in the L-type at the upper left are respectively recorded as Mode _ DIP _ L1_1 and Mode _ DIP _ L1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ L1_1 and SAD _ DIP _ L1_2; by analogy, the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 7 th partition type L7 are respectively denoted as Mode _ DIP _ L7_1 and Mode _ DIP _ L7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ L7_1 and SAD _ DIP _ L7_2;
the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 1 st partition type R1 in the L-type at the upper right are respectively recorded as Mode _ DIP _ R1_1 and Mode _ DIP _ R1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ R1_1 and SAD _ DIP _ R1_2; by analogy, the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 7 th partition type R7 are respectively denoted as Mode _ DIP _ R7_1 and Mode _ DIP _ R7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ R7_1 and SAD _ DIP _ R7_2.
And fourthly, determining the optimal partition and the corresponding prediction combination in all partition types through the rapid Rate Distortion Optimization (RDO).
The calculation principle of this step is consistent with that of the second step in the first embodiment, and therefore, the description is omitted, and the difference between the two steps is mainly that the marks of the sub-blocks are not consistent.
In this embodiment, the partition and prediction combination with the minimum overall cost is determined from the 7 partition types of the respective L-type at the top left and the L-type at the top right, and the process is as follows:
in the 7 division types of L-type L1 to L7 at the top left, there are 14 combinations, and the corresponding costs are:
in the above formula, i =1, 2., 7; the Bits function is an estimate of the number of Bits consumed for entropy coding of MV and DIP directions; finding out the minimum combination in C _ L _ i _1 and C _L _i _ _2, marking as C _ L _ k1_ p1, marking as (k 1, p 1) the corresponding prediction mode, wherein k1 is one number from 1 to 7, and indicating that the division type is Lk1; p1 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that the upper left L-shaped part is subjected to IBC prediction, the lower right square part is subjected to DIP prediction, and 2 is the opposite;
in the 7 division types of L-type R1 to R7 at the top right, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination in C _ R _ i _1 and C _R _i _ _2, and marking as C _ R _ k2_ p2, and marking as (k 2, p 2) the corresponding prediction mode, wherein k2 is a number from 1 to 7, and the division position is Rk2; p2 is one of 1 to 2, indicating the prediction combination mode, 1 means that the upper right L-shaped part is subjected to IBC prediction, the lower left square part is subjected to DIP prediction, and 2 is the opposite.
And fifthly, comparing the coding cost of IBC prediction of the current coding block, the coding cost of DIP prediction of the current coding block and the coding cost of optimal division and corresponding prediction combination through complete RDO, and selecting the prediction mode with the minimum coding cost as the final prediction mode of the current coding block.
The process of this step is the same as the fifth step in the first embodiment, and the difference is only that the marks of some parameters are not consistent; the process of this step is specifically as follows:
carrying out DIP prediction on a current coding block, and recording the coding cost calculated by complete RDO as C _ DIP;
IBC prediction is carried out on the current coding block, and the coding cost calculated by complete RDO is recorded as C _ IBC;
for the partition type with L-shaped upper left, the prediction mode (k 1, p 1) is used to predict the direction in the frame according to the corresponding motion vector MV _ IBC _ Lk1_ p1Dividing the type Lk1 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ L; wherein the content of the first and second substances,
for the partition type with L-shaped upper right, the prediction mode (k 2, p 2) is used to predict the direction in the frame according to the corresponding motion vector MV _ IBC _ Rk2_ p2And dividing the type Rk2 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ R; wherein the content of the first and second substances,
and comparing the sizes of the C _ DIP, the C _ IBC, the C _ L and the C _ R, and taking the prediction mode corresponding to the minimum coding cost as the final prediction mode of the current coding block.
In the two embodiments of the present invention, the coding block is divided into two sub-blocks by a flexible block division manner, so that the prediction content of the same block can simultaneously include local information and non-local information, and then the RDO determines the prediction with the minimum cost for each block. Meanwhile, the combination of the rapid RDO and the complete RDO is designed, and the coding complexity is reduced on the premise of not influencing the coding performance. The overall effect is to achieve higher compression efficiency without substantially increasing the complexity at the decoding end.
To further illustrate, the effects of the above-described embodiment were also tested based on the first embodiment. The test conditions included: intra Configuration (AI), quantization Step (QP) is set to {22, 27, 32, 37} and the search range is | mv x |+|mv y |&128, the number of frames tested is 5 frames, the software based on is HM12.0, the test sequence is the generic test sequence of HEVC (Class F is not included because it is a SCC sequence). There are two groups of comparative experiments: the first is the comparison of performance of HM12.0 itself with that of HM12.0 after the IBC technique has been integrated; the second set is a comparison of the performance of the HM12.0 integrated IBC technique with the HM12.0 integrated with our technique. The two sets of experimental results are shown in fig. 9, wherein the first column of fig. 9 is the name of the test sequence, the second column is the first set of experimental results, the third column is the second set of experimental results, and the last two rows are the complexity variation of the encoding side and the decoding side. It can be seen that the scheme proposed by the present invention can obtain a 2.1% code rate saving with respect to the HM, and can obtain a 0.9% code rate saving with respect to the HM integrated with IBC, and the decoding complexity is substantially unchanged.
Through the above description of the embodiments, it is clear to those skilled in the art that the above embodiments can be implemented by software, and can also be implemented by software plus a necessary general hardware platform. With this understanding, the technical solutions of the embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments of the present invention.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for video intra-coding with combined directional prediction and block copy prediction, comprising:
dividing a current coding block by utilizing a predefined division template containing a plurality of division types, wherein each division type divides the current coding block into two sub-blocks;
intra block copy IBC prediction for all sub-blocks: determining a search range of IBC prediction, then IBC prediction is carried out on all subblocks by utilizing each reference block in the search range, the optimal motion vector of each subblock is determined, and a prediction error obtained by predicting the optimal motion vector of each subblock is recorded;
carrying out DIP prediction on all the subblocks to obtain the optimal prediction direction of each subblock, and recording the prediction error of each subblock, which is obtained by predicting the optimal prediction direction; the DIP prediction is direction prediction;
after prediction errors of all subblocks under IBC prediction and DIP prediction are obtained, determining optimal division and corresponding prediction combinations in all division types through rapid Rate Distortion Optimization (RDO);
and through complete RDO comparison, the coding cost of IBC prediction on the current coding block, the coding cost of DIP prediction on the current coding block and the coding cost of optimal division and corresponding prediction combination are selected, and the prediction mode with the minimum coding cost is selected as the final prediction mode of the current coding block.
2. The method of claim 1, wherein the plurality of partition types comprise:
the method comprises the following steps of (1) covering 28 division types of a horizontal direction, a vertical direction, a diagonal direction from top right to bottom left and a diagonal direction from top left to bottom right, wherein each direction has 7 division types, the division types of the horizontal direction and the vertical direction are collectively called rectangular division, and the division types of the diagonal direction from top right to bottom left and the diagonal direction from top left to bottom right are collectively called triangular division;
or, the two partitioning modes include 7 partitioning types with an L-shape at the top left and 7 partitioning types with an L-shape at the top right, where both partitioning modes are to partition the current coding block into two sub-blocks: one sub-block is a square block, and the other sub-block is an L-shaped block formed by two adjacent rectangular blocks.
3. The method of claim 2, wherein if the plurality of partition types are 28 partition types including horizontal, vertical, diagonal from top right to bottom left, and diagonal from top left to bottom right, determining the optimal motion vector for each sub-block during IBC prediction for all sub-blocks, and recording the prediction error of each sub-block from optimal motion vector prediction comprises:
marking 7 divisions in the horizontal direction as H1-H7, and 7 divisions in the vertical direction as V1-V7; 7 types of partitions in the diagonal direction from the upper right to the lower left are recorded as T1 to T7, and 7 types of partitions in the diagonal direction from the upper left to the lower right are recorded as D1 to D7;
after each reference block in the search range is searched, the minimum prediction error and corresponding optimal motion vector of each sub-block in each partition are obtained, and the following steps are performed:
the optimal motion vectors MV of the upper and lower sub-blocks of the 1 st partition type H1 in the horizontal direction are respectively recorded as MV _ IBC _ H1_1 and MV _ IBC _ H1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ H1_1 and SAD _ IBC _ H1_2; by analogy, the optimal motion vectors MV of the upper and lower sub-blocks of the 7 th division type H7 are respectively recorded as MV _ IBC _ H7_1 and MV _ IBC _ H7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ H7_1 and SAD _ IBC _ H7_2;
the optimal motion vectors MV of the left sub-block and the right sub-block of the 1 st division type V1 in the vertical direction are respectively recorded as MV _ IBC _ V1_1 and MV _ IBC _ V1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ V1_1 and SAD _ IBC _ V1_2; by analogy, the optimal motion vectors MV of the two sub-blocks at the left and right of the 7 th partition type V7 are respectively recorded as MV _ IBC _ V7_1 and MV _ IBC _ V7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ V7_1 and SAD _ IBC _ V7_2;
the optimal motion vectors MV of the upper left sub-block and the lower right sub-block of the 1 st division type T1 in the diagonal direction from the upper right to the lower left are respectively recorded as MV _ IBC _ T1_1 and MV _ IBC _ T1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ T1_1 and SAD _ IBC _ T1_2; by analogy, the optimal motion vectors MV of the upper left sub-block and the lower right sub-block of the 7 th division type T7 are respectively recorded as MV _ IBC _ T7_1 and MV _ IBC _ T7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ T7_1 and SAD _ IBC _ T7_2;
the optimal motion vectors MV of the upper right sub-block and the lower left sub-block of the 1 st division type D1 in the diagonal direction from the upper left to the lower right are respectively denoted as MV _ IBC _ D1_1 and MV _ IBC _ D1_2, and the corresponding prediction errors are denoted as SAD _ IBC _ D1_1 and SAD _ IBC _ D1_2; by analogy, the optimal motion vectors MV of the upper right sub-block and the lower left sub-block of the 7 th partition type T7 are denoted as MV _ IBC _ D7_1 and MV _ IBC _ D7_2, respectively, and the corresponding prediction errors are denoted as SAD _ IBC _ D7_1 and SAD _ IBC _ D7_2.
4. The method of claim 3, wherein the DIP prediction is performed on all sub-blocks to obtain an optimal prediction direction of each sub-block, and the recording of the prediction error of each sub-block obtained by the optimal prediction direction prediction comprises:
the DIP prediction is that the optimal prediction direction is determined in 35 kinds of intra-frame prediction of HEVC, and after a predicted value in each direction is generated, the prediction error of each sub-block between a predicted block and a current coding block is calculated; after completing the traversal of 35 prediction directions, the minimum prediction error and corresponding intra prediction direction of each sub-block in each partition are obtained, and the following labels are performed:
the optimal prediction directions of the upper and lower sub-blocks of the 1 st partition type H1 in the horizontal direction are respectively recorded as Mode _ DIP _ H1_1 and Mode _ DIP _ H1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ H1_1 and SAD _ DIP _ H1_2; by analogy, the optimal prediction directions of the upper and lower sub-blocks of the 7 th partition type H7 are respectively recorded as Mode _ DIP _ H7_1 and Mode _ DIP _ H7_2, and the corresponding prediction errors are recorded as SAD _ DIP _ H7_1 and SAD _ DIP _ H7_2;
the optimal prediction directions of the left and right sub-blocks of the 1 st partition type V1 in the vertical direction are respectively recorded as Mode _ DIP _ V1_1 and Mode _ DIP _ V1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ V1_1 and SAD _ DIP _ V1_2; by analogy, the optimal prediction directions of the left and right sub-blocks of the 7 th partition type H7 are respectively recorded as Mode _ DIP _ V7_1 and Mode _ DIP _ V7_2, and the corresponding prediction errors are recorded as SAD _ DIP _ V7_1 and SAD _ DIP _ V7_2;
the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 1 st partition type T1 in the diagonal direction from the upper right to the lower left are respectively denoted as Mode _ DIP _ T1_1 and Mode _ DIP _ T1_2, and the corresponding prediction errors are denoted as SAD _ DIP _ T1_1 and SAD _ DIP _ T1_2; by analogy, the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 7 th partition type T7 are respectively recorded as Mode _ DIP _ T7_1 and Mode _ DIP _ T7_2, and the corresponding prediction errors are recorded as SAD _ DIP _ T7_1 and SAD _ DIP _ T7_2;
the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 1 st partition type D1 in the diagonal direction from the upper left to the lower right are respectively denoted as Mode _ DIP _ D1_1 and Mode _ DIP _ D1_2, and the corresponding prediction errors are denoted as SAD _ DIP _ D1_1 and SAD _ DIP _ D1_2; by analogy, the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 7 th partition type T7 are denoted as Mode _ DIP _ D7_1 and Mode _ DIP _ D7_2, respectively, and the corresponding prediction errors are denoted as SAD _ DIP _ D7_1 and SAD _ DIP _ D7_2.
5. The method of claim 4, wherein the determining the optimal partition and corresponding prediction combination among all partition types by fast Rate Distortion Optimization (RDO) comprises:
determining the partition and prediction combination with the minimum total cost in 7 partition types in the horizontal direction, the vertical direction, the diagonal direction from the top right to the bottom left and the diagonal direction from the top left to the bottom right respectively, wherein the process is as follows:
of the 7 division types in the horizontal direction H1 to H7, there are 14 combinations, and the corresponding costs are:
in the above formula, i =1, 2., 7; lambda is Lagrange multiplier determined by a parameter specified by an encoder, and a Bits function is an estimation of bit number consumption required by entropy coding in MV and DIP directions; finding out the minimum combination in C _ H _ i _1 and C _H _i _2, marking as C _ H _ k1_ p1, marking as (k 1, p 1) the corresponding prediction mode, wherein k1 is one number from 1 to 7, and indicating that the division type is Hk1; p1 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that the left part performs IBC prediction, the right part performs DIP prediction, and 2 is the opposite;
in the 7 division types of the vertical directions V1 to V7, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination of C _ V _ i _1 and C _V _i _ _2from the above formula, and marking as C _ V _ k2_ p2, and marking as (k 2, p 2) the corresponding prediction mode, wherein k2 is one number from 1 to 7, which indicates that the division type is Vk2; p2 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that IBC prediction is carried out on the upper part, DIP prediction is carried out on the lower part, and 2 is vice versa;
in the 7 divisions of the diagonal directions T1 to T7 from the top right to the bottom left, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination in C _ T _ i _1 and C _T _i _ _2from the above formula, and marking as C _ T _ k3_ p3, and marking as (k 3, p 3) the corresponding prediction mode, wherein k3 is one number from 1 to 7, which indicates that the division type is Tk3; p3 is one of 1 to 2, which indicates a prediction combination mode, wherein 1 means that IBC prediction is carried out on the upper left part, DIP prediction is carried out on the lower right part, and the other way is not carried out on the right part;
in 7 divisions of the diagonal directions D1 to D7 from top left to bottom right, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination of C _ D _ i _1 and C _D _i _2 from the above formula, and marking as C _ D _ k4_ p4, and marking the corresponding prediction mode as (k 4, p 4), wherein k4 is one number of 1 to 7, which indicates that the partition type is Dk4; p4 is one of numbers 1 to 2, indicating the prediction combination mode, 1 means that IBC prediction is carried out on the upper right part, DIP prediction is carried out on the lower left part, and 2 is the reverse.
6. The method of claim 5, wherein the selecting the prediction mode with the lowest coding cost as the final prediction mode of the current coding block comprises:
carrying out DIP prediction on a current coding block, and recording the coding cost calculated by complete RDO as C _ DIP;
IBC prediction is carried out on the current coding block, and the coding cost calculated by complete RDO is recorded as C _ IBC;
for the horizontal direction, the prediction mode (k 1, p 1) is based on the corresponding motion vector MV _ IBC _ Hk1_ p1, intra prediction directionGenerating a prediction block of the current block by the partitioning type Hk1, and recording the coding cost calculated by the complete RDO as C _ H; wherein the content of the first and second substances,
for the vertical direction, from the prediction mode (k 2, p 2), according to the corresponding motion vector MV _ IBC _ Vk2_ p2, intra prediction directionGenerating a prediction block of the current block by the division type Vk2, and recording the coding cost calculated by the complete RDO as C _ V; wherein the content of the first and second substances,
for diagonal directions from top right to bottom left, the intra prediction direction is determined by the prediction mode (k 3, p 3) according to the corresponding motion vector MV _ IBC _ Tk3_ p3And dividing the type Tk3 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ T; wherein the content of the first and second substances,
for diagonal directions from top left to bottom right, the intra prediction direction is determined by the prediction mode (k 4, p 4) according to the corresponding motion vector MV _ IBC _ Dk4_ p4And dividing the type Dk4 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ D;
and comparing the sizes of the C _ DIP, the C _ IBC, the C _ H, the C _ V, the C _ T and the C _ D, and taking the prediction mode corresponding to the minimum coding cost as the final prediction mode of the current coding block.
7. The method of claim 2, wherein if the plurality of partition types include 7 partition types with an L-shaped upper left and 7 partition types with an L-shaped upper right, determining an optimal motion vector for each sub-block when performing IBC prediction on all sub-blocks, and recording a prediction error of each sub-block, which is predicted by the optimal motion vector, comprises:
recording 7 division types with L-shaped upper left as L1-L7, and recording 7 division types with L-shaped upper right as R1-R7;
after the search of each reference block in the search range is completed, the minimum prediction error and the corresponding optimal motion vector of each sub-block in each partition are obtained, and the following marks are carried out:
the optimal motion vectors MV of the upper left sub-block and the lower right sub-block with the upper left being the 1 st division type L1 in the L type are respectively recorded as MV _ IBC _ L1_1 and MV _ IBC _ L1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ L1_1 and SAD _ IBC _ L1_2; by analogy, the optimal motion vectors MV of the two sub-blocks at the upper left and the lower right of the 7 th division type L7 are respectively recorded as MV _ IBC _ L7_1 and MV _ IBC _ L7_2, and the corresponding prediction errors are recorded as SAD _ IBC _ L7_1 and SAD _ IBC _ L7_2;
the optimal motion vectors MV of the upper right sub-block and the lower left sub-block with the upper right being the 1 st division type R1 in the L type are respectively recorded as MV _ IBC _ R1_1 and MV _ IBC _ R1_2, and the corresponding prediction errors are recorded as SAD _ IBC _ R1_1 and SAD _ IBC _ R1_2; by analogy, the optimal motion vectors MV of the two sub-blocks at the upper right and lower left of the 7 th partition type R7 are respectively denoted as MV _ IBC _ R7_1 and MV _ IBC _ R7_2, and the corresponding prediction errors are denoted as SAD _ IBC _ R7_1 and SAD _ IBC _ R7_2.
8. The method of claim 7, wherein the DIP prediction is performed on all sub-blocks to obtain an optimal prediction direction of each sub-block, and the recording of the prediction error of each sub-block obtained by the optimal prediction direction prediction comprises:
the DIP prediction is that the optimal prediction direction is determined in 35 kinds of intra-frame prediction of HEVC, and after a predicted value in each direction is generated, the prediction error of each sub-block between a predicted block and a current coding block is calculated; after completing the traversal of 35 prediction directions, the minimum prediction error and corresponding intra prediction direction of each sub-block in each partition are obtained, and marked as follows:
the optimal prediction directions of the upper left sub-block and the lower right sub-block of the 1 st partition type L1 in the L-type at the upper left are respectively recorded as Mode _ DIP _ L1_1 and Mode _ DIP _ L1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ L1_1 and SAD _ DIP _ L1_2; by analogy, the optimal prediction directions of the two sub-blocks at the upper left and the lower right of the 7 th division type L7 are respectively recorded as Mode _ DIP _ L7_1 and Mode _ DIP _ L7_2, and the corresponding prediction errors are recorded as SAD _ DIP _ L7_1 and SAD _ DIP _ L7_2;
the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 1 st partition type R1 in the L-type at the upper right are respectively recorded as Mode _ DIP _ R1_1 and Mode _ DIP _ R1_2, and the corresponding prediction errors are recorded as SAD _ DIP _ R1_1 and SAD _ DIP _ R1_2; by analogy, the optimal prediction directions of the upper right sub-block and the lower left sub-block of the 7 th partition type R7 are respectively denoted as Mode _ DIP _ R7_1 and Mode _ DIP _ R7_2, and the corresponding prediction errors are denoted as SAD _ DIP _ R7_1 and SAD _ DIP _ R7_2.
9. The method of claim 8, wherein determining the optimal partition and corresponding prediction combination among all partition types by fast Rate Distortion Optimization (RDO) comprises:
determining the partitioning and predicting combination with the minimum overall cost in the 7 respective partitioning types of the L-type at the upper left and the L-type at the upper right, wherein the process is as follows:
in the 7 division types of L-type L1 to L7 at the top left, there are 14 combinations, and the corresponding costs are:
in the above formula, i =1, 2., 7; the Bits function is an estimate of the number of Bits consumed for entropy coding of MV and DIP directions; finding out the minimum combination of C _ L _ i _1 and C _L _i _2, marking as C _ L _ k1_ p1, marking the corresponding prediction mode as (k 1, p 1), wherein k1 is one number of 1 to 7, and indicating that the division type is Lk1; p1 is one of 1 to 2, which indicates the prediction combination mode, 1 means that the upper left L-shaped part performs IBC prediction, the lower right square part performs DIP prediction, and 2 is the opposite;
in the 7 division types of L-type R1 to R7 at the top right, there are 14 combinations, and the corresponding costs are:
finding out the minimum combination in C _ R _ i _1 and C _R _i _ _2, and marking as C _ R _ k2_ p2, and marking as (k 2, p 2) the corresponding prediction mode, wherein k2 is a number from 1 to 7, and the division position is Rk2; p2 is one of 1 to 2, indicating the prediction combination mode, 1 means that the upper right L-shaped part is subjected to IBC prediction, the lower left square part is subjected to DIP prediction, and 2 is the opposite.
10. The method of claim 9, wherein the selecting the prediction mode with the lowest coding cost as the final prediction mode of the current coding block comprises:
carrying out DIP prediction on a current coding block, and recording the coding cost calculated by complete RDO as C _ DIP;
IBC prediction is carried out on the current coding block, and the coding cost calculated through complete RDO is recorded as C _ IBC;
for the partition type with L-shaped upper left, the prediction mode (k 1, p 1) is used to predict the direction in the frame according to the corresponding motion vector MV _ IBC _ Lk1_ p1Dividing the type Lk1 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ L; wherein the content of the first and second substances,
for the partition type with L-shaped upper right, the prediction mode (k 2, p 2) is used according to the corresponding motion vector MV _ IBC _ Rk2_ p2 and the intra-frame prediction directionAnd dividing the type Rk2 to generate a prediction block of the current block, and recording the coding cost calculated by the complete RDO as C _ R; wherein the content of the first and second substances,
and comparing the sizes of the C _ DIP, the C _ IBC, the C _ L and the C _ R, and taking the prediction mode corresponding to the minimum coding cost as the final prediction mode of the current coding block.
CN201610795564.8A 2016-08-31 2016-08-31 A kind of bonding position prediction and block replicate the video intra-frame encoding method of prediction Active CN106375764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610795564.8A CN106375764B (en) 2016-08-31 2016-08-31 A kind of bonding position prediction and block replicate the video intra-frame encoding method of prediction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610795564.8A CN106375764B (en) 2016-08-31 2016-08-31 A kind of bonding position prediction and block replicate the video intra-frame encoding method of prediction

Publications (2)

Publication Number Publication Date
CN106375764A CN106375764A (en) 2017-02-01
CN106375764B true CN106375764B (en) 2018-04-10

Family

ID=57899784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610795564.8A Active CN106375764B (en) 2016-08-31 2016-08-31 A kind of bonding position prediction and block replicate the video intra-frame encoding method of prediction

Country Status (1)

Country Link
CN (1) CN106375764B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3991430A4 (en) * 2020-04-09 2022-08-31 Tencent America LLC Intra coding with l-type partitioning tree

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107155108B (en) * 2017-06-19 2019-07-12 电子科技大学 A kind of intra-frame prediction method based on brightness change
CN111385581B (en) * 2018-12-28 2022-04-26 杭州海康威视数字技术股份有限公司 Coding and decoding method and equipment thereof
WO2020182052A1 (en) * 2019-03-11 2020-09-17 Huawei Technologies Co., Ltd. An encoder, a decoder and corresponding methods restricting size of sub-partitions from intra sub-partition coding mode tool
CN113924778A (en) * 2019-06-03 2022-01-11 北京字节跳动网络技术有限公司 Intra block copy with triangle partitioning
CN113924783A (en) * 2019-06-03 2022-01-11 北京字节跳动网络技术有限公司 Combined intra and intra block copy prediction for video coding
CN113950838A (en) * 2019-06-06 2022-01-18 北京字节跳动网络技术有限公司 Sub-block based intra block copy
CN110312130B (en) * 2019-06-25 2021-10-15 浙江大华技术股份有限公司 Inter-frame prediction and video coding method and device based on triangular mode
CN114830651A (en) * 2020-11-17 2022-07-29 Oppo广东移动通信有限公司 Intra prediction method, encoder, decoder, and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595118A (en) * 2011-01-14 2012-07-18 华为技术有限公司 Prediction method and predictor in encoding and decoding
JP2013021507A (en) * 2011-07-11 2013-01-31 Jvc Kenwood Corp Image decoder, image decoding method and image decoding program
CN103609121A (en) * 2011-06-20 2014-02-26 高通股份有限公司 Unified merge mode and adaptive motion vector prediction mode candidates selection
CN103929641A (en) * 2014-05-12 2014-07-16 北京工商大学 Intra-frame encoding method based on virtual reference frame
CN105493507A (en) * 2013-08-27 2016-04-13 高通股份有限公司 Residual prediction for intra block copying

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009126260A1 (en) * 2008-04-11 2009-10-15 Thomson Licensing Methods and apparatus for template matching prediction (tmp) in video encoding and decoding
CN101715135B (en) * 2009-09-30 2013-01-09 武汉大学 Template matching based method for encoding self-adaption intra-frame prediction filtering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595118A (en) * 2011-01-14 2012-07-18 华为技术有限公司 Prediction method and predictor in encoding and decoding
CN103609121A (en) * 2011-06-20 2014-02-26 高通股份有限公司 Unified merge mode and adaptive motion vector prediction mode candidates selection
JP2013021507A (en) * 2011-07-11 2013-01-31 Jvc Kenwood Corp Image decoder, image decoding method and image decoding program
CN105493507A (en) * 2013-08-27 2016-04-13 高通股份有限公司 Residual prediction for intra block copying
CN103929641A (en) * 2014-05-12 2014-07-16 北京工商大学 Intra-frame encoding method based on virtual reference frame

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Improvements on Intra Block Copy in Natural;Haoming Chen*, Yu-Sheng Chen*, Ming-Ting Sun*;《2015 IEEE International Symposium on Circuits and Systems》;20150527;2772-2775 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3991430A4 (en) * 2020-04-09 2022-08-31 Tencent America LLC Intra coding with l-type partitioning tree
EP4277273A3 (en) * 2020-04-09 2024-01-24 Tencent America LLC Intra coding with l-type partitioning tree

Also Published As

Publication number Publication date
CN106375764A (en) 2017-02-01

Similar Documents

Publication Publication Date Title
CN106375764B (en) A kind of bonding position prediction and block replicate the video intra-frame encoding method of prediction
JP7355894B2 (en) Bit width control method and device for bidirectional optical flow
US11902563B2 (en) Encoding and decoding method and device, encoder side apparatus and decoder side apparatus
WO2017005146A1 (en) Video encoding and decoding method and device
US20110261886A1 (en) Image prediction encoding device, image prediction encoding method, image prediction encoding program, image prediction decoding device, image prediction decoding method, and image prediction decoding program
US11336915B2 (en) Global motion vector video encoding systems and methods
US20130294512A1 (en) Apparatus and method for generating/recovering motion information based on predictive motion vector index encoding, and apparatus and method for image encoding/decoding using same
EP3282701B1 (en) Prediction mode selection method, apparatus and device
US20080002772A1 (en) Motion vector estimation method
JP2007202150A (en) Method of and apparatus for deciding encoding mode for variable block size motion estimation
CN112385211A (en) Motion compensation for video encoding and decoding
CN101888546A (en) Motion estimation method and device
CN116684637B (en) Prediction refinement method, apparatus, and medium using optical flow for encoding video data
CN113615195A (en) Intra block copy for screen content coding and decoding
CN112887732B (en) Method and device for inter-frame and intra-frame joint prediction coding and decoding with configurable weight
US11006143B2 (en) Motion vector candidate pruning systems and methods
Pakdaman et al. Fast and efficient intra mode decision for HEVC, based on dual-tree complex wavelet
EP3791591A1 (en) Method and apparatus for blended intra prediction
CN110475116B (en) Motion vector deriving method and device and electronic equipment
CN105992012B (en) Error concealment method and device
CN111327901A (en) Video encoding method, video encoding device, storage medium and encoding device
WO2020124040A1 (en) Method for deriving constructed affine merge candidates
CN117014627B (en) Bidirectional optical flow method for encoding video signal, computing device and storage medium
US20230096682A1 (en) Systems and Methods for Low Resolution Motion Estimation Searches
WO2021129627A1 (en) Affine prediction method and related devices

Legal Events

Date Code Title Description
C06 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