Video coding method, device, equipment, storage medium and computer program product

Based on the reference pixels that are selected to participate in the in -frame angle prediction mode based on similarity, the problem of high video coding complexity and low efficiency in existing technologies has been solved, and a more efficient video coding process is achieved.

CN119383347APending Publication Date: 2025-01-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310923995.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

When selecting reference rows and intra-angle prediction modes, existing video encoding standards need to traverse all combinations, resulting in large consumption of computing resources, long encoding time, and low encoding efficiency.

Method used

By determining multiple reference pixels corresponding to the encoding unit, and based on the similarity between the reference pixels, select the reference pixels to participate in the searches of the internal angle prediction mode, thereby reducing unnecessary predictive mode search.

Benefits of technology

Effectively reduce the computing complexity of multiple reference coding, reduce the coding time and computing resource overhead of the encoder, and significantly improve the coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383347A_ABST
    Figure CN119383347A_ABST
Patent Text Reader

Abstract

The invention relates to a video coding method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: determining a to-be-coded unit and a plurality of reference pixel rows corresponding to the to-be-coded unit; determining at least one reference pixel row participating in intra-frame angle prediction mode search from the plurality of reference pixel rows based on the similarity between every two reference pixel rows in the plurality of reference pixel rows; performing intra-frame angle prediction mode search according to the at least one reference pixel row to obtain a target reference pixel row for performing intra-frame coding on the unit to be coded and a target intra-frame angle prediction mode; and coding the to-be-coded unit according to the target reference pixel row and the target intra-frame angle prediction mode to obtain coded data corresponding to the to-be-coded unit. By adopting the method, the proportion of the data calculation complexity of multi-reference line coding in the complexity of the whole coding process can be effectively reduced, the coding time of a coder and the overhead of calculation resources are reduced, and the coding efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a video encoding method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of digital media technology and computer technology, video is applied to various fields, such as mobile communication, network TV, video interaction, video live broadcast, etc. At present, some video coding standards support multiple reference line intra prediction, namely Multiple Reference Line intra prediction, referred to as MRLP. Multiple reference lines refer to multiple reference pixel rows / columns (upper row and left column), and one of the rows / columns can be selected to generate predicted pixel values. For example, the latest generation of coding standard H.266 supports multiple reference line intra prediction technology.

[0003] Among various coding standards, some support multiple intra-frame angle prediction modes. When selecting reference lines and intra-frame angle prediction modes, video encoders often adopt the method of traversing all combinations, that is, encoding all reference lines and prediction modes to form prediction combinations, and selecting the configuration with the best rate-distortion performance. Although this method guarantees the rate-distortion performance of the encoder, it also brings extremely high complexity, which means that encoding requires more computing resources and takes longer encoding time, resulting in low encoding efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a video encoding method, apparatus, computer device, computer-readable storage medium and computer program product that can improve encoding efficiency in response to the above technical problems.

[0005] In a first aspect, the present application provides a video encoding method. The method comprises:

[0006] Determine a unit to be encoded and a plurality of reference pixel rows corresponding to the unit to be encoded;

[0007] Determine, based on the similarities between any two of the reference pixel rows in the plurality of reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search from the plurality of reference pixel rows;

[0008] Performing an intra-frame angle prediction mode search according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded;

[0009] The unit to be encoded is encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain encoding data corresponding to the unit to be encoded.

[0010] In a second aspect, the present application further provides a video encoding device. The device comprises:

[0011] A multiple reference row determination module, used to determine a unit to be encoded and multiple reference pixel rows corresponding to the unit to be encoded;

[0012] A reference row decision module, configured to determine at least one reference pixel row participating in the intra-frame angle prediction mode search from the multiple reference pixel rows based on the similarity between any two reference pixel rows in the multiple reference pixel rows;

[0013] A reference row and preset mode determination module, configured to search for an intra-frame angle prediction mode according to the at least one reference pixel row, and obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded;

[0014] The coding data acquisition module is used to encode the unit to be encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain the coding data corresponding to the unit to be encoded.

[0015] In one embodiment, the multiple reference pixel rows include a basic reference pixel row that is most adjacent to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search; the multiple reference pixel rows also include other reference pixel rows; the reference row decision module is also used to calculate the similarity between the basic reference pixel row and the other reference pixel rows; if it is determined based on the similarity that the basic reference pixel row and the other reference pixel rows are similar, it is determined that the other reference pixel rows do not participate in the intra-frame angle prediction mode search.

[0016] Optionally, the reference row decision module is further used to calculate the similarity between any two reference pixel rows in the other reference pixel rows if it is determined based on the similarity that the basic reference pixel row and the other reference pixel rows are not similar; and based on the similarity between any two reference pixel rows in the other reference pixel rows, determine at least one reference pixel row participating in the intra-frame angle prediction mode search from the other reference pixel rows.

[0017] In one embodiment, the multiple reference pixel rows include a basic reference pixel row that is most adjacent to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search; the multiple reference pixel rows also include a first reference pixel row and a second reference pixel row whose distances to the unit to be encoded gradually increase; the reference row decision module is also used to determine that the first reference pixel row participates in the intra-frame angle prediction mode search if the basic reference pixel row is not similar to the first reference pixel row; if the basic reference pixel row is similar to the first reference pixel row, determine that the first reference pixel row does not participate in the intra-frame angle prediction mode search; if the basic reference pixel row is similar to the second reference pixel row, determine that the second reference pixel row does not participate in the intra-frame angle prediction mode search.

[0018] Optionally, the reference row decision module is also used to determine that the first reference pixel row participates in the intra-frame angle prediction mode search and the second reference pixel row does not participate in the intra-frame angle prediction mode search if the basic reference pixel row is not similar to the first reference pixel row, and the basic reference pixel row is not similar to the second reference pixel row, and the first reference pixel row is similar to the second reference pixel row; if the basic reference pixel row is not similar to the first reference pixel row, and the basic reference pixel row is not similar to the second reference pixel row, and the first reference pixel row is not similar to the second reference pixel row, then determine that both the first reference pixel row and the second reference pixel row participate in the intra-frame angle prediction mode search.

[0019] In one embodiment, the video encoding apparatus further comprises:

[0020] A similarity determination module is used to determine a target number of pixels according to the size of the unit to be encoded; for each reference pixel row, pixel positions are intercepted from the reference pixel row according to the target number of pixels, pixel positions are intercepted from the reference pixel column corresponding to the reference pixel row according to the target number of pixels, and a reference row vector corresponding to the reference pixel row is determined according to the reconstructed pixel values ​​of the intercepted pixel positions; and the similarity between the reference row vectors is used as the similarity between the reference pixel rows.

[0021] Optionally, the similarity determination module is also used to calculate the Euclidean distance between pairwise reference row vectors based on the vector elements of pairwise reference row vectors; use the Euclidean distance as the similarity between pairwise reference pixel rows; calculate the ratio of the Euclidean distance to the target number of pixels; wherein the condition for determining that the corresponding two reference pixel rows are similar includes at least: the ratio of the Euclidean distance to the target number of pixels is less than a first preset threshold.

[0022] Optionally, the similarity determination module is also used to calculate the difference between two vector elements of the same vector dimension corresponding to each of the reference row vectors; wherein the condition for determining that the corresponding two reference pixel rows are similar also includes: the difference between the two vector elements of each vector dimension is less than a second preset threshold.

[0023] In one embodiment, the reference row and preset mode determination module is further used to traverse each reference pixel row in the at least one reference pixel row in turn; calculate corresponding rate-distortion costs based on prediction combinations formed by the traversed reference pixel rows and each intra-frame angle prediction mode; and use the prediction combination with the smallest corresponding rate-distortion cost as the target reference pixel row and target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded.

[0024] In one embodiment, the encoding data acquisition module is also used to obtain the reconstructed pixel value of the pixel position adjacent to the unit to be encoded from the encoded unit of the target reference pixel row; generate the predicted pixel value corresponding to the unit to be encoded according to the reconstructed pixel value based on the angle and prediction method corresponding to the angle prediction mode in the target frame; calculate the prediction residual between the original pixel value corresponding to the unit to be encoded and the predicted pixel value; and transform, quantize, and entropy encode the prediction residual to obtain the encoding data corresponding to the unit to be encoded.

[0025] In one embodiment, the video encoding apparatus further comprises:

[0026] A sending module is used to send the encoded data, the pixel row index corresponding to the target reference pixel row, and the prediction mode index corresponding to the target intra-frame angle prediction mode to the decoding end, so that the decoding end determines the corresponding target reference pixel row and the target intra-frame angle prediction mode corresponding to the prediction mode index according to the pixel row index, performs intra-frame decoding on the encoded data, and obtains the decoded data corresponding to the unit to be encoded.

[0027] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0028] Determine a unit to be encoded and a plurality of reference pixel rows corresponding to the unit to be encoded;

[0029] Determine, based on the similarities between any two of the reference pixel rows in the plurality of reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search from the plurality of reference pixel rows;

[0030] Performing an intra-frame angle prediction mode search according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded;

[0031] The unit to be encoded is encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain encoding data corresponding to the unit to be encoded.

[0032] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0033] Determine a unit to be encoded and a plurality of reference pixel rows corresponding to the unit to be encoded;

[0034] Determine, based on the similarities between any two of the reference pixel rows in the plurality of reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search from the plurality of reference pixel rows;

[0035] Performing an intra-frame angle prediction mode search according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded;

[0036] The unit to be encoded is encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain encoding data corresponding to the unit to be encoded.

[0037] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0038] Determine a unit to be encoded and a plurality of reference pixel rows corresponding to the unit to be encoded;

[0039] Determine, based on the similarities between any two of the reference pixel rows in the plurality of reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search from the plurality of reference pixel rows;

[0040] Performing an intra-frame angle prediction mode search according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded;

[0041] The unit to be encoded is encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain encoding data corresponding to the unit to be encoded.

[0042] The above-mentioned video encoding method, apparatus, computer equipment, storage medium and computer program product determine a unit to be encoded and multiple reference pixel rows corresponding to the unit to be encoded, and based on the similarity between two reference pixel rows in the multiple reference pixel rows, determine at least one reference pixel row participating in the intra-frame angle prediction mode search from the multiple reference pixel rows. That is, a decision is made on the reference pixel rows participating in the candidate prediction mode search based on the similarity, rather than directly allowing each reference pixel row in the multiple reference pixel rows to participate in the prediction mode search, and then, an intra-frame angle prediction mode search is performed according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded, and the unit to be encoded is encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain the encoding data corresponding to the unit to be encoded, which can effectively reduce the proportion of the computational complexity of multi-reference row encoding in the complexity of the entire encoding process, thereby reducing the encoding time and computing resource overhead of the encoder, and significantly improving the encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A diagram showing an application environment of a video encoding method in an embodiment;

[0044] Figure 2 is a schematic diagram of multiple reference pixel rows in one embodiment;

[0045] Figure 3 is a schematic flow chart of a video encoding method in one embodiment;

[0046] Figure 4 is a schematic diagram of intra-frame prediction in one embodiment;

[0047] Figure 5 is a schematic diagram of a flow chart of reference pixel row decision in one embodiment;

[0048] Figure 6 A schematic diagram of a flow chart of reference pixel row decision and prediction mode search in one embodiment;

[0049] Figure 7 A schematic diagram of a process for calculating similarities between two reference pixel rows in one embodiment;

[0050] Figure 8 is a schematic diagram of an N-dimensional vector element of a reference row vector in one embodiment;

[0051] Fig. 9 is a structural block diagram of a video encoding device in one embodiment;

[0052] Fig.10 is an internal structure diagram of a computer device in one embodiment;

[0053] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The video encoding method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other servers.

[0056] In one embodiment, the terminal 102 obtains the current frame to be encoded, determines the unit to be encoded and multiple reference pixel rows corresponding to the unit to be encoded from the current frame to be encoded, the current frame to be encoded is a video frame to be intra-coded, the terminal 102 determines at least one reference pixel row participating in the intra-frame angle prediction mode search from multiple reference pixel rows based on the similarity between the reference pixel rows in each of the multiple reference pixel rows, then the terminal 102 performs the intra-frame angle prediction mode search according to the at least one reference pixel row, obtains the target reference pixel row and the target intra-frame angle prediction mode for intra-coding the unit to be encoded, encodes the unit to be encoded according to the target reference pixel row and the target intra-frame angle prediction mode, and obtains the encoding data corresponding to the unit to be encoded. The terminal 102 can also generate a corresponding encoding code stream from the encoding data and transmit it to the server 104, the server 104 can be a decoding end, the server 104 can directly pass it to the processor for decoding, or store it in a database for subsequent decoding.

[0057] Of course, in other embodiments, the video encoding method provided in the embodiments of the present application may be executed by the server 104. The server 104 generates a corresponding encoded code stream from the encoded data and transmits it to the terminal 102. The terminal 102 receives the encoded code stream. As a decoding end, the terminal can also decode to obtain the corresponding video data and play the video according to the video data.

[0058] Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this.

[0059] It should be noted that the video encoding method provided in the embodiment of the present application is applied to the process of intra-frame encoding of the coding unit in the intra-frame coded video frame. Intra-frame coding is a technology based on the correlation between adjacent pixels in the same frame, using the reconstructed pixel values ​​of the adjacent area to the unit to be encoded to predict the pixels in the unit to be encoded. After obtaining the predicted pixel value corresponding to the unit to be encoded through intra-frame prediction, the prediction residual is transformed, quantized, entropy encoded, etc., which can effectively remove the correlation between pixels.

[0060] Intra-frame prediction generally includes three steps: reference pixel acquisition, pixel prediction, and post-processing. Reference pixel acquisition, that is, obtaining the reconstructed pixel values ​​around the unit to be coded, involves the validity judgment, acquisition, and filtering of reference pixels. In pixel prediction, based on the intra-frame angle prediction mode, the reconstructed pixel values ​​of the reference pixels around the unit to be coded are used to predict the pixels of the unit to be coded to obtain the predicted pixel values. Post-processing is to further correct the predicted pixel values, such as smoothing. Next, the prediction residual between the original pixel value of the unit to be coded and the predicted pixel value obtained after post-processing is processed by transformation, quantization, entropy coding, etc. The closer the prediction residual is to 0, the fewer bits of the encoded bitstream will be. Specifically, during transformation, the prediction residual and motion vector data in the spatial domain are transformed into the frequency domain, and the transformation coefficients can be encoded. The transformation methods may include discrete Fourier transform and discrete cosine transform, etc.; during quantization, the transformed data is mapped into another numerical value. For example, a smaller value can be obtained by dividing the transformed data by the quantization step. The quantization parameter is the serial number corresponding to the quantization step. The corresponding quantization step can be found according to the quantization parameter. If the quantization parameter is small, most of the details of the video frame will be retained, and the corresponding bit rate is high. If the quantization parameter is large, the corresponding bit rate is low, but the image distortion is large and the quality is not high. During entropy coding, a data coding method that does not lose any information according to the entropy principle can use smaller characters to express certain information. The entropy coding method can be, for example, Shannon coding or Huffman coding.

[0061] The intra-frame prediction mode is a compression technology. The intra-frame angle prediction mode (full name is the angle-based directional intra-frame prediction mode) provides high-quality prediction for objects with directional structures. There are multiple intra-frame angle prediction modes. For example, taking H.266 as an example, multiple intra-frame prediction modes are provided, of which there are 65 intra-frame angle prediction modes, such as horizontal prediction mode, vertical prediction mode, upper left corner prediction mode, etc., plus the DC mode that uses the mean of reference pixels for prediction and the planar mode that uses reference pixels for bilinear interpolation, a total of 67 intra-frame prediction modes.

[0062] Some video coding standards support multiple reference line intraprediction, or MRLP for short. Multiple reference lines refer to multiple reference pixel rows / columns (upper row, left column), and one of the rows / columns can be selected to generate predicted pixel values, that is, there are multiple options for reference pixels. Figure 2As shown, multiple reference pixel rows support three configurations, namely, reference pixel row 0 closest to the current unit to be coded, reference pixel row 1 separated by two rows of pixels from the current unit to be coded, and reference pixel row 2 separated by three rows of pixels. When selecting reference pixel rows and intra-frame angle prediction modes, the encoder often adopts the method of traversing all combinations, that is, encoding the prediction combinations formed by all reference pixel rows and intra-frame angle prediction modes, and selecting the configuration with the best rate-distortion performance. For example, there are N intra-frame angle prediction modes, and the corresponding rate-distortion costs are calculated based on the reconstructed pixel values ​​corresponding to reference pixel row 0, reference pixel row 1, and reference pixel row 2 and the N intra-frame angle prediction modes, respectively. A total of 3*N calculations are required. Although this method guarantees the rate-distortion performance of the encoder, it also brings extremely high complexity, which means that encoding requires more computing resources and takes longer encoding time, resulting in low encoding efficiency. In some application scenarios, the user experience is reduced. For example, for high transcoding load services such as video on demand and low latency services such as live broadcasts, high encoding complexity will directly reduce the user's service experience.

[0063] The video encoding method provided in the embodiment of the present application makes a quick decision on the reference pixel rows participating in the candidate prediction mode search based on similarity, rather than directly allowing each of the multiple reference pixel rows to participate in the prediction mode search, and then, performs an intra-frame angle prediction mode search based on the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded, and encodes the unit to be encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain the encoding data corresponding to the unit to be encoded, which can effectively reduce the proportion of the computational complexity of multi-reference row encoding in the complexity of the entire encoding process, thereby reducing the encoding time and computing resource overhead of the encoder, and significantly improving the encoding efficiency.

[0064] In one embodiment, Figure 3 As shown, a video encoding method is provided, which is applied to Figure 1 The computer device (terminal 102 or server 104) in the example is used for explanation, and the following steps are included:

[0065] Step 302: determine a unit to be encoded and a plurality of reference pixel rows corresponding to the unit to be encoded.

[0066] Among them, the coding unit (CU) is the basic unit for video coding, and the size of each coding unit can be 8x8, 16x16, 32x32, or 64x64. Figure 4 FIG. 1 is a schematic diagram of intra-frame prediction in an embodiment, referring to FIG. Figure 4, where the blank filled area is the unit to be encoded, and the intra-frame prediction process is the process of obtaining the predicted pixel value of the unit to be encoded according to a certain intra-frame prediction mode based on the reconstructed pixel value that has been encoded in the adjacent area.

[0067] In the field of video compression, reference pixels are often needed to predict the pixel value of a coding unit. The basis of intra-frame prediction is the correlation of the internal spatial domain of the video image, that is, a certain inherent continuity of the pixel values ​​inside the video image from the upper left position to the lower right position. The reference pixels used for intra-frame prediction are the reconstructed pixel values ​​of the boundaries of the coded units in the prediction direction within the same frame. For different videos and different texture contents, an intra-frame angle prediction mode search should be performed, that is, different angle prediction modes should be used adaptively for the coding unit to be coded, and a decision should be made as to which direction of reference pixels its predicted pixel values ​​should refer to and use, so as to achieve the best compression performance for this coding unit. Therefore, the computer device needs to first determine the multiple reference pixel rows corresponding to the unit to be coded. The multiple reference pixel rows are usually multiple rows adjacent to the unit to be coded. By comparison, one row / column can be selected to generate the predicted pixel. For example, referring to Figure 2 , the multiple reference pixel rows are 3 rows above / 3 columns on the left of the unit to be encoded, and are respectively recorded as reference pixel row 0, reference pixel row 1, and reference pixel row 2.

[0068] Step 304: Determine at least one reference pixel row participating in the intra-frame angle prediction mode search from the multiple reference pixel rows based on the similarity between any two reference pixel rows in the multiple reference pixel rows.

[0069] Since the multiple reference pixel rows corresponding to the unit to be encoded are usually multiple rows of pixels adjacent to the unit to be encoded, it is very likely that each reference pixel row is similar or even identical. When each reference pixel row is similar, the intra-frame prediction mode determined after the intra-frame prediction mode search is basically the same, which causes computational redundancy in the intra-frame prediction mode search.

[0070] To this end, in an embodiment of the present application, the computer device determines at least one reference pixel row participating in the intra-frame angle prediction mode search from multiple reference pixel rows based on the similarity between two reference pixel rows in multiple reference pixel rows, that is, when there are similar reference pixel rows in multiple reference pixel rows, a quick decision is made on the reference pixel rows participating in the candidate prediction mode search based on the similarity, and some reference pixel rows can be skipped, and the skipped reference pixel rows do not participate in the subsequent intra-frame prediction mode search, rather than directly allowing each reference pixel row in the multiple reference pixel rows to participate in the prediction mode search, which can effectively reduce the proportion of the computational complexity of multi-reference row encoding in the complexity of the entire encoding process, thereby reducing the encoding time and computing resource overhead of the encoder, and significantly improving the encoding efficiency. Among them, the similarity between two reference pixel rows can be determined by using the similarity between the pixel reconstruction values ​​of some pixel positions in the two reference pixel rows.

[0071] For example, when reference pixel row 1, reference pixel row 2 and reference pixel row 0 are similar, reference pixel row 1 and reference pixel row 2 can be skipped, and only reference pixel row 0 can be used to treat the coding unit using different intra-frame angle prediction modes to decide which intra-frame angle prediction mode should be referenced and used for its predicted pixel value.

[0072] It can be understood that based on the similarity between any two reference pixel rows in a plurality of reference pixel rows, at least one reference pixel row determined from the plurality of reference pixel rows to participate in the intra-frame angle prediction mode search may be one reference pixel row among the plurality of reference pixel rows, which means that any two reference pixel rows among the plurality of reference pixel rows are similar. Of course, it may also be all the reference pixel rows among the plurality of reference pixel rows, which means that any two reference pixel rows among the plurality of reference pixel rows are not similar. Considering that the plurality of reference pixel rows themselves are adjacent pixel rows, this situation is very rare.

[0073] Step 306 , performing an intra-frame angle prediction mode search according to at least one reference pixel row, and obtaining a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded.

[0074] After deciding on at least one reference pixel row to participate in the intra-frame angle prediction mode search, the computer device can perform an intra-frame angle prediction mode search based on the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded. The combination of the target reference pixel row and the target intra-frame angle prediction mode optimizes the compression performance of the unit to be encoded.

[0075] It should be noted that if it is determined that there is only one reference pixel row that participates in the intra-frame angle prediction mode search, it is only necessary to use different angle prediction modes based on the one reference pixel row to determine which intra-frame angle prediction mode the predicted pixel value of the unit to be encoded should refer to and use. If it is determined that there are more than one reference pixel row that participates in the intra-frame angle prediction mode search, it is necessary to use different angle prediction modes based on each of the determined reference pixel rows to determine which reference pixel row the predicted pixel value of the unit to be encoded should refer to and which intra-frame angle prediction mode to use.

[0076] In one embodiment, step 306, performing an intra-frame angle prediction mode search based on at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the coding unit, includes: traversing each reference pixel row in the at least one reference pixel row in turn; calculating corresponding rate-distortion costs based on prediction combinations formed by the traversed reference pixel rows and each intra-frame angle prediction mode; and using the prediction combination with the smallest corresponding rate-distortion cost as the target reference pixel row and the target intra-frame angle prediction mode for intra-frame encoding of the coding unit.

[0077] For example, if the reference pixel rows that are decided to participate in the intra-frame angle prediction mode search are pixel reference row 0 and pixel reference row 1, and there are a total of N intra-frame angle prediction modes, if there is only one, then it is only necessary to use different angle prediction modes according to the one reference pixel row to determine which intra-frame angle prediction mode the predicted pixel value of the unit to be encoded should refer to and use. If it is decided that there are more than one reference pixel rows that participate in the intra-frame angle prediction mode search, it is necessary to use different angle prediction modes according to each reference pixel row that is decided, to determine which reference pixel row the predicted pixel value of the unit to be encoded should refer to and which intra-frame angle prediction mode to use. Since multiple reference pixel rows are adjacent pixel rows themselves, in most cases, there is only one reference pixel row that is decided to participate in the intra-frame angle prediction mode search in the above manner.

[0078] It should be noted that the computer device can also use some optimized search methods to reduce the search complexity. As mentioned above, H.266 supports a total of 65 intra-frame angle prediction modes. If the 65 intra-frame angle prediction modes are screened one by one, the computational complexity will increase dramatically. In order to reduce the complexity, the search strategy for the intra-frame angle prediction mode can be divided into three steps: the first step is to use the SATD (sum of absolute transformed difference, the sum of absolute transform errors) cost, only N intra-frame angle prediction modes are roughly selected from some intra-frame angle prediction modes (such as 35 intra-frame angle prediction modes belonging to H.265 among the 65 intra-frame angle prediction modes, and the value of N is related to the size of the coding unit); the second step is to perform a second rough selection, use the SATD cost to compare the intra-frame angle prediction mode in the selected N intra-frame angle prediction modes with its adjacent intra-frame angle prediction modes, select the intra-frame angle prediction mode with a better SATD cost, and update the N intra-frame angle prediction modes; the third step is to merge the selected N intra-frame angle prediction modes into a list for storing the most likely prediction mode (i.e., MostProbableMode, MPM), obtain the final candidate list, and use a more accurate rate-distortion cost (RateDistortion cost) to select the optimal intra-frame angle prediction mode.

[0079] Step 308 , encoding the unit to be encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain encoding data corresponding to the unit to be encoded.

[0080] Specifically, after determining the target reference pixel row and the target intra-frame angle prediction mode for intra-coding the unit to be coded, the computer device can encode the unit to be coded to obtain the coded data corresponding to the unit to be coded.

[0081] In one embodiment, step 308 encodes the unit to be encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain the encoded data corresponding to the unit to be encoded, including: obtaining the reconstructed pixel value of the pixel position adjacent to the unit to be encoded from the encoded unit of the target reference pixel row; generating the predicted pixel value corresponding to the unit to be encoded according to the reconstructed pixel value based on the angle and prediction method corresponding to the target intra-frame angle prediction mode; calculating the prediction residual between the original pixel value and the predicted pixel value corresponding to the unit to be encoded; and transforming, quantizing, and entropy encoding the prediction residual to obtain the encoded data corresponding to the unit to be encoded.

[0082] Specifically, the process of encoding the coding unit to be coded may include intra-frame prediction, post-processing of predicted pixel values, prediction residual calculation, transformation, quantization, entropy coding and other processing processes. Intra-frame prediction includes reference pixel acquisition, reference pixel filtering, and predicted pixel values. When acquiring reference pixels, the reference pixel row can be divided into 5 parts by region, namely, lower left, left, upper left, upper and upper right, and the reconstructed pixel values ​​of these positions are acquired. If the current coding unit is located at the image boundary or the Slice or Tile boundary, the reference pixel may not exist or be available, and in some cases, the coding unit at the lower left or upper right may not be coded yet, and these reference pixels are also unavailable. When the reference pixel does not exist or is unavailable, the nearest pixel can be used for filling. For example, if the reference pixel at the lower left does not exist, all reference pixels in the lower left area can be filled with the lowermost pixel in the left area. If the reference pixel at the upper right area does not exist, the rightmost pixel in the upper area can be used for filling. If all reference pixels are unavailable, the reference pixel can be filled with a fixed value, such as 128 or 512. The reference pixels are filtered to better utilize the correlation between adjacent pixels. The calculation of the predicted pixel value is to use the reconstructed pixel value corresponding to the filtered reference pixel, and use the calculation method corresponding to the angle prediction mode in the target frame to obtain the predicted pixel value. Then, the computer device performs transformation, quantization, entropy coding and other processing on the difference between the reconstructed pixel value corresponding to the reference pixel and its predicted pixel value, that is, the prediction residual, to obtain the encoded data corresponding to the unit to be encoded.

[0083] It can be understood that the computer device can also reconstruct the unit to be encoded based on the quantized prediction residual and predicted pixel value corresponding to the unit to be encoded, and obtain the reconstructed pixel value corresponding to the unit to be encoded. The reconstructed pixel value can be used as a reference pixel for other subsequent units to be encoded and used for intra-frame prediction of other subsequent units to be encoded.

[0084] In one embodiment, the video encoding method may further include: sending the encoded data, the pixel row index corresponding to the target reference pixel row, and the prediction mode index corresponding to the target intra-frame angle prediction mode to the decoding end, so that the decoding end determines the corresponding target reference pixel row according to the pixel row index and the target intra-frame angle prediction mode corresponding to the prediction mode index to perform intra-frame decoding on the encoded data to obtain corresponding decoded data.

[0085] Specifically, when the decoding end receives the coded data, entropy decoding, inverse quantization, inverse transformation, and reconstruction can be performed to obtain the reconstructed pixel value corresponding to the unit to be coded, which can keep the consistency of the reference pixel in coding and decoding. When decoding, the computer device sequentially performs entropy decoding, inverse quantization, and inverse transformation on the coded data to obtain the corresponding prediction residual. When reconstructing, the reconstructed pixel value corresponding to the reference pixel is obtained based on the pixel row index, and the prediction mode corresponding to the target frame intra-angle prediction mode is obtained. According to the reconstructed pixel value, the prediction mode is calculated to obtain the predicted pixel value. The predicted pixel value plus the prediction residual obtained by inverse transformation obtains the corresponding decoded data, which can also be used as the reconstructed pixel value of the reference pixel corresponding to the unit to be decoded later.

[0086] The above-mentioned video encoding method determines a unit to be encoded and a plurality of reference pixel rows corresponding to the unit to be encoded, and determines at least one reference pixel row participating in the intra-frame angle prediction mode search from the plurality of reference pixel rows based on the similarity between the reference pixel rows in pairs among the plurality of reference pixel rows. That is, a decision is made on the reference pixel rows participating in the candidate prediction mode search based on the similarity, rather than directly allowing each reference pixel row in the plurality of reference pixel rows to participate in the prediction mode search. Then, the intra-frame angle prediction mode search is performed according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded, and the unit to be encoded is encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain the encoding data corresponding to the unit to be encoded, which can effectively reduce the proportion of the computational complexity of multi-reference row encoding in the complexity of the entire encoding process, thereby reducing the encoding time and computing resource overhead of the encoder, and significantly improving the encoding efficiency. .

[0087] In one embodiment, the multiple reference pixel rows include a basic reference pixel row that is closest to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search; the multiple reference pixel rows also include other reference pixel rows;

[0088] like Figure 5 As shown, step 304, based on the similarity between two reference pixel rows in a plurality of reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search is determined from the plurality of reference pixel rows, including the following steps 502 and 504:

[0089] Step 502, calculating the similarity between the basic reference pixel row and other reference pixel rows;

[0090] Step 504: If it is determined according to the similarity that the basic reference pixel row is similar to the other reference pixel rows, it is determined that the other reference pixel rows do not participate in the intra-frame angle prediction mode search.

[0091] Among them, the basic reference pixel row is a reference pixel row among the multiple reference pixel rows that must participate in the intra-frame angle prediction mode search. Based on the basic reference pixel row, the similarity between other reference pixel rows and it is judged, and the reference pixel row among the other reference pixel rows that needs to participate in the intra-frame angle prediction mode search is determined. Optionally, considering that the multiple reference pixel rows themselves are relatively close, the basic reference pixel row can be any one of the multiple reference pixel rows. Optionally, in this embodiment, considering that the reference pixel row closest to the unit to be encoded has the highest correlation with the unit to be encoded, more spatial redundant information can be eliminated subsequently, and the number of bits of the encoding code rate can be reduced. The reference pixel row closest to the unit to be encoded can be used as the basic reference pixel row that must participate in the intra-frame angle prediction mode search, for example Figure 2 In the example, the reference pixel row 0 closest to the current unit to be encoded can be used as the basic reference pixel row.

[0092] The computer device may calculate the similarity between the basic reference pixel row and other reference pixel rows. If it is determined based on the similarity that the basic reference pixel row and other reference pixel rows are similar, it is determined that other reference pixel rows do not participate in the intra-frame angle prediction mode search.

[0093] In this embodiment, the reference pixel row closest to the unit to be encoded is used as the basic reference pixel row that must participate in the intra-frame angle prediction mode search. According to the similarity between other reference pixel rows and the basic reference pixel row, when they are similar, other reference pixel rows do not participate in the intra-frame angle prediction mode search, which can greatly reduce the computational complexity of the intra-frame angle prediction mode search, reduce the encoding time and computing resource overhead of the encoder, significantly improve the encoding efficiency, eliminate the spatial redundant information between related pixels, and reduce the number of bits of the encoding code rate. Moreover, this calculation process of prioritizing the basic pixel row can avoid directly calculating the similarity between the combination formed by all the reference pixel rows in multiple reference pixel rows, which can reduce the amount of calculation.

[0094] In one embodiment, referring to Figure 5 , step 304 also includes step 506, that is, if it is determined based on the similarity that the basic reference pixel row is not similar to the other reference pixel rows, then the similarity between each pair of reference pixel rows in the other reference pixel rows is calculated; based on the similarity between each pair of reference pixel rows in the other reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search is determined from the other reference pixel rows.

[0095] Specifically, if it is determined based on the similarity that the basic reference pixel row is not similar to other reference pixel rows, it means that other reference pixel rows may carry other relevant information of the current unit to be encoded, and other reference pixel rows need to participate in the intra-frame angle prediction mode search.

[0096] Similarly, in order to reduce the computational complexity of the intra-frame angle prediction mode search, the computer device may further calculate the similarity between any two reference pixel rows in other reference pixel rows, and determine therefrom at least one reference pixel row to participate in the intra-frame angle prediction mode search. Based on the similarity between any two reference pixel rows in other reference pixel rows, at least one reference pixel row to participate in the intra-frame angle prediction mode search is determined from the other reference pixel rows, which may be one of the other reference pixel rows, indicating that any two reference pixel rows in the other reference pixel rows are similar. Of course, it may also be all of the other reference pixel rows, indicating that any two reference pixel rows in the other reference pixel rows are not similar.

[0097] Optionally, when calculating the similarity between any two reference pixel rows in other reference pixel rows, the computer device may use the reference pixel row closest to the unit to be coded (also called a secondary basic pixel row, such as Figure 2 The reference pixel rows 1) in the frame are used to calculate similarities with the remaining reference pixel rows, and whether other reference pixel rows participate in the intra-frame angle prediction mode search is determined based on the similarities.

[0098] Similarly, this calculation process of the priority basic pixel rows can avoid directly calculating the similarity between the combinations formed by all the reference pixel rows in other reference pixel rows, thereby reducing the amount of calculation.

[0099] In a specific embodiment, the multiple reference pixel rows include a basic reference pixel row that is closest to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search; the multiple reference pixel rows also include a first reference pixel row and a second reference pixel row that are gradually distanced from the unit to be encoded; step 304, based on the similarity between any two reference pixel rows in the multiple reference pixel rows, determines at least one reference pixel row that participates in the intra-frame angle prediction mode search from the multiple reference pixel rows, including:

[0100] If the base reference pixel row is not similar to the first reference pixel row, it is determined that the first reference pixel row participates in the intra-frame angle prediction mode search; if the base reference pixel row is similar to the first reference pixel row, it is determined that the first reference pixel row does not participate in the intra-frame angle prediction mode search; if the base reference pixel row is similar to the second reference pixel row, it is determined that the second reference pixel row does not participate in the intra-frame angle prediction mode search.

[0101] Furthermore, the video encoding method may also include:

[0102] If the basic reference pixel row is not similar to the first reference pixel row, and the basic reference pixel row is not similar to the second reference pixel row, and the first reference pixel row is similar to the second reference pixel row, then it is determined that the first reference pixel row participates in the intra-frame angle prediction mode search and the second reference pixel row does not participate in the intra-frame angle prediction mode search; if the basic reference pixel row is not similar to the first reference pixel row, and the basic reference pixel row is not similar to the second reference pixel row, and the first reference pixel row is not similar to the second reference pixel row, then it is determined that both the first reference pixel row and the second reference pixel row participate in the intra-frame angle prediction mode search.

[0103] like Figure 6 FIG. 1 is a flow chart of intra-frame prediction in one embodiment. Figure 6 , reference pixel row 0 is used as the basic pixel row and must participate in the intra-frame angle prediction mode search. Whether reference pixel row 1 and reference pixel row 2 are encoded needs to follow Figure 6 The decision is made according to the flowchart shown. The basis for the judgment order is that reference pixel row 0 is closest to the unit to be encoded, has the strongest correlation, and is most likely to be adopted. Reference pixel row 1 is the next closest to the unit to be encoded and has the next highest correlation. Reference pixel row 2 is the farthest from the unit to be encoded and has the lowest correlation. That is, when deciding on the reference pixel row and the intra-frame angle prediction mode, first, encode according to reference pixel row 0 and each intra-frame angle prediction mode, and calculate the corresponding rate-distortion cost. Then, generate a reference row vector representing reference pixel row 0, reference pixel row 1, and reference pixel row 2 to determine whether reference pixel row 0 is similar to reference pixel row 1. If reference pixel row 0 is not similar to reference pixel row 1, it is determined that reference pixel row 1 also participates in the intra-frame angle prediction mode search, and it is necessary to encode according to reference pixel row 1 and each intra-frame angle prediction mode, and calculate the corresponding rate-distortion cost. Next, determine whether reference pixel row 0 is similar to reference pixel row 2. Of course, if reference pixel row 0 is similar to reference pixel row 1, determine that reference pixel row 1 does not participate in the intra-frame angle prediction mode search, and directly determine whether reference pixel row 0 is similar to reference pixel row 2.

[0104] If reference pixel row 0 is similar to reference pixel row 2, it is determined that reference pixel row 2 does not participate in the intra-frame angle prediction mode search, and the process ends at this time. If reference pixel row 0 is not similar to reference pixel row 2, it is determined whether reference pixel row 1 is similar to reference pixel row 2. If reference pixel row 1 is not similar to reference pixel row 2, it is determined that reference pixel row 2 also participates in the intra-frame angle prediction mode search, and it is necessary to use reference pixel row 2 and each intra-frame angle prediction mode for encoding, and calculate the corresponding rate-distortion cost, and then determine the final target reference pixel row and target intra-frame angle prediction mode based on all rate-distortion costs, and the process ends. If reference pixel row 1 is similar to reference pixel row 2, it is determined that reference pixel row 2 does not participate in the intra-frame angle prediction mode search, and the process ends.

[0105] In this embodiment, the reference pixel row closest to the unit to be encoded is used as the basic reference pixel row that must participate in the intra-frame angle prediction mode search. According to the similarity between other reference pixel rows and the basic reference pixel row, when they are similar, other reference pixel rows do not participate in the intra-frame angle prediction mode search, which can greatly reduce the computational complexity of the intra-frame angle prediction mode search, reduce the encoding time and computing resource overhead of the encoder, significantly improve the encoding efficiency, eliminate the spatial redundant information between related pixels, and reduce the number of bits of the encoding code rate. Moreover, this calculation process of prioritizing the basic pixel row can avoid directly calculating the similarity between the combination formed by all the reference pixel rows in multiple reference pixel rows, which can reduce the amount of calculation.

[0106] In one embodiment, Figure 7 As shown, the steps of calculating the similarity between two reference pixel rows include:

[0107] Step 702: determine the target number of pixels according to the size of the unit to be encoded.

[0108] Step 704, for each reference pixel row, pixel positions are intercepted from the reference pixel row according to the target number of pixels, pixel positions are intercepted from the reference pixel column corresponding to the reference pixel row according to the target number of pixels, and a reference row vector corresponding to the reference pixel row is determined according to the reconstructed pixel values ​​of the intercepted pixel positions.

[0109] In order to compare the similarity between reference pixel rows, in this embodiment, each reference pixel row is regarded as an N-dimensional vector composed of specific pixels, that is, a reference row vector. The N-dimensional vector used to represent a reference pixel row is obtained by intercepting part of the pixels (or all the pixels) of the reference pixel row. The size of the unit to be encoded is the width and height of the unit to be encoded, which are respectively denoted as w and h. It can be understood that the reference pixel row has a row direction and a column direction. The computer device can intercept w+h pixels located above the unit to be encoded from the row direction corresponding to the reference pixel row, and intercept h+w pixels located on the left side of the unit to be encoded from the row direction corresponding to the reference pixel row, and construct the reference row vector corresponding to the reference pixel row, that is, the value of N can be 2*(w+h). In this way, each reference pixel row can be uniformly represented by a corresponding N-dimensional vector, which can facilitate the calculation of the similarity between reference pixel rows. Of course, in other embodiments, other methods can also be used to construct the reference row vector corresponding to the reference pixel row. For example, a computer device can intercept w pixels located above the unit to be encoded from the row direction corresponding to the reference pixel row, and intercept h pixels located on the left side of the unit to be encoded from the row direction corresponding to the reference pixel row, that is, the value of N can be w+h, so that each reference pixel row can be uniformly represented by a corresponding N-dimensional vector.

[0110] Step 706: The similarity between the reference row vectors is used as the similarity between the reference pixel rows.

[0111] like Figure 8 FIG. 1 is a schematic diagram of a reference pixel row in an embodiment. Figure 8 , w and h are the width and height of the current unit to be coded. Reference pixel row 0 has the least pixels, consisting of w+h pixels on the upper side of the current unit to be coded, w+h pixels on the left side, and 1 pixel in the upper left corner. Reference pixel row 2 has the most pixels. When generating an N-dimensional vector corresponding to a reference pixel row, you can only select Figure 8 The intercepted A and B parts shown, that is, the N-dimensional vector representing a reference pixel row, is composed of the corresponding A and B parts, and the vector dimension N is 2*(w+h). It can be understood that there is no limitation on which pixel in A and B a particular dimension in the N-dimensional vector corresponds to, as long as each reference pixel row is generated according to a uniform pixel arrangement and can objectively measure the similarity between reference pixel rows. According to the above-mentioned interception method, the vector element of reference pixel row 0 contains all the pixels of reference pixel row 0 except the 1 pixel in the upper left corner, that is, w+h pixels on the upper side and w+h pixels on the left side.

[0112] In one embodiment, the similarity between pairwise reference row vectors is used as the similarity between pairwise reference pixel rows, including: calculating the Euclidean distance between pairwise reference row vectors based on vector elements of pairwise reference row vectors; using the Euclidean distance as the similarity between pairwise reference pixel rows; the video encoding method may also include: calculating the ratio of the Euclidean distance to the target number of pixels; determining that the conditions for the corresponding two reference pixel rows to be similar include at least: the ratio of the Euclidean distance to the target number of pixels is less than a first preset threshold.

[0113] In this embodiment, the Euclidean distance is used to represent the similarity of the reference pixel row. Assume that there are two N-dimensional reference row vectors x and y, the vector elements of the i-th dimension are denoted as xi and yi respectively, and the value of i is 0, 1, 2, ..., N. The Euclidean distance d(x, y) between them is:

[0114]

[0115] Of course, in other embodiments, other methods may be used to measure the similarity of the reference pixel rows, such as Hamming distance, Pearson Correlation Coefficient, or similarity prediction based on a neural network model, etc.

[0116] In this embodiment, the condition for determining that the corresponding two reference pixel rows are similar includes at least: the ratio of the Euclidean distance to the number of target pixels is less than a first preset threshold, that is:

[0117] d(x, y)<N*K1, where K1 is a first preset threshold.

[0118] When measuring whether two reference pixel rows are similar, a "normalization" process is performed, that is, the ratio of the Euclidean distance to the number of target pixels is compared with the first preset threshold, rather than directly comparing the Euclidean distance with the first preset threshold. In this way, regardless of whether the size of the to-be-encoded unit is 8x8, 16x16, 32x32 or 64x64, these to-be-encoded units of different sizes can use the same first preset threshold to determine whether two reference pixel rows are similar. There is no need to determine a different first preset threshold for each size, which can reduce the workload.

[0119] The first preset threshold is a preset value. The value of the first preset threshold can be set manually according to the actual situation. For example, some sample units to be encoded and their corresponding multiple reference pixel rows can be determined. On the one hand, the final target reference pixel row and the target intra-frame angle prediction mode are determined by directly involving multiple reference pixel rows in the intra-frame angle prediction mode search. The unit to be encoded is encoded according to the final target reference pixel row and the target intra-frame angle prediction mode to obtain corresponding encoded data. On the other hand, after the reference pixel row participating in the intra-frame angle prediction mode search is determined according to the method provided in the embodiment of the present application, the intra-frame angle prediction mode search is performed according to the determined reference pixel row to determine the final target reference pixel row and the target intra-frame angle prediction mode. The unit to be encoded is encoded according to the final target reference pixel row and the target intra-frame angle prediction mode to obtain corresponding encoded data. The computer device determines the value of the first preset threshold according to the difference between the encoded data in the two ways. The smaller the difference, the more reasonable the value of the first preset threshold.

[0120] In one embodiment, the video encoding method may further include: calculating the difference between two vector elements of the same vector dimension corresponding to each pair of reference row vectors; the condition for determining that the corresponding two reference pixel rows are similar also includes: the difference between the two vector elements of each vector dimension is less than a second preset threshold.

[0121] In this embodiment, in order to avoid excessive difference in local dimensions of the reference row vectors and improve the accuracy of similarity judgment, the single-dimensional difference of the reference row vectors is also limited. Specifically, the difference between the two vector elements of each vector dimension is less than the second preset threshold, that is:

[0122] T2 is the second preset threshold value, which can be set according to actual needs.

[0123] In this embodiment, when two reference row vectors meet the above two conditions simultaneously, it is considered that the corresponding two reference pixel rows are similar.

[0124] In a specific embodiment, the video encoding method includes the following steps:

[0125] 1. Determine a unit to be encoded and multiple reference pixel rows corresponding to the unit to be encoded; the multiple reference pixel rows include a basic reference pixel row that is closest to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search.

[0126] 2. Determine the target number of pixels based on the size of the unit to be encoded.

[0127] 3. For each reference pixel row, pixel positions are intercepted from the reference pixel row according to the target number of pixels, pixel positions are intercepted from the reference pixel column corresponding to the reference pixel row according to the target number of pixels, and the reference row vector corresponding to the reference pixel row is determined according to the reconstructed pixel values ​​of the intercepted pixel positions.

[0128] 4. Calculate the similarity between the basic reference pixel row and other reference pixel rows based on the reference row vector.

[0129] 5. If it is determined based on the similarity that the basic reference pixel row is similar to other reference pixel rows, it is determined that other reference pixel rows do not participate in the intra-frame angle prediction mode search.

[0130] 6. If it is determined based on the similarity that the basic reference pixel row is not similar to the other reference pixel rows, then the similarity between any two reference pixel rows in the other reference pixel rows is calculated based on the reference row vectors.

[0131] 7. Based on the similarity between any two reference pixel rows in other reference pixel rows, determine at least one reference pixel row participating in the intra-frame angle prediction mode search from other reference pixel rows.

[0132] 8. Traverse each reference pixel row in at least one reference pixel row in turn.

[0133] 9. Based on the prediction combinations formed by the traversed reference pixel rows and the angle prediction modes within each frame, the corresponding rate-distortion costs are calculated respectively.

[0134] 10. The corresponding prediction combination with the minimum rate-distortion cost is used as the target reference pixel row and the target intra-frame angle prediction mode for intra-frame coding of the coding unit.

[0135] 11. Obtain reconstructed pixel values ​​of pixel positions adjacent to the unit to be encoded from the encoded units of the target reference pixel row.

[0136] 12. According to the angle and prediction method corresponding to the angle prediction mode in the target frame, the predicted pixel value corresponding to the unit to be encoded is generated according to the reconstructed pixel value.

[0137] 13. Calculate the prediction residual between the original pixel value and the predicted pixel value corresponding to the unit to be encoded.

[0138] 14. After transforming, quantizing, and entropy encoding the prediction residual, the encoded data corresponding to the unit to be encoded is obtained.

[0139] 15. Send the encoded data, the pixel row index corresponding to the target reference pixel row, and the prediction mode index corresponding to the target intra-frame angle prediction mode to the decoding end, so that the decoding end determines the corresponding target reference pixel row according to the pixel row index and the target intra-frame angle prediction mode corresponding to the prediction mode index, performs intra-frame decoding on the encoded data, and obtains the decoded data corresponding to the unit to be encoded.

[0140] The above-mentioned video encoding method makes a decision on the reference pixel rows participating in the candidate prediction mode search based on similarity, rather than directly allowing each of the multiple reference pixel rows to participate in the prediction mode search, and then performs an intra-frame angle prediction mode search based on the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded, and encodes the unit to be encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain the encoding data corresponding to the unit to be encoded, which can effectively reduce the proportion of the computational complexity of multi-reference row encoding in the complexity of the entire encoding process, thereby reducing the encoding time and computing resource overhead of the encoder, and significantly improving the encoding efficiency.

[0141] The above-mentioned video encoding method uses the reference pixel row closest to the unit to be encoded as the basic reference pixel row that must participate in the intra-frame angle prediction mode search. According to the similarity between other reference pixel rows and the basic reference pixel row, when they are similar, other reference pixel rows do not participate in the intra-frame angle prediction mode search, which can eliminate the spatial redundant information between related pixels and reduce the number of bits of the encoding bit rate. Moreover, this calculation process of prioritizing the basic pixel row can avoid directly calculating the similarity between the combination formed by all the reference pixel rows in multiple reference pixel rows, which can reduce the amount of calculation.

[0142] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0143] Based on the same inventive concept, the embodiment of the present application also provides a video encoding device for implementing the above-mentioned video encoding method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in the one or more video encoding device embodiments provided below can refer to the above-mentioned limitations on the video encoding method, and will not be repeated here.

[0144] In one embodiment, Fig. 9 As shown, a video encoding device 900 is provided, comprising: a multi-reference line determination module, a reference line decision module 904, a reference line and preset mode determination module 906 and an encoding data acquisition module 908, wherein:

[0145] A multiple reference row determination module 902, configured to determine a unit to be encoded and multiple reference pixel rows corresponding to the unit to be encoded;

[0146] A reference row decision module 904, configured to determine at least one reference pixel row for participating in the intra-frame angle prediction mode search from the multiple reference pixel rows based on the similarity between any two reference pixel rows in the multiple reference pixel rows;

[0147] A reference row and preset mode determination module 906, configured to search for an intra-frame angle prediction mode according to at least one reference pixel row, and obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of a to-be-encoded unit;

[0148] The coding data acquisition module 908 is used to encode the unit to be coded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain coding data corresponding to the unit to be coded.

[0149] In one embodiment, the multiple reference pixel rows include a basic reference pixel row that is closest to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search; the multiple reference pixel rows also include other reference pixel rows; the reference row decision module 904 is also used to calculate the similarity between the basic reference pixel row and the other reference pixel rows; if the basic reference pixel row is determined to be similar to the other reference pixel rows based on the similarity, it is determined that the other reference pixel rows do not participate in the intra-frame angle prediction mode search.

[0150] Optionally, the reference row decision module 904 is further used to calculate the similarity between any two reference pixel rows in the other reference pixel rows if it is determined based on the similarity that the basic reference pixel row is not similar to any other reference pixel rows; and determine at least one reference pixel row participating in the intra-frame angle prediction mode search from the other reference pixel rows based on the similarity between any two reference pixel rows in the other reference pixel rows.

[0151] In one embodiment, the multiple reference pixel rows include a basic reference pixel row that is most adjacent to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search; the multiple reference pixel rows also include a first reference pixel row and a second reference pixel row whose distances to the unit to be encoded gradually increase; the reference row decision module 904 is also used to determine that the first reference pixel row participates in the intra-frame angle prediction mode search if the basic reference pixel row is not similar to the first reference pixel row; if the basic reference pixel row is similar to the first reference pixel row, determine that the first reference pixel row does not participate in the intra-frame angle prediction mode search; if the basic reference pixel row is similar to the second reference pixel row, determine that the second reference pixel row does not participate in the intra-frame angle prediction mode search.

[0152] Optionally, the reference row decision module 904 is also used to determine that the first reference pixel row participates in the intra-frame angle prediction mode search and the second reference pixel row does not participate in the intra-frame angle prediction mode search if the base reference pixel row is not similar to the first reference pixel row, and the base reference pixel row is not similar to the second reference pixel row, and the first reference pixel row is similar to the second reference pixel row; if the base reference pixel row is not similar to the first reference pixel row, and the base reference pixel row is not similar to the second reference pixel row, and the first reference pixel row is not similar to the second reference pixel row, then determine that both the first reference pixel row and the second reference pixel row participate in the intra-frame angle prediction mode search.

[0153] In one embodiment, the video encoding apparatus 900 further includes:

[0154] A similarity determination module is used to determine the target number of pixels according to the size of the unit to be encoded; for each reference pixel row, pixel positions are intercepted from the reference pixel row according to the target number of pixels, pixel positions are intercepted from the reference pixel column corresponding to the reference pixel row according to the target number of pixels, and reference row vectors corresponding to the reference pixel row are determined according to the reconstructed pixel values ​​of the intercepted pixel positions; and the similarity between the reference row vectors is used as the similarity between the reference pixel rows.

[0155] Optionally, the similarity determination module is also used to calculate the Euclidean distance between pairwise reference row vectors based on the vector elements of the pairwise reference row vectors; use the Euclidean distance as the similarity between pairwise reference pixel rows; calculate the ratio of the Euclidean distance to the number of target pixels; wherein the conditions for determining that the corresponding two reference pixel rows are similar include at least: the ratio of the Euclidean distance to the number of target pixels is less than a first preset threshold.

[0156] Optionally, the similarity determination module is also used to calculate the difference between two vector elements of the same vector dimension corresponding to each of the reference row vectors; wherein the condition for determining that the corresponding two reference pixel rows are similar also includes: the difference between the two vector elements of each vector dimension is less than a second preset threshold.

[0157] In one embodiment, the reference row and preset mode determination module 906 is further used to sequentially traverse each reference pixel row in at least one reference pixel row; calculate corresponding rate-distortion costs based on prediction combinations formed by the traversed reference pixel rows and each intra-frame angle prediction mode; and use the prediction combination with the smallest corresponding rate-distortion cost as the target reference pixel row and target intra-frame angle prediction mode for intra-frame encoding of the encoding unit.

[0158] In one embodiment, the coding data acquisition module 908 is also used to obtain the reconstructed pixel value of the pixel position adjacent to the unit to be coded from the coded unit of the target reference pixel row; generate the predicted pixel value corresponding to the unit to be coded according to the reconstructed pixel value based on the angle and prediction method corresponding to the angle prediction mode in the target frame; calculate the prediction residual between the original pixel value and the predicted pixel value corresponding to the unit to be coded; and transform, quantize, and entropy encode the prediction residual to obtain the coding data corresponding to the unit to be coded.

[0159] In one embodiment, the video encoding apparatus 900 further includes:

[0160] The sending module is used to send the encoded data, the pixel row index corresponding to the target reference pixel row, and the prediction mode index corresponding to the target intra-frame angle prediction mode to the decoding end, so that the decoding end determines the corresponding target reference pixel row according to the pixel row index and the target intra-frame angle prediction mode corresponding to the prediction mode index to perform intra-frame decoding on the encoded data to obtain the decoded data corresponding to the unit to be encoded.

[0161] The above-mentioned video encoding device 900 determines a unit to be encoded and multiple reference pixel rows corresponding to the unit to be encoded, and based on the similarity between each reference pixel row in the multiple reference pixel rows, determines at least one reference pixel row participating in the intra-frame angle prediction mode search from the multiple reference pixel rows. That is, based on the similarity, a decision is made on the reference pixel rows participating in the candidate prediction mode search, rather than directly allowing each reference pixel row in the multiple reference pixel rows to participate in the prediction mode search, and then, an intra-frame angle prediction mode search is performed according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded, and the unit to be encoded is encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain the encoding data corresponding to the unit to be encoded, which can effectively reduce the proportion of the computational complexity of multi-reference row encoding in the complexity of the entire encoding process, thereby reducing the encoding time and computing resource overhead of the encoder, and significantly improving the encoding efficiency.

[0162] Each module in the video encoding device 900 can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0163] In one embodiment, a computer device is provided, which may be Figure 1 The server shown in FIG. 1 may have an internal structure as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store video data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a video encoding method is implemented.

[0164] In one embodiment, a computer device is provided, which may be Figure 1 The terminal shown in FIG. 1 may have an internal structure as shown in FIG. Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a video encoding method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0165] Those skilled in the art will understand that Fig.10 , Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0166] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the video encoding method provided in the embodiment of the present application are implemented.

[0167] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the video encoding method provided in the embodiment of the present application are implemented.

[0168] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the video encoding method provided in the embodiment of the present application.

[0169] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0170] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0172] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A video encoding method, characterized in that: The method comprises: Determine a unit to be encoded and a plurality of reference pixel rows corresponding to the unit to be encoded; Determine, based on the similarities between any two of the reference pixel rows in the plurality of reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search from the plurality of reference pixel rows; Performing an intra-frame angle prediction mode search according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded; The unit to be encoded is encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain encoding data corresponding to the unit to be encoded.

2. The method according to claim 1, characterized in that: The multiple reference pixel rows include a basic reference pixel row that is closest to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search; the multiple reference pixel rows also include other reference pixel rows; The determining, based on the similarities between any two of the reference pixel rows in the multiple reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search from the multiple reference pixel rows comprises: Calculating the similarity between the basic reference pixel row and the other reference pixel rows; If it is determined according to the similarity that the basic reference pixel row and the other reference pixel rows are similar, it is determined that the other reference pixel rows do not participate in the intra-frame angle prediction mode search.

3. The method according to claim 2, characterized in that The method further comprises: If it is determined according to the similarity that the basic reference pixel row and the other reference pixel rows are not similar, then calculating the similarity between any two reference pixel rows in the other reference pixel rows; Based on the similarity between any two reference pixel rows in the other reference pixel rows, at least one reference pixel row participating in the intra-frame angular prediction mode search is determined from the other reference pixel rows.

4. The method according to claim 1, characterized in that: The multiple reference pixel rows include a basic reference pixel row that is closest to the unit to be encoded, and the basic reference pixel row participates in the intra-frame angle prediction mode search; the multiple reference pixel rows also include a first reference pixel row and a second reference pixel row whose distances to the unit to be encoded gradually increase; The determining, based on the similarities between any two of the reference pixel rows in the multiple reference pixel rows, at least one reference pixel row participating in the intra-frame angle prediction mode search from the multiple reference pixel rows comprises: If the basic reference pixel row is not similar to the first reference pixel row, determining that the first reference pixel row participates in the intra-frame angle prediction mode search; If the basic reference pixel row is similar to the first reference pixel row, determining that the first reference pixel row does not participate in the intra-frame angle prediction mode search; If the basic reference pixel row is similar to the second reference pixel row, it is determined that the second reference pixel row does not participate in the intra-frame angular prediction mode search.

5. The method according to claim 4, characterized in that The method further comprises: If the base reference pixel row is not similar to the first reference pixel row, and the base reference pixel row is not similar to the second reference pixel row, and the first reference pixel row is similar to the second reference pixel row, determining that the first reference pixel row participates in the intra-frame angular prediction mode search and the second reference pixel row does not participate in the intra-frame angular prediction mode search; If the basic reference pixel row is not similar to the first reference pixel row, and the basic reference pixel row is not similar to the second reference pixel row, and the first reference pixel row is not similar to the second reference pixel row, then it is determined that both the first reference pixel row and the second reference pixel row participate in the intra-frame angle prediction mode search.

6. The method according to claim 1, characterized in that The steps of calculating the similarity between two reference pixel rows include: Determining the target number of pixels according to the size of the unit to be encoded; For each reference pixel row, intercept pixel positions from the reference pixel row according to the target number of pixels, intercept pixel positions from a reference pixel column corresponding to the reference pixel row according to the target number of pixels, and determine a reference row vector corresponding to the reference pixel row according to reconstructed pixel values ​​of the intercepted pixel positions; The similarity between the two reference row vectors is used as the similarity between the two reference pixel rows.

7. The method according to claim 6, characterized in that The method of using the similarity between the two reference row vectors as the similarity between the two reference pixel rows includes: Calculate the Euclidean distance between the pairwise reference row vectors according to the vector elements of the pairwise reference row vectors; Taking the Euclidean distance as the similarity between two reference pixel rows; The method further comprises: Calculating the ratio of the Euclidean distance to the number of target pixels; The conditions for determining that the corresponding two reference pixel rows are similar include at least: A ratio of the Euclidean distance to the number of target pixels is less than a first preset threshold.

8. The method according to claim 7, characterized in that The method further comprises: Calculate the difference between two vector elements of the same vector dimension corresponding to the pairwise reference row vectors; The conditions for determining that the corresponding two reference pixel rows are similar also include: The difference between the two vector elements of each vector dimension is less than a second preset threshold.

9. The method according to any one of claims 1 to 8, characterized in that: The step of performing an intra-frame angle prediction mode search according to the at least one reference pixel row to obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded includes: traversing each reference pixel row in the at least one reference pixel row in sequence; Based on the prediction combinations formed by the traversed reference pixel rows and the angle prediction modes within each frame, the corresponding rate-distortion costs are calculated respectively; The corresponding prediction combination with the minimum rate-distortion cost is used as the target reference pixel row and the target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded.

10. The method according to any one of claims 1 to 8, characterized in that: The step of encoding the unit to be encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain encoded data corresponding to the unit to be encoded includes: Acquire a reconstructed pixel value of a pixel position adjacent to the unit to be encoded from the encoded unit of the target reference pixel row; According to the angle and prediction mode corresponding to the target intra-frame angle prediction mode, generating the predicted pixel value corresponding to the unit to be encoded according to the reconstructed pixel value; Calculating a prediction residual between an original pixel value corresponding to the unit to be encoded and the predicted pixel value; The prediction residual is transformed, quantized, and entropy encoded to obtain the encoded data corresponding to the unit to be encoded.

11. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The encoded data, the pixel row index corresponding to the target reference pixel row, and the prediction mode index corresponding to the target intra-frame angle prediction mode are sent to the decoding end, so that the decoding end determines the corresponding target reference pixel row according to the pixel row index and the target intra-frame angle prediction mode corresponding to the prediction mode index, performs intra-frame decoding on the encoded data, and obtains the decoded data corresponding to the unit to be encoded.

12. A video encoding device, characterized in that: The device comprises: A multiple reference row determination module, used to determine a unit to be encoded and multiple reference pixel rows corresponding to the unit to be encoded; A reference row decision module, configured to determine at least one reference pixel row participating in the intra-frame angle prediction mode search from the multiple reference pixel rows based on the similarity between any two reference pixel rows in the multiple reference pixel rows; A reference row and preset mode determination module, configured to search for an intra-frame angle prediction mode according to the at least one reference pixel row, and obtain a target reference pixel row and a target intra-frame angle prediction mode for intra-frame encoding of the unit to be encoded; The coding data acquisition module is used to encode the unit to be encoded according to the target reference pixel row and the target intra-frame angle prediction mode to obtain the coding data corresponding to the unit to be encoded.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.