WO2018040868A1 - 一种视频编码帧内预测方法和装置 - Google Patents

一种视频编码帧内预测方法和装置 Download PDF

Info

Publication number
WO2018040868A1
WO2018040868A1 PCT/CN2017/096632 CN2017096632W WO2018040868A1 WO 2018040868 A1 WO2018040868 A1 WO 2018040868A1 CN 2017096632 W CN2017096632 W CN 2017096632W WO 2018040868 A1 WO2018040868 A1 WO 2018040868A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction
coding block
frame
intra
adjacent
Prior art date
Application number
PCT/CN2017/096632
Other languages
English (en)
French (fr)
Inventor
朱洪波
Original Assignee
北京奇艺世纪科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京奇艺世纪科技有限公司 filed Critical 北京奇艺世纪科技有限公司
Priority to EP17845170.4A priority Critical patent/EP3509305B1/en
Priority to CA3027764A priority patent/CA3027764C/en
Priority to ES17845170T priority patent/ES2884500T3/es
Priority to MYPI2018002693A priority patent/MY184601A/en
Priority to KR1020187037513A priority patent/KR102275830B1/ko
Priority to JP2018560660A priority patent/JP6697582B2/ja
Priority to US16/313,576 priority patent/US10681367B2/en
Priority to SG11201811305WA priority patent/SG11201811305WA/en
Priority to AU2017317847A priority patent/AU2017317847B2/en
Publication of WO2018040868A1 publication Critical patent/WO2018040868A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/436Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation using parallelised computational arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
    • 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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/174Methods 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 slice, e.g. a line of blocks or a group of blocks
    • 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/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • the present application relates to the field of image coding, and in particular to a video coding intra prediction method and apparatus.
  • intra-frame predictive coding has become the mainstream technology for intra-frame block coding.
  • the prediction of the current coding block is obtained by linear prediction from its left adjacent column and the upper adjacent row according to one direction. As shown in FIG.
  • the current coding block is an 8x8 block
  • the pixel shown by the triangle is The left and upper adjacent reference pixels
  • the intra prediction first specifies a direction, and then each row or column in the current block is obtained from its upper left adjacent row according to the direction, as shown in the sixth row, according to The direction shown in the figure is mapped to the pixel position of the upper adjacent row, as shown by the dot in the figure, because these dots are not integer pixels, so they need to be based on their sub-pixel coordinates, according to the known algorithm.
  • the integer pixel which is the triangle pixel shown in the figure, is calculated.
  • An embodiment of the present invention provides a video coding intra prediction method and apparatus, which are used to solve the defect that the prediction precision of a pixel which is far away from a reference reference pixel in a current video coding block is low, and the current video coding block is implemented. High prediction accuracy.
  • the present application discloses a video coding intra prediction method, where Including steps:
  • the video coding performs bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction for the current coding block.
  • the bidirectional prediction further refers to: performing intra-frame left and up direction prediction and right and down direction prediction on the current coding block and weighting the video coding.
  • the intra-frame left and up prediction of the current coding block is performed according to the rightmost column pixel column of the left adjacent coding block and the lowermost pixel row of the adjacent adjacent coding block, and the prediction in the left and upper directions is performed; wherein, when corresponding When there is a pixel column or a pixel row that does not exist, the intra-frame left and upper predictions are only performed according to the existing pixel row or pixel column;
  • the intra-frame right and bottom prediction of the current coding block is performed according to the leftmost column pixel column of the coding block adjacent to the right side and the uppermost pixel row of the adjacent adjacent coding block, and the prediction in the right and the downward direction is performed; wherein, when corresponding When there is a pixel column or a pixel row that does not exist, the intra-frame right and bottom prediction is performed only according to the existing pixel row or pixel column;
  • the predictions that exist in the left and upper directions of the frame and the predictions in the right and down directions are weighted.
  • the first coding block from left to right is a first coding block
  • the second coding block from left to right is a second coding block
  • the first coding block performs intra-frame prediction in the left and upper directions according to the most downlink pixel row of the adjacent coding block and the rightmost column of the left adjacent coding block; and performs the prediction according to the leftmost column pixel column of the second coding block. Prediction in the right and down directions of the frame, and weighting the prediction in the left and upper directions and the prediction in the right and down directions;
  • the second coding block performs intra-frame prediction in the left and upper directions according to the most downlink pixel row of the adjacent coding block and the rightmost column pixel column of the first adjacent coding block; the intra-frame right and downlink predictions are not predicted.
  • the A coding block performs prediction in the left and upper directions of the frame according to the most downlink pixel row of the adjacent coding block and the rightmost column of the left adjacent coding block; and according to the leftmost column pixel column of the B code block
  • the uppermost pixel row of the C coding block performs prediction in the right and lower directions of the frame, and weights the prediction in the left and upper directions of the frame and the prediction in the right and the downward direction;
  • the B-th coding block performs intra-frame prediction in the left and upper directions according to the most downlink pixel row of the adjacent coding block and the right-most column pixel column of the A-coded block; and performs the uplink pixel row according to the D-th coding block. Prediction in the right and down directions of the frame, and weighting the prediction in the left and upper directions and the prediction in the right and down directions;
  • the C coding block performs prediction in the left and upper directions of the frame according to the lowest downlink pixel row of the A coding block and the rightmost column pixel column of the left adjacent coding block; and performs according to the leftmost column pixel column of the D coding block. Prediction in the right and down directions of the frame, and weighting the prediction in the left and upper directions and the prediction in the right and down directions;
  • the D-th coding block performs intra-frame prediction in the left and upper directions according to the pixel block of the rightmost row of the B-th coding block and the right-most column of the C-coded block; the intra-frame right and left predictions are not predicted.
  • the present invention also discloses a video coding intra prediction apparatus, which includes:
  • the intra-frame upper left prediction unit is configured to perform intra-frame left and up direction prediction on the current coding block
  • the intra-frame lower right prediction unit is configured to perform intra-frame right and down direction prediction on the current coded block.
  • the device further comprising:
  • the weighting unit is configured to perform intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block.
  • the intra-frame upper left prediction unit is further configured to perform intra-frame left and up direction prediction according to a rightmost column pixel column of a left adjacent coding block of the current coding block and a lowermost pixel row of the adjacent adjacent coding block. Measured; wherein, when one of the corresponding pixel columns or pixel rows does not exist, the intra-frame left and top predictions are performed only according to the existing pixel rows or pixel columns;
  • the intra-frame lower right prediction unit is further configured to perform intra-frame right and bottom prediction according to the leftmost column pixel column of the right adjacent coding block of the current coding block and the highest uplink pixel row of the adjacent adjacent coding block; When one of the corresponding pixel columns or pixel rows does not exist, intra-frame right and bottom prediction is performed only according to the existing pixel row or pixel column.
  • the present application also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • a memory for storing a computer program
  • the processor when used to execute a program stored on the memory, implements any of the above-described video coding intra prediction method steps.
  • the present application also discloses a computer readable storage medium, wherein the computer readable storage medium stores instructions for causing a computer to perform any of the above described video encoding intra prediction method steps when it is run on a computer .
  • the present application also discloses a computer program product comprising instructions, which, when run on a computer, cause the computer to perform any of the above described video encoding intra prediction method steps.
  • a video coding intra prediction method and apparatus performs bidirectional prediction and weighting of intra-frame left and up direction prediction and intra-frame right and down direction prediction on a current coding block at the time of video coding. Since the current coding block is closer to the reference prediction pixel and the prediction correlation is high, the high prediction precision of the current video coding block is achieved, and the coding efficiency is improved.
  • FIG. 1 is a schematic diagram of prior art video coding intra prediction
  • FIG. 2 is a flow chart of steps of an embodiment of a video encoding intra prediction method according to the present application
  • FIG. 3 is a schematic diagram of intra prediction when two horizontally adjacent coding blocks are simultaneously encoded in the video coding of the present application;
  • FIG. 4 is a schematic diagram of intra prediction when four coding blocks adjacent to each other in the video coding of the present application are simultaneously coded;
  • FIG. 5 is a structural block diagram of an embodiment of a video encoding intra prediction apparatus according to the present application.
  • FIG. 6 is a structural block diagram of an embodiment of an electronic device of the present application.
  • the embodiment of the present application provides a video coding intra prediction method.
  • a video coding intra prediction method provided by an embodiment of the present application is introduced below.
  • FIG. 2 a flow chart of steps of a video encoding intra prediction method according to an embodiment of the present application is shown.
  • Step 101 Perform intra-frame left and up direction prediction on the current coding block during video coding
  • Step 102 Perform bidirectional prediction of intra-frame right and down direction prediction on the current coding block.
  • Step 103 Weighting the intra-frame left and up direction prediction and the intra-frame right and down direction prediction of the coding block.
  • the step of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • the rightmost column pixel column of the coding block adjacent to the left of the current coding block and the last downlink pixel row of the adjacent adjacent coding block are present, the rightmost column pixel column of the coding block adjacent to the left of the current coding block is used. And the lowermost pixel row of the adjacent coded block above is predicted in the left and upper directions of the frame;
  • intra-frame left and upper prediction are performed according to the existing pixel row or pixel column.
  • the frame right and bottom are only performed according to the existing pixel row or pixel column. prediction.
  • the intra-frame left and up prediction of the current coding block is performed according to the rightmost column pixel column of the left adjacent coding block and the lowermost pixel row of the adjacent adjacent coding block, and the prediction in the left and upper directions is performed; Wherein, when one of the corresponding pixel columns or pixel rows does not exist, intra-frame left and up prediction is performed only according to the existing pixel row or pixel column; when the corresponding pixel column or pixel row does not exist, no intra-frame is performed Left and up forecast.
  • the code block adjacent to the left or the code adjacent to the upper side is illustrated. If the blocks exist, the prediction in the left and upper directions of the frame can be performed according to the rightmost column pixel column of the left adjacent coding block and the lowermost pixel row of the adjacent adjacent coding block.
  • the rightmost column pixel column of the code block adjacent to the left of the current coding block does not exist, it indicates that the code block adjacent to the left side does not exist, and the current code block is likely to be the leftmost code block of the image frame, so that it can be based only on The lowermost pixel row of the adjacent adjacent coding block performs prediction in the left and upper directions of the frame.
  • the last downlink pixel row of the adjacent coding block above the current coding block does not exist, it indicates that the adjacent coding block does not exist above, and the current coding block is likely to be the uppermost coding block of the image frame, so that it can be based only on The rightmost column of pixel columns of the left adjacent coded block is predicted in the left and upper directions of the frame.
  • the current coding block is likely to be the coding block of the top left corner of the image frame, then the intra-frame left and up prediction may not be performed.
  • the intra-frame right and bottom prediction of the current coding block is performed according to the leftmost column pixel column of the coding block adjacent to the right side and the uppermost pixel row of the adjacent adjacent coding block, and the prediction in the right and the downward direction is performed; wherein, when corresponding When there is a pixel column or a pixel row that does not exist, the intra-frame right and bottom prediction is performed only according to the existing pixel row or pixel column; when the corresponding pixel column and the pixel row do not exist, the intra-frame right and bottom are not performed. prediction.
  • the leftmost column of pixel blocks of the code block adjacent to the right of the current coding block is below and below
  • the uppermost pixel row of the adjacent coding block it indicates that the code block adjacent to the right or the code block adjacent to the right exists, and then the leftmost column of pixels and the lower phase of the code block adjacent to the right side may be
  • the uppermost pixel row of the adjacent coded block is predicted in the right and down directions of the frame.
  • the leftmost column pixel column of the code block adjacent to the right of the current coding block does not exist, it indicates that the code block adjacent to the right side does not exist, and the current code block is likely to be the rightmost code block of the image frame, so that it can be based only on The uppermost pixel row of the adjacent coded block below is predicted in the right and down directions of the frame.
  • the last uplink pixel row of the adjacent coding block below the current coding block does not exist, it indicates that the adjacent coding block does not exist below, and the current coding block is likely to be the lowest coding block of the image frame, so that it can be based only on The leftmost column of pixel columns of the code block adjacent to the right is predicted in the right and down directions in the frame.
  • the leftmost column pixel column of the coding block adjacent to the right of the current coding block and the most uplink pixel row of the adjacent adjacent coding block are not present, it indicates that the code block adjacent to the right and the code block adjacent to the lower side are not There is, the current coding block is likely to be the coding block of the bottom right corner of the image frame, then the intra-frame right and down predictions may not be performed.
  • bidirectional prediction and weighting of intra-frame left and up direction prediction and intra-frame right and down direction prediction are performed on the current coding block at the time of video coding. Since the current coding block is closer to the reference prediction pixel and the prediction correlation is high, the high prediction precision of the current video coding block is achieved, and the coding efficiency is improved.
  • the current coding block is two horizontally adjacent coding blocks, where the first coding block from left to right is the first coding block, and the second from the left to the right.
  • the coding block is a second coding block;
  • the foregoing steps of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block include:
  • For the first coding block performing prediction in the left and upper directions of the frame according to the most downlink pixel row of the adjacent coding block and the rightmost column of the left adjacent coding block; and according to the leftmost column pixel of the second coding block
  • the column performs prediction in the right and down directions of the frame
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent coding block and the rightmost column pixel column of the first adjacent coding block.
  • FIG. 3 there is shown a schematic diagram of intra-frame prediction when horizontally adjacent two coding blocks are simultaneously encoded in the video coding of the present application. That is, the current coding block includes two horizontally adjacent coding blocks.
  • the first coding block from left to right is the first coding block
  • the second coding block from left to right is the first coding block.
  • the second coding block; T0 is the first downlink block of the first coding block and the upper adjacent coding block of the second coding block.
  • T0 is a known reference pixel row
  • L0 is a left adjacent coding block of the first coding block.
  • the rightmost column of pixels, in this embodiment L0 is a known reference pixel column
  • R1 is the rightmost column of pixels of the first coding block
  • L2 is the leftmost column of pixels of the second coding block.
  • the prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row T0 of the adjacent adjacent coding block and the rightmost column pixel column L0 of the left adjacent coding block;
  • the leftmost column pixel column L2 of the two coded block performs prediction in the right and down directions in the frame, and weights the prediction in the left and upper directions in the frame and the prediction in the right and left directions;
  • the prediction in the left and upper directions of the frame is performed according to the last downlink pixel row T0 of the adjacent adjacent coding block and the rightmost column pixel column R1 of the first adjacent coding block; The next prediction is not predicted.
  • dir0 is the current prediction direction
  • P(L0, T0, dir0) indicating that L0 and T0 are used as references
  • an intra prediction vector for R1 is generated in the direction of dir0.
  • P(L2, dir0) indicates that L2 is used as a reference vector to generate a prediction of R1 in the direction of dir0.
  • q is a constant, which is greater than 0 and less than 1, indicating a weighted prediction, that is, the prediction of R1 is derived from the known L0 and T0 and the L2 weighted prediction on the right.
  • Rsdl0 and rsdl1 are residual vectors, which are obtained after the first coding block minus the prediction residual is subjected to DCT transform, quantization, inverse quantization and inverse DCT transform, and the prediction of L2 is generated according to R1 and T0.
  • the formula 2 is substituted into the formula 1.
  • the solution equation can be used to solve R1.
  • R1 and T0 the second coding block can be obtained, and L2 is also obtained.
  • the first coded block is then solved.
  • rsdl0 is the source pixel block of the first coding block minus its intra prediction block, and then transform-quantization-inverse quantization-inverse transformation is performed to obtain a reconstructed residual block, and then the rightmost column is obtained. Rsdl0.
  • Rsdl1 is the source block of the second code block minus its intra prediction block, and then transform-quantize-inverse-inverse-inverse transform to obtain the reconstructed residual block, and then take the leftmost column, which is rsdl1.
  • P(L0, T0, dir0) in the first formula indicates that the prediction of the first code block generated by L0 and T0 according to the direction dir0 takes the rightmost column
  • P(L2, dir0) represents the prediction generated by L2 and direction dir0. Take the rightmost column
  • P(R1, T0, dir1) indicates that the prediction of the second code block generated by R1 and T0 according to the direction dir1 takes the leftmost column.
  • the above is the intra prediction performed under the condition that the residual vector and the left and upper pixel sources are already available.
  • the bidirectional prediction and the weighting of the intra-frame left and up direction prediction and the intra-frame right and down direction prediction are performed on the current coding block, and since the current coding block is close to the reference prediction pixel, the prediction correlation is high, so The high prediction accuracy of the current video coding block and the encoding of two horizontally adjacent coding blocks can be performed at the same time, which further improves the coding efficiency.
  • the current coding block is four adjacent coding blocks, and the upper left coding block is the A coding block, the upper right coding block is the B coding block, and the lower left coding block is the first coding block.
  • the C coding block and the lower right coding block are D code blocks;
  • the foregoing steps of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block include:
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent adjacent coding block and the rightmost column of the left adjacent coding block; and according to the B coding block
  • the leftmost pixel row and the uppermost pixel row of the Cth encoding block are predicted in the right and the lower direction of the frame;
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent code block and the rightmost column pixel column of the A-code block; and the highest-order pixel according to the D-code block Lines are predicted in the right and down directions of the frame;
  • the prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row of the A coding block and the rightmost column pixel column of the left adjacent coding block; and according to the leftmost column pixel of the D coding block
  • the column performs prediction in the right and down directions of the frame
  • the prediction in the left and upper directions of the frame is performed based on the pixel block of the rightmost row of the B-th code block and the pixel column of the rightmost column of the C-code block.
  • the current coding block includes four adjacent coding blocks of up, down, left, and right.
  • the upper left coding block is the A coding block
  • the upper right coding block is the B coding block
  • the lower left coding block is the C coding block
  • the right The lower coded block is the D code block.
  • T0 is the lowermost pixel row of the upper adjacent coding block of the A coding block and the B coding block.
  • T0 is a known reference pixel row;
  • L0 is the left adjacent coding of the A coding block and the C coding block.
  • L0 is a known reference pixel column
  • R1 is the rightmost column pixel column of the A code block
  • B1 is the last row pixel row of the A code block
  • L2 is the B code block
  • B2 is the lowermost row of pixels of the Bth coded block
  • T3 is the most upstream row of pixels of the Cth coded block
  • R3 is the rightmost column of pixels of the Cth coded block
  • L4 is the Dth coded block The leftmost column of pixels
  • T4 is the most upstream row of pixels of the D-coded block.
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row T0 of the adjacent code block and the rightmost column pixel column L0 of the left adjacent code block; and according to the B code
  • the leftmost column pixel column L2 of the block and the uppermost pixel row T3 of the Cth coding block perform prediction in the right and down directions in the frame and weight the intraframe left and up direction prediction and the right and down direction prediction.
  • prediction in the left and upper directions of the frame is performed according to the most downlink pixel row T0 of the adjacent adjacent coding block and the rightmost column pixel column R1 of the A-coded block; and according to the D-code
  • the uppermost pixel row T4 of the block performs prediction in the right and bottom directions of the frame, and the left and upper sides of the frame
  • the prediction is weighted to the prediction and the right and down directions.
  • prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row B1 of the A coding block and the rightmost column pixel column L0 of the left adjacent coding block; and according to the D coding
  • the leftmost column pixel column L4 of the block performs prediction in the right and down directions in the frame, and weights the prediction in the left and upper directions and the prediction in the right and left directions.
  • prediction in the left and upper directions of the frame is performed according to the lowermost pixel row B2 of the B-th encoding block and the pixel column R3 of the rightmost column of the C-coded block; the intra-frame right and left predictions are not performed. prediction.
  • rsdl2 and rsdl3 are residual vectors.
  • For the A-coded block obtain bidirectional prediction of one of its dir2s, then subtract the source block from the prediction block to obtain a residual block, and then perform DCT on the residual block. After the quantization-inverse quantization-IDCT operation, the reconstructed residual block is obtained, and then the bottom row of the residual block is rsdl2, and the rightmost column is rsdl3.
  • P(L0, T0, dir2) itself represents the prediction of the A-coded block generated by L0 and T0 according to the direction dir2, but in Equation 1 of the present embodiment, it actually represents the A-th generated by L0 and T0 according to the direction dir2.
  • the prediction of the coding block takes the bottom row, and P(L0, T0, dir2) in the second equation indicates that the prediction of the A-coded block generated by L0 and T0 according to the direction dir2 takes the rightmost column.
  • the formulas of the Bth code block, the Cth code block, and the D code block can be listed.
  • the B code block its prediction is obtained by the upper left prediction of R1, T0 and the lower right prediction of T4.
  • the formula is as follows:
  • the C-coded block it is also a bidirectional prediction, that is, from the L0, B1 upper left prediction and the L4 lower right prediction weight from, the formula is as follows:
  • the D-coded block uses unidirectional prediction, that is, the upper left prediction of B2 and R3, and the formula is as follows:
  • the above is the intra prediction performed under the condition that the residual vector and the left and upper pixel sources are already available.
  • the bidirectional prediction and the weighting of the intra-frame left and up direction prediction and the intra-frame right and down direction prediction are performed on the current coding block, and since the current coding block is close to the reference prediction pixel, the prediction correlation is high, so The high prediction accuracy of the current video coding block, and the encoding blocks of four upper, lower, left and right adjacent codes can be simultaneously encoded, thereby further improving the coding efficiency.
  • the embodiment of the present application further provides a video coding intra prediction apparatus.
  • a video coding intra prediction apparatus according to an embodiment of the present invention is introduced below.
  • FIG. 5 a block diagram of a video encoding intra prediction apparatus of the present application is shown.
  • the video coding intra prediction apparatus 1 of this embodiment includes: an intra-frame upper left prediction unit 2, an intra-frame lower right prediction unit 3, and a weighting unit 4, where:
  • the intra-frame upper left prediction unit 2 is configured to perform intra-frame left and up direction prediction on the current coding block; for example, a right-most column pixel column and an upper adjacent coding block of the coding block adjacent to the left of the current coding block
  • the prediction in the left and upper directions of the frame is performed according to the rightmost column pixel column of the left adjacent coding block of the current coding block and the last downlink pixel row of the adjacent adjacent coding block;
  • the intra-frame left and upper predictions are only performed according to the existing pixel rows or pixel columns; when the corresponding pixel columns and pixel rows are not present, no frame is performed.
  • Internal left and upper prediction Internal left and upper prediction;
  • the intra-frame lower right prediction unit 3 is configured to perform intra-frame right and down direction prediction on the current coding block; for example, a leftmost column of pixel columns and a code adjacent to the lower side of the coding block adjacent to the right of the current coding block
  • the prediction in the right and the bottom direction is performed according to the leftmost column pixel column of the coding block adjacent to the right of the current coding block and the most upstream pixel row of the adjacent adjacent coding block;
  • the intra-frame right and bottom prediction is performed only according to the existing pixel row or pixel column; when the corresponding pixel column and the pixel row do not exist, the intra-frame right is not performed. Forecast.
  • the weighting unit 4 is configured to weight the prediction result of the intra-frame left and up direction prediction output by the intra-frame upper left prediction unit 2 and the prediction result of the intra-frame right and down direction prediction output by the intra-frame lower right prediction unit 3.
  • the video coding intra prediction apparatus in this embodiment is used to implement the corresponding video coding intra prediction method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
  • An embodiment of the present invention further provides an electronic device, as shown in FIG. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus, wherein the processor 601, the communication interface 602, and the memory 603 are completed through the communication bus 604. Communication with each other,
  • the processor 601 is configured to perform the following steps when executing the program stored on the memory 603:
  • the obtained prediction results are weighted.
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard structure (Extended Industry) Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above electronic device and other devices.
  • the memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
  • RAM random access memory
  • NVM non-volatile memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the electronic device performs bidirectional prediction and weighting on the intra-frame left and up direction prediction and the intra-frame right and down direction prediction on the current coding block during video coding. Since the current coding block is closer to the reference prediction pixel and the prediction correlation is high, the high prediction precision of the current video coding block is achieved, and the coding efficiency is improved.
  • the step of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • the rightmost column pixel column of the coding block adjacent to the left of the current coding block and the last downlink pixel row of the adjacent adjacent coding block are present, the rightmost column pixel column of the coding block adjacent to the left of the current coding block is used. And the lowermost pixel row of the adjacent coded block above is predicted in the left and upper directions of the frame;
  • intra-frame left and upper prediction are performed according to the existing pixel row or pixel column.
  • the leftmost column pixel column of the coding block adjacent to the right of the current coding block and the most uplink pixel row of the adjacent adjacent coding block are present, the leftmost column pixel column of the coding block adjacent to the right of the current coding block is And the uppermost pixel row of the adjacent coded block below is predicted in the right and the bottom of the frame;
  • the frame right and bottom are only performed according to the existing pixel row or pixel column. prediction.
  • the current coding block may be two horizontally adjacent coding blocks, where the first coding block from left to right is the first coding block, and the second coding block from left to right is the second coding block. ;
  • the foregoing steps of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • For the first coding block performing prediction in the left and upper directions of the frame according to the most downlink pixel row of the adjacent coding block and the rightmost column of the left adjacent coding block; and according to the leftmost column pixel of the second coding block
  • the column performs prediction in the right and down directions of the frame
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent coding block and the rightmost column pixel column of the first adjacent coding block.
  • the current coding block may be four adjacent coding blocks, and the upper left coding block is the A coding block, the upper right coding block is the B coding block, the lower left coding block is the C coding block, and the lower right coding block is the lower right coding block. Is the D code block;
  • the foregoing steps of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • the prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row of the adjacent code block and the rightmost column pixel column of the adjacent code block; and the leftmost column pixel of the B code block The column and the uppermost pixel row of the C code block are predicted in the right and the bottom of the frame;
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent code block and the rightmost column pixel column of the A-code block; and the highest-order pixel according to the D-code block Lines are predicted in the right and down directions of the frame;
  • the prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row of the A coding block and the rightmost column pixel column of the left adjacent coding block; and according to the leftmost column pixel of the D coding block
  • the column performs prediction in the right and down directions of the frame
  • the pixel column performs prediction in the left and upper directions of the frame.
  • a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform any of the above embodiments
  • the video encoding intra prediction method
  • the above video coding intra prediction method may include the following steps:
  • the obtained prediction results are weighted.
  • the current coding block is subjected to bidirectional prediction and weighting in the intra-frame left and up direction prediction and the intra-frame right and down direction prediction at the time of video coding. Since the current coding block is closer to the reference prediction pixel and the prediction correlation is high, the high prediction precision of the current video coding block is achieved, and the coding efficiency is improved.
  • the step of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • the rightmost column pixel column of the coding block adjacent to the left of the current coding block and the last downlink pixel row of the adjacent adjacent coding block are present, the rightmost column pixel column of the coding block adjacent to the left of the current coding block is used. And the lowermost pixel row of the adjacent coded block above is predicted in the left and upper directions of the frame;
  • intra-frame left and upper prediction are performed according to the existing pixel row or pixel column.
  • the leftmost column pixel column of the coding block adjacent to the right of the current coding block and the most uplink pixel row of the adjacent adjacent coding block are present, the leftmost column pixel column of the coding block adjacent to the right of the current coding block is And the uppermost pixel row of the adjacent coded block below is predicted in the right and the bottom of the frame;
  • the frame right and bottom are only performed according to the existing pixel row or pixel column. prediction.
  • the current coding block may be two horizontally adjacent coding blocks, where the first coding block from left to right is the first coding block, and the second coding block from left to right is the second coding block. ;
  • the foregoing steps of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • For the first coding block performing prediction in the left and upper directions of the frame according to the most downlink pixel row of the adjacent coding block and the rightmost column of the left adjacent coding block; and according to the leftmost column pixel of the second coding block
  • the column performs prediction in the right and down directions of the frame
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent coding block and the rightmost column pixel column of the first adjacent coding block.
  • the current coding block may be four adjacent coding blocks, and the upper left coding block is the A coding block, the upper right coding block is the B coding block, the lower left coding block is the C coding block, and the lower right coding block is the lower right coding block. Is the D code block;
  • the foregoing steps of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • the prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row of the adjacent code block and the rightmost column pixel column of the adjacent code block; and the leftmost column pixel of the B code block The column and the uppermost pixel row of the C code block are predicted in the right and the bottom of the frame;
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent code block and the rightmost column pixel column of the A-code block; and the highest-order pixel according to the D-code block Lines are predicted in the right and down directions of the frame;
  • the prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row of the A coding block and the rightmost column pixel column of the left adjacent coding block; and according to the leftmost column pixel of the D coding block
  • the column performs prediction in the right and down directions of the frame
  • the prediction in the left and upper directions of the frame is performed based on the pixel block of the rightmost row of the B-th code block and the pixel column of the rightmost column of the C-code block.
  • a computer program including instructions is also provided And, when run on a computer, cause the computer to perform the video encoding intra prediction method of any of the above embodiments.
  • the above video coding intra prediction method may include the following steps:
  • the obtained prediction results are weighted.
  • the current coding block is subjected to bidirectional prediction and weighting in the intra-frame left and up direction prediction and the intra-frame right and down direction prediction at the time of video coding. Since the current coding block is closer to the reference prediction pixel and the prediction correlation is high, the high prediction precision of the current video coding block is achieved, and the coding efficiency is improved.
  • the step of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • the rightmost column pixel column of the coding block adjacent to the left of the current coding block and the last downlink pixel row of the adjacent adjacent coding block are present, the rightmost column pixel column of the coding block adjacent to the left of the current coding block is used. And the lowermost pixel row of the adjacent coded block above is predicted in the left and upper directions of the frame;
  • intra-frame left and upper prediction are performed according to the existing pixel row or pixel column.
  • the leftmost column pixel column of the coding block adjacent to the right of the current coding block and the most uplink pixel row of the adjacent adjacent coding block are present, the leftmost column pixel column of the coding block adjacent to the right of the current coding block is And the uppermost pixel row of the adjacent coded block below is predicted in the right and the bottom of the frame;
  • the frame right and bottom are only performed according to the existing pixel row or pixel column. prediction.
  • the current coding block may be two horizontally adjacent coding blocks, where the first coding block from left to right is the first coding block, and the second coding block from left to right is the second coding block. ;
  • the steps to predict may include:
  • For the first coding block performing prediction in the left and upper directions of the frame according to the most downlink pixel row of the adjacent coding block and the rightmost column of the left adjacent coding block; and according to the leftmost column pixel of the second coding block
  • the column performs prediction in the right and down directions of the frame
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent coding block and the rightmost column pixel column of the first adjacent coding block.
  • the current coding block may be four adjacent coding blocks, and the upper left coding block is the A coding block, the upper right coding block is the B coding block, the lower left coding block is the C coding block, and the lower right coding block is the lower right coding block. Is the D code block;
  • the foregoing steps of performing bidirectional prediction of intra-frame left and up direction prediction and intra-frame right and down direction prediction on the current coding block may include:
  • the prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row of the adjacent code block and the rightmost column pixel column of the adjacent code block; and the leftmost column pixel of the B code block The column and the uppermost pixel row of the C code block are predicted in the right and the bottom of the frame;
  • the prediction in the left and upper directions of the frame is performed according to the most downlink pixel row of the adjacent code block and the rightmost column pixel column of the A-code block; and the highest-order pixel according to the D-code block Lines are predicted in the right and down directions of the frame;
  • the prediction in the left and upper directions of the frame is performed according to the lowest downlink pixel row of the A coding block and the rightmost column pixel column of the left adjacent coding block; and according to the leftmost column pixel of the D coding block
  • the column performs prediction in the right and down directions of the frame
  • the prediction in the left and upper directions of the frame is performed based on the pixel block of the rightmost row of the B-th code block and the pixel column of the rightmost column of the C-code block.
  • the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present invention are generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or Other programmable devices.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Landscapes

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

Abstract

本申请提供一种视频编码帧内预测方法和装置,其中,方法包括:对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测,得到预测结果;对得到的预测结果进行加权。由于当前编码块与参考预测像素距离较近,预测相关性高,因此可以实现视频编码过程中帧内预测的高精度预测,从而可以提高编码效率。

Description

一种视频编码帧内预测方法和装置
本申请要求于2016年8月31日提交中国专利局、申请号为201610799819.8、发明名称为“一种视频编码帧内预测方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像编码领域,特别是涉及一种视频编码帧内预测方法和装置。
背景技术
从H.264高度压缩数字视频编解码标准开始,帧内方向预测编码成了视频帧内块编码的主流技术。在这种技术中,当前编码块的预测从其左相邻列和上相邻行根据一个方向进行直线预测得到,如图1所示,当前编码块是一个8x8的块,三角形所示像素是其左、上相邻参考像素,帧内预测首先规定一个方向,然后当前块中的每一行或列,就根据这个方向从其左上相邻行列中获得,如图所示的第六行,根据如图所示方向就映射到上相邻行的像素位置,如图中圆点所示,因为这些圆点并不是整像素点,所以它们需要根据其子像素坐标,通过插值算法根据已知的整像素点,即图中所示三角形像素点计算得出。
现有的这种帧内预测存在的一个问题是,因为参考预测像素位于块的左、上相邻位置,而预测相关性是距离越远越低,所以对于当前块中距离较远的右、下像素,则显然预测精度不高,从而降低了编码效率。
如何提供高预测精度的视频编码帧内预测方法和装置成为亟待解决的技术问题。
发明内容
本申请实施例提供一种视频编码帧内预测方法和装置,用以解决现有技术中对于当前视频编码块中距离参考预测像素位较远的像素预测精度低的缺陷,实现当前视频编码块的高预测精度。
为了解决上述问题,本申请公开了一种视频编码帧内预测方法,其中, 包括步骤:
视频编码时对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测。
本发明所述的方法,其中,
所述双向预测进一步是指:视频编码时对当前编码块进行帧内左、上方向预测和右、下方向预测并进行加权。
本发明所述的方法,其中,
当前编码块进行帧内左、上预测是根据其左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内左、上预测;
当前编码块进行帧内右、下预测是根据其右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测;
对帧内左、上方向预测和右、下方向预测都存在的预测进行加权。
本发明所述的方法,其中,
当两个水平相邻的编码块同时进行视频编码时,其中,从左往右数第一个编码块为第一编码块,从左往右数第二个编码块为第二编码块;
第一编码块根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第二编码块的最左列像素列进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
第二编码块根据其上方相邻编码块的最下行像素行以及第一邻编码块的最右列像素列进行帧内左、上方向的预测;帧内右、下预测不进行预测。
本发明所述的方法,其中,
当上下左右四个相邻编码块同时进行视频编码时,其中,左上编码块为第A编码块、右上编码块为第B编码块、左下编码块为第C编码块、右下编码块为第D编码块;
第A编码块根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第B编码块的最左列像素列及第C编码块的最上行像素行进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
第B编码块根据其上方相邻编码块的最下行像素行以及第A编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最上行的像素行进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
第C编码块根据第A编码块的最下行的像素行以及其左方相邻编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最左列像素列进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
第D编码块根据第B编码块最下行像素行以及第C编码块最右列的像素列进行帧内左、上方向的预测;帧内右、下预测不进行预测。
为了解决上述问题,本发明还公开了一种视频编码帧内预测装置,其中,包括:
帧内左上预测单元,用于对当前编码块进行帧内左、上方向预测;
帧内右下预测单元,用于对当前编码块进行帧内右、下方向预测。
所述的装置,其中,还进一步包括:
加权单元,用于对当前编码块进行帧内左、上方向预测和帧内右、下方向预测进行加权。
本发明所述的装置,其中,
帧内左上预测单元,进一步用于根据当前编码块的左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预 测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内左、上预测;
帧内右下预测单元,进一步用于根据当前编码块的右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测。
本申请还公开了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现上述任一视频编码帧内预测方法步骤。
本申请还公开了一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述任一视频编码帧内预测方法步骤。
本申请还公开了一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行上述任一视频编码帧内预测方法步骤。
本申请实施例提供的一种视频编码的帧内预测方法和装置,通过在视频编码时对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测并加权。由于当前编码块与参考预测像素距离较近,预测相关性高,因此实现了对当前视频编码块的高预测精度,提高了编码效率。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍。
图1是现有技术视频编码帧内预测示意图;
图2是本申请一种视频编码帧内预测方法实施例的步骤流程图;
图3是本申请视频编码中水平相邻的两个编码块同时编码时帧内预测的示意图;
图4是本申请视频编码中上下左右相邻的四个编码块同时编码时帧内预测的示意图;
图5是本申请一种视频编码帧内预测装置实施例的结构框图;
图6是本申请一种电子设备实施例的结构框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
为了实现当前视频编码块的高预测精度,提高编码效率,本申请实施例提供了一种视频编码帧内预测方法。
下面对本申请实施例提供的一种视频编码帧内预测方法进行介绍。
参照图2,示出了本申请实施例一种视频编码帧内预测方法的步骤流程图。
本实施例的方法包括以下步骤:
步骤101:视频编码时对当前编码块进行帧内左、上方向预测;
步骤102:对当前编码块进行帧内右、下方向预测的双向预测;
步骤103:将所述编码块的帧内左、上方向预测和帧内右、下方向预测进行加权。
在本实施例中,上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行均存在时,根据所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;
当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行有一个不存在时,根据存在的像素行或者像素列进行帧内左、上预测;
当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行均存在时,根据所述当前编码块右方相邻的编码块的最左 列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;
当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测。
具体来说,当前编码块进行帧内左、上预测是根据其左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内左、上预测;当相应的像素列或者像素行都不存在时,不进行帧内左、上预测。
也就是说,当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行均存在时,说明其左方相邻的编码块或者上方相邻的编码块均存在,那么便可以根据其左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测。当前编码块左方相邻的编码块的最右列像素列不存在时,说明其左方相邻的编码块不存在,当前编码块很可能为图像帧的最左侧的编码块,那么便可以只根据其上方相邻的编码块的最下行像素行进行帧内左、上方向的预测。当前编码块上方相邻的编码块的最下行像素行不存在时,说明其上方相邻的编码块不存在,当前编码块很可能为图像帧的最上方的编码块,那么便可以只根据其左方相邻的编码块的最右列像素列进行帧内左、上方向的预测。当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行均不存在时,说明其左方相邻的编码块及上方相邻的编码块均不存在,当前编码块很可能为图像帧的最左上角的编码块,那么便可以不进行帧内左、上预测。
当前编码块进行帧内右、下预测是根据其右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测;当相应的像素列和者像素行都不存在时,不进行帧内右、下预测。
也就是说,当所述当前编码块右方相邻的编码块的最左列像素列及下方 相邻的编码块的最上行像素行均存在时,说明其右方相邻的编码块或者下方相邻的编码块均存在,那么便可以根据其右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测。当前编码块右方相邻的编码块的最左列像素列不存在时,说明其右方相邻的编码块不存在,当前编码块很可能为图像帧的最右侧的编码块,那么便可以只根据其下方相邻的编码块的最上行像素行进行帧内右、下方向的预测。当前编码块下方相邻的编码块的最上行像素行不存在时,说明其下方相邻的编码块不存在,当前编码块很可能为图像帧的最下方的编码块,那么便可以只根据其右方相邻的编码块的最左列像素列进行帧内右、下方向的预测。当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行均不存在时,说明其右方相邻的编码块及下方相邻的编码块均不存在,当前编码块很可能为图像帧的最右下角的编码块,那么便可以不进行帧内右、下预测。
本方法实施例,通过在视频编码时对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测并加权。由于当前编码块与参考预测像素距离较近,预测相关性高,因此实现了对当前视频编码块的高预测精度,提高了编码效率。
作为本发明实施例的一种实施方式,上述当前编码块为两个水平相邻的编码块,其中,从左往右数第一个编码块为第一编码块,从左往右数第二个编码块为第二编码块;
上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,包括:
针对第一编码块,根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第二编码块的最左列像素列进行帧内右、下方向的预测;
针对第二编码块,根据其上方相邻编码块的最下行像素行以及第一邻编码块的最右列像素列进行帧内左、上方向的预测。
参照图3,示出了本申请视频编码中水平相邻的两个编码块同时编码时帧内预测的示意图。也就是说,当前编码块包括两个水平相邻的编码块。
当该两个水平相邻的编码块同时进行视频编码时,如图3所示,从左往右数第一个编码块为第一编码块;从左往右数第二个编码块为第二编码块;T0是第一编码块和第二编码块的上方相邻编码块的最下行像素行,本实施例中T0为已知参考像素行;L0是第一编码块的左方相邻编码块最右列像素列,本实施例中L0为已知参考像素列;R1是第一编码块最右列像素列;L2是第二编码块最左列像素列。
其中,在对第一编码块进行编码时,根据其上方相邻编码块的最下行像素行T0以及其左方相邻编码块最右列像素列L0进行帧内左、上方向的预测;并根据第二编码块的最左列像素列L2进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
在对第二编码块进行编码时,根据其上方相邻编码块的最下行像素行T0以及第一邻编码块的最右列像素列R1进行帧内左、上方向的预测;帧内右、下预测不进行预测。
具体公式如下:
公式一:R1=P(L0,T0,dir0)*q+(1-q)*P(L2,dir0)+rsdl0
公式二:L2=P(R1,T0,dir1)+rsdl1
其中,P表示帧内预测操作,dir0是当前预测方向,P(L0,T0,dir0),表示使用L0和T0作参考,以dir0为方向产生一个对于R1的帧内预测向量。
P(L2,dir0)表示以L2为参考向量,以dir0为方向产生R1的预测。q是个常量,它大于0小于1,表示加权预测,即R1的预测由已知的L0和T0以及右边的L2加权预测而得。rsdl0和rsdl1是残差向量,它是第一编码块减去预测后得到的残差经过DCT变换、量化、反量化和反DCT变换后得到的,而L2的预测则是根据R1和T0产生。上面两个公式中只有2个未知向量,即R1和L2,将公式二代入公式一,通过解方程即可解出R1,然后根据R1和T0可以得到第二编码块,同时也得到了L2,然后解出第一编码块。
另外,在本实施例中rsdl0就是第一编码块的源像素块减去其帧内预测块,然后变换-量化-反量化-反变换后得到重构残差块,然后取最右一列,就是rsdl0。
rsdl1就是第二编码块的源像素块减去其帧内预测块,然后变换-量化-反量化-反变换后得到重构残差块,然后取最左一列,就是rsdl1。
第一个公式中的P(L0,T0,dir0)表示以L0和T0根据方向dir0产生的第一编码块的预测取最右一列,P(L2,dir0)表示以L2和方向dir0产生的预测取最右一列。P(R1,T0,dir1)表示以R1和T0根据方向dir1生成的第二编码块的预测取最左一列。
以上是在残差向量和左、上像素源已经可用的条件下,进行的帧内预测。
但在初次编码时,我们只有左上相邻行列,以及原始的两个当前像素块,即,第一编码块和第二编码块。这时,我们要先给第一编码块和第二编码块直接生成预测,对于非最后一个块,事实上都是需要双向预测的,这时,我们第一次生成预测时,除了最左上的相邻行列外,其余的全部使用原始像素生成预测,然后加权,然后用源像素减预测,变换-量化-反量化-反变换获得残差的重构,就是rsdl。
通过本实施例,对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测并加权,由于当前编码块与参考预测像素距离较近,预测相关性高,因此实现了对当前视频编码块的高预测精度,且可以同时对两个水平相邻的编码块进行编码,进一步提高了编码效率。
作为本发明实施例的一种实施方式,上述当前编码块为上下左右四个相邻编码块,其中,左上编码块为第A编码块、右上编码块为第B编码块、左下编码块为第C编码块、右下编码块为第D编码块;
上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,包括:
针对第A编码块,根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第B编码块的最 左列像素列及第C编码块的最上行像素行进行帧内右、下方向的预测;
针对第B编码块,根据其上方相邻编码块的最下行像素行以及第A编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最上行的像素行进行帧内右、下方向的预测;
针对第C编码块,根据第A编码块的最下行的像素行以及其左方相邻编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最左列像素列进行帧内右、下方向的预测;
针对第D编码块,根据第B编码块最下行像素行以及第C编码块最右列的像素列进行帧内左、上方向的预测。
参照图4,示出了本申请视频编码中上下左右相邻的四个编码块同时编码时帧内预测的示意图。也就是说,当前编码块包括上下左右四个相邻编码块。
当该上下左右四个相邻编码块同时进行视频编码时,参照图4,其中,左上编码块为第A编码块、右上编码块为第B编码块、左下编码块为第C编码块、右下编码块为第D编码块。
T0是第A编码块和第B编码块的上方相邻编码块的最下行像素行,本实施例中T0为已知参考像素行;L0是第A编码块和第C编码块的左方相邻编码块最右列像素列,本实施例中L0为已知参考像素列;R1为第A编码块的最右列像素列;B1为第A编码块的最下行像素行;L2为第B编码块的最左列像素列;B2为第B编码块的最下行像素行;T3为第C编码块的最上行像素行;R3为第C编码块的最右列像素列;L4为第D编码块的最左列像素列;T4为第D编码块的最上行像素行。
在对第A编码块进行编码时,根据其上方相邻编码块的最下行像素行T0以及其左方相邻编码块最右列像素列L0进行帧内左、上方向的预测;并根据第B编码块的最左列像素列L2及第C编码块的最上行像素行T3进行帧内右、下方向的预测并对帧内左、上方向预测和右、下方向预测进行加权。
在对第B编码块进行编码时,根据其上方相邻编码块的最下行像素行T0以及第A编码块的最右列像素列R1进行帧内左、上方向的预测;并根据第D编码块的最上行的像素行T4进行帧内右、下方向的预测,并对帧内左、上方 向预测和右、下方向预测进行加权。
在对第C编码块进行编码时,根据第A编码块的最下行的像素行B1以及其左方相邻编码块的最右列像素列L0进行帧内左、上方向的预测;并根据第D编码块的最左列像素列L4进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权。
在对第D编码块进行编码时,根据第B编码块最下行像素行B2以及第C编码块最右列的像素列R3进行帧内左、上方向的预测;帧内右、下预测不进行预测。
对于第A编码块,具体公式如下:
公式一:B1=P(L0,T0,dir2)*q2+(1-q2)P(T3,L2,dir2)+rsdl2
公式二:R1=P(L0,T0,dir2)*p2+(1-p2)P(T3,L2,dir2)+rsdl3
此处,rsdl2和rsdl3是残差向量,对于第A编码块,获得它的某一个dir2的双向预测,然后将源块和预测块相减,得到残差块,然后对残差块执行DCT-量化-反量化-IDCT操作后,得到重构的残差块,然后残差块的最底一行就是rsdl2,最右一列为rsdl3。P(L0,T0,dir2)本身表示以L0和T0根据方向dir2产生的第A编码块的预测,但在本实施例的公式一中,它实际表示以L0和T0根据方向dir2产生的第A编码块的预测取最底一行,而第二个公式中的P(L0,T0,dir2)表示以L0和T0根据方向dir2产生的第A编码块的预测取最右一列。
同样的方式,可以列出第B编码块、第C编码块、和第D编码块的公式,对于第B编码块,它的预测由R1、T0的左上预测以及T4的右下预测加权得到,公式如下:
公式三:L2=P(R1,T0,dir3)*q3+(1-q3)*P(T4,dir3)+rsdl4
公式四:B2=P(R1,T0,dir3)*p3+(1-p3)*P(T4,dir3)+rsdl5
对于第C编码块,它也是双向预测,即来自的L0、B1左上预测和来自的L4右下预测加权获得,公式如下:
公式五:T3=P(L0,B1,dir4)*q4+(1-q4)*P(L4,dir4)+rsdl6
公式六:R3=P(L0,B1,dir4)*p4+(1-p4)*P(L4,dir4)+rsdl7
对于第D编码块,它采用单向预测,即B2和R3的左上预测,公式如下:
公式七:T4=P(B2,R3,dir5)+rsdl8
公式八:L4=P(B2,R3,dir5)+rsdl9
本实施例中有8个向量方程式,同时有8个未知向量,所以方程可解。
以上是在残差向量和左、上像素源已经可用的条件下,进行的帧内预测。
但在初次编码时,我们只有左上相邻行列,以及原始的四个当前像素块,即,第A编码块、第B编码块、第C编码块和第D编码块,这时,我们要先给第A编码块、第B编码块、第C编码块和第D编码块直接生成预测,对于非最后一个块,事实上都是需要双向预测的,这时,我们第一次生成预测时,除了最左上的相邻行列外,其余的全部使用原始像素生成预测,然后加权,然后用源像素减预测,变换-量化-反量化-反变换获得残差的重构,就是rsdl。
通过本实施例,对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测并加权,由于当前编码块与参考预测像素距离较近,预测相关性高,因此实现了对当前视频编码块的高预测精度,且可以同时对四个上下左右相邻的编码块进行编码,进一步提高了编码效率。
相应于上述方法实施例,本申请实施例还提供了一种视频编码帧内预测装置。下面对本发明实施例所提供的一种视频编码帧内预测装置进行介绍。
参照图5,示出了本申请一种视频编码帧内预测装置的结构框图。
本实施例的视频编码帧内预测装置1,包括:帧内左上预测单元2、帧内右下预测单元3、加权单元4,其中:
帧内左上预测单元2,用于对当前编码块进行帧内左、上方向预测;例如,用于当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行均存在时,根据当前编码块的左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;其 中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内左、上预测;当相应的像素列和者像素行都不存在时,不进行帧内左、上预测;
帧内右下预测单元3,用于对当前编码块进行帧内右、下方向预测;例如,用于当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行均存在时,根据当前编码块的右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测;当相应的像素列和者像素行都不存在时,不进行帧内右、下预测。
加权单元4,用于对帧内左上预测单元2输出的帧内左、上方向预测的预测结果和帧内右下预测单元3输出的帧内右、下方向预测的预测结果进行加权。
本实施例的视频编码帧内预测装置用于实现前述方法实施例中相应的视频编码帧内预测方法,并且具有相应的方法实施例的有益效果,在此不再赘述。
本发明实施例还提供了一种电子设备,如图6所示,包括处理器601、通信接口602、存储器603和通信总线,其中,处理器601,通信接口602,存储器603通过通信总线604完成相互间的通信,
存储器603,用于存放计算机程序;
处理器601,用于执行存储器603上所存放的程序时,实现如下步骤:
对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测,得到预测结果;
对得到的预测结果进行加权。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry  Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
可见,本申请实施例提供的方案中,电子设备通过在视频编码时对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测并加权。由于当前编码块与参考预测像素距离较近,预测相关性高,因此实现了对当前视频编码块的高预测精度,提高了编码效率。
其中,上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行均存在时,根据所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;
当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行有一个不存在时,根据存在的像素行或者像素列进行帧内左、上预测;
当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行均存在时,根据所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;
当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测。
其中,上述当前编码块可以为两个水平相邻的编码块,其中,从左往右数第一个编码块为第一编码块,从左往右数第二个编码块为第二编码块;
上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
针对第一编码块,根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第二编码块的最左列像素列进行帧内右、下方向的预测;
针对第二编码块,根据其上方相邻编码块的最下行像素行以及第一邻编码块的最右列像素列进行帧内左、上方向的预测。
其中,上述当前编码块可以为上下左右四个相邻编码块,其中,左上编码块为第A编码块、右上编码块为第B编码块、左下编码块为第C编码块、右下编码块为第D编码块;
上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
针对第A编码块,根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第B编码块的最左列像素列及第C编码块的最上行像素行进行帧内右、下方向的预测;
针对第B编码块,根据其上方相邻编码块的最下行像素行以及第A编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最上行的像素行进行帧内右、下方向的预测;
针对第C编码块,根据第A编码块的最下行的像素行以及其左方相邻编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最左列像素列进行帧内右、下方向的预测;
针对第D编码块,根据第B编码块最下行像素行以及第C编码块最右列 的像素列进行帧内左、上方向的预测。
在本发明提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的视频编码帧内预测方法。
其中,上述视频编码帧内预测方法可以包括以下步骤:
对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测,得到预测结果;
对得到的预测结果进行加权。
可见,本申请实施例提供的方案中,在视频编码时对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测并加权。由于当前编码块与参考预测像素距离较近,预测相关性高,因此实现了对当前视频编码块的高预测精度,提高了编码效率。
其中,上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行均存在时,根据所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;
当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行有一个不存在时,根据存在的像素行或者像素列进行帧内左、上预测;
当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行均存在时,根据所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;
当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测。
其中,上述当前编码块可以为两个水平相邻的编码块,其中,从左往右数第一个编码块为第一编码块,从左往右数第二个编码块为第二编码块;
上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
针对第一编码块,根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第二编码块的最左列像素列进行帧内右、下方向的预测;
针对第二编码块,根据其上方相邻编码块的最下行像素行以及第一邻编码块的最右列像素列进行帧内左、上方向的预测。
其中,上述当前编码块可以为上下左右四个相邻编码块,其中,左上编码块为第A编码块、右上编码块为第B编码块、左下编码块为第C编码块、右下编码块为第D编码块;
上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
针对第A编码块,根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第B编码块的最左列像素列及第C编码块的最上行像素行进行帧内右、下方向的预测;
针对第B编码块,根据其上方相邻编码块的最下行像素行以及第A编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最上行的像素行进行帧内右、下方向的预测;
针对第C编码块,根据第A编码块的最下行的像素行以及其左方相邻编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最左列像素列进行帧内右、下方向的预测;
针对第D编码块,根据第B编码块最下行像素行以及第C编码块最右列的像素列进行帧内左、上方向的预测。
在本发明提供的又一实施例中,还提供了一种包含指令的计算机程序产 品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的视频编码帧内预测方法。
其中,上述视频编码帧内预测方法可以包括以下步骤:
对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测,得到预测结果;
对得到的预测结果进行加权。
可见,本申请实施例提供的方案中,在视频编码时对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测并加权。由于当前编码块与参考预测像素距离较近,预测相关性高,因此实现了对当前视频编码块的高预测精度,提高了编码效率。
其中,上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行均存在时,根据所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;
当所述当前编码块左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行有一个不存在时,根据存在的像素行或者像素列进行帧内左、上预测;
当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行均存在时,根据所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;
当所述当前编码块右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测。
其中,上述当前编码块可以为两个水平相邻的编码块,其中,从左往右数第一个编码块为第一编码块,从左往右数第二个编码块为第二编码块;
上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双 向预测的步骤,可以包括:
针对第一编码块,根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第二编码块的最左列像素列进行帧内右、下方向的预测;
针对第二编码块,根据其上方相邻编码块的最下行像素行以及第一邻编码块的最右列像素列进行帧内左、上方向的预测。
其中,上述当前编码块可以为上下左右四个相邻编码块,其中,左上编码块为第A编码块、右上编码块为第B编码块、左下编码块为第C编码块、右下编码块为第D编码块;
上述对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测的步骤,可以包括:
针对第A编码块,根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第B编码块的最左列像素列及第C编码块的最上行像素行进行帧内右、下方向的预测;
针对第B编码块,根据其上方相邻编码块的最下行像素行以及第A编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最上行的像素行进行帧内右、下方向的预测;
针对第C编码块,根据第A编码块的最下行的像素行以及其左方相邻编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最左列像素列进行帧内右、下方向的预测;
针对第D编码块,根据第B编码块最下行像素行以及第C编码块最右列的像素列进行帧内左、上方向的预测。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或 者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (11)

  1. 一种视频编码帧内预测方法,其特征在于,包括:
    视频编码时对当前编码块进行帧内左、上方向预测和帧内右、下方向预测的双向预测。
  2. 根据权利要求1所述的方法,其特征在于,
    所述双向预测进一步是指:视频编码时对当前编码块进行帧内左、上方向预测和右、下方向预测并进行加权。
  3. 根据权利要求1所述的方法,其特征在于,
    当前编码块进行帧内左、上预测是根据当前编码块其左方相邻的编码块的最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内左、上预测;
    当前编码块进行帧内右、下预测是根据其右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测;
    对帧内左、上方向预测和右、下方向预测都存在的预测进行加权。
  4. 根据权利要求3所述的方法,其特征在于,
    当两个水平相邻的编码块同时进行视频编码时,其中,从左往右数第一个编码块为第一编码块,从左往右数第二个编码块为第二编码块;
    第一编码块根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第二编码块的最左列像素列进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
    第二编码块根据其上方相邻编码块的最下行像素行以及第一邻编码块的最右列像素列进行帧内左、上方向的预测;帧内右、下预测不进行预测。
  5. 根据权利要求3所述的方法,其特征在于,
    当上下左右四个相邻编码块同时进行视频编码时,其中,左上编码块为第A编码块、右上编码块为第B编码块、左下编码块为第C编码块、右下编码块为第D编码块;
    第A编码块根据其上方相邻编码块的最下行像素行以及其左方相邻编码块最右列像素列进行帧内左、上方向的预测;并根据第B编码块的最左列像素列及第C编码块的最上行像素行进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
    第B编码块根据其上方相邻编码块的最下行像素行以及第A编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最上行的像素行进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
    第C编码块根据第A编码块的最下行的像素行以及其左方相邻编码块的最右列像素列进行帧内左、上方向的预测;并根据第D编码块的最左列像素列进行帧内右、下方向的预测,并对帧内左、上方向预测和右、下方向预测进行加权;
    第D编码块根据第B编码块最下行像素行以及第C编码块最右列的像素列进行帧内左、上方向的预测;帧内右、下预测不进行预测。
  6. 一种视频编码帧内预测装置,其特征在于,包括:
    帧内左上预测单元,用于对当前编码块进行帧内左、上方向预测;
    帧内右下预测单元,用于对当前编码块进行帧内右、下方向预测。
  7. 根据权利要求6所述的装置,其特征在于,还包括:
    加权单元,用于对当前编码块进行帧内左、上方向预测和帧内右、下方向预测进行加权。
  8. 根据权利要求6或7所述的装置,其特征在于,
    帧内左上预测单元,进一步用于根据当前编码块的左方相邻的编码块的 最右列像素列及上方相邻的编码块的最下行像素行进行帧内左、上方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内左、上预测;
    帧内右下预测单元,进一步用于根据当前编码块的右方相邻的编码块的最左列像素列及下方相邻的编码块的最上行像素行进行帧内右、下方向的预测;其中,当相应的像素列或者像素行有一个不存在时,只根据存在的像素行或者像素列进行帧内右、下预测。
  9. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1-5任一所述的方法步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行权利要求1-5任一项所述的方法步骤。
  11. 一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行权利要求1-5任一项所述的方法步骤。
PCT/CN2017/096632 2016-08-31 2017-08-09 一种视频编码帧内预测方法和装置 WO2018040868A1 (zh)

Priority Applications (9)

Application Number Priority Date Filing Date Title
EP17845170.4A EP3509305B1 (en) 2016-08-31 2017-08-09 Intra-prediction video coding method and device
CA3027764A CA3027764C (en) 2016-08-31 2017-08-09 Intra-prediction video coding method and device
ES17845170T ES2884500T3 (es) 2016-08-31 2017-08-09 Procedimiento y dispositivo de intrapredicción de codificación de vídeo
MYPI2018002693A MY184601A (en) 2016-08-31 2017-08-09 Intra-prediction video coding method and device
KR1020187037513A KR102275830B1 (ko) 2016-08-31 2017-08-09 인트라 예측 비디오 코딩 방법 및 장치
JP2018560660A JP6697582B2 (ja) 2016-08-31 2017-08-09 イントラ予測動画符号化方法および装置
US16/313,576 US10681367B2 (en) 2016-08-31 2017-08-09 Intra-prediction video coding method and device
SG11201811305WA SG11201811305WA (en) 2016-08-31 2017-08-09 Intra-prediction video coding method and device
AU2017317847A AU2017317847B2 (en) 2016-08-31 2017-08-09 Intra-prediction video coding method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610799819.8 2016-08-31
CN201610799819.8A CN106162197B (zh) 2016-08-31 2016-08-31 一种视频编码帧内预测方法和装置

Publications (1)

Publication Number Publication Date
WO2018040868A1 true WO2018040868A1 (zh) 2018-03-08

Family

ID=57344374

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/096632 WO2018040868A1 (zh) 2016-08-31 2017-08-09 一种视频编码帧内预测方法和装置

Country Status (12)

Country Link
US (1) US10681367B2 (zh)
EP (1) EP3509305B1 (zh)
JP (1) JP6697582B2 (zh)
KR (1) KR102275830B1 (zh)
CN (1) CN106162197B (zh)
AU (1) AU2017317847B2 (zh)
CA (1) CA3027764C (zh)
ES (1) ES2884500T3 (zh)
MY (1) MY184601A (zh)
SG (1) SG11201811305WA (zh)
TW (1) TWI690199B (zh)
WO (1) WO2018040868A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162197B (zh) * 2016-08-31 2019-07-12 北京奇艺世纪科技有限公司 一种视频编码帧内预测方法和装置
US20190014324A1 (en) * 2017-07-05 2019-01-10 Industrial Technology Research Institute Method and system for intra prediction in image encoding
US20190110052A1 (en) * 2017-10-06 2019-04-11 Futurewei Technologies, Inc. Bidirectional intra prediction
BR112020019831A2 (pt) 2018-03-29 2021-01-05 Huawei Technologies Co., Ltd. Método de codificar uma imagem, método para intrapredição de um bloco de codificação corrente de uma imagem, codificador, decodificador, e produto de computador
US11343536B2 (en) 2018-06-27 2022-05-24 Kt Corporation Method and apparatus for processing video signal
CN109803145B (zh) * 2018-12-29 2022-10-28 浙江大华技术股份有限公司 帧内预测方法、装置、编码器及存储装置
WO2023101524A1 (ko) * 2021-12-02 2023-06-08 현대자동차주식회사 양방향 인트라 예측 모드를 이용하는 비디오 부호화/복호화 방법 및 장치
US20240230020A9 (en) * 2022-10-21 2024-07-11 Hewlett-Packard Development Company, L.P. Device mounts
WO2024177434A1 (ko) * 2023-02-23 2024-08-29 현대자동차주식회사 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
CN116095316B (zh) * 2023-03-17 2023-06-23 北京中星微人工智能芯片技术有限公司 视频图像处理方法及装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101600116A (zh) * 2009-03-11 2009-12-09 北京中星微电子有限公司 一种帧内预测方法及装置
US20110249735A1 (en) * 2010-04-09 2011-10-13 Jie Zhao Methods and Systems for Intra Prediction
CN102685506A (zh) * 2011-03-10 2012-09-19 华为技术有限公司 帧内预测的方法和预测装置
CN104104959A (zh) * 2013-04-10 2014-10-15 乐金电子(中国)研究开发中心有限公司 深度图像帧内预测方法及装置
CN106162197A (zh) * 2016-08-31 2016-11-23 北京奇艺世纪科技有限公司 一种视频编码帧内预测方法和装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2006346583B2 (en) * 2006-07-28 2011-04-28 Kabushiki Kaisha Toshiba Image encoding and decoding method and apparatus
US8619857B2 (en) 2010-04-09 2013-12-31 Sharp Laboratories Of America, Inc. Methods and systems for intra prediction
CN103929641A (zh) 2014-05-12 2014-07-16 北京工商大学 一种基于虚拟参考帧的帧内编码方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101600116A (zh) * 2009-03-11 2009-12-09 北京中星微电子有限公司 一种帧内预测方法及装置
US20110249735A1 (en) * 2010-04-09 2011-10-13 Jie Zhao Methods and Systems for Intra Prediction
CN102685506A (zh) * 2011-03-10 2012-09-19 华为技术有限公司 帧内预测的方法和预测装置
CN104104959A (zh) * 2013-04-10 2014-10-15 乐金电子(中国)研究开发中心有限公司 深度图像帧内预测方法及装置
CN106162197A (zh) * 2016-08-31 2016-11-23 北京奇艺世纪科技有限公司 一种视频编码帧内预测方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIANG, LIWEI ET AL.: "Intra prediction method based on H.264 standard", PROCEEDINGS OF THE 14TH NATIONAL CONFERENCE OF NEURAL NETWORKS, CHINA; 2004/10/27-29, 17 March 2008 (2008-03-17), pages 469 - 471, XP009515405 *

Also Published As

Publication number Publication date
US10681367B2 (en) 2020-06-09
EP3509305A1 (en) 2019-07-10
TWI690199B (zh) 2020-04-01
CN106162197B (zh) 2019-07-12
TW201813390A (zh) 2018-04-01
SG11201811305WA (en) 2019-03-28
MY184601A (en) 2021-04-07
JP2019515606A (ja) 2019-06-06
CA3027764A1 (en) 2018-03-08
EP3509305A4 (en) 2019-07-10
KR102275830B1 (ko) 2021-07-12
US20190327481A1 (en) 2019-10-24
ES2884500T3 (es) 2021-12-10
AU2017317847B2 (en) 2020-01-30
EP3509305B1 (en) 2021-06-16
KR20190008959A (ko) 2019-01-25
JP6697582B2 (ja) 2020-05-20
CN106162197A (zh) 2016-11-23
CA3027764C (en) 2021-12-07
AU2017317847A1 (en) 2019-01-17

Similar Documents

Publication Publication Date Title
WO2018040868A1 (zh) 一种视频编码帧内预测方法和装置
KR102252816B1 (ko) 부호화유닛 심도 확정 방법 및 장치
KR101941955B1 (ko) 재귀적 블록 파티셔닝
TW201830972A (zh) 用於視訊寫碼之低複雜度符號預測
US11070817B2 (en) Video encoding method, computer device, and storage medium for determining skip status
WO2016180129A1 (zh) 预测模式选择方法、装置及设备
WO2019072248A1 (zh) 运动估计方法、装置、电子设备及计算机可读存储介质
WO2016065872A1 (zh) 图像预测方法及相关装置
TWI688260B (zh) 包括用於影像處理的編碼器之方法、系統及裝置
KR20210041603A (ko) 비디오 이미지 요소의 예측 방법 및 장치, 및 컴퓨터 저장 매체
JP2018533273A5 (zh)
WO2018040869A1 (zh) 一种帧间预测编码方法及装置
US20170099487A1 (en) Encoder for determining quantization parameter adaptively and application processor having the same
JP2015530841A5 (zh)
WO2021056454A1 (zh) 当前块的预测方法及装置、设备、存储介质
US8971407B2 (en) Detection of skip mode
WO2023044917A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
WO2023044918A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
WO2023044916A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
CN111683271B (zh) 一种视频加密方法、终端设备以及计算机存储介质
WO2020181471A1 (zh) 帧内预测方法、装置及计算机存储介质
CN116977788A (zh) 图像跨域转换模型构建方法及图像跨域转换方法
CN114339240A (zh) 变换模式的方向选择方法、装置、电子设备和存储介质
JP2010258984A (ja) 画像符号化装置および画像符号化方法

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018560660

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 17845170

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3027764

Country of ref document: CA

ENP Entry into the national phase

Ref document number: 20187037513

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2017317847

Country of ref document: AU

Date of ref document: 20170809

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017845170

Country of ref document: EP

Effective date: 20190401