Method and device for determining intra-frame prediction coding information
By segmenting the images to be encoded and analyzing texture features using the image block classification prediction model, the block division and angle prediction mode of intra prediction are determined, which solves the high encoding time-consuming problem caused by intra prediction complexity in the H.266 encoding standard, and improves the coding efficiency and accuracy.
Patent Information
- Application Number
- CN202411210037.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
AI Technical Summary
In the H.266 encoding standard, intra prediction is complex compared to the H.265 encoding standard, resulting in increased encoding computing power consumption and transcoding time consumption. How to reduce encoding time, quickly decide on the block division and angle prediction mode of intra prediction becomes Technical challenges.
By segmenting the images to be encoded, texture feature information is generated, texture features are analyzed using image block classification prediction model, division probability and angle prediction index information are determined, computing resources are saved, and efficiency and accuracy are improved.
A more reasonable and accurate intra prediction mode selection is achieved, reducing encoding time and improving encoding efficiency and accuracy.
Smart Images

Figure CN119110094A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for determining intra-frame prediction coding information. The present application also relates to an apparatus for determining intra-frame prediction coding information, a computing device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the development of Internet technology, online video technology has developed rapidly. H.266 encoding and H.265 encoding are online video encoding standards. In the online on-demand or live transcoding business, time consumption is a very important indicator, which determines the efficiency of video output speed, transcoding machine cost, etc. In the H.266 encoding standard, intra-frame prediction is much more complicated than the previous generation H.265 encoding standard. In order to capture the direction of any edge in natural video, the number of directional intra-frame modes has increased from 33 in HEVC to 65. These dense directional intra-frame prediction modes are applied to blocks of all sizes and are also used for all brightness and chrominance intra-frame predictions. That is, all angle prediction modes are tried in all possible block divisions, resulting in huge encoding computing power consumption and transcoding time consumption. Therefore, how to reduce encoding time, reduce the consumption of intra-frame prediction computing power during encoding, and quickly decide on the block division and angle prediction mode of intra-frame prediction has become an urgent problem for technicians to solve. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a method for determining intra-frame prediction coding information. The present application also relates to an apparatus for determining intra-frame prediction coding information, a computing device, a computer-readable storage medium and a computer program product to solve the above problems existing in the prior art.
[0004] According to a first aspect of an embodiment of the present application, a method for determining intra-frame prediction coding information is provided, including:
[0005] Segmenting the image to be encoded to obtain a plurality of image blocks to be encoded corresponding to at least one encoding block size information;
[0006] Determine a target image block to be encoded according to the target encoding block size information, and determine a reference image block to be encoded corresponding to the target image block to be encoded;
[0007] Generate texture feature information to be processed according to target texture feature information of the target image block to be encoded and reference texture feature information of the reference image block to be encoded;
[0008] The partition probability and angle prediction index information corresponding to the target image block to be encoded are determined according to the texture feature information to be processed.
[0009] According to a second aspect of an embodiment of the present application, a device for determining intra-frame prediction coding information is provided, including:
[0010] A segmentation module is configured to segment the image to be encoded to obtain a plurality of image blocks to be encoded corresponding to at least one encoding block size information;
[0011] A determination module is configured to determine a target image block to be encoded according to the target encoding block size information, and determine a reference image block to be encoded corresponding to the target image block to be encoded;
[0012] A generating module, configured to generate texture feature information to be processed according to target texture feature information of the target image block to be encoded and reference texture feature information of the reference image block to be encoded;
[0013] The prediction module is configured to determine the partition probability and angle prediction index information corresponding to the target image block to be encoded according to the texture feature information to be processed.
[0014] According to a third aspect of an embodiment of the present application, a method for training an image block classification prediction model is provided, comprising:
[0015] Obtaining a sample image and a sample encoding result corresponding to the sample image;
[0016] Segmenting the sample image to obtain a plurality of sample image blocks corresponding to at least one coding block size information; determining a target sample image block according to the target coding block size information, and determining a reference sample image block corresponding to the target sample image block; generating texture feature information to be processed according to target texture feature information of the target sample image block and reference texture feature information of the reference sample image block;
[0017] Inputting the texture feature information to be processed into the image block classification prediction model, obtaining the image block prediction result corresponding to the target sample image block, and continuing to perform the operation of determining the target sample image block according to the target coding block size information based on the image block prediction result, until each sample image block with a division probability less than a preset probability threshold and the angle prediction index information of each sample image block are obtained;
[0018] The model parameters of the image block classification prediction model are adjusted according to each sample image block, the angle prediction index information of each sample image block and the sample encoding result, and the image block classification prediction model is continuously trained until the model training stop condition is reached.
[0019] According to a fourth aspect of an embodiment of the present application, a computing device is provided, including:
[0020] Memory and processor;
[0021] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned method for determining intra-frame prediction coding information are implemented.
[0022] According to a fifth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the method for determining the intra-frame prediction coding information are implemented.
[0023] According to a sixth aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned method for determining intra-frame prediction coding information.
[0024] The present application provides a method for determining intra-frame prediction coding information, comprising segmenting an image to be encoded to obtain a plurality of image blocks to be encoded corresponding to at least one encoding block size information; determining a target image block to be encoded according to target encoding block size information, and determining a reference image block to be encoded corresponding to the target image block to be encoded; generating texture feature information to be processed according to target texture feature information of the target image block to be encoded and reference texture feature information of the reference image block to be encoded; and determining a partition probability and angle prediction index information corresponding to the target image block to be encoded according to the texture feature information to be processed.
[0025] An embodiment of the present application realizes the analysis and processing of the texture feature information corresponding to each image block to be encoded, and uses the texture information of each image block to be encoded as a reference for whether to divide the image block to be encoded and the angle prediction mode. This makes the division probability and the angle prediction mode more reasonable and accurate. At the same time, the image block classification prediction model is also used to process the texture feature information, and the idea of machine learning is used to save the computing resources for image block division and angle prediction mode selection, thereby improving the efficiency and accuracy of generating prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flowchart of a method for determining intra-frame prediction coding information provided by an embodiment of the present application;
[0027] Figure 2 is a schematic diagram of coding block size information provided by an embodiment of the present application;
[0028] Figure 3 is a schematic diagram of an image block to be encoded provided by an embodiment of the present application;
[0029] Figure 4 It is a processing flow chart of a method for determining intra-frame prediction coding information applied to an encoding scenario of online live video provided by an embodiment of the present application;
[0030] Figure 5 It is a structural diagram of a device for determining intra-frame prediction coding information provided by an embodiment of the present application;
[0031] Figure 6 It is a flowchart of an image block classification prediction model training method provided in an embodiment of the present application;
[0032] Figure 7 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0033] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0034] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0035] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0036] 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 in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0037] First, the terms involved in one or more embodiments of the present application are explained.
[0038] Intra-frame prediction: It is an image compression technology that uses the correlation between pixels within an image to reduce the amount of data. Intra-frame prediction is mainly used for I frames in video encoding, and I frames do not need to rely on other video frames for encoding.
[0039] All Intra Coding: is a video coding technology that encodes each video frame independently without referring to other video frames. This method does not need to consider the inter-frame dependencies between video frames, achieves higher coding efficiency, and is suitable for image coding scenarios with low real-time requirements.
[0040] With the development of computer technology, more and more video services have been developed rapidly. Video encoding and decoding has an important impact on video services. In video encoding and decoding services, time consumption is an important indicator that determines the efficiency of video output speed, transcoding machine cost, etc. Transcoding speed is an important optimization indicator in video encoding and decoding.
[0041] In the current video coding technology, the intra-frame prediction of the video encoder is time-consuming. In the H.266 coding standard, intra-frame prediction is much more complicated than the previous generation H.265 coding standard. Intra-frame prediction technology is a technology that uses the correlation of adjacent pixels in the same frame and the reconstructed pixels in the adjacent area of the current block to predict the pixels in the current block. The current CU (Coding Unit) can use the reconstructed pixels in its adjacent positions (lower left, left, upper left, above, upper right) to predict the pixels in the current CU. Specifically, the encoded pixel value is used to predict the value of the current pixel point, and the difference between the predicted value and the actual value (i.e., the residual) is encoded, which can greatly improve the coding efficiency. Since the residual is usually much smaller than the original pixel value itself, the amount of data that needs to be encoded is reduced by encoding the residual value.
[0042] In order to capture the direction of any edge in natural video, the number of directional intra-frame modes has increased from 36 in HEVC to 65, plus Planar mode and DC mode (Direct Current), a total of 67 prediction modes constitute the traditional intra-frame prediction mode. Planar mode is numbered 0 and is suitable for areas where pixel values change slowly. Its predicted pixels can be regarded as the average of the predicted values in the horizontal and vertical directions. DC mode is numbered 1 and is suitable for large flat areas. DC mode needs to calculate the average of the reference pixels on the left and above the current CU (Coding Unit). Numbers 2 to 66 represent 65 angle prediction modes within -135° to 45°, among which the horizontal class modes are numbered 2-33 and the vertical class modes are numbered 34-66. Each angle prediction mode is equivalent to an angle offset in the horizontal or processing direction. Each angle prediction mode corresponds to a texture direction. If the image texture is similar to the angle mode, a better prediction effect can be obtained, so that the obtained prediction residual value is smaller, which is more conducive to the subsequent encoding compression process. These dense directional intra prediction modes are applied to blocks of all sizes and also to all luminance and chrominance intra predictions, that is, all angular prediction modes are tried in all possible block divisions, which results in huge encoding computing power consumption and transcoding time consumption.
[0043] Based on this, in the present application, a method for determining intra-frame prediction coding information is provided. The present application also relates to an apparatus for determining intra-frame prediction coding information, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0044] Figure 1 A flowchart of a method for determining intra-frame prediction coding information provided according to an embodiment of the present application is shown, which specifically includes the following steps:
[0045] Step 102: Segment the image to be encoded to obtain a plurality of image blocks to be encoded corresponding to at least one encoding block size information.
[0046] Among them, the image to be encoded can be understood as an image that needs to be intra-frame predicted. In the subsequent processing steps provided in the embodiment of the present application, image encoding will be performed on the image to be encoded.
[0047] The coding block size information can be understood as the size of each coding block obtained by segmenting the image to be coded. For example, when the coding block size information is 128*128, the image to be coded is segmented based on the coding block size information to obtain multiple image blocks to be coded with a size of 128*128. It should be noted that the unit of 128 here is pixel. It should be noted that in the method provided in the present application, the segmentation of the image to be coded is performed according to at least one pre-set coding block size information to obtain multiple image blocks to be coded corresponding to at least one coding block size information.
[0048] In the method provided in the present application, multiple coding block size information will be pre-set, and the multiple coding block sizes are in a sequential structure of 2 to the power of n. For example, the first coding block size information is 128*128, the second coding block size information is 64*64, the third coding block size information is 32*32, the fourth coding block size information is 16*16, the fifth coding block size information is 8*8, and the sixth coding block size information is 4*4. It should be noted that the above is a schematic description of each coding block size information. In actual applications, the coding block size information can select part or all of them, or more sizes according to actual conditions. In the method provided in the present application, this is not limited.
[0049] By dividing the image to be encoded according to different encoding block size information, a plurality of image blocks to be encoded corresponding to each encoding block size information can be obtained.
[0050] For example, the size of the image to be encoded is 1280*1280, and the corresponding encoding block size information is 128*128, 64*64 and 32*32. The image to be encoded is divided by the encoding block size information 128*128 to obtain 100 128*128 image blocks to be encoded; the image to be encoded is divided by the encoding block size information 64*64 to obtain 400 64*64 image blocks to be encoded; the image to be encoded is divided by the encoding block size information 32*32 to obtain 800 32*32 image blocks to be encoded.
[0051] After the image to be encoded is divided by the encoding block size information, each image block with encoding can be numbered. For example, 100 image blocks to be encoded with a size of 128*128 can be numbered from 1 to 100 in the order from left to right and from top to bottom; or they can be numbered in the order from right to left and from top to bottom. In practical applications, the numbering method of each image block to be encoded can be based on the actual application and is not specifically limited here.
[0052] The above is a schematic illustration of segmenting the image to be encoded according to at least one encoding block size information. In practical applications, there is no limitation on the size of the image to be encoded, and there is no limitation on the number and size of the encoding block size information, which shall be subject to practical applications.
[0053] When the size of the image to be encoded cannot be completely divided by the encoding block size information, the image to be encoded can be first divided by the current encoding block size information, and the part that cannot be completely divided can be divided by using the encoding block size information of a smaller size. Alternatively, the image to be encoded can be divided by the current encoding block size information, and the part that cannot be completely divided can be filled by filling the pixels with 0, so as to facilitate subsequent calculations.
[0054] Step 104: Determine a target image block to be encoded according to the target encoding block size information, and determine a reference image block to be encoded corresponding to the target image block to be encoded.
[0055] After the image to be encoded is segmented according to the size information of each encoding block, a plurality of image blocks to be encoded are obtained. In the subsequent processing, each image block to be encoded needs to be predicted respectively to determine whether the current image block to be encoded needs to be further segmented.
[0056] Since the method provided by the present application needs to predict whether the current coded image block needs to be further segmented, in the method provided by the present application, the coding block size information is sorted in descending order, and the larger coding block size information is first determined as the target coding block size information, and then the smaller coding block size information is determined in turn for prediction.
[0057] For example, still taking the above coding block size information of 128*128, 64*64 and 32*32 as examples for explanation, first select the coding block size information of 128*128 as the target coding block size information, which corresponds to 100 image blocks to be encoded. After the above segmentation process, each image block to be encoded will be numbered respectively, and the target image block to be encoded can be further determined according to the numbering order of each image block to be encoded.
[0058] After determining the target image block to be encoded, in order to further determine whether it can be further segmented in the subsequent processing, it is also necessary to obtain the reference image block to be encoded corresponding to the target image block to be encoded. The reference image block to be encoded can be understood as an image block to be encoded that is used to assist in determining whether the target image block to be encoded can be further segmented. In a specific embodiment provided in the present application, the coding block size information of the reference image block to be encoded is different from the target coding block size information. For example, if the target coding block size information is 128*128, the coding block size information of the reference coding image block can be 64*64, 32*32; if the target coding block size information is 64*64, the coding block size information of the reference coding image block can be 128*128, 32*32, and so on.
[0059] In a specific implementation provided in the present application, determining a target image block to be encoded according to target encoding block size information includes:
[0060] Determine target coding block size information from each coding block size information in descending order;
[0061] At least one to-be-encoded image block corresponding to the target encoding block size information is determined, and a target to-be-encoded image block is determined among the to-be-encoded image blocks.
[0062] In an optional example, the coding block size information is sorted in descending order, the target coding block size information is selected according to the sorting result, and a target image block to be encoded is selected from multiple image blocks to be encoded corresponding to the target coding block size information. In a subsequent method, it is necessary to analyze the target image block to be encoded to predict whether it needs to be further divided.
[0063] For example, first select the coding block size information of 128*128 as the target coding block size information, and select the target image blocks to be encoded in sequence according to the numbers of 1-100 image blocks to be encoded corresponding to the coding block size information of 128*128.
[0064] For another example, after all the image blocks to be encoded corresponding to the 128*128 coding block size information have been processed, the 64*64 coding block size information can be further determined as the target coding block size information based on the sorting result, and the target image blocks to be encoded can be selected in sequence according to the numbers of 1-400 image blocks to be encoded corresponding to the 64*64 coding block size information.
[0065] It should be noted that if the prediction result of a target image block to be encoded is further segmentation, the next level encoding block size information corresponding to the target image block to be encoded can be used as the target encoding block size information, and a new target image block to be encoded can be determined from the multiple sub-image blocks corresponding to the target image block to be encoded.
[0066] For example, the size of a certain image block 1 to be encoded is 128*128. After prediction by the method provided in the present application, the prediction result is that it needs to be further divided. Then a smaller size (64*64) can be determined as the target coding block size information. The 128*128 image block 1 to be encoded can be divided into 4 64*64 image blocks to be encoded, and the target image block to be encoded corresponding to the target coding block size information 64*64 is further determined from the 4 64*64 image blocks to be encoded.
[0067] In a specific implementation provided by the present application, in the process of predicting the target image block to be encoded, if the prediction is performed only based on the information of the target image block to be encoded itself, the problem of incomplete information involved in the prediction will result. Therefore, some reference image blocks to be encoded associated with the target image block to be encoded are required to provide more reference information for the subsequent prediction of the target image block to be encoded. Based on this, determining the reference image block to be encoded corresponding to the target image block to be encoded includes S1042-S1044:
[0068] S1042: Determine reference coding block size information corresponding to the target coding block size information.
[0069] In order to better provide reference information for the target image block to be encoded, the reference encoding block size information may be the same as the target encoding block size information, or may be size information different from the target encoding block size information.
[0070] For example, when the target coding block size information is 32*32, the reference coding block size information may also be 32*32, that is, other to-be-encoded image blocks of the same size as the target to-be-encoded image block are selected as reference to-be-encoded image blocks.
[0071] For another example, when the target coding block size information is 32*32, the reference coding block size information can be 64*64 and 16*16; if the target coding block size information is 128*128, the reference coding block size information can be 64*64 and 32*32, and so on.
[0072] In practical applications, preferably, reference coding block size information different from the target coding block size information is selected as reference block size information to be coded. The purpose is to facilitate the acquisition of image blocks to be coded of different scales, and in the subsequent processing process, references can be provided for the target image blocks to be coded from different size dimensions. It helps determine whether the target image blocks to be coded need to be further segmented, or their corresponding angle prediction information, etc.
[0073] In a specific implementation provided in the present application, determining the reference coding block size information corresponding to the target coding block size information includes:
[0074] In a case where the target coding block size information includes parent coding block size information and child coding block size information, determining the parent coding block size information and the child coding block size information as reference coding block size information, wherein the parent coding block size information is larger than the target coding block size information, and the child coding block size information is smaller than the target coding block size information;
[0075] In a case where the target coding block size information does not include parent coding block size information, sub-coding block size information and grandchild coding block size information of the target coding block size information are determined as reference coding block size information, wherein the grandchild coding block size information is smaller than the sub-coding block size information.
[0076] In the specific implementation manner provided in the present application, the target coding block size information is selected in order from large to small. When different target coding block size information is selected, the corresponding reference coding block size information is also different.
[0077] For example, when the target coding block size information includes parent coding block size information and child coding block size information, the parent coding block size information and child coding block size information can be determined as reference coding block size information. The parent coding block size information refers to the coding block size information including the target coding block size information, and the parent coding block size information is larger than the target coding block size information; the child coding block size information refers to the coding block size information included in the target coding block size information, and the child coding block size information is smaller than the target coding block size information. Figure 2 , Figure 2 FIG. 2 is a schematic diagram showing the coding block size information provided by an embodiment of the present application. Figure 2 As shown, if the target coding block size information is 64*64, its parent coding block size information is 128*128, and its child coding block size information is 32*32.
[0078] For another example, when the target coding block size information does not have the parent coding block size information, it means that the target coding block size information is the largest coding block size information, and its child coding block size information and grandchild coding block size information can be used as reference coding block size information, where the grandchild coding block size information is the child coding block size information of the target coding block size information corresponding to the child coding block size information. Figure 2 For example, when the target coding block size information is 128*128, its sub-coding block size information is 64*64, and its grandchild coding block size information is 32*32.
[0079] In practical applications, the target coding block size information usually does not exist without sub-coding block size information. The reason is that if the target coding block size information has reached the minimum size, it cannot be further divided, and there is no need to determine whether it needs to be further divided.
[0080] Based on this, in this step, two situations of determining the reference coding block size information are provided, both of which are intended to find the reference coding block size information corresponding to the target coding block size information. In practical applications, there may be other determination methods, which are not limited in the method provided in this application, and it is only necessary to ensure that the reference coding block size information is size information that is closely related to the target coding block size information.
[0081] S1044: Determine an initial to-be-encoded image block corresponding to the reference encoding block size information.
[0082] After the reference coding block size information is determined, the image block to be encoded corresponding to the reference coding block size information can be determined as the initial image block to be encoded.
[0083] For example, still Figure 2 For example, taking the reference coding block size information as 64*64 as an example, a 128*128 image block to be encoded will include 4 64*64 image blocks to be encoded. Then, when the reference coding block size information is 64*64, there will be 4 initial image blocks to be encoded.
[0084] For another example, taking the reference coding block size information as 32*32, a 128*128 image block to be encoded will include 32 32*32 image blocks to be encoded. Then, when the reference coding block size information is 32*32, there will be 32 initial image blocks to be encoded.
[0085] S1046: Select an initial image block to be encoded that is associated with the target image block to be encoded as a reference image block to be encoded.
[0086] After the initial image block to be encoded is determined, in order to better provide information reference for the target image block to be encoded, it is necessary to select the initial image block to be encoded that has an association relationship with the target image block to be encoded as the reference image block to be encoded. In the method provided in the present application, the association relationship can be understood as a containment relationship and a contained relationship. That is, the initial image block to be encoded that contains the target image block to be encoded and the initial image block to be encoded contained by the target image block to be encoded are selected as the reference image block to be encoded.
[0087] In practical applications, it is necessary to further determine the reference image block to be encoded based on the relationship between the reference encoding block size information and the target encoding block size information. In a specific implementation provided by the present application, selecting an initial image block to be encoded that has an association relationship with the target image block to be encoded as the reference image block to be encoded includes:
[0088] In a case where the reference coding block size information is parent coding block size information and child coding block size information, determining a parent to-be-coded image block and a child to-be-coded image block corresponding to the target to-be-coded image block as a reference to-be-coded image block;
[0089] In a case where the reference coding block size information is sub-coding block size information and grand-child coding block size information, the sub-to-be-coded image block and the grand-child to-be-coded image block corresponding to the target to-be-coded image block are determined as reference to-be-coded image blocks.
[0090] In the above steps, if the reference coding block size information is determined to be the parent coding block size information and the child coding block size information, the parent image block to be coded and the child image block to be coded corresponding to the target image block to be coded can be determined as the reference image block to be coded. The parent image block to be coded can be understood as the initial image block to be coded including the target image block to be coded, and the child image block to be coded can be understood as the initial image block to be coded included in the target image block to be coded.
[0091] See also Figure 3 , Figure 3 A schematic diagram of an image block to be encoded provided by an embodiment of the present application is shown, and an image block 2 whose target image block to be encoded is 64*64 in size is taken as an example for explanation. Its parent image block to be encoded is an initial image block to be encoded with a size of 128*128, and its child image block to be encoded is an initial image block to be encoded 5-8 with a size of 32*32.
[0092] If the reference coding block size information is sub-coding block size information and grand-child coding block size information, it can be determined that the reference to-be-coded image block corresponding to the target to-be-coded image block is the sub-to-be-coded image block and the grand-child to-be-coded image block. Figure 3 , the target image block to be encoded is 128*128 in size, and its corresponding sub-image blocks to be encoded are image blocks 1-4. Each sub-image block to be encoded includes 4 sub-image blocks to be encoded, and sub-image block 2 includes sub-image blocks 5-8. For the target image block to be encoded of 128*128, there are 32 sub-image blocks to be encoded. That is, the reference image block to be encoded of the target image block to be encoded of 128*128 includes 4 sub-image blocks to be encoded and 32 sub-image blocks to be encoded.
[0093] Step 106: Generate texture feature information to be processed according to the target texture feature information of the target image block to be encoded and the reference texture feature information of the reference image block to be encoded.
[0094] After research, technicians have found that the angle prediction mode of intra-frame prediction is largely related to the texture direction of the image block to be encoded. The intra-frame prediction mode is basically consistent with the texture direction of the image block to be encoded, and the texture direction has a great influence on the division of the image block to be encoded. Therefore, in the method provided in the present application, it is necessary to predict whether the target image block to be encoded needs to be further divided, and its corresponding angle prediction mode, based on the texture characteristics of the image block to be encoded.
[0095] In a specific implementation provided by the present application, the texture feature information corresponding to the target image block to be encoded includes not only its own texture features, but also the texture feature information of the corresponding reference image block to be encoded. Specifically, the target texture feature information of the target image block to be encoded is obtained, the reference texture feature information corresponding to each reference image block to be encoded is obtained, and the texture feature information to be processed is generated according to the target texture feature information and the reference texture feature information.
[0096] The target texture feature information can be understood as the texture feature information corresponding to the target image block to be encoded, the reference texture feature information can be understood as the texture feature information corresponding to the reference image block to be encoded, and the processed texture feature information can be understood as the fusion of the texture feature information corresponding to the target image block to be encoded and the reference image block to be encoded respectively.
[0097] In practical applications, each texture feature information is generated by fusing the texture information of each pixel in the image block to be encoded. In a specific implementation provided by the present application, the texture feature information to be processed is generated according to the target texture feature information of the target image block to be encoded and the reference texture feature information of the reference image block to be encoded, including:
[0098] Acquire first texture information of each pixel in the target image block to be encoded, and determine target texture feature information of the target image block to be encoded according to each first texture information;
[0099] Acquire second texture information of each pixel in the reference image block to be encoded, and determine reference texture feature information of the reference image block to be encoded according to each second texture information;
[0100] The target texture feature information and the reference texture feature information are concatenated to generate texture feature information to be processed.
[0101] The image block to be encoded includes multiple pixels, each of which corresponds to a YUV value. YUF is a color encoding method, where Y represents the grayscale value information of the pixel, which is used to indicate the brightness of the pixel; U and V represent the chromaticity value of the pixel, which is used to indicate the image color and saturation of the pixel. The Y value of the pixel can be used to reflect the texture value of the pixel.
[0102] The first texture information can be understood as the grayscale value corresponding to each pixel in the target image block to be encoded. In practical applications, the first texture information can be the Y value information corresponding to each pixel, or it can be the grayscale value calculated by the Sobel operator. In the method provided in the present application, it is preferred to obtain the first texture information of each pixel in the target encoded image block by using the Sobel operator.
[0103] After obtaining the first texture information of each pixel, target texture feature information of the target image block to be encoded can be generated according to the first texture information corresponding to each pixel. The target texture feature information can be understood as feature information representing the target image block to be encoded.
[0104] The same operation as the target image block to be encoded can be used to calculate the reference texture feature information of the reference image block to be encoded based on the second texture information of each pixel in the reference image block to be encoded. It should be noted that each reference image block to be encoded will correspond to a reference texture feature information. For example, if the target image block to be encoded corresponds to 5 reference image blocks to be encoded, there will be 5 reference texture feature information.
[0105] In another specific implementation provided by the present application, the first texture information is a first grayscale value, and the second texture information is a second grayscale value;
[0106] Determining target texture feature information of the target image block to be encoded according to each first texture information includes:
[0107] Counting first grayscale means and first grayscale variances corresponding to each first grayscale value, and using the first grayscale means and the first grayscale variances as target texture feature information of the target image block to be encoded;
[0108] Correspondingly, determining the reference texture feature information of the reference image block to be encoded according to each second texture information includes:
[0109] The second grayscale mean and the second grayscale variance corresponding to each second grayscale value are counted, and the second grayscale mean and the second grayscale variance are used as reference texture feature information of the reference image block to be encoded.
[0110] In practical applications, as described in the above steps, texture information can be understood as the grayscale value of each pixel. The first texture information is the first grayscale value corresponding to each pixel in the target image block to be encoded, and the second texture information is the second grayscale value corresponding to each pixel in the reference image block to be encoded.
[0111] According to the first grayscale value of each pixel in the target image block to be encoded, the first grayscale mean and the first grayscale variance corresponding to each first grayscale value can be calculated, and the first grayscale mean and the first grayscale variance are used as target texture feature information.
[0112] Based on the same processing method, the corresponding second grayscale mean and second grayscale variance can be calculated according to the second grayscale value corresponding to each reference image block to be encoded, and the second grayscale mean and second grayscale variance corresponding to each reference image block to be encoded are used as the reference texture feature information corresponding to each reference image block to be encoded.
[0113] After obtaining the target texture feature information and each reference texture feature information, they are concatenated to generate the texture feature information to be processed.
[0114] Step 108: Determine the partition probability and angle prediction index information corresponding to the target image block to be encoded according to the texture feature information to be processed.
[0115] After the above processing, the texture feature information to be processed corresponding to the target image block to be encoded can be obtained. By identifying and analyzing the texture feature information to be processed, an image block prediction result corresponding to the target image block to be encoded can be generated.
[0116] In this embodiment, the image block prediction result specifically includes the segmentation probability and angle prediction index information corresponding to the target image block to be encoded, wherein the segmentation probability represents the probability that the target image block to be encoded needs to be further segmented, and the angle prediction index information represents the information of the prediction angle for the target image block to be encoded.
[0117] Furthermore, the angle prediction index information refers to the number of the angle mode for encoding the target image block to be encoded. If the target image block to be encoded needs to be further divided and cannot be directly encoded, the angle prediction index information at this time has no guiding significance for the angle mode for encoding the target image block to be encoded, and it can be ignored or not output. When it is determined based on the division probability that the target image block to be encoded does not need to be further divided, its corresponding angle prediction index information will be recorded for encoding the target image block to be encoded.
[0118] After determining the image block prediction result for the target image block to be encoded, the subsequent processing will be further determined according to the image block prediction result. In a specific implementation provided by the present application, the method further includes:
[0119] In the case where the division probability is greater than or equal to a preset probability threshold, determining target sub-coding block size information corresponding to the target image block to be encoded, determining the target sub-coding block size information as the target coding block size information, and continuing to perform an operation of determining the target image block to be encoded according to the target coding block size information;
[0120] When the division probability is less than a preset probability threshold, it is determined that the angle prediction index information is the target angle prediction index information corresponding to the target image block to be encoded.
[0121] In an optional example provided in the present application, the preset probability threshold can be understood as a preset probability threshold for determining whether the target image block to be encoded needs to be further segmented. When the segmentation probability is greater than or equal to the preset probability threshold, it indicates that the result predicted by the image block classification prediction model is that the target image block to be encoded needs to be further segmented. In this case, if it is further segmented, the corresponding coding block size information will become smaller, that is, the sub-coding block size information of the target coding block size information is selected as the new target coding block size information, and the above-mentioned operations of steps 104 to 108 are continued.
[0122] For example, the target coding block size information is 128*128 as an example for explanation. After the corresponding target image block to be encoded is predicted by the image block classification prediction model, the output division probability threshold is greater than the preset probability threshold, then the sub-coding block size information 64*64 corresponding to 128*128 is determined as the new target coding block size information. Under the new target coding block size information, there are 4 new image blocks to be encoded. These 4 image blocks to be encoded are selected in turn as the new target image blocks to be encoded, and the operations of the above steps 104 to 108 are performed.
[0123] In an optional example provided in the present application, the partition probability may be less than a preset probability threshold. In this case, it means that the image block classification prediction model predicts that the target image block to be encoded is no longer suitable for further segmentation, and the target angle prediction index information of the target image block to be encoded can be further determined based on the angle prediction index information in the prediction result.
[0124] In a specific embodiment provided in the present application, the method further comprises:
[0125] When the division probability of each to-be-encoded image block is less than a preset probability threshold, obtaining angle prediction index information corresponding to each to-be-encoded image block;
[0126] The image to be encoded is encoded according to the angle prediction index information corresponding to each image block to be encoded.
[0127] In this embodiment, after looping through the operations of steps 104 to 108, the image to be encoded is divided into a plurality of image blocks to be encoded according to the texture information of the image blocks. The division probabilities corresponding to each image block to be encoded are all less than the preset probability threshold, which means that each image block to be encoded does not need to be further segmented. At this point, there will also be angle prediction index information corresponding to each image block to be encoded. Each angle prediction index information represents the angle index information of the intra-frame encoding of each image block to be encoded.
[0128] According to the angle prediction index information corresponding to each to-be-encoded image block, intra-frame encoding may be performed on the to-be-encoded image, thereby generating a corresponding image encoding result.
[0129] Through the method provided by the present application, the texture feature information corresponding to each image block to be encoded is analyzed and processed, and the texture information of each image block to be encoded is used as a reference for whether to divide the image block to be encoded and the angle prediction mode. The division probability and the angle prediction mode are made more reasonable and accurate. At the same time, the image block classification prediction model is also used to process the texture feature information, and the idea of machine learning is used to save the computing resources for image block division and angle prediction mode selection, thereby improving the efficiency and accuracy of generating prediction results.
[0130] In practical applications, the division probability and angle prediction index information corresponding to the target image block to be encoded are determined according to the texture feature information to be processed, and the calculation can be performed according to a preset calculation formula, or the prediction can be performed according to the relationship between the feature information between the texture feature information to be processed. In order to further improve the calculation efficiency, in a specific embodiment provided in the present application, the division probability and angle prediction index information corresponding to the target image block to be encoded are determined according to the texture feature information to be processed, including:
[0131] The texture feature information to be processed is input into an image block classification prediction model to obtain the partition probability and angle prediction index information for the target image block to be encoded output by the image block classification prediction model.
[0132] In the method provided in the embodiment of the present application, the image block classification prediction model is a pre-trained machine learning model, which has the ability to analyze the texture feature information to be processed, and can predict the image block prediction result of the target image block to be encoded corresponding to the texture feature information to be processed based on the analysis result.
[0133] In a specific implementation provided in the present application, the image block classification prediction model is obtained by training through the following steps:
[0134] Obtaining a sample image and a sample encoding result corresponding to the sample image;
[0135] Segmenting the sample image to obtain a plurality of sample image blocks corresponding to at least one coding block size information; determining a target sample image block according to the target coding block size information, and determining a reference sample image block corresponding to the target sample image block; generating texture feature information to be processed according to target texture feature information of the target sample image block and reference texture feature information of the reference sample image block;
[0136] Inputting the texture feature information to be processed into the image block classification prediction model, obtaining the image block prediction result corresponding to the target sample image block, and continuing to perform the operation of determining the target sample image block according to the target coding block size information based on the image block prediction result, until each sample image block with a division probability less than a preset probability threshold and the angle prediction index information of each sample image block are obtained;
[0137] The model parameters of the image block classification prediction model are adjusted according to each sample image block, the angle prediction index information of each sample image block and the sample encoding result, and the image block classification prediction model is continuously trained until the model training stop condition is reached.
[0138] In the method provided in the present application, a model training method for an image block classification prediction model is also provided. In an optional implementation, an XGBOOST machine learning training method is adopted, and the image block classification prediction model is a classification model.
[0139] In this embodiment, the model training method adopts supervised model training to obtain sample images and sample encoding results corresponding to sample objects. Specifically, obtaining the sample encoding results corresponding to the sample images includes:
[0140] Perform full-frame intra-coding on the sample image to generate a sample encoding result corresponding to the sample image.
[0141] In an optional embodiment, the sample image may be a video frame selected from a video segment. In order to obtain the final encoding effect, the sample image needs to be encoded using the All Intra encoding method to generate a sample encoding result corresponding to the sample image. The sample encoding result includes a sample image block division result and a sample angle prediction mode corresponding to the sample image.
[0142] After obtaining the sample image, the sample image can be segmented based on at least one coding block size information to obtain sample image blocks corresponding to each coding block size information; the target sample image block is determined according to the target coding block size information, and the reference sample image block corresponding to the target sample image block is determined; the texture feature information to be processed is generated according to the target texture feature information of the target sample image block and the reference texture feature information of the reference sample image block. The step of obtaining the texture feature information to be processed corresponding to the target sample image block according to the sample image is the same as the operation of the above steps 102 to 106. The specific operation content is detailed in the description of the above steps and will not be repeated here.
[0143] After obtaining the texture feature information to be processed, it is input into the image block classification prediction model for prediction, and the output result of the image block classification prediction model is used to further determine whether the image block needs to be divided. This is done until the division probability corresponding to each image block is less than the preset probability threshold. At this point, the angle prediction index information corresponding to each image block is obtained.
[0144] At this time, according to the processing of the image block classification prediction model, the predicted image block division result and the predicted angle prediction mode (angle prediction index information) of the sample image block corresponding to the sample image can be obtained. At this time, the image block classification prediction model is an untrained model, and its prediction result has some differences with the sample label. Therefore, the model parameters of the image block classification prediction model can be adjusted according to each sample image block and the angle prediction index information of each sample image block and the sample encoding result.
[0145] Specifically, the model loss value of the image block classification prediction model is calculated according to each sample image block and the angle prediction index information of each sample image block and the sample encoding result. In the method provided in the present application, there are many methods for calculating the model loss value, such as the cross entropy loss function, the maximum loss function, the average loss function, etc. In the method provided in the present application, the specific method of the loss function is not limited, and the actual application shall prevail.
[0146] After obtaining the model loss value, the model parameters of the image block classification prediction model can be adjusted based on the model loss value. The above model training operation steps are continued until the model training stop condition is reached. At this time, a pre-trained image block classification prediction model is obtained.
[0147] The following combination Figure 4 Taking the application of the method for determining intra-frame prediction coding information provided by the present application in the coding of online live video as an example, the method for determining intra-frame prediction coding information is further described. Figure 4A processing flow chart of a method for determining intra-frame prediction coding information applied to an encoding scenario of an online live video provided by an embodiment of the present application is shown, which specifically includes the following steps:
[0148] Step 402: determine a live video to be encoded, and determine an image to be encoded from the live video to be encoded.
[0149] Step 404: Determine the coding block size information of 6 sizes, namely, 128*128, 64*64, 32*32, 16*16, 8*8, and 4*4. Segment the image to be coded according to each coding block size information to obtain the image blocks to be coded corresponding to each coding block size information.
[0150] Step 406: Count the texture features of each image block to be encoded, calculate the mean and variance of the grayscale value of each pixel in each image block to be encoded, and use the mean and variance of the pixel grayscale value of each image block to be encoded as texture feature information.
[0151] Step 408: Determine the target coding block size information and the reference coding block size information in order from large to small.
[0152] Step 410: Determine a target image block to be encoded according to the target encoding block size information. Determine a reference image block to be encoded according to the reference encoding block size information and the target image block to be encoded.
[0153] Step 412: Generate texture feature information to be processed according to the target texture feature information corresponding to the target image block to be encoded and the reference texture feature information corresponding to the reference image block to be encoded.
[0154] Step 414: input the texture feature information to be processed into the image block classification prediction model to obtain the partition probability and angle prediction index information corresponding to the target image block to be encoded output by the image block classification prediction model.
[0155] Step 416: Continue to divide the target image blocks to be encoded whose division probability is greater than the preset probability threshold, and generate corresponding texture feature information to be processed, and input the texture feature information to be processed into the image block classification prediction model until the division probability of each image block to be encoded is less than the preset probability threshold.
[0156] Step 418: Encode the image to be encoded according to the angle prediction index information corresponding to each image block to be encoded to obtain an image encoding result.
[0157] Corresponding to the above method embodiment, the present application also provides an embodiment of a device for determining intra-frame prediction coding information. Figure 5 FIG. 2 is a schematic diagram showing a structure of a device for determining intra-frame prediction coding information provided by an embodiment of the present application. Figure 5As shown, the device comprises:
[0158] The segmentation module 502 is configured to segment the image to be encoded to obtain a plurality of image blocks to be encoded corresponding to at least one encoding block size information;
[0159] The determination module 504 is configured to determine a target image block to be encoded according to the target encoding block size information, and determine a reference image block to be encoded corresponding to the target image block to be encoded;
[0160] A generating module 506 is configured to generate texture feature information to be processed according to the target texture feature information of the target image block to be encoded and the reference texture feature information of the reference image block to be encoded;
[0161] The prediction module 508 is configured to determine the partition probability and angle prediction index information corresponding to the target image block to be encoded according to the texture feature information to be processed.
[0162] Optionally, the determining module 504 is further configured to:
[0163] Determine target coding block size information from each coding block size information in descending order;
[0164] At least one to-be-encoded image block corresponding to the target encoding block size information is determined, and a target to-be-encoded image block is determined among the to-be-encoded image blocks.
[0165] Optionally, the determining module 504 is further configured to:
[0166] Determine reference coding block size information corresponding to the target coding block size information;
[0167] Determine an initial to-be-encoded image block corresponding to the reference encoding block size information;
[0168] An initial image block to be encoded that is associated with the target image block to be encoded is selected as a reference image block to be encoded.
[0169] Optionally, the determining module 504 is further configured to:
[0170] In a case where the target coding block size information includes parent coding block size information and child coding block size information, determining the parent coding block size information and the child coding block size information as reference coding block size information, wherein the parent coding block size information is larger than the target coding block size information, and the child coding block size information is smaller than the target coding block size information;
[0171] In a case where the target coding block size information does not include parent coding block size information, sub-coding block size information and grandchild coding block size information of the target coding block size information are determined as reference coding block size information, wherein the grandchild coding block size information is smaller than the sub-coding block size information.
[0172] Optionally, the determining module 504 is further configured to:
[0173] In a case where the reference coding block size information is parent coding block size information and child coding block size information, determining a parent to-be-coded image block and a child to-be-coded image block corresponding to the target to-be-coded image block as a reference to-be-coded image block;
[0174] In a case where the reference coding block size information is sub-coding block size information and grand-child coding block size information, the sub-to-be-coded image block and the grand-child to-be-coded image block corresponding to the target to-be-coded image block are determined as reference to-be-coded image blocks.
[0175] Optionally, the generating module 506 is further configured to:
[0176] Acquire first texture information of each pixel in the target image block to be encoded, and determine target texture feature information of the target image block to be encoded according to each first texture information;
[0177] Acquire second texture information of each pixel in the reference image block to be encoded, and determine reference texture feature information of the reference image block to be encoded according to each second texture information;
[0178] The target texture feature information and the reference texture feature information are concatenated to generate texture feature information to be processed.
[0179] Optionally, the first texture information is a first grayscale value, and the second texture information is a second grayscale value;
[0180] The generating module 506 is further configured to:
[0181] Counting first grayscale means and first grayscale variances corresponding to each first grayscale value, and using the first grayscale means and the first grayscale variances as target texture feature information of the target image block to be encoded;
[0182] The second grayscale mean and the second grayscale variance corresponding to each second grayscale value are counted, and the second grayscale mean and the second grayscale variance are used as reference texture feature information of the reference image block to be encoded.
[0183] Optionally, the prediction module 508 is further configured to:
[0184] The texture feature information to be processed is input into an image block classification prediction model to obtain the partition probability and angle prediction index information for the target image block to be encoded output by the image block classification prediction model.
[0185] Optionally, the device further includes a further processing module configured to:
[0186] In the case where the division probability is greater than or equal to a preset probability threshold, determining target sub-coding block size information corresponding to the target image block to be encoded, determining the target sub-coding block size information as the target coding block size information, and continuing to perform an operation of determining the target image block to be encoded according to the target coding block size information;
[0187] When the division probability is less than a preset probability threshold, it is determined that the angle prediction index information is the target angle prediction index information corresponding to the target image block to be encoded.
[0188] Optionally, the device further includes an encoding module configured to:
[0189] When the division probability of each to-be-encoded image block is less than a preset probability threshold, obtaining angle prediction index information corresponding to each to-be-encoded image block;
[0190] The image to be encoded is encoded according to the angle prediction index information corresponding to each image block to be encoded.
[0191] Optionally, the device further comprises a training module configured to:
[0192] Obtaining a sample image and a sample encoding result corresponding to the sample image;
[0193] Segmenting the sample image to obtain a plurality of sample image blocks corresponding to at least one coding block size information; determining a target sample image block according to the target coding block size information, and determining a reference sample image block corresponding to the target sample image block; generating texture feature information to be processed according to target texture feature information of the target sample image block and reference texture feature information of the reference sample image block;
[0194] Inputting the texture feature information to be processed into the image block classification prediction model, obtaining the image block prediction result corresponding to the target sample image block, and continuing to perform the operation of determining the target sample image block according to the target coding block size information based on the image block prediction result, until each sample image block with a division probability less than a preset probability threshold and the angle prediction index information of each sample image block are obtained;
[0195] The model parameters of the image block classification prediction model are adjusted according to each sample image block, the angle prediction index information of each sample image block and the sample encoding result, and the image block classification prediction model is continuously trained until the model training stop condition is reached.
[0196] Optionally, the training module is further configured to:
[0197] Perform full-frame intra-coding on the sample image to generate a sample encoding result corresponding to the sample image.
[0198] Through the device provided by the present application, the texture feature information corresponding to each image block to be encoded is analyzed and processed, and the texture information of each image block to be encoded is used as a reference for whether to divide the image block to be encoded and the angle prediction mode. The division probability and the angle prediction mode are made more reasonable and accurate. At the same time, the image block classification prediction model is also used to process the texture feature information, and the idea of machine learning is used to save the computing resources for image block division and angle prediction mode selection, and improve the efficiency and accuracy of generating prediction results.
[0199] The above is a schematic scheme of a device for determining intra-frame prediction coding information of this embodiment. It should be noted that the technical scheme of the device for determining intra-frame prediction coding information and the technical scheme of the method for determining intra-frame prediction coding information belong to the same concept, and the details not described in detail in the technical scheme of the device for determining intra-frame prediction coding information can be referred to the description of the technical scheme of the method for determining intra-frame prediction coding information.
[0200] Figure 6 : is a flowchart of an image block classification prediction model training method provided in an embodiment of the present application, which specifically includes the following steps:
[0201] Step 602: Obtain a sample image and a sample encoding result corresponding to the sample image.
[0202] Step 604: Segment the sample image to obtain a plurality of sample image blocks corresponding to at least one coding block size information; determine a target sample image block according to the target coding block size information, and determine a reference sample image block corresponding to the target sample image block; generate texture feature information to be processed according to target texture feature information of the target sample image block and reference texture feature information of the reference sample image block.
[0203] Step 606: Input the texture feature information to be processed into the image block classification prediction model to obtain the image block prediction result corresponding to the target sample image block, and continue to perform the operation of determining the target sample image block according to the target coding block size information based on the image block prediction result, until each sample image block whose division probability is less than a preset probability threshold and the angle prediction index information of each sample image block are obtained.
[0204] Step 608: adjusting the model parameters of the image block classification prediction model according to each sample image block and the angle prediction index information of each sample image block and the sample encoding result, and continuing to train the image block classification prediction model until the model training stop condition is reached.
[0205] In a specific implementation provided by the present application, obtaining a sample encoding result corresponding to a sample image includes:
[0206] Perform full-frame intra-coding on the sample image to generate a sample encoding result corresponding to the sample image.
[0207] Figure 7 The structure block diagram of a computing device 700 provided according to an embodiment of the present application is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.
[0208] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0209] In one embodiment of the present application, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0210] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 700 may also be a mobile or stationary server.
[0211] The processor 720 is used to execute the following computer program / instruction, which, when executed by the processor, implements the steps of the above-mentioned method for determining intra-frame prediction coding information.
[0212] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the method for determining the intra-frame prediction coding information are of the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the method for determining the intra-frame prediction coding information.
[0213] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned method for determining intra-frame prediction coding information when the computer program / instruction is executed by a processor.
[0214] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the method for determining the intra-frame prediction coding information belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the method for determining the intra-frame prediction coding information.
[0215] An embodiment of the present specification further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned method for determining intra-frame prediction coding information when executed by a processor.
[0216] The above is a schematic solution of a computer program product of this embodiment. It should be noted that the technical solution of the computer program product and the technical solution of the method for determining intra-frame prediction coding information described above belong to the same concept, and the details not described in detail in the technical solution of the computer program product can be found in the description of the technical solution of the method for determining intra-frame prediction coding information described above.
[0217] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0218] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0219] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0220] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0221] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A method for determining intra-frame prediction coding information, characterized in that: include: Segmenting the image to be encoded to obtain a plurality of image blocks to be encoded corresponding to at least one encoding block size information; Determine a target image block to be encoded according to the target encoding block size information, and determine a reference image block to be encoded corresponding to the target image block to be encoded; Generate texture feature information to be processed according to target texture feature information of the target image block to be encoded and reference texture feature information of the reference image block to be encoded; The partition probability and angle prediction index information corresponding to the target image block to be encoded are determined according to the texture feature information to be processed.
2. The method according to claim 1, characterized in that Determining a target image block to be encoded according to target encoding block size information includes: Determine target coding block size information from each coding block size information in descending order; At least one to-be-encoded image block corresponding to the target encoding block size information is determined, and a target to-be-encoded image block is determined among the to-be-encoded image blocks.
3. The method according to claim 1, characterized in that Determining a reference image block to be encoded corresponding to the target image block to be encoded includes: Determine reference coding block size information corresponding to the target coding block size information; Determine an initial to-be-encoded image block corresponding to the reference encoding block size information; An initial image block to be encoded that is associated with the target image block to be encoded is selected as a reference image block to be encoded.
4. The method according to claim 3, characterized in that Determining reference coding block size information corresponding to the target coding block size information includes: In a case where the target coding block size information includes parent coding block size information and child coding block size information, determining the parent coding block size information and the child coding block size information as reference coding block size information, wherein the parent coding block size information is larger than the target coding block size information, and the child coding block size information is smaller than the target coding block size information; In a case where the target coding block size information does not include parent coding block size information, sub-coding block size information and grandchild coding block size information of the target coding block size information are determined as reference coding block size information, wherein the grandchild coding block size information is smaller than the sub-coding block size information.
5. The method according to claim 4, characterized in that Selecting an initial image block to be encoded that is associated with the target image block to be encoded as a reference image block to be encoded, comprising: In a case where the reference coding block size information is parent coding block size information and child coding block size information, determining a parent to-be-coded image block and a child to-be-coded image block corresponding to the target to-be-coded image block as a reference to-be-coded image block; In a case where the reference coding block size information is sub-coding block size information and grand-child coding block size information, the sub-to-be-coded image block and the grand-child to-be-coded image block corresponding to the target to-be-coded image block are determined as reference to-be-coded image blocks.
6. The method according to claim 1, characterized in that Generating the texture feature information to be processed according to the target texture feature information of the target image block to be encoded and the reference texture feature information of the reference image block to be encoded, comprising: Acquire first texture information of each pixel in the target image block to be encoded, and determine target texture feature information of the target image block to be encoded according to each first texture information; Acquire second texture information of each pixel in the reference image block to be encoded, and determine reference texture feature information of the reference image block to be encoded according to each second texture information; The target texture feature information and the reference texture feature information are concatenated to generate texture feature information to be processed.
7. The method according to claim 6, characterized in that The first texture information is a first grayscale value, and the second texture information is a second grayscale value; Determining target texture feature information of the target image block to be encoded according to each first texture information includes: Counting first grayscale means and first grayscale variances corresponding to each first grayscale value, and using the first grayscale means and the first grayscale variances as target texture feature information of the target image block to be encoded; Correspondingly, determining the reference texture feature information of the reference image block to be encoded according to each second texture information includes: The second grayscale mean and the second grayscale variance corresponding to each second grayscale value are counted, and the second grayscale mean and the second grayscale variance are used as reference texture feature information of the reference image block to be encoded.
8. The method according to claim 1, characterized in that Determining the partition probability and angle prediction index information corresponding to the target image block to be encoded according to the texture feature information to be processed, including: The texture feature information to be processed is input into an image block classification prediction model to obtain the partition probability and angle prediction index information for the target image block to be encoded output by the image block classification prediction model.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: In the case where the division probability is greater than or equal to a preset probability threshold, determining target sub-coding block size information corresponding to the target image block to be encoded, determining the target sub-coding block size information as the target coding block size information, and continuing to perform an operation of determining the target image block to be encoded according to the target coding block size information; When the division probability is less than a preset probability threshold, it is determined that the angle prediction index information is the target angle prediction index information corresponding to the target image block to be encoded.
10. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: When the division probability of each to-be-encoded image block is less than a preset probability threshold, obtaining angle prediction index information corresponding to each to-be-encoded image block; The image to be encoded is encoded according to the angle prediction index information corresponding to each image block to be encoded.
11. The method according to claim 8, characterized in that The image block classification prediction model is trained by the following steps: Obtaining a sample image and a sample encoding result corresponding to the sample image; Segmenting the sample image to obtain a plurality of sample image blocks corresponding to at least one coding block size information; determining a target sample image block according to the target coding block size information, and determining a reference sample image block corresponding to the target sample image block; generating texture feature information to be processed according to target texture feature information of the target sample image block and reference texture feature information of the reference sample image block; Inputting the texture feature information to be processed into an image block classification prediction model to obtain an image block prediction result corresponding to the target sample image block, and continuing to perform an operation of determining the target sample image block according to the target coding block size information based on the image block prediction result until each sample image block having a division probability less than a preset probability threshold and angle prediction index information of each sample image block are obtained; The model parameters of the image block classification prediction model are adjusted according to each sample image block and the angle prediction index information of each sample image block and the sample encoding result, and the image block classification prediction model is continuously trained until the model training stop condition is reached.
12. The method according to claim 11, characterized in that Get the sample encoding result corresponding to the sample image, including: Perform full-frame intra-coding on the sample image to generate a sample encoding result corresponding to the sample image.
13. A training method for an image block classification prediction model, characterized in that: include: Obtaining a sample image and a sample encoding result corresponding to the sample image; Segmenting the sample image to obtain a plurality of sample image blocks corresponding to at least one coding block size information; Determine a target sample image block according to target coding block size information, and determine a reference sample image block corresponding to the target sample image block; generate texture feature information to be processed according to target texture feature information of the target sample image block and reference texture feature information of the reference sample image block; Inputting the texture feature information to be processed into an image block classification prediction model to obtain an image block prediction result corresponding to the target sample image block, and continuing to perform an operation of determining the target sample image block according to the target coding block size information based on the image block prediction result until each sample image block having a division probability less than a preset probability threshold and angle prediction index information of each sample image block are obtained; The model parameters of the image block classification prediction model are adjusted according to each sample image block and the angle prediction index information of each sample image block and the sample encoding result, and the image block classification prediction model is continuously trained until the model training stop condition is reached.
14. A device for determining intra-frame prediction coding information, characterized in that: include: A segmentation module is configured to segment the image to be encoded to obtain a plurality of image blocks to be encoded corresponding to at least one encoding block size information; A determination module is configured to determine a target image block to be encoded according to the target encoding block size information, and determine a reference image block to be encoded corresponding to the target image block to be encoded; A generating module, configured to generate texture feature information to be processed according to target texture feature information of the target image block to be encoded and reference texture feature information of the reference image block to be encoded; The prediction module is configured to determine the partition probability and angle prediction index information corresponding to the target image block to be encoded according to the texture feature information to be processed.
15. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 13 are implemented.
16. A computer-readable storage medium storing a computer program / instruction, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.
