Intra-frame linear prediction method and device using horizontal and vertical coordinates

By determining the prediction mode based on the coding block position and the availability of reference pixels, and using filtering and least squares to fit a linear model, the problem of improper calculation of linear model parameters in the prior art is solved, the accuracy and practicality of intra-frame prediction are improved, and the application scope is expanded to include luminance and chrominance intra-frame prediction.

CN114679587BActive Publication Date: 2025-12-16SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210247372.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-14
Publication Date
2025-12-16
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

In existing technologies, the linear model parameters of intra-frame prediction methods are not properly calculated, resulting in poor fitting accuracy. Furthermore, existing methods cannot be effectively applied to intra-frame prediction of luminance and chrominance, and the implementation is unreasonable, increasing the requirement for flag bits in the coding block.

Method used

Based on the current position of the coding block and the availability of reference pixels, the prediction mode is determined to be normal, horizontal, vertical, or default mode. A linear model is fitted through filtering and least squares method, the linear model parameters are calculated, pixel prediction is performed, and residual values ​​are generated during the video encoding process.

Benefits of technology

It improves the accuracy and practicality of intra-frame prediction, reduces the flag bit requirement of coded blocks, and expands the application scope to luma and chroma intra-frame prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114679587B_ABST
    Figure CN114679587B_ABST
Patent Text Reader

Abstract

The application discloses an intraframe linear prediction method and device using horizontal and vertical coordinates, and the method comprises the following steps: obtaining reference pixels according to the position of a current coding block; determining a prediction mode according to the availability of the reference pixels; wherein the prediction mode comprises a normal mode, a horizontal mode, a default mode and a vertical mode; predicting all pixels of the current coding block according to the prediction mode to obtain the predicted values of all pixels; performing the difference between the real values of the current coding block and the predicted values to obtain residual values; and completing the video coding process according to the residual values. The application has high accuracy, high practicability and wide application range, and can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and particularly relates to an intra-frame linear prediction method and device using horizontal and vertical coordinates. BACKGROUND

[0002] In the intra-frame prediction of a video coding process, the prior art uses horizontal and vertical coordinates of a prediction pixel to perform linear prediction on a pixel value, and the prediction formula is shown in the following formula:

[0003] P xy =a0·x+a1·y+a2

[0004] wherein, P xy is a prediction value, x is a horizontal coordinate of a pixel to be predicted in a prediction block, y is a vertical coordinate of the pixel to be predicted in the prediction block, and a0, a1 and a2 are three parameters of a linear model. In the prior art, the three parameters of the linear model are obtained by a simplified least square method, and the calculation steps and method are as follows:

[0005]

[0006]

[0007] In the above two formulas, the letters have the following meanings:

[0008]

[0009] Two matrices A and B are defined, and the element values are obtained according to the following formula:

[0010] A i,j =sumL i,j

[0011]

[0012] Finally, the three parameters of the linear model can be calculated, and the calculation formula is as follows:

[0013]

[0014] wherein, || is an operation of taking a determinant of a matrix.

[0015] In the algorithm for predicting a pixel using horizontal and vertical coordinates based on the least square method, the following problems exist:

[0016] 1. The calculation method of the linear model parameters is not appropriate, resulting in poor fitting accuracy of the linear model.

[0017] 2. The implementation of the existing method is unreasonable, and the new method is mixed with the original intra prediction mode, and a new flag is needed to identify whether the new method is used for all coding blocks.

[0018] 3. The existing method is only for luminance, and is not used for chroma intra prediction. SUMMARY

[0019] Therefore, the embodiment of the present application provides an intra linear prediction method and device using horizontal and vertical coordinates, which has high accuracy, high practicability and wide application range.

[0020] One aspect of the present application provides an intra linear prediction method using horizontal and vertical coordinates, comprising:

[0021] obtaining reference pixels according to the position of the current coding block;

[0022] determining a prediction mode according to the availability of the reference pixels; wherein the prediction mode includes a regular mode, a horizontal mode, a default mode and a vertical mode;

[0023] predicting all pixels of the current coding block according to the prediction mode to obtain predicted values of all pixels;

[0024] subtracting the true values of the current coding block from the predicted values to obtain residual values;

[0025] completing a video coding process according to the residual values.

[0026] Optionally, the obtaining of the reference pixels according to the position of the current coding block comprises:

[0027] obtaining initial reference pixels of reconstructed luminance above the current coding block and initial reference pixels of reconstructed luminance on the left side of the current coding block;

[0028] removing invalid pixel points in the initial reference pixels and identifying the availability of the remaining reference pixels to determine the reference pixels to be used.

[0029] Optionally, the determining of the prediction mode according to the availability of the reference pixels comprises:

[0030] when the reference pixels above a row and on a column of the current coding block can all be used, determining the prediction mode as the regular mode;

[0031] when only the reference pixels above a row of the current coding can be used, determining the prediction mode as the vertical mode;

[0032] when only the reference pixels on a column of the current coding can be used, determining the prediction mode as the horizontal mode;

[0033] When none of the reference pixels of the current coding is available, the prediction mode is determined as a default mode.

[0034] Optionally, in the step of predicting all the pixels of the current coding block according to the prediction mode to obtain the predicted values of all the pixels, when the prediction mode is a regular mode, the step comprises the following steps of:

[0035] The reference pixels of the above row and the left column are smoothed by a filter;

[0036] The parameters of the linear model are calculated according to the pixel values obtained by the smoothing filtering;

[0037] The positions in the prediction block are predicted according to the parameters of the linear model to obtain the prediction result;

[0038] The prediction result of the prediction block is supplementary filtered according to the reference pixels to obtain the final predicted values of the pixels.

[0039] Optionally, in the step of predicting all the pixels of the current coding block according to the prediction mode to obtain the predicted values of all the pixels, when the prediction mode is a default mode, the step comprises the following steps of:

[0040] The three parameters of the linear model are determined as corresponding constants;

[0041] The pixels are predicted according to the three parameters of which the constants are determined to obtain the predicted values of the pixels.

[0042] Optionally, in the step of predicting all the pixels of the current coding block according to the prediction mode to obtain the predicted values of all the pixels, when the prediction mode is a horizontal mode, the step comprises the following steps of:

[0043] All the predicted pixels in each row of the current coding block are assigned as the reference pixel values of the same row to determine the predicted values of all the pixels.

[0044] Optionally, in the step of predicting all the pixels of the current coding block according to the prediction mode to obtain the predicted values of all the pixels, when the prediction mode is a vertical mode, the step comprises the following steps of:

[0045] All the predicted pixels in each column of the current coding block are assigned as the reference pixel values of the same column to determine the predicted values of all the pixels.

[0046] Another aspect of the embodiment of the application provides a device for intra-frame linear prediction using horizontal and vertical coordinates, which comprises:

[0047] The first module is used for obtaining reference pixels according to the position of the current coding block;

[0048] The second module is used for determining a prediction mode according to the availability of the reference pixels, wherein the prediction mode comprises a normal mode, a horizontal mode, a default mode and a vertical mode;

[0049] The third module is used for predicting all pixels of the current coding block according to the prediction mode to obtain predicted values of all pixels;

[0050] The fourth module is used for subtracting the predicted values from the real values of the current coding block to obtain residual values;

[0051] The fifth module is used for completing a video coding process according to the residual values.

[0052] Another aspect of the embodiment of the present application provides an electronic device comprising a processor and a memory;

[0053] The memory is used for storing a program;

[0054] The processor executes the program to realize the method as described above.

[0055] Another aspect of the embodiment of the present application provides a computer readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to realize the method as described above.

[0056] The embodiment of the present application obtains reference pixels according to the position of the current coding block, determines a prediction mode according to the availability of the reference pixels, wherein the prediction mode comprises a normal mode, a horizontal mode, a default mode and a vertical mode, predicts all pixels of the current coding block according to the prediction mode to obtain predicted values of all pixels, subtracts the predicted values from the real values of the current coding block to obtain residual values, and completes a video coding process according to the residual values. The present application has high accuracy, high practicability and wide application range. BRIEF DESCRIPTION OF DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.

[0058] Figure 1 The overall step flowchart provided by the embodiment of the present application is provided;

[0059] Figure 2A schematic diagram of a calculation process of the residual subformula provided for the embodiment of the present application is shown. DETAILED DESCRIPTION

[0060] For the purpose, technical solutions and advantages of the present application to be more clearly and obviously understood, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0061] The embodiment of the present application provides an intra-frame linear prediction method using horizontal and vertical coordinates,

[0062] comprising:

[0063] obtaining reference pixels according to the position of the current coding block;

[0064] determining a prediction mode according to the availability of the reference pixels; wherein the prediction mode comprises a normal mode, a horizontal mode, a default mode and a vertical mode;

[0065] predicting all pixels of the current coding block according to the prediction mode to obtain predicted values of all pixels;

[0066] subtracting the real values of the current coding block from the predicted values to obtain residual values;

[0067] completing a video coding process according to the residual values.

[0068] Optionally, the obtaining of the reference pixels according to the position of the current coding block comprises:

[0069] obtaining initial reference pixels of reconstructed luminance located above the current coding block and initial reference pixels of reconstructed luminance located on the left side of the current coding block;

[0070] removing invalid pixel points in the initial reference pixels and identifying the availability of the remaining reference pixels to determine the reference pixels to be used.

[0071] Optionally, the determining of the prediction mode according to the availability of the reference pixels comprises:

[0072] when the reference pixels of the upper row and the left column of the current coding block can both be used, determining the prediction mode as the normal mode;

[0073] when only the reference pixels of the upper row of the current coding can be used, determining the prediction mode as the vertical mode;

[0074] when only the reference pixels of the left column of the current coding can be used, determining the prediction mode as the horizontal mode;

[0075] When the current coded reference pixels are all unavailable, the prediction mode is determined as a default mode.

[0076] Optionally, in the step of predicting all pixels of the current coded block according to the prediction mode to obtain the predicted values of all pixels, the prediction mode is a regular mode, and the step comprises the following steps.

[0077] The reference pixels in the above row and the left column are subjected to smoothing filtering processing by using a filter;

[0078] The parameters of the linear model are calculated according to the pixel values obtained by the smoothing filtering processing;

[0079] The positions in the prediction block are predicted according to the parameters of the linear model to obtain a prediction result;

[0080] The prediction result of the prediction block is subjected to supplementary filtering according to the reference pixels to obtain the final predicted values of the pixels.

[0081] Optionally, in the step of predicting all pixels of the current coded block according to the prediction mode to obtain the predicted values of all pixels, the prediction mode is a default mode, and the step comprises the following steps.

[0082] The three parameters of the linear model are determined to be corresponding constants;

[0083] The pixels are predicted according to the three parameters of which the constants are determined to obtain the predicted values of the pixels.

[0084] Optionally, in the step of predicting all pixels of the current coded block according to the prediction mode to obtain the predicted values of all pixels, the prediction mode is a horizontal mode, and the step comprises the following steps.

[0085] All predicted pixels in each row of the current coded block are assigned to the reference pixel values in the same row to determine the predicted values of all pixels.

[0086] Optionally, in the step of predicting all pixels of the current coded block according to the prediction mode to obtain the predicted values of all pixels, the prediction mode is a vertical mode, and the step comprises the following steps.

[0087] All predicted pixels in each column of the current coded block are assigned to the reference pixel values in the same column to determine the predicted values of all pixels.

[0088] Another aspect of the embodiment of the application provides a frame intra linear prediction device using horizontal and vertical coordinates, which comprises:

[0089] A first module is configured to obtain reference pixels according to the position of a current coded block.

[0090] a second module configured to determine a prediction mode according to availability of the reference pixels, wherein the prediction mode comprises a normal mode, a horizontal mode, a default mode and a vertical mode;

[0091] a third module configured to predict all pixels of the current coding block according to the prediction mode to obtain predicted values of all pixels;

[0092] a fourth module configured to subtract the predicted values from real values of the current coding block to obtain residual values;

[0093] a fifth module configured to complete a video coding process according to the residual values.

[0094] Another aspect of the embodiment of the present application provides an electronic device comprising a processor and a memory.

[0095] The memory is configured to store a program.

[0096] The processor executes the program to realize the method as described above.

[0097] Another aspect of the embodiment of the present application provides a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the method as described above.

[0098] The specific implementation principle of the present application will be described in detail below with reference to the accompanying drawings:

[0099] The present application is one of the prediction methods in the intra prediction of video coding, which is independent of other intra prediction methods and does not interfere with each other. The video encoder will select an optimal mode as the final intra prediction method by traversal. As shown in the following table, the method of the present application comprises the following steps: Figure 1

[0100] Step 1: Obtain reference pixels. Obtain the reconstructed luminance reference pixels located above and left of the current coding block, remove invalid pixels, and identify the availability of the reference pixels for subsequent steps. In the actual coding process, four situations may occur due to boundary problems, which are that the reference pixels in the upper row and the left column are all available, only the reference pixels in the upper row are available, only the reference pixels in the left column are available, and the reference pixels in the upper row and the left column are all unavailable.

[0101] Step 2: Determine the prediction mode according to the availability of the reference pixels. The method of the present application uses the reconstructed pixels in the upper row and the left column of the prediction block as reference pixels, but in the actual coding process, the reference pixels may not be available due to boundary problems, so the present application uses different prediction modes for different situations.​

[0102] When both the above line and the left column of reference pixels are available, the regular mode is used to predict the pixel value with horizontal and vertical coordinates and linear mode; when only the above line of reference pixels is available, the original vertical mode in the codec is used because the least square fitting of the linear model with horizontal and vertical coordinates cannot be used with only the above line of reference pixels; when only the left column of reference pixels is available, the original horizontal mode in the codec is used; when neither of the reference pixels is available, the default mode is used, the parameters of the linear model do not need to be fitted, and the default initialization value is used.

[0103] Step three: predict the pixel. The specific refinement steps are as follows:

[0104] 1) In the regular mode, the following steps Step1-Step4 are included:

[0105] Step 1: reference pixel filtering. The left and above non-boundary reference pixels are smoothed by a filter with tap coefficients [1 2 1] to make the reconstructed pixel change more smoothly, which is conducive to the fitting of the subsequent linear model. Because smoothing filtering needs to use adjacent pixels, the reference pixels at the boundary are not filtered. The calculation formula of the above line of reference pixels after filtering is as follows:

[0106] rec'(x, y) = (1·rec(x-1, y) + 2·rec(x, y) + 1·rec(x+1, y) + 1) » 2

[0107] Wherein, rec'(x, y) is the pixel value obtained after filtering, rec(x, y) is the reconstructed pixel value before filtering, rec(x-1, y) is the pixel value of the left side before filtering, rec(x+1, y) is the pixel value of the right side before filtering. The calculation formula of the left column of reference pixels after filtering is as follows:

[0108] rec'(x, y) = (1·rec(x, y-1) + 2·rec(x, y) + 1·rec(x, y+1) + 1) » 2

[0109] Wherein, rec'(x, y) is the pixel value obtained after filtering, rec(x, y) is the reconstructed pixel value before filtering, rec(x, y-1) is the pixel value of the above side before filtering, rec(x, y+1) is the pixel value of the below side before filtering.

[0110] Step 2: Calculate the parameters of the linear model. The linear model proposed in the present application is to predict the pixel value with horizontal and vertical coordinates and the average of the reference pixels, and the prediction formula is as follows:

[0111] pred(x, y) = a·x + b·y + c·avg

[0112] where x, y are the horizontal and vertical coordinates of the current pixel, avg is the average of the reference pixels, pred(x, y) is the predicted value of the pixel with horizontal and vertical coordinates x, y in the prediction block, and a, b, c are the parameters of the linear model, which are to be obtained in this step. The above prediction formula can be written in matrix form as follows:

[0113]

[0114] Let The above formula can be rewritten as: p = Uq

[0115] The linear model parameters are calculated using the reference pixels. The formula for solving the optimal q by the least square method is as follows:

[0116] q = (U T U) -1 U T p

[0117] where the calculation method of the parameter a is as follows:

[0118] First, calculate U T U, where it is easy to know that U T The calculation formula of each element of U

[0119]

[0120]

[0121]

[0122]

[0123]

[0124] U T U 22 = n avg 2

[0125] where n is the total number of reference pixels, U T U 00 is the element value of U T U matrix at position (0, 0), and the representation method of other positions is similar.

[0126] The calculation method of the parameter b is as follows:

[0127] Take the inverse of U T U matrix to get (U T U) -1In the present application, the matrix inversion uses the method of adjoint matrix inversion, and the calculation method is shown as follows:

[0128]

[0129] wherein, is the element value at position (i, j) in the inverse matrix, |U T U|is the determinant of matrix U T U, the adjoint matrix inversion method needs to divide the determinant of the original matrix, M ij is the determinant of U T is the minor at position (i, j) in U, and the result value of the minor is the determinant of the matrix obtained by deleting the ith column and the jth row of the matrix, for the minor M 11 The calculation method is shown as follows. Figure 2

[0130] The calculation method of the parameter c is: multiplying U T and the multiplication between the matrix and the vector by p, that is, the optimal solution q obtained by the least square method, that is, the three elements in the vector q are the three parameters in the linear model in turn.

[0131] Step 3: Linear prediction pixel. After obtaining the parameters a, b and c of the linear model, the positions in the prediction block are predicted, and the prediction formula is shown as follows:

[0132] pred(x, y) = clip(a x + b y + c avg)

[0133] Wherein, the clipping operation means that the result value is limited in the interval [0, 1023], because the bit depth in the codec is 10 bits, and the value range of the pixel is [0, 1023], and the calculation formula of the clipping is shown as follows:

[0134]

[0135] Step 4: Supplementary filtering. After completing the prediction of the pixel, the first row and the first column of the prediction block are subjected to supplementary filtering by using the reference pixel, so that the transition of the pixels at the block boundary is more smooth, and the filtering formula of the first row in the prediction block is shown as follows:

[0136] pred'(x, 1) = (3 pred(x, 1) + 1 rec(x, 0) + 2) » 2

[0137] Wherein, pred'(x, 1) represents the final prediction value of the horizontal coordinate x in the first row of the prediction block, pred(x, 1) represents the prediction value without supplementary filtering, and rec(x, 0) represents the reference pixel value directly above the current prediction position. The filtering formula of the first column in the prediction block is shown as follows:​

[0138] pred'(1,y) = (3*pred(1,y) + 1*rec(0,y) + 2) » 2

[0139] where pred'(1,y) denotes the final prediction value of the first column of the prediction block at vertical coordinate y, pred(1,y) denotes the prediction value without supplementary filtering, and rec(0,y) denotes the reference pixel value on the left of the current prediction position.

[0140] 2) Default mode:

[0141] The default mode is a mode used when no reference pixel is available. A fixed value is set for the three parameters of the linear model, and then the pixel is predicted. The prediction formula is as follows:

[0142] pred(x,y) = clip(a*x + b*y + c*avg)

[0143]

[0144] where clip is a clipping operation, and the specific calculation is the same as Step 3 in 1).

[0145] 3) Horizontal mode:

[0146] The horizontal mode is a mode used when only the left reference pixel is available. Since only one column of reference pixels is available, a linear model with three parameters cannot be fitted. The horizontal mode in the present application is the same as the original horizontal mode in the codec. All prediction pixels in each row are equal to the reference pixel value in the same row, and the calculation formula is as follows:

[0147] pred(x,y) = rec(0,y)

[0148] where pred(x,y) denotes the prediction pixel value at (x,y), and rec(0,y) denotes the reference pixel value on the left of the prediction block in the same row.

[0149] 4) Vertical mode

[0150] The vertical mode is a mode used when only the upper reference pixel is available. Since only one row of reference pixels is available, a linear model with three parameters cannot be fitted. The vertical mode in the present application is the same as the original vertical mode in the codec. All prediction pixels in each column are equal to the reference pixel value in the same column, and the calculation formula is as follows:

[0151] pred(x,y) = rec(x,0)

[0152] Wherein, pred(x, y) represents the predicted pixel value at the horizontal and vertical coordinates (x, y), and rec(x, 0) represents the reference pixel value of the same column above the prediction block.

[0153] Step four: end. Through step three, the prediction of all pixels of the current prediction block has been completed, the real value of the current block is then subtracted from the predicted value to obtain a residual value, and the subsequent video coding is performed in the modules such as transformation and quantization.

[0154] Finally, the implementation of the application in the encoder is simply described. All the intra prediction methods of luminance are expressed by a plurality of binary bits in the encoder, and the application proposes a new intra prediction method, which is expressed by the same binary bits as the last intra prediction method in the encoder. In order to distinguish the new method from the original last method, the application adds a flag bit in the implementation of the encoder. If the encoder selects the method of the application as the final intra prediction method by traversal, the prediction method of the application needs to be encoded into the code stream as the last intra prediction method, and a flag bit is added into the code stream to express that the method of the application is used. If the encoder selects the original last intra prediction method, a flag bit also needs to be added into the code stream to express that the old method is used. Therefore, the implementation of the application in the encoder only needs to add a flag bit for the new method and the original last intra prediction method, and no additional code stream is needed for the other methods, which can save the bit rate of coding compression to a certain extent.

[0155] In summary, compared with the prior art, the application has the following advantages:

[0156] 1. The application uses complete least squares method to fit a linear model, and the linear model prediction is more accurate and can improve the efficiency of intra-frame. The relationship between the horizontal and vertical coordinates and the pixel value is fully utilized, and when the pixels in the coding block have a close relationship with the horizontal and vertical coordinates, a new type of prediction method can be provided for intra-frame prediction.

[0157] 2. The implementation of the application is reasonable, and only a new flag bit needs to be encoded for part of the coding blocks that meet the conditions, instead of all the coding blocks, which can save the bit rate of the code stream.

[0158] 3. The application optimizes the third part of the linear model structure to improve the practicability of the linear model. The multiplier multiplied by the third parameter is changed to the average value of the reference pixels, and the multiplier used in the prior art is 1. After changing to the average value, it is beneficial to improve the prediction accuracy of the linear model.

[0159] 4. The application has a wide range of applications, and is an intra-frame prediction technology applicable to both luminance and chrominance components.

[0160] In some alternative embodiments, the function / operations mentioned in the block diagrams can not occur in the order mentioned in the operational illustrations. For example, depending on the involved function / operation, two blocks shown in succession can in fact be executed substantially concurrently or the blocks can sometimes be executed in reverse order, depending upon the functionality / operations involved. Furthermore, embodiments presented and described in the flowcharts are only examples of implementing the present application. Alternative embodiments are possible where some of the steps are omitted, wherein additional steps are added, or wherein some of the steps are performed in a different order. It should be understood that the order of steps presented and described in the flowcharts illustrates implementations of the present application. The steps presented and described in the flowcharts are not necessarily performed in the order presented and described. Steps from one exemplary flowchart can be performed in a different order.

[0161] Furthermore, although the present application has been described in the context of functional modules, it is to be understood that one or more of the functions and / or features described can be integrated in a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It will also be appreciated that detailed discussion of the actual implementation of each module is not necessary for an understanding of the present application. Rather, the actual implementation of the modules, in light of the description of the properties, functions and internal relationships of the various functional modules disclosed herein, will be apparent to the skilled artisan in view of the present disclosure. Thus, the present application is not limited to the embodiments described herein which can be considered as illustrative only. Indeed, the scope of the present application is to be determined only by the appended claims and equivalents thereto. It is therefore contemplated to this effect that the particular conceptual aspects disclosed are merely illustrative and are not intended to limit the scope of the present application, which is to be determined by the full scope of the appended claims and equivalents thereto.

[0162] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0163] The logic and / or steps represented in the flowcharts and / or described herein, for example, can be embodied in non-transitory computer-readable media, executed by one or more computing devices, and / or in any other way. The logic and / or steps represented in the flowcharts and / or described herein, for example, can be considered a list of executable instructions for implementing logic functions, and can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber (optical), and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example via an optical scanner, then compiled, interpreted, or otherwise processed, and stored in a computer memory in a form that can be later executed by a computer. In this context, a "computer-readable medium" can be any means that can store the program for use by or in connection with the instruction execution system, apparatus, or device.

[0164] The foregoing description of various embodiments of the application has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the application to the precise form disclosed, and various modifications and variations are possible in light of the above teachings or can be acquired from practice of the application. For example, while a particular feature of the application can have been described with respect to only one or more embodiments thereof, the feature is not necessarily limited to that one or more embodiments. Rather, applicants have provided various embodiments of the application and combinations thereof and candidates can combine them in various combinations to produce yet other embodiments of the application. It is intended that the specification and examples be considered as exemplary only, with a true scope of the application being indicated by the following claims.

[0165] It is understood that various portions of the application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiment, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and in another embodiment, any of the following technologies, known in the art, or a combination thereof, can be used: discrete logic circuitry having logic gates for implementing logic functions upon an application of data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.

[0166] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific feature, structure, material or characteristic being described is included in at least one embodiment or example of the application. The illustrative representations of the above terms in the specification do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0167] While the embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary and are not to be construed as limiting the scope of the application. The scope of the application is defined by the appended claims and their equivalents.

[0168] The above is the specific description of the preferred embodiment of the application, but the application is not limited to the described embodiments, and those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the application, and these equivalent modifications or replacements are all included in the scope defined by the claims of the application.

Claims

1. An intraframe linear prediction method using horizontal and vertical coordinates, characterized by, The application comprises the following steps: According to the position of the current coding block, reference pixels are obtained; According to the availability of the reference pixels, a prediction mode is determined; wherein the prediction mode comprises a normal mode, a horizontal mode, a default mode and a vertical mode; According to the prediction mode, all pixels of the current coding block are predicted to obtain the predicted values of all pixels; The real values of the current coding block are subtracted from the predicted values to obtain residual values; According to the residual values, a video coding process is completed; The step of predicting all pixels of the current coding block according to the prediction mode to obtain the predicted values of all pixels comprises the following steps: When the prediction mode is the normal mode, the reference pixels in the upper row and the left column are smoothed and filtered by a filter; According to the pixel values obtained by the smoothing and filtering, the parameters of a linear model are calculated; According to the parameters of the linear model and the horizontal and vertical coordinates of the current pixel, each position in the prediction block is predicted to obtain a prediction result; The prediction result of the prediction block is supplemented by filtering the reference pixels to obtain the predicted values of the pixels predicted by the normal mode; When the prediction mode is not the normal mode, the pixels of the current coding block that cannot be predicted by the normal mode are predicted according to the prediction mode and the horizontal and vertical coordinates to obtain the predicted values of the pixels predicted by the non-normal mode; The linear model is specifically pred(x, y) = a x + b y + c avg; Wherein, a, b and c represent the parameters of the linear model, x and y represent the horizontal and vertical coordinates of the current pixel, avg represents the average of the reference pixels, and pred(x, y) represents the prediction result of the current pixel; The step of calculating the parameters of the linear model according to the pixel values obtained by the smoothing and filtering comprises the following steps: A matrix is constructed according to the average, horizontal coordinate and vertical coordinate of the reference pixels after the smoothing and filtering; The parameters of the linear model are calculated according to the matrix.

2. The intraframe linear prediction method using horizontal and vertical coordinates according to claim 1, wherein, The step of obtaining the reference pixels according to the position of the current coding block comprises the following steps: Initial reference pixels of reconstructed luminance located above the current coding block and initial reference pixels of reconstructed luminance located on the left side of the current coding block are obtained; Invalid pixel points in the initial reference pixels are removed, and the availability of the remaining reference pixels is identified to determine the reference pixels to be used.

3. The intraframe linear prediction method using horizontal and vertical coordinates according to claim 1, wherein, The step of determining the prediction mode according to the availability of the reference pixels comprises the following steps: When the reference pixels in the upper row and the left column of the current coding block can all be used, it is determined that the prediction mode is the normal mode; When only the reference pixels in the upper row of the current coding can be used, it is determined that the prediction mode is the vertical mode; When only the reference pixels in the left column of the current coding can be used, it is determined that the prediction mode is the horizontal mode; When the reference pixels of the current coding are all unavailable, it is determined that the prediction mode is the default mode.

4. The intraframe linear prediction method using horizontal and vertical coordinates according to claim 1, wherein, In the step of predicting all pixels of the current coding block according to the prediction mode to obtain the predicted values of all pixels, the prediction mode is the default mode, and the step comprises the following steps: The three parameters of the linear model are determined to have corresponding fixed values; According to the three parameters of the determined constant value, the pixel is predicted to obtain a predicted value of the pixel.

5. The intraframe linear prediction method using horizontal and vertical coordinates according to claim 1, wherein, In the step of predicting all pixels of the current coding block according to the prediction mode to obtain predicted values of all pixels, the prediction mode is a horizontal mode, and the step comprises the following steps. All predicted pixels in each row of the current coding block are assigned to reference pixel values of the same row to determine predicted values of all pixels.

6. The intraframe linear prediction method using horizontal and vertical coordinates according to claim 1, wherein, In the step of predicting all pixels of the current coding block according to the prediction mode to obtain predicted values of all pixels, the prediction mode is a vertical mode, and the step comprises the following steps. All predicted pixels in each column of the current coding block are assigned to reference pixel values of the same column to determine predicted values of all pixels.

7. An apparatus for intra-frame linear prediction using horizontal and vertical coordinates, characterized by Comprise: The first module is used for obtaining reference pixels according to the position of the current coding block; The second module is used for determining a prediction mode according to the availability of the reference pixels; wherein the prediction mode comprises a regular mode, a horizontal mode, a default mode and a vertical mode; The third module is used for predicting all pixels of the current coding block according to the prediction mode to obtain predicted values of all pixels; The fourth module is used for subtracting the predicted values from the true values of the current coding block to obtain residual values; The fifth module is used for completing a video coding process according to the residual values; Wherein, the third module is specifically used for when the prediction mode is the regular mode, performing smoothing filter processing on the reference pixels of the reference pixels of the above row and the left column; calculating parameters of a linear model according to the pixel values obtained through the smoothing filter processing; predicting each position in the prediction block according to the parameters of the linear model and the horizontal and vertical coordinates of the current pixel to obtain a prediction result; performing supplementary filtering on the prediction result of the prediction block according to the reference pixels to obtain the predicted values of the pixels predicted through the regular mode; when the prediction mode is not the regular mode, predicting all pixels of the current coding block which cannot be predicted through the regular mode according to the prediction mode and the horizontal and vertical coordinates to obtain predicted values of all pixels predicted through the irregular mode; The linear model is specifically pred(x, y) = a x + b y + c avg; Wherein, a, b and c represent the parameters of the linear model, x and y represent the horizontal and vertical coordinates of the current pixel respectively, avg represents the average of the reference pixels, and pred(x, y) represents the prediction result of the current pixel; The calculation of the parameters of the linear model according to the pixel values obtained through the smoothing filter processing comprises: Constructing a matrix according to the average, horizontal coordinate and vertical coordinate of the reference pixels after the smoothing filter processing; Calculating the parameters of the linear model according to the matrix.

8. An electronic device, comprising: Comprise a processor and a memory; The memory is used for storing a program; The processor executes the program to realize the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The storage medium stores a program, and the program is executed by the processor to realize the method of any one of claims 1 to 6. The storage medium stores a program, and the program is executed by the processor to realize the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Inside-frame prediction, decoding and coding method and device

    CN101267567A

  • Depth map intra prediction method based on linear model

    CN102209243A