WO2024078401A1 - Intra-frame prediction method and apparatus, and device - Google Patents

Intra-frame prediction method and apparatus, and device Download PDF

Info

Publication number
WO2024078401A1
WO2024078401A1 PCT/CN2023/123318 CN2023123318W WO2024078401A1 WO 2024078401 A1 WO2024078401 A1 WO 2024078401A1 CN 2023123318 W CN2023123318 W CN 2023123318W WO 2024078401 A1 WO2024078401 A1 WO 2024078401A1
Authority
WO
WIPO (PCT)
Prior art keywords
sample point
reference sample
prediction
image block
predicted
Prior art date
Application number
PCT/CN2023/123318
Other languages
French (fr)
Chinese (zh)
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 维沃移动通信有限公司
Publication of WO2024078401A1 publication Critical patent/WO2024078401A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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
    • 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/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

Definitions

  • the present application belongs to the field of coding and decoding technology, and specifically relates to an intra-frame prediction method, device and equipment.
  • the Position Dependent intra Prediction Combination (PDPC) technology is sampled in the Versatile Video Coding (VVC) standard to perform intra prediction on image blocks and obtain the prediction values corresponding to the image blocks.
  • VVC Versatile Video Coding
  • the PDPC technology is only applicable to the case where the angle between the angle prediction direction represented by the pattern index corresponding to the image block and the horizontal direction is greater than or equal to 90 degrees or less than or equal to 0 degrees, wherein the above-mentioned pattern index is the index of the angle prediction mode corresponding to the image block.
  • the reference image block is determined only according to the angle prediction mode corresponding to the image block, and then the prediction value is determined based on the reconstructed value of the reference image block.
  • the prediction value obtained in the above manner is not accurate enough, thereby reducing the accuracy of intra-frame prediction.
  • the embodiments of the present application provide an intra-frame prediction method, apparatus and device, which can solve the problem in the existing scheme that when the angle prediction direction represented by the mode index corresponding to the image block is greater than 0 degrees and less than 90 degrees with the horizontal direction, the reference image block is determined only according to the index of the angle prediction mode, thereby reducing the accuracy of the intra-frame prediction.
  • an intra-frame prediction method comprising:
  • intra-frame prediction is performed on the predicted sample point based on the angle prediction mode to determine a first reference sample point and a second reference sample point; the first reference sample point and the second reference sample point are both sample points in the reconstructed image block;
  • the first reconstruction value is a reconstruction value of the first reference sample point
  • the second reconstruction value is a reconstruction value of the second reference sample point
  • the first prediction value is determined based on an angle prediction mode corresponding to the prediction image block.
  • an intra-frame prediction device comprising:
  • An acquisition module used to acquire a mode index of an angle prediction mode corresponding to a prediction image block
  • a first determination module configured to, for each prediction sample point in the prediction image block, perform intra-frame prediction on the prediction sample point based on the angle prediction mode, and determine a first reference sample point and a second reference sample point, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees; the first reference sample point and the second reference sample point are both sample points in the reconstructed image block;
  • a second determination module is configured to determine a second prediction value corresponding to the prediction sample point according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and a weight coefficient associated with the first gradient value; the first reconstruction value is a reconstruction value of the first reference sample point, the second reconstruction value is a reconstruction value of the second reference sample point, and the first prediction value is determined based on an angle prediction mode corresponding to the prediction image block.
  • a terminal comprising a processor and a memory, wherein the memory stores a program or instruction that can be executed on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
  • a readable storage medium on which a program or instruction is stored.
  • the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
  • a chip comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
  • a computer program/program product is provided, wherein the computer program/program product is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.
  • an electronic device configured to execute the steps of the method described in the first aspect.
  • the predicted sample point is intra-predicted based on the angle prediction mode to determine the first reference sample point and the second reference sample point, and the second predicted value corresponding to the predicted sample point is determined based on the first predicted value, the first gradient value between the first reconstruction value and the second reconstruction value, and the weight coefficient associated with the first gradient value; wherein the first reconstruction value is the reconstruction value of the first reference sample point, and the second reconstruction value is the reconstruction value of the second reference sample point.
  • the scope of application of the PDPC technology is expanded, and a more accurate second prediction value is obtained by using the PDPC technology for intra-frame prediction, thereby improving the accuracy of intra-frame prediction.
  • FIG1 is a schematic diagram showing the relationship between an angle prediction mode and a mode index in the related art
  • FIG. 2 is one of the application scenario diagrams of the intra-frame prediction method in the related art
  • FIG3 is a second application scenario diagram of the intra-frame prediction method in the related art.
  • FIG4 is a schematic diagram of a flow chart of an intra-frame prediction method provided in an embodiment of the present application.
  • FIG5 is one of the application scenario diagrams of the intra-frame prediction method provided in an embodiment of the present application.
  • FIG6 is a second diagram of an application scenario of the intra-frame prediction method provided in an embodiment of the present application.
  • FIG. 7 is a third application scenario diagram of the intra-frame prediction method provided in an embodiment of the present application.
  • FIG8 is a structural diagram of an intra-frame prediction device provided in an embodiment of the present application.
  • FIG9 is a structural diagram of a communication device provided in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of the hardware structure of the terminal provided in an embodiment of the present application.
  • first, second, etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by “first” and “second” are generally of the same type, and the number of objects is not limited.
  • the first object can be one or more.
  • “and/or” in the specification and claims represents at least one of the connected objects, and the character “/" generally represents that the objects associated with each other are in an "or” relationship.
  • an image block includes 65 angle prediction modes, each of which corresponds to a mode index.
  • FIG1 shows the relationship between the angle prediction mode and the mode index, wherein the mode index can represent the angle prediction direction.
  • the angle prediction direction represented by the mode index 34 is 45 degrees from the horizontal direction.
  • the PDPC technology can be used to perform intra-frame prediction on the image block to obtain the prediction value corresponding to the image block.
  • nScale Min(2,Log2(nTbH)-Floor(Log2(3*invAngle-2))+8)(1)
  • nTbH represents the height of the image block
  • invAngle represents the angle prediction function corresponding to the image block
  • intraPredAngle represents the offset value corresponding to the image block.
  • the above offset value can be obtained by querying Table 1.
  • the predicted value p(x, y) of each sample point in the image block can be calculated by the following formulas (3) and (4), where the value range of x is 0 to min(3 ⁇ nScale, nTbW), and nTbW represents the width of the image block.
  • p(x,y) ((64–wL(x))*p'(x,y)+wL(x)*r(-1,y+d1)+32)>>6 (3)
  • r(-1+d) (32–dFrac)*r(-1+dInt)+dFrac*r(-1+dInt+1) (4)
  • wL(x) 32>>((x ⁇ 1)>>nScale)
  • p'(x,y) is a prediction value determined based on the angle prediction mode corresponding to the image block
  • r(-1,y+d1) is the reconstructed value of the reference sample point determined along the angle prediction direction corresponding to the image block, determined based on formula (4)
  • dInt (intraPredAngle>>5)
  • dFract (intraPredAngle&31)
  • intraPredAngle can be obtained by querying Table 1.
  • the predicted value p(x, y) of each sample point in the image block can be calculated by the following formula (5), where the value range of x is 0 to min(3 ⁇ nScale, nTbW).
  • p(x,y) Clip(((64–wL(x))*p'(x,y)+wL(x)*(r(-1,y)-r(-1,-1))+32)>>6)
  • p(x,y) Clip(((64–wL(x))*p'(x,y)+wL(x)*(r(-1,y)-r(-1,-1))+32)>>6)
  • wL(x) 32>>((x ⁇ 1)>>nScale2)
  • nScale2 (log2(nTbH)+log2(nTbW)–2)>>2.
  • the reference image block is determined only according to the angle prediction mode corresponding to the image block, and then the prediction value is determined based on the reconstructed value of the reference image block.
  • the prediction value obtained in the above manner is not accurate enough, thereby reducing the accuracy of intra-frame prediction.
  • the present application provides an intra-frame prediction method.
  • the intra-frame prediction method provided by the embodiments of the present application is described in detail below through some embodiments and their application scenarios in combination with the accompanying drawings.
  • FIG4 is a flow chart of an intra-frame prediction method in an embodiment of the present application.
  • the intra-frame prediction method provided in this embodiment includes the following steps:
  • the angle prediction model corresponding to the predicted image block can be determined by obtaining identification information in the predicted image block. formula, and then obtain the mode index of the angle prediction mode.
  • the predicted image block includes at least two predicted sample points, which can be understood as pixel points in the predicted image block.
  • the mode index represents the angle prediction direction, please refer to Figure 1.
  • the mode index is greater than 18 and less than 50, it can be understood that the angle prediction direction represented by the mode index is greater than 0 degrees and less than 90 degrees with the horizontal direction; it should be noted that if the angle prediction mode corresponding to the predicted image block is a wide angle mode, then when the mode index is greater than 34 and less than 98, it can be understood that the angle prediction direction represented by the mode index is greater than 0 degrees and less than 90 degrees with the horizontal direction.
  • the predicted sample point is intra-predicted based on the angle prediction direction of the angle prediction mode to determine the first reference sample point and the second reference sample point.
  • the first reference sample point and the second reference sample point are both sample points in the reconstructed image block, and the first reference sample point and the second reference sample point can be understood as pixel points in the reconstructed image block.
  • the first prediction value is determined based on the third reference sample point determined according to the angle prediction mode corresponding to the prediction sample point, and then based on the reconstruction value of the third reference image block.
  • the first reconstruction value is the reconstruction value of the first reference sample point
  • the second reconstruction value is the reconstruction value of the second reference sample point
  • the first gradient value can be understood as the difference between the first reconstruction value and the second reconstruction value.
  • the weight coefficient is determined based on the width and height of the prediction image block.
  • the second prediction value corresponding to the prediction sample point is determined according to the first prediction value, the first gradient value and the weight coefficient.
  • it can be calculated by formula (6).
  • p(x,y) Clip(((64–w)*p'(x,y)+w*D1+32)>>6) (6)
  • p(x, y) represents the second prediction value
  • p’(x, y) represents the first prediction value
  • W represents the weight coefficient
  • D1 represents the first gradient value
  • the intra-frame prediction result corresponding to the prediction image block can be obtained.
  • intra-frame prediction is performed on the predicted sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point, and the second predicted value corresponding to the predicted sample point is determined based on the first predicted value, the first gradient value between the first reconstruction value and the second reconstruction value, and the weight coefficient corresponding to the first gradient value; wherein the first reconstruction value is the reconstruction value of the first reference sample point, and the second reconstruction value is the reconstruction value of the second reference sample point.
  • the scope of application of the PDPC technology is expanded, and a more accurate second prediction value is obtained by using the PDPC technology for intra-frame prediction. This improves the accuracy of intra-frame prediction.
  • performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point includes:
  • a second reference sample point adjacent to the predicted image block and located on the left side of the predicted image block is determined.
  • a first reference sample point is determined from the left image block adjacent to the predicted image block, and intra-frame prediction is performed on the first reference sample point based on the angle prediction mode to determine a second reference sample point located above the predicted image block.
  • a first reference sample point is determined from an upper image block adjacent to the predicted image block, and intra-frame prediction is performed on the first reference sample point based on the angular prediction mode to determine a second reference sample point located on the left side of the predicted image block.
  • Figure 5 shows an application scenario in which the angle between the angle prediction direction represented by the pattern index and the horizontal direction is greater than or equal to 45 degrees.
  • the coordinates of the predicted sample point are (x, y)
  • the coordinates of the first reference sample point are (-1, y)
  • the coordinates of the second reference sample point are (-1+d, -1).
  • nTbW is the width of the predicted image block
  • nScale (log2(nTbH)+log2(nTbW)–2)>>2
  • nTbH is the height of the predicted image block
  • p(x,y) represents the second predicted value
  • p1(x,y) represents the first predicted value
  • r(-1,y) represents the first reconstructed value
  • r(-1+d,-1) represents the second reconstructed value
  • r(-1,y)-r(-1+d,-1) represents the first gradient value
  • wL(x) represents the weight coefficient
  • the predicted sample point pair is calculated by the above formula (7): The second predicted value.
  • intra-frame prediction is performed on the predicted sample points based on the angle prediction mode corresponding to the predicted image block, and the first reference sample points and the second reference sample points adjacent to the predicted image block are determined, thereby expanding the application scope of the PDPC technology.
  • a more accurate second prediction value is obtained by using the PDPC technology for intra-frame prediction, thereby improving the accuracy of intra-frame prediction.
  • performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point includes:
  • a second reference sample point located above the first reference image sample point is determined.
  • a first reference sample point is determined from the left image block adjacent to the predicted image block, and the first reference sample point is intra-predicted based on the angle prediction mode to determine a second reference sample point located on the left side of the first reference image sample point.
  • a first reference sample point is determined from an upper image block adjacent to the predicted image block, and intra-frame prediction is performed on the first reference sample point based on the angular prediction mode to determine a second reference sample point located above the first reference image sample point.
  • Figure 6 shows an application scenario in which the angle between the angle prediction direction represented by the pattern index and the horizontal direction is greater than or equal to 45 degrees.
  • the coordinates of the predicted sample point are (x, y)
  • the coordinates of the first reference sample point are (-1, y)
  • the coordinates of the second reference sample point are (-n, y+d).
  • nTbW is the width of the predicted image block
  • nScale (log2(nTbH)+log2(nTbW)–2)>>2
  • nTbH is the height of the predicted image block
  • p(x,y) represents the second predicted value
  • p1(x,y) represents the first predicted value
  • r0(-1,y) represents the first reconstructed value
  • rn(-n,y+d) represents the second reconstructed value
  • r0(-1,y)-rn(-n,y+d) represents the first gradient value
  • wL(x) represents the weight coefficient
  • the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
  • the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
  • the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
  • intra-frame prediction is performed on the predicted sample points based on the angle prediction mode corresponding to the predicted image block, and the first reference sample point and the second reference sample point located above the predicted image block are determined, or the first reference sample point and the second reference sample point located on the left side of the predicted image block are determined, thereby expanding the application scope of the PDPC technology, using the PDPC technology for intra-frame prediction to obtain a more accurate second prediction value, and improving the accuracy of intra-frame prediction.
  • performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point includes:
  • a second reference sample point located on the left side of the first reference image sample point is determined.
  • a first reference sample point is determined from an upper image block adjacent to the predicted image block, and an intra-frame prediction is performed on the first reference sample point based on the angle prediction mode to determine a second reference sample point located above the first reference image sample point.
  • a first reference sample point is determined from a left image block adjacent to the predicted image block, and intra-frame prediction is performed on the first reference sample point based on the angular prediction mode to determine a second reference sample point located on the left side of the first reference image sample point.
  • Figure 7 shows an application scenario in which the angle between the angle prediction direction represented by the pattern index and the horizontal direction is greater than or equal to 45 degrees.
  • the coordinates of the predicted sample point are (x, y)
  • the coordinates of the first reference sample point are (x, -1)
  • the coordinates of the second reference sample point are (x+d, -n).
  • nTbW is the width of the predicted image block
  • nScale (log2(nTbH)+log2(nTbW)–2)>>2
  • nTbH is the height of the predicted image block
  • p(x,y) represents the second predicted value
  • p1(x,y) represents the first predicted value
  • r0(x,-1) represents the first reconstructed value
  • rn(x+d,-n) represents the second reconstructed value
  • r0(x,-1)-rn(x+d,-n) represents the first gradient value
  • wL(x) represents the weight coefficient
  • the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
  • the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
  • intra-frame prediction is performed on the predicted sample points based on the angle prediction mode corresponding to the predicted image block, and the first reference sample point and the second reference sample point located above the predicted image block are determined, or the first reference sample point and the second reference sample point located on the left side of the predicted image block are determined, thereby expanding the application scope of the PDPC technology, using the PDPC technology for intra-frame prediction to obtain a more accurate second prediction value, and improving the accuracy of intra-frame prediction.
  • the intra-frame prediction method involved in the application scenario shown in FIG5 may be used to obtain the second prediction value corresponding to the predicted image block; or the intra-frame prediction method involved in the application scenario shown in FIG7 may be used to obtain the second prediction value corresponding to the predicted image block.
  • the intra-frame prediction method involved in the application scenario shown in FIG6 may be used to obtain the second prediction value corresponding to the predicted image block.
  • the method includes:
  • a second prediction value corresponding to the prediction sample point is determined according to a second gradient value between the third reconstruction value and the fourth reconstruction value, and a third gradient value between the fifth reconstruction value and the sixth reconstruction value.
  • intra-frame prediction is performed on each prediction sample point in the prediction image block to obtain a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point corresponding to the prediction sample point, wherein the third reference sample point and the fourth reference sample point are located on the left side of the prediction image block, and the fifth reference sample point and the sixth reference sample point are located on the left side of the prediction image block.
  • the third reference sample point, the fourth reference sample point, the fifth reference sample point and the sixth reference sample point are all sample points in the reconstructed image block.
  • the difference between the third reconstruction value and the fourth reconstruction value is determined as the second gradient value
  • the difference between the fifth reconstruction value and the sixth reconstruction value is determined as the third gradient value
  • the third reconstruction value is the reconstruction value of the third reference sample point
  • the fourth reconstruction value is the reconstruction value of the fourth reference sample point
  • the fifth reconstruction value is the reconstruction value of the fifth reference sample point
  • the sixth reconstruction value is the reconstruction value of the sixth reference sample point.
  • the second prediction value corresponding to the prediction sample point is calculated by formula (10).
  • p(x, y) represents the second predicted value
  • w1(x) and w2(x) represent preset weight values
  • p1(x, y) represents the first predicted value
  • GradientLeft represents the first gradient value
  • GradientTop represents the second gradient value.
  • performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point comprises:
  • a sixth reference sample point located above the fifth reference sample point is determined.
  • a third reference sample point is determined from a left image block adjacent to the predicted image block, and intra-frame prediction is performed on the third reference sample point based on the angle prediction mode to determine a fourth reference sample point located to the left of the third reference image sample point, that is, the third reference image sample point and the fourth reference sample point are obtained using the intra-frame prediction method involved in the application scenario shown in FIG6.
  • a fifth reference sample point is determined from an upper image block adjacent to the predicted image block, and intra-frame prediction is performed on the fifth reference sample point based on the angle prediction mode to determine a sixth reference sample point located above the fifth reference image sample point, that is, the fifth reference image sample point and the sixth reference sample point are obtained using the intra-frame prediction method involved in the application scenario shown in FIG7.
  • the intra-frame prediction method provided in the embodiment of the present application can be executed by an intra-frame prediction device.
  • an intra-frame prediction device executing the intra-frame prediction method is taken as an example to illustrate the intra-frame prediction device provided in the embodiment of the present application.
  • an intra-frame prediction device 800 including:
  • An acquisition module 801 is used to acquire a mode index of an angle prediction mode corresponding to a prediction image block;
  • the first determining module 802 is configured to determine, for each predicted sample point in the predicted image block, a prediction direction represented by the mode index and a horizontal direction with an angle greater than 0 degrees and less than 90 degrees based on the angle prediction direction.
  • intra-frame prediction is performed on the prediction sample point to determine a first reference sample point and a second reference sample point;
  • the second determination module 803 is used to determine the second prediction value corresponding to the prediction sample point according to the first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and the weight coefficient associated with the first gradient value.
  • the first determining module 802 is specifically configured to:
  • a second reference sample point adjacent to the predicted image block and located on the left side of the predicted image block is determined.
  • the first determining module 802 is further specifically configured to:
  • a second reference sample point located above the first reference image sample point is determined.
  • the first determining module 802 is further specifically configured to:
  • a second reference sample point located on the left side of the first reference image sample point is determined.
  • the intra-frame prediction device 800 further includes:
  • a third determination module configured to, for each prediction sample point in the prediction image block, perform intra-frame prediction on the prediction sample point based on the angle prediction mode, and determine a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees;
  • the fourth determination module is used to determine the second prediction value corresponding to the prediction sample point according to the second gradient value between the third reconstruction value and the fourth reconstruction value, and the third gradient value between the fifth reconstruction value and the sixth reconstruction value.
  • the third determining module is specifically configured to:
  • a sixth reference sample point located above the fifth reference sample point is determined.
  • the predicted sample point is intra-predicted based on the angle prediction mode to determine the first reference sample point and the second reference sample point, and the second predicted value corresponding to the predicted sample point is determined based on the first predicted value, the first gradient value between the first reconstruction value and the second reconstruction value, and the weight coefficient associated with the first gradient value; wherein the first reconstruction value is the reconstruction value of the first reference sample point, and the second reconstruction value is the reconstruction value of the second reference sample point.
  • the scope of application of the PDPC technology is expanded, and a more accurate second prediction value is obtained by using the PDPC technology for intra-frame prediction, thereby improving the accuracy of intra-frame prediction.
  • This device embodiment corresponds to the intra-frame prediction method embodiment shown in FIG. 4 .
  • Each implementation process and implementation method in the above method embodiment can be applied to this device embodiment and can achieve the same technical effect.
  • the intra-frame prediction device in the embodiment of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip.
  • the electronic device can be a terminal, or it can be other devices other than a terminal.
  • the terminal can include but is not limited to the types of terminals listed above, and other devices can be servers, network attached storage (NAS), etc., which are not specifically limited in the embodiment of the present application.
  • an embodiment of the present application also provides a communication device 900, including a processor 901 and a memory 902, and the memory 902 stores programs or instructions that can be executed on the processor 901.
  • the communication device 900 is a terminal
  • the program or instructions are executed by the processor 901 to implement the various steps of the above-mentioned intra-frame prediction method embodiment and can achieve the same technical effect.
  • the embodiment of the present application also provides a terminal, including a processor 901 and a communication interface, wherein the processor 901 is configured to execute Next operation:
  • a second prediction value corresponding to the prediction sample point is determined according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value associated with the prediction sample point, and a weight coefficient corresponding to the first gradient value.
  • the terminal embodiment corresponds to the above-mentioned terminal side method embodiment, and each implementation process and implementation mode of the above-mentioned method embodiment can be applied to the terminal embodiment and can achieve the same technical effect.
  • Figure 10 is a schematic diagram of the hardware structure of a terminal implementing the embodiment of the present application.
  • the terminal 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
  • the terminal 1000 can also include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 1010 through a power management system, so as to implement functions such as charging, discharging, and power consumption management through the power management system.
  • a power supply such as a battery
  • the terminal structure shown in FIG10 does not constitute a limitation on the terminal, and the terminal can include more or fewer components than shown in the figure, or combine certain components, or arrange components differently, which will not be described in detail here.
  • the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode.
  • the display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
  • the user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072.
  • the touch panel 10071 is also called a touch screen.
  • the touch panel 10071 may include two parts: a touch detection device and a touch controller.
  • Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
  • the RF unit 1001 can transmit the data to the processor 1010 for processing; the RF unit 1001 can send uplink data to the network side device.
  • the RF unit 1001 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
  • the memory 1009 can be used to store software programs or instructions and various data.
  • the memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
  • the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories.
  • the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory, or a non-volatile memory.
  • Volatile memory can be Random Access Memory (Random Access Memory, RAM), Static Random Access Memory (Static RAM, SRAM), Dynamic Random Access Memory (Dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Synch link DRAM, SLDRAM) and Direct Rambus RAM (Direct Rambus RAM, DRRAM).
  • the memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
  • the processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
  • the processor 1010 is configured to perform the following operations:
  • a second prediction value corresponding to the prediction sample point is determined according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and a weight coefficient associated with the first gradient value.
  • An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
  • a program or instruction is stored.
  • the program or instruction is executed by a processor, each process of the above-mentioned intra-frame prediction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
  • the processor is the processor in the terminal described in the above embodiment.
  • the readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
  • An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
  • the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
  • the embodiment of the present application further provides a computer program/program product, which is stored in a storage medium.
  • the computer program/program product is executed by at least one processor to implement the various processes of the above-mentioned intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
  • the technical solution of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
  • a storage medium such as ROM/RAM, a magnetic disk, or an optical disk
  • a terminal which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

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

Abstract

The present application relates to the technical field of coding and decoding, and discloses an intra-frame prediction method and apparatus, and a device. The intra-frame prediction method provided by embodiments of the present application comprises: acquiring a mode index of an angle prediction mode corresponding to a predicted image block; for each predicted sample point in the predicted image block, when an included angle between an angle prediction direction represented by the mode index and a horizontal direction is greater than 0 degree and less than 90 degrees, performing intra-frame prediction on the predicted sample point on the basis of the angle prediction mode, and determining a first reference sample point and a second reference sample point; and according to a first gradient value between a first reconstructed value and a second reconstructed value, a first predicted value corresponding to the predicted sample point, and a weight coefficient associated with the first gradient value, determining a second predicted value corresponding to the predicted sample point, wherein the first reconstructed value is a reconstructed value of the first reference sample point, the second reconstructed value is a reconstructed value of the second reference sample point, and the first predicted value is determined on the basis of the angle prediction mode corresponding to the predicted image block.

Description

帧内预测方法、装置及设备Intra-frame prediction method, device and apparatus
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2022年10月12日在中国提交的中国专利申请No.202211249310.8的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202211249310.8 filed in China on October 12, 2022, the entire contents of which are incorporated herein by reference.
技术领域Technical Field
本申请属于编解码技术领域,具体涉及一种帧内预测方法、装置及设备。The present application belongs to the field of coding and decoding technology, and specifically relates to an intra-frame prediction method, device and equipment.
背景技术Background technique
在通用视频编码(Versatile Video Coding,VVC)标准中采样了位置相关的帧内预测组合(Position Dependent intra Prediction Combination,PDPC)技术,对图像块进行帧内预测,获得图像块对应的预测值。The Position Dependent intra Prediction Combination (PDPC) technology is sampled in the Versatile Video Coding (VVC) standard to perform intra prediction on image blocks and obtain the prediction values corresponding to the image blocks.
然而,PDPC技术只适用于图像块对应的模式索引表征的角度预测方向与水平方向的夹角大于等于90度或小于等于0度的情况,其中,上述模式索引为该图像块对应的角度预测模式的索引,在图像块对应的模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,仅根据图像块对应的角度预测模式确定参考图像块,进而基于参考图像块的重建值确定预测值,通过上述方式得到的预测值不够准确,进而降低了帧内预测的准确度。However, the PDPC technology is only applicable to the case where the angle between the angle prediction direction represented by the pattern index corresponding to the image block and the horizontal direction is greater than or equal to 90 degrees or less than or equal to 0 degrees, wherein the above-mentioned pattern index is the index of the angle prediction mode corresponding to the image block. When the angle between the angle prediction direction represented by the pattern index corresponding to the image block and the horizontal direction is greater than 0 degrees and less than 90 degrees, the reference image block is determined only according to the angle prediction mode corresponding to the image block, and then the prediction value is determined based on the reconstructed value of the reference image block. The prediction value obtained in the above manner is not accurate enough, thereby reducing the accuracy of intra-frame prediction.
发明内容Summary of the invention
本申请实施例提供一种帧内预测方法、装置及设备,能够解决现有方案中在图像块对应的模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,仅根据角度预测模式的索引确定参考图像块,进而降低了帧内预测的准确度的问题。The embodiments of the present application provide an intra-frame prediction method, apparatus and device, which can solve the problem in the existing scheme that when the angle prediction direction represented by the mode index corresponding to the image block is greater than 0 degrees and less than 90 degrees with the horizontal direction, the reference image block is determined only according to the index of the angle prediction mode, thereby reducing the accuracy of the intra-frame prediction.
第一方面,提供了一种帧内预测方法,包括:In a first aspect, an intra-frame prediction method is provided, comprising:
获取预测图像块对应的角度预测模式的模式索引;Obtaining a mode index of an angle prediction mode corresponding to a predicted image block;
对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点;所述第一参考样本点和所述第二参考样本点均为已重建的图像块内的样本点;For each predicted sample point in the predicted image block, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees, intra-frame prediction is performed on the predicted sample point based on the angle prediction mode to determine a first reference sample point and a second reference sample point; the first reference sample point and the second reference sample point are both sample points in the reconstructed image block;
根据第一重建值和第二重建值之间的第一梯度值、所述预测样本点对应的第一预测值、以及所述第一梯度值相关联的权重系数,确定所述预测样本点对应的第二预测值;所述第一重建值为所述第一参考样本点的重建值,所述第二重建值为所述第二参考样本点的重建值,所述第一预测值基于所述预测图像块对应的角度预测模式确定。 Determine a second prediction value corresponding to the prediction sample point according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and a weight coefficient associated with the first gradient value; the first reconstruction value is a reconstruction value of the first reference sample point, the second reconstruction value is a reconstruction value of the second reference sample point, and the first prediction value is determined based on an angle prediction mode corresponding to the prediction image block.
第二方面,提供了一种帧内预测装置,包括:In a second aspect, an intra-frame prediction device is provided, comprising:
获取模块,用于获取预测图像块对应的角度预测模式的模式索引;An acquisition module, used to acquire a mode index of an angle prediction mode corresponding to a prediction image block;
第一确定模块,用于对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点;所述第一参考样本点和所述第二参考样本点均为已重建的图像块内的样本点;a first determination module, configured to, for each prediction sample point in the prediction image block, perform intra-frame prediction on the prediction sample point based on the angle prediction mode, and determine a first reference sample point and a second reference sample point, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees; the first reference sample point and the second reference sample point are both sample points in the reconstructed image block;
第二确定模块,用于根据第一重建值和第二重建值之间的第一梯度值、所述预测样本点对应的第一预测值、以及所述第一梯度值相关联的权重系数,确定所述预测样本点对应的第二预测值;所述第一重建值为所述第一参考样本点的重建值,所述第二重建值为所述第二参考样本点的重建值,所述第一预测值基于所述预测图像块对应的角度预测模式确定。A second determination module is configured to determine a second prediction value corresponding to the prediction sample point according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and a weight coefficient associated with the first gradient value; the first reconstruction value is a reconstruction value of the first reference sample point, the second reconstruction value is a reconstruction value of the second reference sample point, and the first prediction value is determined based on an angle prediction mode corresponding to the prediction image block.
第三方面,提供了一种终端,该终端包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。According to a third aspect, a terminal is provided, comprising a processor and a memory, wherein the memory stores a program or instruction that can be executed on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
第四方面,提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
第五方面,提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
第六方面,提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤。In a sixth aspect, a computer program/program product is provided, wherein the computer program/program product is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.
第七方面,提供了一种电子设备,被配置成用于执行如第一方面所述的方法的步骤。According to a seventh aspect, an electronic device is provided, configured to execute the steps of the method described in the first aspect.
本申请实施例中,对于预测图像块中的每个预测样本点,在预测图像块对应的模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于该角度预测模式对该预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点,并根据第一预测值、第一重建值和第二重建值之间的第一梯度值、以及第一梯度值相关联的权重系数,确定预测样本点对应的第二预测值;其中,第一重建值为第一参考样本点的重建值,第二重建值为第二参考样本点的重建值。通过基于角度预测模式对预测样本点进行帧内预测,扩展了PDPC技术的适用范围,使用PDPC技术进行帧内预测得到更为准确的第二预测值,以此提高了帧内预测的准确度。In an embodiment of the present application, for each predicted sample point in the predicted image block, when the angle between the angle prediction direction represented by the mode index corresponding to the predicted image block and the horizontal direction is greater than 0 degrees and less than 90 degrees, the predicted sample point is intra-predicted based on the angle prediction mode to determine the first reference sample point and the second reference sample point, and the second predicted value corresponding to the predicted sample point is determined based on the first predicted value, the first gradient value between the first reconstruction value and the second reconstruction value, and the weight coefficient associated with the first gradient value; wherein the first reconstruction value is the reconstruction value of the first reference sample point, and the second reconstruction value is the reconstruction value of the second reference sample point. By performing intra-frame prediction on the predicted sample point based on the angle prediction mode, the scope of application of the PDPC technology is expanded, and a more accurate second prediction value is obtained by using the PDPC technology for intra-frame prediction, thereby improving the accuracy of intra-frame prediction.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是相关技术中角度预测模式与模式索引之间的关系示意图;FIG1 is a schematic diagram showing the relationship between an angle prediction mode and a mode index in the related art;
图2是相关技术中帧内预测方法的应用场景图之一;FIG. 2 is one of the application scenario diagrams of the intra-frame prediction method in the related art;
图3是相关技术中帧内预测方法的应用场景图之二;FIG3 is a second application scenario diagram of the intra-frame prediction method in the related art;
图4是本申请实施例提供的帧内预测方法的流程示意图; FIG4 is a schematic diagram of a flow chart of an intra-frame prediction method provided in an embodiment of the present application;
图5是本申请实施例提供的帧内预测方法的应用场景图之一;FIG5 is one of the application scenario diagrams of the intra-frame prediction method provided in an embodiment of the present application;
图6是本申请实施例提供的帧内预测方法的应用场景图之二;FIG6 is a second diagram of an application scenario of the intra-frame prediction method provided in an embodiment of the present application;
图7是本申请实施例提供的帧内预测方法的应用场景图之三;FIG. 7 is a third application scenario diagram of the intra-frame prediction method provided in an embodiment of the present application;
图8是本申请实施例提供的帧内预测装置的结构图;FIG8 is a structural diagram of an intra-frame prediction device provided in an embodiment of the present application;
图9是本申请实施例提供的通信设备的结构图;FIG9 is a structural diagram of a communication device provided in an embodiment of the present application;
图10是本申请实施例提供的终端的硬件结构示意图。FIG. 10 is a schematic diagram of the hardware structure of the terminal provided in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”所区别的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally represents that the objects associated with each other are in an "or" relationship.
相关技术中,图像块包括65种角度预测模式,每种角度预测模式对应一个模式索引,请参阅图1,图1示出了角度预测模式与模式索引之间的关系,其中,上述模式索引可以表征角度预测方向。例如,如图1所示,模式索引34表征的角度预测方向与水平方向的夹角为45度。In the related art, an image block includes 65 angle prediction modes, each of which corresponds to a mode index. Please refer to FIG1, which shows the relationship between the angle prediction mode and the mode index, wherein the mode index can represent the angle prediction direction. For example, as shown in FIG1, the angle prediction direction represented by the mode index 34 is 45 degrees from the horizontal direction.
在模式索引大于等于50或小于等于18(即模式索引表征的角度预测方向与水平方向的夹角大于等于90度或小于等于0度)的情况下,可以使用PDPC技术对图像块进行帧内预测,获得图像块对应的预测值。When the mode index is greater than or equal to 50 or less than or equal to 18 (i.e., the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 90 degrees or less than or equal to 0 degrees), the PDPC technology can be used to perform intra-frame prediction on the image block to obtain the prediction value corresponding to the image block.
以下以图像块对应的模式索引大于50为例进行说明:The following takes the case where the mode index corresponding to the image block is greater than 50 as an example for explanation:
根据公式(1)和(2)计算得到图像块对应的变量nScale;
nScale=Min(2,Log2(nTbH)-Floor(Log2(3*invAngle-2))+8)(1)
The variable nScale corresponding to the image block is calculated according to formulas (1) and (2);
nScale=Min(2,Log2(nTbH)-Floor(Log2(3*invAngle-2))+8)(1)
其中,nTbH表示图像块的高度,invAngle表示图像块对应的角度预测函数,intraPredAngle表示图像块对应的偏移值,可选地,上述偏移值可以通过查询表一得到。Wherein, nTbH represents the height of the image block, invAngle represents the angle prediction function corresponding to the image block, and intraPredAngle represents the offset value corresponding to the image block. Optionally, the above offset value can be obtained by querying Table 1.
表一:
Table I:
如图2所示,当nScale>=0时,可以通过以下公式(3)和(4)计算得到图像块内各样本点的预测值p(x,y),其中,x的取值范围为0至min(3<<nScale,nTbW),nTbW表示图像块的宽度。
p(x,y)=((64–wL(x))*p’(x,y)+wL(x)*r(-1,y+d1)+32)>>6    (3)
r(-1+d)=(32–dFrac)*r(-1+dInt)+dFrac*r(-1+dInt+1)    (4)
As shown in FIG2 , when nScale>=0, the predicted value p(x, y) of each sample point in the image block can be calculated by the following formulas (3) and (4), where the value range of x is 0 to min(3<<nScale, nTbW), and nTbW represents the width of the image block.
p(x,y)=((64–wL(x))*p'(x,y)+wL(x)*r(-1,y+d1)+32)>>6 (3)
r(-1+d)=(32–dFrac)*r(-1+dInt)+dFrac*r(-1+dInt+1) (4)
其中,wL(x)=32>>((x<<1)>>nScale),p’(x,y)为基于图像块对应的角度预测模式确定的一个预测值,r(-1,y+d1)为沿着图像块对应的角度预测方向确定的参考样本点的重建值,基于公式(4)确定;dInt=(intraPredAngle>>5),dFract=(intraPredAngle&31),intraPredAngle可以通过查询表一得到。Wherein, wL(x)=32>>((x<<1)>>nScale), p'(x,y) is a prediction value determined based on the angle prediction mode corresponding to the image block, r(-1,y+d1) is the reconstructed value of the reference sample point determined along the angle prediction direction corresponding to the image block, determined based on formula (4); dInt=(intraPredAngle>>5), dFract=(intraPredAngle&31), intraPredAngle can be obtained by querying Table 1.
如图3所示,当nScale<0时,可以通过以下公式(5)计算得到图像块内各样本点的预测值p(x,y),其中,x的取值范围为0至min(3<<nScale,nTbW)。
p(x,y)=Clip(((64–wL(x))*p’(x,y)+wL(x)*(r(-1,y)-r(-1,-1))+32)>>6)    (5)
As shown in FIG3 , when nScale<0, the predicted value p(x, y) of each sample point in the image block can be calculated by the following formula (5), where the value range of x is 0 to min(3<<nScale, nTbW).
p(x,y)=Clip(((64–wL(x))*p'(x,y)+wL(x)*(r(-1,y)-r(-1,-1))+32)>>6) (5)
其中,wL(x)=32>>((x<<1)>>nScale2),nScale2=(log2(nTbH)+log2(nTbW)–2)>>2。Among them, wL(x)=32>>((x<<1)>>nScale2), nScale2=(log2(nTbH)+log2(nTbW)–2)>>2.
然而,在模式索引小于50且大于18(即模式索引表征的角度预测方向与水平方向的夹角小于90度且大于0度)的情况下,仅根据图像块对应的角度预测模式确定参考图像块,进而基于参考图像块的重建值确定预测值,通过上述方式得到的预测值不够准确,进而降低了帧内预测的准确度。However, when the mode index is less than 50 and greater than 18 (i.e., the angle between the angle prediction direction represented by the mode index and the horizontal direction is less than 90 degrees and greater than 0 degrees), the reference image block is determined only according to the angle prediction mode corresponding to the image block, and then the prediction value is determined based on the reconstructed value of the reference image block. The prediction value obtained in the above manner is not accurate enough, thereby reducing the accuracy of intra-frame prediction.
为了解决上述技术问题,本申请提供了一种帧内预测方法,下面结合附图,通过一些实施例及其应用场景对本申请实施例提供的帧内预测方法进行详细地说明。In order to solve the above technical problems, the present application provides an intra-frame prediction method. The intra-frame prediction method provided by the embodiments of the present application is described in detail below through some embodiments and their application scenarios in combination with the accompanying drawings.
请参阅图4,图4是本申请实施例中帧内预测方法的流程图。本实施例提供的帧内预测方法包括以下步骤:Please refer to FIG4 , which is a flow chart of an intra-frame prediction method in an embodiment of the present application. The intra-frame prediction method provided in this embodiment includes the following steps:
S401,获取预测图像块对应的角度预测模式的模式索引。S401, obtaining a mode index of an angle prediction mode corresponding to a predicted image block.
可选地,可以通过获取预测图像块中的标识信息,确定预测图像块对应的角度预测模 式,进而获取该角度预测模式的模式索引。Optionally, the angle prediction model corresponding to the predicted image block can be determined by obtaining identification information in the predicted image block. formula, and then obtain the mode index of the angle prediction mode.
S402,对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点。S402, for each predicted sample point in the predicted image block, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degree and less than 90 degrees, perform intra-frame prediction on the predicted sample point based on the angle prediction mode to determine a first reference sample point and a second reference sample point.
应理解,预测图像块包括至少两个预测样本点,该预测样本点可以理解为是预测图像块中的像素点。如上所述,模式索引表征角度预测方向,请参阅图1,在模式索引大于18且小于50的情况下,可以理解为模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度;需要说明的是,若预测图像块对应的角度预测模式为宽角度模式,则在模式索引大于34且小于98的情况下,可以理解为模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度。It should be understood that the predicted image block includes at least two predicted sample points, which can be understood as pixel points in the predicted image block. As described above, the mode index represents the angle prediction direction, please refer to Figure 1. When the mode index is greater than 18 and less than 50, it can be understood that the angle prediction direction represented by the mode index is greater than 0 degrees and less than 90 degrees with the horizontal direction; it should be noted that if the angle prediction mode corresponding to the predicted image block is a wide angle mode, then when the mode index is greater than 34 and less than 98, it can be understood that the angle prediction direction represented by the mode index is greater than 0 degrees and less than 90 degrees with the horizontal direction.
本步骤中,对于预测图像块中的每个预测样本点,在模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于角度预测模式的角度预测方向,对该预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点。其中,第一参考样本点和第二参考样本点均为已重建的图像块内的样本点,第一参考样本点和第二参考样本点可以理解为该已重建的图像块内的像素点。具体的实施方式请参阅后续实施例。In this step, for each predicted sample point in the predicted image block, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees, the predicted sample point is intra-predicted based on the angle prediction direction of the angle prediction mode to determine the first reference sample point and the second reference sample point. The first reference sample point and the second reference sample point are both sample points in the reconstructed image block, and the first reference sample point and the second reference sample point can be understood as pixel points in the reconstructed image block. For specific implementation methods, please refer to the subsequent embodiments.
S403,根据第一重建值和第二重建值之间的第一梯度值、所述预测样本点对应的第一预测值、以及所述第一梯度值相关联的权重系数,确定所述预测样本点对应的第二预测值。S403 , determining a second prediction value corresponding to the prediction sample point according to a first gradient value between the first reconstruction value and the second reconstruction value, a first prediction value corresponding to the prediction sample point, and a weight coefficient associated with the first gradient value.
上述第一预测值是根据预测样本点对应的角度预测模式确定第三参考样本点,进而基于第三参考图像块的重建值确定。上述第一重建值为第一参考样本点的重建值,上述第二重建值为第二参考样本点的重建值,第一梯度值可以理解为第一重建值与第二重建值之间的差值。上述权重系数基于预测图像块的宽度和高度确定。The first prediction value is determined based on the third reference sample point determined according to the angle prediction mode corresponding to the prediction sample point, and then based on the reconstruction value of the third reference image block. The first reconstruction value is the reconstruction value of the first reference sample point, the second reconstruction value is the reconstruction value of the second reference sample point, and the first gradient value can be understood as the difference between the first reconstruction value and the second reconstruction value. The weight coefficient is determined based on the width and height of the prediction image block.
本步骤中,根据上述第一预测值、第一梯度值和权重系数,确定预测样本点对应的第二预测值,可选地,可以通过公式(6)计算得到。
p(x,y)=Clip(((64–w)*p’(x,y)+w*D1+32)>>6)    (6)
In this step, the second prediction value corresponding to the prediction sample point is determined according to the first prediction value, the first gradient value and the weight coefficient. Optionally, it can be calculated by formula (6).
p(x,y)=Clip(((64–w)*p'(x,y)+w*D1+32)>>6) (6)
其中,p(x,y)表示第二预测值,p’(x,y)表示第一预测值,W表示权重系数,D1表示第一梯度值。Among them, p(x, y) represents the second prediction value, p’(x, y) represents the first prediction value, W represents the weight coefficient, and D1 represents the first gradient value.
本步骤中,在确定每个预测样本点对应的第二预测值之后,即可得到预测图像块对应的帧内预测结果。In this step, after determining the second prediction value corresponding to each prediction sample point, the intra-frame prediction result corresponding to the prediction image block can be obtained.
本申请实施例中,对于预测图像块中的每个预测样本点,在预测图像块对应的模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于该角度预测模式对该预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点,并根据第一预测值、第一重建值和第二重建值之间的第一梯度值、以及第一梯度值对应的权重系数,确定预测样本点对应的第二预测值;其中,第一重建值为第一参考样本点的重建值,第二重建值为第二参考样本点的重建值。通过基于角度预测模式对预测样本点进行帧内预测,扩展了PDPC技术的适用范围,使用PDPC技术进行帧内预测得到更为准确的第二预测值, 以此提高了帧内预测的准确度。In an embodiment of the present application, for each predicted sample point in a predicted image block, when the angle between the angle prediction direction represented by the pattern index corresponding to the predicted image block and the horizontal direction is greater than 0 degrees and less than 90 degrees, intra-frame prediction is performed on the predicted sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point, and the second predicted value corresponding to the predicted sample point is determined based on the first predicted value, the first gradient value between the first reconstruction value and the second reconstruction value, and the weight coefficient corresponding to the first gradient value; wherein the first reconstruction value is the reconstruction value of the first reference sample point, and the second reconstruction value is the reconstruction value of the second reference sample point. By performing intra-frame prediction on the predicted sample point based on the angle prediction mode, the scope of application of the PDPC technology is expanded, and a more accurate second prediction value is obtained by using the PDPC technology for intra-frame prediction. This improves the accuracy of intra-frame prediction.
可选地,所述基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点包括:Optionally, performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point includes:
在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定与所述预测图像块相邻,且位于所述预测图像块上方的第二参考样本点;或者,Determine, based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point adjacent to the predicted image block and located above the predicted image block; or
在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定与所述预测图像块相邻,且位于所述预测图像块左侧的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point adjacent to the predicted image block and located on the left side of the predicted image block is determined.
本实施例中,在模式索引表征的角度预测方向与水平方向的夹角大于等于45度(即模式索引大于等于34,或者在宽角度模式下,模式索引大于等于66)的情况下,从预测图像块相邻的左侧图像块中确定第一参考样本点,并基于角度预测模式对第一参考样本点进行帧内预测,确定位于预测图像块上方的第二参考样本点。In this embodiment, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees (that is, the mode index is greater than or equal to 34, or in the wide angle mode, the mode index is greater than or equal to 66), a first reference sample point is determined from the left image block adjacent to the predicted image block, and intra-frame prediction is performed on the first reference sample point based on the angle prediction mode to determine a second reference sample point located above the predicted image block.
在模式索引表征的角度预测方向与水平方向的夹角小于45度(即模式索引小于34,或者在宽角度模式下,模式索引小于66)的情况下,从预测图像块相邻的上方图像块中确定第一参考样本点,并基于角度预测模式对第一参考样本点进行帧内预测,确定位于预测图像块左侧的第二参考样本点。When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees (that is, the mode index is less than 34, or in the wide angle mode, the mode index is less than 66), a first reference sample point is determined from an upper image block adjacent to the predicted image block, and intra-frame prediction is performed on the first reference sample point based on the angular prediction mode to determine a second reference sample point located on the left side of the predicted image block.
为便于理解,请参阅图5,图5示出的是模式索引表征的角度预测方向与水平方向的夹角大于等于45度的应用场景,在图5示出的应用场景中,预测样本点的坐标为(x,y),第一参考样本点的坐标为(-1,y),第二参考样本点的坐标为(-1+d,-1)。For ease of understanding, please refer to Figure 5, which shows an application scenario in which the angle between the angle prediction direction represented by the pattern index and the horizontal direction is greater than or equal to 45 degrees. In the application scenario shown in Figure 5, the coordinates of the predicted sample point are (x, y), the coordinates of the first reference sample point are (-1, y), and the coordinates of the second reference sample point are (-1+d, -1).
获取预测图像块相邻左侧一列已解码的参考样本点的重建值,组成数组r;根据预测样本点对应的角度预测模式查询表一,得到预测样本点的偏移值intraPredAngle,进而通过公式(7)计算得到预测样本点对应的第二预测值。
p(x,y)=Clip(((64–wL(x))*p1(x,y)+wL(x)*(r(-1,y)-r(-1+d,-1))+32)>>6)    (7)
Obtain the reconstructed values of the decoded reference sample points in a column adjacent to the left of the predicted image block to form an array r; query Table 1 according to the angle prediction mode corresponding to the predicted sample point to obtain the offset value intraPredAngle of the predicted sample point, and then calculate the second predicted value corresponding to the predicted sample point through formula (7).
p(x,y)=Clip(((64–wL(x))*p1(x,y)+wL(x)*(r(-1,y)-r(-1+d,-1))+32)>>6) (7)
其中,x的取值范围为0至min(3<<nScale,nTbW),nTbW为预测图像块的宽度,nScale=(log2(nTbH)+log2(nTbW)–2)>>2,nTbH为预测图像块的高度;Wherein, the value range of x is 0 to min(3<<nScale, nTbW), nTbW is the width of the predicted image block, nScale=(log2(nTbH)+log2(nTbW)–2)>>2, and nTbH is the height of the predicted image block;
其中,p(x,y)表示第二预测值,p1(x,y)表示第一预测值,r(-1,y)表示第一重建值,r(-1+d,-1)表示第二重建值,r(-1,y)-r(-1+d,-1)表示第一梯度值,wL(x)表示权重系数。r(-1+d,-1)=(32–dFrac)*r(-1+dInt)+dFrac*r(-1+dInt+1),dInt=(intraPredAngle>>5),dFract=(intraPredAngle&31),在宽角度模式下,dInt=(intraPredAngle>>6),dFract=(intraPredAngle&63),wL(x)=32>>((x<<1)>>nScale)。Wherein, p(x,y) represents the second predicted value, p1(x,y) represents the first predicted value, r(-1,y) represents the first reconstructed value, r(-1+d,-1) represents the second reconstructed value, r(-1,y)-r(-1+d,-1) represents the first gradient value, and wL(x) represents the weight coefficient. r(-1+d,-1)=(32–dFrac)*r(-1+dInt)+dFrac*r(-1+dInt+1), dInt=(intraPredAngle>>5), dFract=(intraPredAngle&31), in wide angle mode, dInt=(intraPredAngle>>6), dFract=(intraPredAngle&63), wL(x)=32>>((x<<1)>>nScale).
可选地,在(x+dInt)小于0的情况下,通过上述公式(7)计算得到预测样本点对 应的第二预测值。Optionally, when (x+dInt) is less than 0, the predicted sample point pair is calculated by the above formula (7): The second predicted value.
本实施例中,基于预测图像块对应的角度预测模式对预测样本点进行帧内预测,确定与预测图像块相邻的第一参考样本点和第二参考样本点,以此扩展了PDPC技术的适用范围,使用PDPC技术进行帧内预测得到更为准确的第二预测值,提高了帧内预测的准确度。In this embodiment, intra-frame prediction is performed on the predicted sample points based on the angle prediction mode corresponding to the predicted image block, and the first reference sample points and the second reference sample points adjacent to the predicted image block are determined, thereby expanding the application scope of the PDPC technology. A more accurate second prediction value is obtained by using the PDPC technology for intra-frame prediction, thereby improving the accuracy of intra-frame prediction.
可选地,所述基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点包括:Optionally, performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point includes:
在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点左侧的第二参考样本点;或者,Determine, based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located on the left side of the first reference image sample point; or,
在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点上方的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located above the first reference image sample point is determined.
本实施例中,在模式索引表征的角度预测方向与水平方向的夹角大于等于45度(即模式索引大于等于34,或者在宽角度模式下,模式索引大于等于66)的情况下,从预测图像块相邻的左侧图像块中确定第一参考样本点,并基于角度预测模式对第一参考样本点进行帧内预测,确定位于第一参考图像样本点左侧的第二参考样本点。In this embodiment, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees (that is, the mode index is greater than or equal to 34, or in the wide angle mode, the mode index is greater than or equal to 66), a first reference sample point is determined from the left image block adjacent to the predicted image block, and the first reference sample point is intra-predicted based on the angle prediction mode to determine a second reference sample point located on the left side of the first reference image sample point.
在模式索引表征的角度预测方向与水平方向的夹角小于45度(即模式索引小于34,或者在宽角度模式下,模式索引小于66)的情况下,从预测图像块相邻的上方图像块中确定第一参考样本点,并基于角度预测模式对第一参考样本点进行帧内预测,确定位于第一参考图像样本点上方的第二参考样本点。When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees (that is, the mode index is less than 34, or in the wide angle mode, the mode index is less than 66), a first reference sample point is determined from an upper image block adjacent to the predicted image block, and intra-frame prediction is performed on the first reference sample point based on the angular prediction mode to determine a second reference sample point located above the first reference image sample point.
为便于理解,请参阅图6,图6示出的是模式索引表征的角度预测方向与水平方向的夹角大于等于45度的应用场景,在图6示出的应用场景中,预测样本点的坐标为(x,y),第一参考样本点的坐标为(-1,y),第二参考样本点的坐标为(-n,y+d)。For ease of understanding, please refer to Figure 6, which shows an application scenario in which the angle between the angle prediction direction represented by the pattern index and the horizontal direction is greater than or equal to 45 degrees. In the application scenario shown in Figure 6, the coordinates of the predicted sample point are (x, y), the coordinates of the first reference sample point are (-1, y), and the coordinates of the second reference sample point are (-n, y+d).
获取预测图像块相邻左侧一列已解码的参考样本点的重建值,组成数组r0,获取预测图像块相邻左侧n列已解码的参考样本点的重建值,组成数组rn,n为大于0的正整数;根据预测样本点对应的角度预测模式查询表一,得到预测样本点的偏移值intraPredAngle,进而通过公式(8)计算得到预测样本点对应的第二预测值。
p(x,y)=Clip(((64–wL(x))*p1(x,y)+wL(x)*(r0(-1,y)-rn(-n,y+d))+32)>>6)    (8)
Obtain the reconstructed values of the decoded reference sample points in the adjacent left column of the prediction image block to form an array r0; obtain the reconstructed values of the decoded reference sample points in the adjacent left n columns of the prediction image block to form an array rn, where n is a positive integer greater than 0; query Table 1 according to the angle prediction mode corresponding to the prediction sample point to obtain the offset value intraPredAngle of the prediction sample point, and then calculate the second prediction value corresponding to the prediction sample point through formula (8).
p(x,y)=Clip(((64–wL(x))*p1(x,y)+wL(x)*(r0(-1,y)-rn(-n,y+d))+32)>>6) (8)
其中,x的取值范围为0至min(3<<nScale,nTbW),nTbW为预测图像块的宽度,nScale=(log2(nTbH)+log2(nTbW)–2)>>2,nTbH为预测图像块的高度;Wherein, the value range of x is 0 to min(3<<nScale, nTbW), nTbW is the width of the predicted image block, nScale=(log2(nTbH)+log2(nTbW)–2)>>2, and nTbH is the height of the predicted image block;
其中,p(x,y)表示第二预测值,p1(x,y)表示第一预测值,r0(-1,y)表示第一重建值,rn(-n,y+d)表示第二重建值,r0(-1,y)-rn(-n,y+d)表示第一梯度值,wL(x)表示权重系数。 rn(y+d)=(32–dFracN)*rn(y+dIntN)+dFracN*r(y+dIntN+1),dIntN=(deltaPos>>5),dFractN=(deltaPos&31),deltaPos=-(32-intraPredAngle)*(1+n),在宽角度模式下,dIntN=(deltaPos>>6),dFractN=(deltaPos&63),deltaPos=-(64-intraPredAngle)*(1+n)。Among them, p(x,y) represents the second predicted value, p1(x,y) represents the first predicted value, r0(-1,y) represents the first reconstructed value, rn(-n,y+d) represents the second reconstructed value, r0(-1,y)-rn(-n,y+d) represents the first gradient value, and wL(x) represents the weight coefficient. rn(y+d)=(32–dFracN)*rn(y+dIntN)+dFracN*r(y+dIntN+1), dIntN=(deltaPos>>5), dFractN=(deltaPos&31), deltaPos=-(32-intraPredAngle)*(1+n), in wide angle mode, dIntN=(deltaPos>>6), dFractN=(deltaPos&63), deltaPos=-(64-intraPredAngle)*(1+n).
可选地,在(y+dIntN)大于等于0的情况下,通过上述公式(8)计算得到预测样本点对应的第二预测值。Optionally, when (y+dIntN) is greater than or equal to 0, the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
可选地,在(x+dInt)大于等于0的情况下,通过上述公式(8)计算得到预测样本点对应的第二预测值。Optionally, when (x+dInt) is greater than or equal to 0, the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
可选地,在(x+dInt)小于0的情况下,通过上述公式(8)计算得到预测样本点对应的第二预测值。Optionally, when (x+dInt) is less than 0, the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
本实施例中,基于预测图像块对应的角度预测模式对预测样本点进行帧内预测,确定位于预测图像块上方的第一参考样本点和第二参考样本点,或者确定位于预测图像块左侧的第一参考样本点和第二参考样本点,以此扩展了PDPC技术的适用范围,使用PDPC技术进行帧内预测得到更为准确的第二预测值,提高了帧内预测的准确度。In this embodiment, intra-frame prediction is performed on the predicted sample points based on the angle prediction mode corresponding to the predicted image block, and the first reference sample point and the second reference sample point located above the predicted image block are determined, or the first reference sample point and the second reference sample point located on the left side of the predicted image block are determined, thereby expanding the application scope of the PDPC technology, using the PDPC technology for intra-frame prediction to obtain a more accurate second prediction value, and improving the accuracy of intra-frame prediction.
可选地,所述基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点包括:Optionally, performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point includes:
在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定所述第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining the first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于第一参考图像样本点上方的第二参考样本点;或者,Determine a second reference sample point located above the first reference image sample point based on the position information of the first reference sample point and the angle prediction mode; or,
在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点左侧的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located on the left side of the first reference image sample point is determined.
本实施例中,在模式索引表征的角度预测方向与水平方向的夹角大于等于45度(即模式索引大于等于34,或者在宽角度模式下,模式索引大于等于66)的情况下,从预测图像块相邻的上方图像块中确定第一参考样本点,并基于角度预测模式对第一参考样本点进行帧内预测,确定位于第一参考图像样本点上方的第二参考样本点。In this embodiment, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees (that is, the mode index is greater than or equal to 34, or in the wide angle mode, the mode index is greater than or equal to 66), a first reference sample point is determined from an upper image block adjacent to the predicted image block, and an intra-frame prediction is performed on the first reference sample point based on the angle prediction mode to determine a second reference sample point located above the first reference image sample point.
在模式索引表征的角度预测方向与水平方向的夹角小于45度(即模式索引小于34,或者在宽角度模式下,模式索引小于66)的情况下,从预测图像块相邻的左侧图像块中确定第一参考样本点,并基于角度预测模式对第一参考样本点进行帧内预测,确定位于第一参考图像样本点左侧的第二参考样本点。When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees (that is, the mode index is less than 34, or in the wide angle mode, the mode index is less than 66), a first reference sample point is determined from a left image block adjacent to the predicted image block, and intra-frame prediction is performed on the first reference sample point based on the angular prediction mode to determine a second reference sample point located on the left side of the first reference image sample point.
为便于理解,请参阅图7,图7示出的是模式索引表征的角度预测方向与水平方向的夹角大于等于45度的应用场景,在图7示出的应用场景中,预测样本点的坐标为(x,y),第一参考样本点的坐标为(x,-1),第二参考样本点的坐标为(x+d,-n)。 For ease of understanding, please refer to Figure 7, which shows an application scenario in which the angle between the angle prediction direction represented by the pattern index and the horizontal direction is greater than or equal to 45 degrees. In the application scenario shown in Figure 7, the coordinates of the predicted sample point are (x, y), the coordinates of the first reference sample point are (x, -1), and the coordinates of the second reference sample point are (x+d, -n).
获取预测图像块相邻上方一行已解码的参考样本点的重建值,组成数组r0,获取预测图像块相邻上方n行已解码的参考样本点的重建值,组成数组rn,n为大于0的正整数;根据预测样本点对应的角度预测模式查询表一,得到预测样本点的偏移值intraPredAngle,进而通过公式(9)计算得到预测样本点对应的第二预测值。
p(x,y)=Clip(((64–wL(x))*p1(x,y)+wL(x)*(r0(x,-1)-rn(x+d,-n))+32)>>6)    (9)
Obtain the reconstruction values of the decoded reference sample points in the adjacent upper row of the prediction image block to form an array r0; obtain the reconstruction values of the decoded reference sample points in the adjacent upper n rows of the prediction image block to form an array rn, where n is a positive integer greater than 0; query Table 1 according to the angle prediction mode corresponding to the prediction sample point to obtain the offset value intraPredAngle of the prediction sample point, and then calculate the second prediction value corresponding to the prediction sample point through formula (9).
p(x,y)=Clip(((64–wL(x))*p1(x,y)+wL(x)*(r0(x,-1)-rn(x+d,-n))+32)>>6) (9)
其中,x的取值范围为0至min(3<<nScale,nTbW),nTbW为预测图像块的宽度,nScale=(log2(nTbH)+log2(nTbW)–2)>>2,nTbH为预测图像块的高度;Wherein, the value range of x is 0 to min(3<<nScale, nTbW), nTbW is the width of the predicted image block, nScale=(log2(nTbH)+log2(nTbW)–2)>>2, and nTbH is the height of the predicted image block;
其中,p(x,y)表示第二预测值,p1(x,y)表示第一预测值,r0(x,-1)表示第一重建值,rn(x+d,-n)表示第二重建值,r0(x,-1)-rn(x+d,-n)表示第一梯度值,wL(x)表示权重系数。rn(x+d)=(32–dFracN)*rn(y+dIntN)+dFracN*r(x+dIntN+1),dIntN=(deltaPos>>5),dFractN=(deltaPos&31),deltaPos=intraPredAngle*(1+n),在宽角度模式下,dIntN=(deltaPos>>6),dFractN=(deltaPos&63),deltaPos=intraPredAngle*(1+n)。Wherein, p(x,y) represents the second predicted value, p1(x,y) represents the first predicted value, r0(x,-1) represents the first reconstructed value, rn(x+d,-n) represents the second reconstructed value, r0(x,-1)-rn(x+d,-n) represents the first gradient value, and wL(x) represents the weight coefficient. rn(x+d)=(32–dFracN)*rn(y+dIntN)+dFracN*r(x+dIntN+1), dIntN=(deltaPos>>5), dFractN=(deltaPos&31), deltaPos=intraPredAngle*(1+n), in wide angle mode, dIntN=(deltaPos>>6), dFractN=(deltaPos&63), deltaPos=intraPredAngle*(1+n).
可选地,在(x+dInt)大于等于0的情况下,通过上述公式(8)计算得到预测样本点对应的第二预测值。Optionally, when (x+dInt) is greater than or equal to 0, the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
可选地,在(x+dInt)小于0的情况下,通过上述公式(8)计算得到预测样本点对应的第二预测值。Optionally, when (x+dInt) is less than 0, the second prediction value corresponding to the prediction sample point is calculated by the above formula (8).
本实施例中,基于预测图像块对应的角度预测模式对预测样本点进行帧内预测,确定位于预测图像块上方的第一参考样本点和第二参考样本点,或者确定位于预测图像块左侧的第一参考样本点和第二参考样本点,以此扩展了PDPC技术的适用范围,使用PDPC技术进行帧内预测得到更为准确的第二预测值,提高了帧内预测的准确度。In this embodiment, intra-frame prediction is performed on the predicted sample points based on the angle prediction mode corresponding to the predicted image block, and the first reference sample point and the second reference sample point located above the predicted image block are determined, or the first reference sample point and the second reference sample point located on the left side of the predicted image block are determined, thereby expanding the application scope of the PDPC technology, using the PDPC technology for intra-frame prediction to obtain a more accurate second prediction value, and improving the accuracy of intra-frame prediction.
可选地,在(x+dInt)小于0的情况下,可以使用图5示出的应用场景涉及的帧内预测方法,获得预测图像块对应的第二预测值;或者使用图7示出的应用场景涉及的帧内预测方法,获得预测图像块对应的第二预测值。在(x+dInt)大于等于0的情况下,可以使用图6示出的应用场景涉及的帧内预测方法,获得预测图像块对应的第二预测值。Optionally, when (x+dInt) is less than 0, the intra-frame prediction method involved in the application scenario shown in FIG5 may be used to obtain the second prediction value corresponding to the predicted image block; or the intra-frame prediction method involved in the application scenario shown in FIG7 may be used to obtain the second prediction value corresponding to the predicted image block. When (x+dInt) is greater than or equal to 0, the intra-frame prediction method involved in the application scenario shown in FIG6 may be used to obtain the second prediction value corresponding to the predicted image block.
可选地,所述获取预测图像块对应的角度预测模式的模式索引之后,所述方法包括:Optionally, after obtaining the mode index of the angle prediction mode corresponding to the predicted image block, the method includes:
对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第三参考样本点、第四参考样本点、第五参考样本点和第六参考样本点;For each prediction sample point in the prediction image block, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees, perform intra-frame prediction on the prediction sample point based on the angle prediction mode to determine a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point;
根据第三重建值和第四重建值之间的第二梯度值,以及第五重建值和第六重建值之间的第三梯度值,确定所述预测样本点对应的第二预测值。A second prediction value corresponding to the prediction sample point is determined according to a second gradient value between the third reconstruction value and the fourth reconstruction value, and a third gradient value between the fifth reconstruction value and the sixth reconstruction value.
本实施例中,在模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,对预测图像块中的每个预测样本点进行帧内预测,获得预测样本点对应的第三参考样本点、第四参考样本点、第五参考样本点和第六参考样本点,其中,第三参考样本点和第四参考样本点位于预测图像块左侧,第五参考样本点和第六参考样本点位于预测 图像块上方,且第三参考样本点、第四参考样本点、第五参考样本点和第六参考样本点均为已重建图像块内的样本点。具体的实施方式请参与后续实施例。In this embodiment, when the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees, intra-frame prediction is performed on each prediction sample point in the prediction image block to obtain a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point corresponding to the prediction sample point, wherein the third reference sample point and the fourth reference sample point are located on the left side of the prediction image block, and the fifth reference sample point and the sixth reference sample point are located on the left side of the prediction image block. The third reference sample point, the fourth reference sample point, the fifth reference sample point and the sixth reference sample point are all sample points in the reconstructed image block. For specific implementation methods, please refer to the subsequent embodiments.
将第三重建值和第四重建值之间的差值确定为第二梯度值,将第五重建值和第六重建值之间的差值确定为第三梯度值,其中,第三重建值为第三参考样本点的重建值,第四重建值为第四参考样本点的重建值,第五重建值为第五参考样本点的重建值,第六重建值为第六参考样本点的重建值。通过公式(10)计算得到预测样本点对应的第二预测值。
p(x,y)=(1-w1(x)-w2(x))*p1(x,y)+w1(x)*GradientLeft+w2(x)*GradientTop    (10)
The difference between the third reconstruction value and the fourth reconstruction value is determined as the second gradient value, and the difference between the fifth reconstruction value and the sixth reconstruction value is determined as the third gradient value, wherein the third reconstruction value is the reconstruction value of the third reference sample point, the fourth reconstruction value is the reconstruction value of the fourth reference sample point, the fifth reconstruction value is the reconstruction value of the fifth reference sample point, and the sixth reconstruction value is the reconstruction value of the sixth reference sample point. The second prediction value corresponding to the prediction sample point is calculated by formula (10).
p(x,y)=(1-w1(x)-w2(x))*p1(x,y)+w1(x)*GradientLeft+w2(x)*GradientTop (10)
其中,p(x,y)表示第二预测值,w1(x)和w2(x)表示预设的权重值,p1(x,y)表示第一预测值,GradientLeft表示第一梯度值,GradientTop表示第二梯度值。Among them, p(x, y) represents the second predicted value, w1(x) and w2(x) represent preset weight values, p1(x, y) represents the first predicted value, GradientLeft represents the first gradient value, and GradientTop represents the second gradient value.
其中,GradientLeft=(r0(-1,y)-rn(-n,y+d)),GradientTop=(r0(x,-1)-rn(x+d,-n)),r0(-1,y)表示第三重建值,rn(-n,y+d)表示第四重建值,r0(x,-1)表示第五重建值,rn(x+d,-n)表示第六重建值。Among them, GradientLeft=(r0(-1,y)-rn(-n,y+d)), GradientTop=(r0(x,-1)-rn(x+d,-n)), r0(-1,y) represents the third reconstruction value, rn(-n,y+d) represents the fourth reconstruction value, r0(x,-1) represents the fifth reconstruction value, and rn(x+d,-n) represents the sixth reconstruction value.
可选地,所述基于所述角度预测模式对所述预测样本点进行帧内预测,确定第三参考样本点、第四参考样本点、第五参考样本点和第六参考样本点包括:Optionally, performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point comprises:
根据所述预测样本点的位置信息,从预测图像块相邻的左侧图像块中确定所述第三参考样本点;Determining the third reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第三参考样本点的位置信息以及所述角度预测模式,确定位于所述第三参考样本点左侧的第四参考样本点;Determine, based on the position information of the third reference sample point and the angle prediction mode, a fourth reference sample point located on the left side of the third reference sample point;
根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定所述第五参考样本点;Determining the fifth reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第五参考样本点的位置信息以及所述角度预测模式,确定位于所述第五参考样本点上方的第六参考样本点。Based on the position information of the fifth reference sample point and the angle prediction mode, a sixth reference sample point located above the fifth reference sample point is determined.
本实施例中,从预测图像块相邻的左侧图像块中确定第三参考样本点,并基于角度预测模式对第三参考样本点进行帧内预测,确定位于第三参考图像样本点左侧的第四参考样本点,也就是说,使用图6示出的应用场景涉及的帧内预测方法,获得第三参考图像样本点和第四参考样本点。从预测图像块相邻的上方图像块中确定第五参考样本点,并基于角度预测模式对第五参考样本点进行帧内预测,确定位于第五参考图像样本点上方的第六参考样本点,也就是说,使用图7示出的应用场景涉及的帧内预测方法,获得第五参考图像样本点和第六参考样本点。In this embodiment, a third reference sample point is determined from a left image block adjacent to the predicted image block, and intra-frame prediction is performed on the third reference sample point based on the angle prediction mode to determine a fourth reference sample point located to the left of the third reference image sample point, that is, the third reference image sample point and the fourth reference sample point are obtained using the intra-frame prediction method involved in the application scenario shown in FIG6. A fifth reference sample point is determined from an upper image block adjacent to the predicted image block, and intra-frame prediction is performed on the fifth reference sample point based on the angle prediction mode to determine a sixth reference sample point located above the fifth reference image sample point, that is, the fifth reference image sample point and the sixth reference sample point are obtained using the intra-frame prediction method involved in the application scenario shown in FIG7.
本申请实施例提供的帧内预测方法,执行主体可以为帧内预测装置。本申请实施例中以帧内预测装置执行帧内预测方法为例,说明本申请实施例提供的帧内预测装置。The intra-frame prediction method provided in the embodiment of the present application can be executed by an intra-frame prediction device. In the embodiment of the present application, an intra-frame prediction device executing the intra-frame prediction method is taken as an example to illustrate the intra-frame prediction device provided in the embodiment of the present application.
如图8所示,本申请实施例还提供了一种帧内预测装置800,包括:As shown in FIG8 , the embodiment of the present application further provides an intra-frame prediction device 800, including:
获取模块801,用于获取预测图像块对应的角度预测模式的模式索引;An acquisition module 801 is used to acquire a mode index of an angle prediction mode corresponding to a prediction image block;
第一确定模块802,用于对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预 测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点;The first determining module 802 is configured to determine, for each predicted sample point in the predicted image block, a prediction direction represented by the mode index and a horizontal direction with an angle greater than 0 degrees and less than 90 degrees based on the angle prediction direction. In the prediction mode, intra-frame prediction is performed on the prediction sample point to determine a first reference sample point and a second reference sample point;
第二确定模块803,用于根据第一重建值和第二重建值之间的第一梯度值、所述预测样本点对应的第一预测值、以及所述第一梯度值相关联的权重系数,确定所述预测样本点对应的第二预测值。The second determination module 803 is used to determine the second prediction value corresponding to the prediction sample point according to the first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and the weight coefficient associated with the first gradient value.
可选地,所述第一确定模块802,具体用于:Optionally, the first determining module 802 is specifically configured to:
在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定与所述预测图像块相邻,且位于所述预测图像块上方的第二参考样本点;或者,Determine, based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point adjacent to the predicted image block and located above the predicted image block; or
在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定与所述预测图像块相邻,且位于所述预测图像块左侧的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point adjacent to the predicted image block and located on the left side of the predicted image block is determined.
可选地,所述第一确定模块802,还具体用于:Optionally, the first determining module 802 is further specifically configured to:
在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点左侧的第二参考样本点;或者,Determine, based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located on the left side of the first reference image sample point; or,
在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点上方的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located above the first reference image sample point is determined.
可选地,所述第一确定模块802,还具体用于:Optionally, the first determining module 802 is further specifically configured to:
在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点上方的第二参考样本点;或者,Determine a second reference sample point located above the first reference image sample point based on the position information of the first reference sample point and the angle prediction mode; or,
在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点左侧的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located on the left side of the first reference image sample point is determined.
可选地,所述帧内预测装置800还包括: Optionally, the intra-frame prediction device 800 further includes:
第三确定模块,用于对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第三参考样本点、第四参考样本点、第五参考样本点和第六参考样本点;a third determination module, configured to, for each prediction sample point in the prediction image block, perform intra-frame prediction on the prediction sample point based on the angle prediction mode, and determine a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees;
第四确定模块,用于根据第三重建值和第四重建值之间的第二梯度值,以及第五重建值和第六重建值之间的第三梯度值,确定所述预测样本点对应的第二预测值。The fourth determination module is used to determine the second prediction value corresponding to the prediction sample point according to the second gradient value between the third reconstruction value and the fourth reconstruction value, and the third gradient value between the fifth reconstruction value and the sixth reconstruction value.
可选地,所述第三确定模块,具体用于:Optionally, the third determining module is specifically configured to:
根据所述预测样本点的位置信息,从预测图像块相邻的左侧图像块中确定所述第三参考样本点;Determining the third reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第三参考样本点的位置信息以及所述角度预测模式,确定位于所述第三参考样本点左侧的第四参考样本点;Determine, based on the position information of the third reference sample point and the angle prediction mode, a fourth reference sample point located on the left side of the third reference sample point;
根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定所述第五参考样本点;Determining the fifth reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
基于所述第五参考样本点的位置信息以及所述角度预测模式,确定位于所述第五参考样本点上方的第六参考样本点。Based on the position information of the fifth reference sample point and the angle prediction mode, a sixth reference sample point located above the fifth reference sample point is determined.
本申请实施例中,对于预测图像块中的每个预测样本点,在预测图像块对应的模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于该角度预测模式对该预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点,并根据第一预测值、第一重建值和第二重建值之间的第一梯度值、以及第一梯度值相关联的权重系数,确定预测样本点对应的第二预测值;其中,第一重建值为第一参考样本点的重建值,第二重建值为第二参考样本点的重建值。通过基于角度预测模式对预测样本点进行帧内预测,扩展了PDPC技术的适用范围,使用PDPC技术进行帧内预测得到更为准确的第二预测值,以此提高了帧内预测的准确度。In an embodiment of the present application, for each predicted sample point in the predicted image block, when the angle between the angle prediction direction represented by the mode index corresponding to the predicted image block and the horizontal direction is greater than 0 degrees and less than 90 degrees, the predicted sample point is intra-predicted based on the angle prediction mode to determine the first reference sample point and the second reference sample point, and the second predicted value corresponding to the predicted sample point is determined based on the first predicted value, the first gradient value between the first reconstruction value and the second reconstruction value, and the weight coefficient associated with the first gradient value; wherein the first reconstruction value is the reconstruction value of the first reference sample point, and the second reconstruction value is the reconstruction value of the second reference sample point. By performing intra-frame prediction on the predicted sample point based on the angle prediction mode, the scope of application of the PDPC technology is expanded, and a more accurate second prediction value is obtained by using the PDPC technology for intra-frame prediction, thereby improving the accuracy of intra-frame prediction.
该装置实施例与上述图4所示的帧内预测方法实施例对应,上述方法实施例中的各个实施过程和实现方式均可适用于该装置实施例中,且能达到相同的技术效果。This device embodiment corresponds to the intra-frame prediction method embodiment shown in FIG. 4 . Each implementation process and implementation method in the above method embodiment can be applied to this device embodiment and can achieve the same technical effect.
本申请实施例中的帧内预测装置可以是电子设备,例如具有操作***的电子设备,也可以是电子设备中的部件、例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,终端可以包括但不限于上述所列举的终端的类型,其他设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)等,本申请实施例不作具体限定。The intra-frame prediction device in the embodiment of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the terminal can include but is not limited to the types of terminals listed above, and other devices can be servers, network attached storage (NAS), etc., which are not specifically limited in the embodiment of the present application.
可选地,如图9所示,本申请实施例还提供一种通信设备900,包括处理器901和存储器902,存储器902上存储有可在所述处理器901上运行的程序或指令,例如,该通信设备900为终端时,该程序或指令被处理器901执行时实现上述帧内预测方法实施例的各个步骤,且能达到相同的技术效果。Optionally, as shown in Figure 9, an embodiment of the present application also provides a communication device 900, including a processor 901 and a memory 902, and the memory 902 stores programs or instructions that can be executed on the processor 901. For example, when the communication device 900 is a terminal, the program or instructions are executed by the processor 901 to implement the various steps of the above-mentioned intra-frame prediction method embodiment and can achieve the same technical effect.
本申请实施例还提供一种终端,包括处理器901和通信接口,处理器901用于执行以 下操作:The embodiment of the present application also provides a terminal, including a processor 901 and a communication interface, wherein the processor 901 is configured to execute Next operation:
获取预测图像块对应的角度预测模式的模式索引;Obtaining a mode index of an angle prediction mode corresponding to a predicted image block;
对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点;For each predicted sample point in the predicted image block, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees, perform intra-frame prediction on the predicted sample point based on the angle prediction mode to determine a first reference sample point and a second reference sample point;
根据第一重建值和第二重建值之间的第一梯度值、所述预测样本点相关联的第一预测值、以及所述第一梯度值对应的权重系数,确定所述预测样本点对应的第二预测值。A second prediction value corresponding to the prediction sample point is determined according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value associated with the prediction sample point, and a weight coefficient corresponding to the first gradient value.
该终端实施例与上述终端侧方法实施例对应,上述方法实施例的各个实施过程和实现方式均可适用于该终端实施例中,且能达到相同的技术效果。具体地,图10为实现本申请实施例的一种终端的硬件结构示意图。The terminal embodiment corresponds to the above-mentioned terminal side method embodiment, and each implementation process and implementation mode of the above-mentioned method embodiment can be applied to the terminal embodiment and can achieve the same technical effect. Specifically, Figure 10 is a schematic diagram of the hardware structure of a terminal implementing the embodiment of the present application.
该终端1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。The terminal 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
本领域技术人员可以理解,终端1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理***与处理器1010逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。图10中示出的终端结构并不构成对终端的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the terminal 1000 can also include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 1010 through a power management system, so as to implement functions such as charging, discharging, and power consumption management through the power management system. The terminal structure shown in FIG10 does not constitute a limitation on the terminal, and the terminal can include more or fewer components than shown in the figure, or combine certain components, or arrange components differently, which will not be described in detail here.
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(Graphics Processing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072中的至少一种。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
本申请实施例中,射频单元1001接收来自网络侧设备的下行数据后,可以传输给处理器1010进行处理;射频单元1001可以向网络侧设备发送上行数据。通常,射频单元1001包括但不限于天线、放大器、收发信机、耦合器、低噪声放大器、双工器等。In the embodiment of the present application, after receiving downlink data from the network side device, the RF unit 1001 can transmit the data to the processor 1010 for processing; the RF unit 1001 can send uplink data to the network side device. Generally, the RF unit 1001 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc.
存储器1009可用于存储软件程序或指令以及各种数据。存储器1009可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作***、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1009可以包括易失性存储器或非易失性存储器,或者,存储器1009可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器 (Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器1009包括但不限于这些和任意其它适合类型的存储器。The memory 1009 can be used to store software programs or instructions and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory, or a non-volatile memory. (Erasable PROM, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash memory. Volatile memory can be Random Access Memory (Random Access Memory, RAM), Static Random Access Memory (Static RAM, SRAM), Dynamic Random Access Memory (Dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Synch link DRAM, SLDRAM) and Direct Rambus RAM (Direct Rambus RAM, DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
处理器1010可包括一个或多个处理单元;可选的,处理器1010集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作***、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
其中,处理器1010用于执行以下操作:The processor 1010 is configured to perform the following operations:
获取预测图像块对应的角度预测模式的模式索引;Obtaining a mode index of an angle prediction mode corresponding to a predicted image block;
对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点;For each predicted sample point in the predicted image block, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees, perform intra-frame prediction on the predicted sample point based on the angle prediction mode to determine a first reference sample point and a second reference sample point;
根据第一重建值和第二重建值之间的第一梯度值、所述预测样本点对应的第一预测值、以及所述第一梯度值相关联的权重系数,确定所述预测样本点对应的第二预测值。A second prediction value corresponding to the prediction sample point is determined according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and a weight coefficient associated with the first gradient value.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned intra-frame prediction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
其中,所述处理器为上述实施例中所述的终端中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为***级芯片,***芯片,芯片***或片上***芯片等。It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
本申请实施例另提供了一种计算机程序/程序产品,所述计算机程序/程序产品被存储在存储介质中,所述计算机程序/程序产品被至少一个处理器执行以实现上述帧内预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a computer program/program product, which is stored in a storage medium. The computer program/program product is executed by at least one processor to implement the various processes of the above-mentioned intra-frame prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素, 而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, It also includes other elements that are not explicitly listed, or includes elements that are inherent to such a process, method, article or device. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, method, article or device that includes the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims (17)

  1. 一种帧内预测方法,包括:An intra-frame prediction method, comprising:
    获取预测图像块对应的角度预测模式的模式索引;Obtaining a mode index of an angle prediction mode corresponding to a predicted image block;
    对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点;所述第一参考样本点和所述第二参考样本点均为已重建的图像块内的样本点;For each predicted sample point in the predicted image block, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees, intra-frame prediction is performed on the predicted sample point based on the angle prediction mode to determine a first reference sample point and a second reference sample point; the first reference sample point and the second reference sample point are both sample points in the reconstructed image block;
    根据第一重建值和第二重建值之间的第一梯度值、所述预测样本点对应的第一预测值、以及所述第一梯度值相关联的权重系数,确定所述预测样本点对应的第二预测值;所述第一重建值为所述第一参考样本点的重建值,所述第二重建值为所述第二参考样本点的重建值,所述第一预测值基于所述预测图像块对应的角度预测模式确定。Determine a second prediction value corresponding to the prediction sample point according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and a weight coefficient associated with the first gradient value; the first reconstruction value is a reconstruction value of the first reference sample point, the second reconstruction value is a reconstruction value of the second reference sample point, and the first prediction value is determined based on an angle prediction mode corresponding to the prediction image block.
  2. 根据权利要求1所述的方法,其中,所述基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点包括:The method according to claim 1, wherein the performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point comprises:
    在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;基于所述第一参考样本点的位置信息以及所述角度预测模式,确定与所述预测图像块相邻,且位于所述预测图像块上方的第二参考样本点;或者,In a case where the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point; determining a second reference sample point adjacent to the predicted image block and located above the predicted image block based on the position information of the first reference sample point and the angular prediction mode; or
    在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;基于所述第一参考样本点的位置信息以及所述角度预测模式,确定与所述预测图像块相邻,且位于所述预测图像块左侧的第二参考样本点。When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, a first reference sample point is determined from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point; and a second reference sample point adjacent to the predicted image block and located on the left side of the predicted image block is determined based on the position information of the first reference sample point and the angular prediction mode.
  3. 根据权利要求1所述的方法,其中,所述基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点包括:The method according to claim 1, wherein the performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point comprises:
    在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点左侧的第二参考样本点;或者,Determine, based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located on the left side of the first reference image sample point; or,
    在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点上方的第二参考样本点。When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, a first reference sample point is determined from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point; and a second reference sample point located above the first reference image sample point is determined based on the position information of the first reference sample point and the angular prediction mode.
  4. 根据权利要求1所述的方法,其中,所述基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点包括: The method according to claim 1, wherein the performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the first reference sample point and the second reference sample point comprises:
    在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点上方的第二参考样本点;或者,Determine a second reference sample point located above the first reference image sample point based on the position information of the first reference sample point and the angle prediction mode; or,
    在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点左侧的第二参考样本点。When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, a first reference sample point is determined from a left image block adjacent to the predicted image block according to the position information of the predicted sample point; and a second reference sample point located to the left of the first reference image sample point is determined based on the position information of the first reference sample point and the angular prediction mode.
  5. 根据权利要求1-4中任一项所述的方法,其中,所述获取预测图像块对应的角度预测模式的模式索引之后,所述方法还包括:The method according to any one of claims 1 to 4, wherein after obtaining the mode index of the angle prediction mode corresponding to the predicted image block, the method further comprises:
    对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第三参考样本点、第四参考样本点、第五参考样本点和第六参考样本点;所述第三参考样本点和所述第四参考样本点位于所述预测图像块左侧,所述第五参考样本点和所述第六参考样本点位于所述预测图像块上方,且所述第三参考样本点、所述第四参考样本点、所述第五参考样本点和所述第六参考样本点均为已重建图像块内的样本点;For each prediction sample point in the prediction image block, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees, intra-frame prediction is performed on the prediction sample point based on the angle prediction mode to determine a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point; the third reference sample point and the fourth reference sample point are located on the left side of the prediction image block, the fifth reference sample point and the sixth reference sample point are located above the prediction image block, and the third reference sample point, the fourth reference sample point, the fifth reference sample point, and the sixth reference sample point are all sample points in the reconstructed image block;
    根据第三重建值和第四重建值之间的第二梯度值,以及第五重建值和第六重建值之间的第三梯度值,确定所述预测样本点对应的第二预测值;所述第三重建值为第三参考样本点的重建值,所述第四重建值为第四参考样本点的重建值,所述第五重建值为第五参考样本点的重建值,所述第六重建值为第六参考样本点的重建值。A second prediction value corresponding to the prediction sample point is determined according to a second gradient value between the third reconstruction value and the fourth reconstruction value, and a third gradient value between the fifth reconstruction value and the sixth reconstruction value; the third reconstruction value is a reconstruction value of a third reference sample point, the fourth reconstruction value is a reconstruction value of a fourth reference sample point, the fifth reconstruction value is a reconstruction value of a fifth reference sample point, and the sixth reconstruction value is a reconstruction value of a sixth reference sample point.
  6. 根据权利要求5所述的方法,其中,所述基于所述角度预测模式对所述预测样本点进行帧内预测,确定第三参考样本点、第四参考样本点、第五参考样本点和第六参考样本点包括:The method according to claim 5, wherein the performing intra-frame prediction on the prediction sample point based on the angle prediction mode to determine the third reference sample point, the fourth reference sample point, the fifth reference sample point, and the sixth reference sample point comprises:
    根据所述预测样本点的位置信息,从预测图像块相邻的左侧图像块中确定所述第三参考样本点;Determining the third reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第三参考样本点的位置信息以及所述角度预测模式,确定位于所述第三参考样本点左侧的第四参考样本点;Determine, based on the position information of the third reference sample point and the angle prediction mode, a fourth reference sample point located on the left side of the third reference sample point;
    根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定所述第五参考样本点;Determining the fifth reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第五参考样本点的位置信息以及所述角度预测模式,确定位于所述第五参考样本点上方的第六参考样本点。Based on the position information of the fifth reference sample point and the angle prediction mode, a sixth reference sample point located above the fifth reference sample point is determined.
  7. 一种帧内预测装置,包括:An intra-frame prediction device, comprising:
    获取模块,用于获取预测图像块对应的角度预测模式的模式索引;An acquisition module, used to acquire a mode index of an angle prediction mode corresponding to a prediction image block;
    第一确定模块,用于对于所述预测图像块中的每个预测样本点,在所述模式索引表征 的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第一参考样本点和第二参考样本点;所述第一参考样本点和所述第二参考样本点均为已重建的图像块内的样本点;The first determining module is used for determining, for each predicted sample point in the predicted image block, the mode index representation When the angle between the angular prediction direction and the horizontal direction is greater than 0 degrees and less than 90 degrees, intra-frame prediction is performed on the predicted sample point based on the angular prediction mode to determine a first reference sample point and a second reference sample point; the first reference sample point and the second reference sample point are both sample points in the reconstructed image block;
    第二确定模块,用于根据第一重建值和第二重建值之间的第一梯度值、所述预测样本点对应的第一预测值、以及所述第一梯度值相关联的权重系数,确定所述预测样本点对应的第二预测值;所述第一重建值为所述第一参考样本点的重建值,所述第二重建值为所述第二参考样本点的重建值,所述第一预测值基于所述预测图像块对应的角度预测模式确定。A second determination module is configured to determine a second prediction value corresponding to the prediction sample point according to a first gradient value between the first reconstruction value and the second reconstruction value, the first prediction value corresponding to the prediction sample point, and a weight coefficient associated with the first gradient value; the first reconstruction value is a reconstruction value of the first reference sample point, the second reconstruction value is a reconstruction value of the second reference sample point, and the first prediction value is determined based on an angle prediction mode corresponding to the prediction image block.
  8. 根据权利要求7所述的装置,其中,所述第一确定模块,具体用于:The apparatus according to claim 7, wherein the first determining module is specifically configured to:
    在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第一参考样本点的位置信息以及所述角度预测模式,确定与所述预测图像块相邻,且位于所述预测图像块上方的第二参考样本点;或者,Determine, based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point adjacent to the predicted image block and located above the predicted image block; or
    在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第一参考样本点的位置信息以及所述角度预测模式,确定与所述预测图像块相邻,且位于所述预测图像块左侧的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point adjacent to the predicted image block and located on the left side of the predicted image block is determined.
  9. 根据权利要求7所述的装置,其中,所述第一确定模块,还具体用于:The apparatus according to claim 7, wherein the first determining module is further specifically configured to:
    在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点左侧的第二参考样本点;或者,Determine, based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located on the left side of the first reference image sample point; or,
    在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点上方的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located above the first reference image sample point is determined.
  10. 根据权利要求7所述的装置,其中,所述第一确定模块,还具体用于:The apparatus according to claim 7, wherein the first determining module is further specifically configured to:
    在所述模式索引表征的角度预测方向与水平方向的夹角大于等于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定第一参考样本点;When the angle between the angular prediction direction represented by the mode index and the horizontal direction is greater than or equal to 45 degrees, determining a first reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点上方的第二参考样本点;或者,Determine a second reference sample point located above the first reference image sample point based on the position information of the first reference sample point and the angle prediction mode; or,
    在所述模式索引表征的角度预测方向与水平方向的夹角小于45度的情况下,根据所述预测样本点的位置信息,从所述预测图像块相邻的左侧图像块中确定第一参考样本点; When the angle between the angular prediction direction represented by the mode index and the horizontal direction is less than 45 degrees, determining a first reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第一参考样本点的位置信息以及所述角度预测模式,确定位于所述第一参考图像样本点左侧的第二参考样本点。Based on the position information of the first reference sample point and the angle prediction mode, a second reference sample point located on the left side of the first reference image sample point is determined.
  11. 根据权利要求7-10中任一项所述的装置,其中,所述装置还包括:The device according to any one of claims 7 to 10, wherein the device further comprises:
    第三确定模块,用于对于所述预测图像块中的每个预测样本点,在所述模式索引表征的角度预测方向与水平方向的夹角大于0度且小于90度的情况下,基于所述角度预测模式对所述预测样本点进行帧内预测,确定第三参考样本点、第四参考样本点、第五参考样本点和第六参考样本点;所述第三参考样本点和所述第四参考样本点位于所述预测图像块左侧,所述第五参考样本点和所述第六参考样本点位于所述预测图像块上方,且所述第三参考样本点、所述第四参考样本点、所述第五参考样本点和所述第六参考样本点均为已重建图像块内的样本点;a third determination module, configured to, for each prediction sample point in the prediction image block, perform intra-frame prediction on the prediction sample point based on the angle prediction mode, and determine a third reference sample point, a fourth reference sample point, a fifth reference sample point, and a sixth reference sample point, when the angle between the angle prediction direction represented by the mode index and the horizontal direction is greater than 0 degrees and less than 90 degrees; the third reference sample point and the fourth reference sample point are located on the left side of the prediction image block, the fifth reference sample point and the sixth reference sample point are located above the prediction image block, and the third reference sample point, the fourth reference sample point, the fifth reference sample point, and the sixth reference sample point are all sample points in the reconstructed image block;
    第四确定模块,用于根据第三重建值和第四重建值之间的第二梯度值,以及第五重建值和第六重建值之间的第三梯度值,确定所述预测样本点对应的第二预测值;所述第三重建值为第三参考样本点的重建值,所述第四重建值为第四参考样本点的重建值,所述第五重建值为第五参考样本点的重建值,所述第六重建值为第六参考样本点的重建值。a fourth determination module, configured to determine a second prediction value corresponding to the prediction sample point according to a second gradient value between the third reconstruction value and the fourth reconstruction value, and a third gradient value between the fifth reconstruction value and the sixth reconstruction value; the third reconstruction value is a reconstruction value of a third reference sample point, the fourth reconstruction value is a reconstruction value of a fourth reference sample point, the fifth reconstruction value is a reconstruction value of a fifth reference sample point, and the sixth reconstruction value is a reconstruction value of a sixth reference sample point.
  12. 根据权利要求11所述的装置,其中,所述第三确定模块,具体用于:The apparatus according to claim 11, wherein the third determining module is specifically configured to:
    根据所述预测样本点的位置信息,从预测图像块相邻的左侧图像块中确定所述第三参考样本点;Determining the third reference sample point from a left image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第三参考样本点的位置信息以及所述角度预测模式,确定位于所述第三参考样本点左侧的第四参考样本点;Determine, based on the position information of the third reference sample point and the angle prediction mode, a fourth reference sample point located on the left side of the third reference sample point;
    根据所述预测样本点的位置信息,从所述预测图像块相邻的上方图像块中确定所述第五参考样本点;Determining the fifth reference sample point from an upper image block adjacent to the predicted image block according to the position information of the predicted sample point;
    基于所述第五参考样本点的位置信息以及所述角度预测模式,确定位于所述第五参考样本点上方的第六参考样本点。Based on the position information of the fifth reference sample point and the angle prediction mode, a sixth reference sample point located above the fifth reference sample point is determined.
  13. 一种终端,包括处理器和存储器,所述存储器存储可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1-6中任一项所述的帧内预测方法的步骤。A terminal comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, wherein when the program or instruction is executed by the processor, the steps of the intra-frame prediction method according to any one of claims 1 to 6 are implemented.
  14. 一种可读存储介质,所述可读存储介质上存储程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1-6中任一项所述的帧内预测方法的步骤。A readable storage medium stores a program or instruction, wherein the program or instruction, when executed by a processor, implements the steps of the intra-frame prediction method according to any one of claims 1 to 6.
  15. 一种芯片,所述芯片包括处理器和通信接口,其中,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-6中任一项所述的帧内预测方法的步骤。A chip comprises a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the intra-frame prediction method according to any one of claims 1 to 6.
  16. 一种计算机程序产品,所述计算机程序产品被存储在存储介质中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1-6中任一项所述的帧内预测方法的步骤。A computer program product is stored in a storage medium and is executed by at least one processor to implement the steps of the intra-frame prediction method according to any one of claims 1 to 6.
  17. 一种电子设备,被配置成用于执行如权利要求1-6中任一项所述的帧内预测方法的步骤。 An electronic device is configured to execute the steps of the intra-frame prediction method according to any one of claims 1 to 6.
PCT/CN2023/123318 2022-10-12 2023-10-08 Intra-frame prediction method and apparatus, and device WO2024078401A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211249310.8A CN117915097A (en) 2022-10-12 2022-10-12 Intra-frame prediction method, device and equipment
CN202211249310.8 2022-10-12

Publications (1)

Publication Number Publication Date
WO2024078401A1 true WO2024078401A1 (en) 2024-04-18

Family

ID=90668849

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/123318 WO2024078401A1 (en) 2022-10-12 2023-10-08 Intra-frame prediction method and apparatus, and device

Country Status (2)

Country Link
CN (1) CN117915097A (en)
WO (1) WO2024078401A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019199093A1 (en) * 2018-04-11 2019-10-17 엘지전자 주식회사 Intra prediction mode-based image processing method and device therefor
US20200107020A1 (en) * 2017-06-05 2020-04-02 Panasonic Intellectual Property Corporation Of America Encoder, decoder, encoding method, and decoding method
CN111771382A (en) * 2018-02-26 2020-10-13 交互数字Vc控股公司 Gradient-based boundary filtering in intra prediction
CN113508592A (en) * 2019-03-08 2021-10-15 华为技术有限公司 Encoder, decoder and corresponding inter-frame prediction method
CN114731394A (en) * 2019-12-09 2022-07-08 高通股份有限公司 Position dependent intra prediction combining of angular intra prediction modes for video coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200107020A1 (en) * 2017-06-05 2020-04-02 Panasonic Intellectual Property Corporation Of America Encoder, decoder, encoding method, and decoding method
CN111771382A (en) * 2018-02-26 2020-10-13 交互数字Vc控股公司 Gradient-based boundary filtering in intra prediction
WO2019199093A1 (en) * 2018-04-11 2019-10-17 엘지전자 주식회사 Intra prediction mode-based image processing method and device therefor
CN113508592A (en) * 2019-03-08 2021-10-15 华为技术有限公司 Encoder, decoder and corresponding inter-frame prediction method
CN114731394A (en) * 2019-12-09 2022-07-08 高通股份有限公司 Position dependent intra prediction combining of angular intra prediction modes for video coding

Also Published As

Publication number Publication date
CN117915097A (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN104967801A (en) Video data processing method and apparatus
EP4109878A1 (en) Content operation method and device, terminal, and storage medium
EP2736011A1 (en) Method, apparatus and computer program product for generating super-resolved images
US11238563B2 (en) Noise processing method and apparatus
CN111638849A (en) Screenshot method and device and electronic equipment
WO2021120952A1 (en) Column-oriented storage method, apparatus and device, and computer-readable storage medium
CN112333734A (en) Serving cell switching method and device
WO2024078401A1 (en) Intra-frame prediction method and apparatus, and device
CN113963072A (en) Binocular camera calibration method and device, computer equipment and storage medium
WO2023226845A1 (en) Image data transmission method and apparatus, and electronic device
CN105786986A (en) Picture finding method and device
CN114978207A (en) Antenna tuning method and electronic device
US8693042B2 (en) Image copying method and device
CN115514860A (en) Dynamic frame rate compensation method, image processing circuit and electronic device
CN113873233A (en) Lens module detection method and device and electronic equipment
CN114554187A (en) Wireless camera detection method, device, equipment, medium and program product
CN112988913A (en) Data processing method and related device
WO2024146591A1 (en) List creating method and terminal
CN114337872B (en) Network signal measurement method and device
WO2024007952A1 (en) Loop filtering method and apparatus, and device
WO2024140544A1 (en) Ping-pong scenario detection method and apparatus, and electronic device
WO2024051565A1 (en) Network selection processing method and apparatus, terminal, and readable storage medium
CN114125151B (en) Image processing method, mobile terminal and storage medium
WO2024017035A1 (en) Location information acquisition method, terminal, and network side device
US10824491B2 (en) System information transmitting method and apparatus, and computer-readable storage medium

Legal Events

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

Ref document number: 23876603

Country of ref document: EP

Kind code of ref document: A1