CN-114630114-B - Intra-frame prediction method and device for video coding, storage medium and electronic equipment
Abstract
The invention discloses an intra-frame prediction method and device for video coding, a storage medium and electronic equipment. The method comprises the steps of obtaining original pixels and quantization parameters qp required by rough mode selection RMD of a current video frame, determining prediction reconstruction pixels of each coding tree unit CTU in the current frame through a preset linear prediction model based on the original pixels and the qp, determining rate distortion cost of intra-frame prediction modes of each prediction unit PU in the current video frame according to the prediction reconstruction pixels, and taking at least one intra-frame prediction mode with the rate distortion cost smaller than a preset threshold value as a target intra-frame prediction mode set of each PU. The invention solves the technical problem of lower accuracy of intra-frame prediction of video coding.
Inventors
- ZHANG PENG
- WEN YINGBO
- XIANG GUOQING
- HUANG XIAOFENG
- YAN WEI
- FAN YIBO
Assignees
- 杭州未名信科科技有限公司
- 浙江省北大信息技术高等研究院
Dates
- Publication Date
- 20260512
- Application Date
- 20220127
Claims (9)
- 1. A method of intra prediction for video coding, comprising: Obtaining an original pixel and a quantization parameter qp required by the rough mode selection RMD of a current video frame; The method for determining the prediction reconstruction pixel of each coding tree unit CTU in the current frame through a preset linear pre-estimated model based on the original pixel and qp comprises the following steps of determining the prediction reconstruction pixel of each CU in each coding tree unit CTU in the current frame through the following formula: Wherein, the For the reconstructed pixels around the current CTU, For the original pixel of the current CTU, For the original pixel of the current coding CU in the current CTU, , For fitting parameters, margin presets a threshold for the quantization parameter qp, Reconstructing pixels for the fitted prediction; determining the rate distortion cost of an intra-frame prediction mode of each prediction unit PU in the current video frame according to the prediction reconstruction pixels; and taking at least one intra-frame prediction mode with the rate distortion cost smaller than a preset threshold value as the target intra-frame prediction mode set of each PU.
- 2. The method of claim 1, wherein said determining the rate-distortion cost of the intra-prediction mode of each prediction unit PU in the current video frame from the prediction reconstruction pixels comprises: Taking the prediction reconstruction pixel as a reference pixel, and determining the rate distortion cost of an intra-frame prediction mode of each prediction unit PU in the current video frame through a formula (1); (1) Wherein, the R is the code rate required by coding, D is distortion error, J is calculated rate distortion cost; in formula (1), the R is obtained by formula (2); (2) Wherein, the Is the value of the current intra prediction mode.
- 3. The method of claim 2, wherein the determining the rate-distortion cost for the intra-prediction mode for each prediction unit PU in the current video frame from the prediction reconstruction pixels further comprises: traversing each PU in the current video frame, and executing the following operation until obtaining the rate distortion cost of the intra-frame prediction mode of each prediction unit PU in the current video frame: and taking the determined rate distortion cost of the intra-frame prediction modes of any two PUs as the rate distortion cost of the intra-frame prediction modes of the father PUs of the any two PUs.
- 4. The method according to claim 1, wherein said setting at least one intra prediction mode having a rate distortion cost less than a preset threshold as the target intra prediction mode set for each PU comprises: And regarding the PU subset divided by the quadtree, when one to-be-determined PU which does not determine the target intra-frame prediction mode set exists in the PU subset, taking the intersection of the target intra-frame prediction mode sets of the three other PUs in the PU subset as the target intra-frame prediction mode set of the to-be-determined PU.
- 5. The method of claim 1, wherein the margin has a value of 30.
- 6. The method according to claim 1, wherein said setting at least one intra prediction mode having a rate distortion cost less than a preset threshold, as said target intra prediction mode set for each PU, further comprises: and outputting the target intra prediction mode set of each PU.
- 7. An image processing apparatus, comprising: An acquisition unit that acquires an original pixel and a quantization parameter qp required for rough mode selection RMD of a current video frame; a first determining unit, configured to determine, based on the original pixel and qp, a prediction reconstruction pixel of each coding tree unit CTU in the current frame through a preset linear prediction model, where the determining unit includes determining, by: Wherein, the For the reconstructed pixels around the current CTU, For the original pixel of the current CTU, For the original pixel of the current coding CU in the current CTU, , For fitting parameters, margin presets a threshold for the quantization parameter qp, Reconstructing pixels for the fitted prediction; A second determining unit, configured to determine, according to the prediction reconstruction pixels, a rate-distortion cost of an intra-prediction mode of each prediction unit PU in the current video frame; And a third determining unit, configured to use at least one intra-prediction mode with a rate distortion cost smaller than a preset threshold value as the target intra-prediction mode set of each PU.
- 8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 6 by means of the computer program.
- 9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when run, performs the method of any one of claims 1 to 6.
Description
Intra-frame prediction method and device for video coding, storage medium and electronic equipment Technical Field The present invention relates to the field of image processing technologies, and in particular, to a video coding intra-frame prediction method and apparatus, a storage medium, and an electronic device. Background Intra-frame prediction is an important component in video coding technology, and can effectively eliminate spatial redundancy. In order to make the intra prediction value more accurate and the prediction residual smaller, a plurality of prediction modes are adopted in the video coding standard of the current mainstream to carry out the intra prediction process, and the mode decision process is divided into two steps, namely coarse mode selection (Rough Mode Decision, RMD) and mode selection. The RMD process selects N modes from the 33 intra-prediction modes to enter a rate-distortion optimized mode decision of the next step. In order to facilitate hardware implementation, current RMD takes an LCU with a size of 64x64 as a Unit, and selects an original pixel nearby and inside the LCU as a reference pixel of each Coding Unit (CU) to perform prediction. Disclosure of Invention The embodiment of the invention provides an intra-frame prediction method and device for video coding, a storage medium and electronic equipment, which are used for at least solving the technical problem of low accuracy of intra-frame prediction of video coding. According to one aspect of the embodiment of the invention, an intra-frame prediction method for video coding is provided, which comprises the steps of obtaining original pixels and quantization parameters qp required by rough mode selection RMD of a current video frame, determining predicted reconstruction pixels of each coding tree unit CTU in the current frame through a preset linear prediction model based on the original pixels and the qp, determining rate distortion cost of an intra-frame prediction mode of each prediction unit PU in the current video frame according to the predicted reconstruction pixels, and taking at least one intra-frame prediction mode with the rate distortion cost smaller than a preset threshold as a target intra-frame prediction mode set of each PU. According to another aspect of the embodiment of the present invention, there is provided an intra-frame prediction apparatus for video encoding, including an acquisition unit configured to acquire an original pixel and a quantization parameter qp required for RMD selection of a coarse mode of a current video frame, a first determination unit configured to determine a prediction reconstruction pixel of each coding tree unit CTU in the current frame through a preset linear prediction model based on the original pixel and qp, a second determination unit configured to determine a rate-distortion cost of an intra-frame prediction mode of each prediction unit PU in the current video frame according to the prediction reconstruction pixel, and a third determination unit configured to use at least one intra-frame prediction mode having a rate-distortion cost smaller than a preset threshold as a target intra-frame prediction mode set of each PU. According to still another aspect of the embodiments of the present invention, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to execute the intra prediction method of video encoding described above by the computer program. According to a further aspect of embodiments of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described intra prediction method of video encoding when run. In the embodiment of the invention, the prediction reconstruction pixel of each coding tree unit CTU in the current frame is determined by a preset linear prediction model based on the original pixel and qp, the rate distortion cost of the intra-frame prediction mode of each prediction unit PU in the current video frame is determined according to the prediction reconstruction pixel, at least one intra-frame prediction mode with the rate distortion cost smaller than a preset threshold value is used as the target intra-frame prediction mode set of each PU, and in the method, the problem that the reconstruction pixel can be obtained without the Mode Decision (MD) in the video coding pipeline process is solved, and the accuracy of intra-frame prediction of video coding is improved due to the fact that the prediction reconstruction pixel of each coding tree unit CTU in the current frame is determined by the preset linear prediction model based on the original pixel and qp. Drawings The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodi