CN113612992B - Encoding method of fast intra-frame encoding unit for AVS3 hardware encoder - Google Patents

Encoding method of fast intra-frame encoding unit for AVS3 hardware encoder Download PDF

Info

Publication number
CN113612992B
CN113612992B CN202110749305.2A CN202110749305A CN113612992B CN 113612992 B CN113612992 B CN 113612992B CN 202110749305 A CN202110749305 A CN 202110749305A CN 113612992 B CN113612992 B CN 113612992B
Authority
CN
China
Prior art keywords
variance
deleting
mode
modes
dividing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110749305.2A
Other languages
Chinese (zh)
Other versions
CN113612992A (en
Inventor
张鹏
卢东东
向国庆
严伟
贾惠柱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology Co Ltd
Original Assignee
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Advanced Institute of Information Technology AIIT of Peking University, Hangzhou Weiming Information Technology Co Ltd filed Critical Advanced Institute of Information Technology AIIT of Peking University
Priority to CN202110749305.2A priority Critical patent/CN113612992B/en
Publication of CN113612992A publication Critical patent/CN113612992A/en
Application granted granted Critical
Publication of CN113612992B publication Critical patent/CN113612992B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction

Landscapes

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

Abstract

The application discloses a coding method of a fast intra-frame coding unit aiming at an AVS3 hardware coder. The encoding method comprises the following steps: according to the second deleting model for deleting the dividing modes again and the variance of the current block sub-block variance, deleting the plurality of initial dividing modes again to obtain n dividing modes after deleting; and video coding is carried out based on the n selected division modes, so that coded video is obtained and output. Therefore, when the embodiment of the application is adopted for intra-frame coding, the optimal n kinds of the 6 kinds of division modes can be selected, wherein n is a positive integer which is more than 1 and less than 6; thus, flexible configuration can be performed according to performance requirements; in addition, the coding mode has simple algorithm, obvious improvement of coding efficiency and smaller performance loss.

Description

Encoding method of fast intra-frame encoding unit for AVS3 hardware encoder
Technical Field
The application relates to the technical field of video coding, in particular to a coding method of a fast intra-frame coding unit aiming at an AVS3 hardware coder.
Background
The existing coding method adopted by video coding generally needs to divide an image into blocks with different sizes, use larger blocks in areas with less image details, use smaller blocks in areas with rich details, and code the image by taking the blocks as units. And (5) finding the optimal division mode by comparing the coding performances of all the division modes.
AVS3 has more kinds of block division than other standards; this enables AVS3 to better match image details resulting in better image quality. However, at the same time the computational complexity is significantly increased.
For example, if a block of 64×64 is divided only twice at maximum according to the HEVC coding scheme, there are 9 division paths in total, and AVS3 has 97 division paths. In an actual video coding scene, the maximum division times are often more than twice, and in a region with complex texture, the maximum division times are divided into small blocks, so that the complexity of an algorithm adopted by the video coding of the AVS3 is far higher than that adopted by the video coding of HEVC.
How to reduce the complexity of the existing AVS3 intra-frame coding calculation method, improve the video coding efficiency and reduce the performance loss is a technical problem to be solved.
Disclosure of Invention
Based on this, there is a need to provide a coding method, a device, a computer device and a storage medium for a fast intra-frame coding unit of an AVS3 hardware encoder, which aims at the problems of more block modes of AVS3 intra-frame coding, higher computation complexity, low video coding efficiency and large performance loss.
In a first aspect, an embodiment of the present application provides a method for encoding a fast intra coding unit of an AVS3 hardware encoder, the method including:
Acquiring a first variance of a current block in a horizontal direction, a second variance of the current block in a vertical direction and a variance of the current block;
according to a first deleting model, the first variance, the second variance and the variance which are used for primarily deleting the dividing modes, carrying out initial deleting on the plurality of dividing modes to obtain a plurality of initial dividing modes;
acquiring the variance of the current block sub-block variance;
performing re-puncturing on the plurality of initial partitioning modes according to a second puncturing model for re-puncturing the partitioning modes and the variance of the current sub-block variance to obtain n partitioning modes after puncturing, wherein n is a set maximum partitioning mode number, and n is a positive integer greater than 1 and less than 6;
and video coding is carried out based on the n selected dividing modes, so that coded video is obtained and output.
In one embodiment, the plurality of division modes includes any one of a non-division mode, a horizontal two-division mode, a vertical two-division mode, an i-shaped moisture division mode, an i-shaped vertical division mode, and a four-division mode.
In one embodiment, the method further comprises:
and configuring a first deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the first deleting condition comprises the following steps:
If the value of the second variance is larger than the value of the first variance of a first preset threshold multiple, deleting the horizontal two-division mode and the I-shaped water division mode in the multiple division modes to obtain a corresponding deleted division mode; or alternatively, the process may be performed,
and deleting the vertical two-division mode and the I-shaped vertical division mode in the multiple division modes if the value of the first variance is larger than the value of the second variance of the first preset threshold multiple, so as to obtain a corresponding deleted division mode.
In one embodiment, the method further comprises:
and configuring a second deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the second deleting condition comprises the following steps:
and deleting the non-divided mode in the plurality of divided modes if the variance is larger than a second preset threshold value, so as to obtain a corresponding deleted divided mode.
In one embodiment, the method further comprises:
and configuring a third deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the third deleting condition comprises the following steps:
deleting the four partition modes in the multiple partition modes if the value of the first variance is larger than the value of the second variance of a third preset threshold multiple, so as to obtain corresponding deleted partition modes; or alternatively, the process may be performed,
And deleting the four partition modes in the multiple partition modes if the value of the second variance is larger than the value of the first variance of the third preset threshold multiple, so as to obtain a corresponding deleted partition mode.
In one embodiment, the method further comprises:
and configuring a fourth deleting condition for carrying out division mode re-deleting on the second deleting model, wherein the fourth deleting condition comprises the following steps:
and if the absolute value of the difference value between the variance of the current block sub-block in the gradient direction and the variance of the current block sub-block in the dividing direction is larger than a preset value, reducing the value of the variance of the current block sub-block variance.
In one embodiment, the method further comprises:
and configuring a fifth deleting condition for carrying out division mode re-deleting on the second deleting model, wherein the fifth deleting condition comprises the following steps:
and deleting the non-divided mode in the plurality of divided modes to obtain a corresponding deleted divided mode if the maximum value of the variances of the corresponding current sub-blocks in any divided mode selected from the plurality of divided modes is larger than a fourth preset threshold.
In one embodiment, the method further comprises:
And configuring a sixth deleting condition for carrying out division mode re-deleting on the second deleting model, wherein the sixth deleting condition comprises the following steps:
if the current dividing mode is the I-shaped water dividing mode and/or the I-shaped vertical dividing mode and the variance difference of the corresponding middle two sub-blocks is larger than a fifth preset threshold, reducing the variance of the corresponding current sub-block variances in the horizontal two dividing modes and/or the variance of the corresponding current sub-block variances in the vertical two dividing modes, and deleting the I-shaped water dividing mode and/or the I-shaped vertical dividing mode; or alternatively, the process may be performed,
if the current division mode is the horizontal division mode and/or the vertical division mode and the variance difference of the corresponding middle two sub-blocks is larger than the fifth preset threshold, the variance of the corresponding current sub-block variance in the I-shaped water division mode and/or the variance of the corresponding current sub-block variance in the I-shaped vertical division mode is reduced, and the horizontal division mode and/or the vertical division mode are deleted.
In one embodiment, the method further comprises:
configuring a seventh deleting condition for carrying out partition mode re-deleting on the second deleting model, wherein the seventh deleting condition comprises the following steps:
If the non-divided mode is one of the candidate divided modes, using the non-divided mode as one of the n divided modes after the deletion, and determining n-1 divided modes according to the variance of the current block sub-block variance; or alternatively, the process may be performed,
and if the non-partition mode is not one of the candidate partition modes, determining n partition modes according to the variance of the current block sub-block variance.
In a second aspect, an embodiment of the present application provides an encoding apparatus for a fast intra coding unit of an AVS3 hardware encoder, the apparatus comprising:
a first obtaining module, configured to obtain a first variance of a current block in a horizontal direction, a second variance of the current block in a vertical direction, and a variance of the current block;
the partition mode preliminary deleting module is used for carrying out initial deleting on multiple partition modes according to a first deleting model for preliminary deleting of the partition modes, the first variance, the second variance and the variance acquired by the first acquisition module, so as to obtain multiple initial partition modes;
the second acquisition module is used for acquiring the variance of the current sub-block variance;
the partition mode re-deleting module is used for deleting the plurality of initial partition modes again according to a second deleting model for deleting the partition modes again and the variance of the current block sub-block variance acquired by the second acquiring module, so as to obtain n deleted partition modes, wherein n is a set maximum partition mode number, and n is a positive integer which is more than 1 and less than 6;
And the coding and outputting module is used for carrying out video coding on the n deleted division modes obtained by deleting the division mode deleting module again, so as to obtain and output coded videos.
In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores computer readable instructions that, when executed by the processor, cause the processor to perform the above-mentioned method steps.
In a fourth aspect, embodiments of the present application provide a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the above-described method steps.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the embodiment of the application, the multiple initial division modes are subjected to repeated deletion according to the second deletion model for the repeated deletion of the division modes and the variance of the current block sub-block variance, n types of deleted division modes are obtained, video coding is carried out based on the n types of deleted division modes, and coded video is obtained and output. Therefore, when the embodiment of the application is adopted for intra-frame coding, the optimal n kinds of the 6 kinds of division modes can be selected, wherein n is a positive integer which is more than 1 and less than 6; thus, flexible configuration can be performed according to performance requirements; in addition, the coding mode has simple algorithm, obvious improvement of coding efficiency and smaller performance loss. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a flowchart of an encoding method of a fast intra-frame encoding unit for an AVS3 hardware encoder provided in an embodiment of the present disclosure;
fig. 2 is a schematic diagram of AVS3 encoding unit classification provided in an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an encoding apparatus of a fast intra-frame encoding unit for an AVS3 hardware encoder according to an embodiment of the present disclosure.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Alternative embodiments of the present disclosure are described in detail below with reference to the drawings.
As shown in fig. 1, an embodiment of the present disclosure provides an encoding method for a fast intra coding unit of an AVS3 hardware encoder, including the following method steps:
S102: the method comprises the steps of obtaining a first variance of a current block in a horizontal direction, a second variance of the current block in a vertical direction and a variance of the current block.
If x 1 、x 2 、x 3 ………x n The average number of (c) is M,
the formula for calculating the variance of the current block may be the following formula:
s104: and performing initial deletion on the multiple division modes according to the first deletion model, the first variance, the second variance and the variance for preliminary deletion of the division modes to obtain multiple initial division modes.
As shown in fig. 2, an AVS3 encoding unit classification type schematic diagram provided by an embodiment of the present disclosure is shown; as shown in fig. 2, the AVS3 coding unit classification category includes 6 major categories, specifically: non-dividing, horizontal dividing, vertical dividing, I-shaped moisture dividing, I-shaped vertical dividing and four dividing.
In the embodiment of the application, the plurality of division modes comprise any one of a non-division mode, a horizontal two-division mode, a vertical two-division mode, an I-shaped moisture division mode, an I-shaped vertical division mode and a four-division mode. The various partitioning modes employed by embodiments of the present application are six partitioning modes as shown in fig. 2.
In this step, the multiple initial division modes are performed with preliminary deletion of the multiple division modes, and deletion conditions adopted by the preliminary deletion and corresponding to the first deletion model are often configured according to requirements of different application scenes; multiple erasure conditions can be configured and are prioritized, i.e.: in the case that the first deleting condition is satisfied, in order to further delete, deleting is performed by adopting the second deleting condition, and so on. The above is merely an example, and the number of configured erasure conditions is not particularly limited.
For example, the first puncturing conditions for performing the preliminary puncturing of the division pattern by the configured first puncturing model include: if the value of the second variance is larger than the value of the first variance of the first preset threshold multiple, deleting the horizontal two-division mode and the I-shaped water division mode in the multiple division modes to obtain a corresponding deleted division mode; or deleting the vertical two-division mode and the I-shaped vertical division mode in the multiple division modes if the value of the first variance is larger than the value of the second variance of the first preset threshold multiple, so as to obtain the corresponding deleted division mode.
For another example, the second puncturing condition for performing the preliminary puncturing of the partition mode by the configured first puncturing model includes: and if the variance is larger than a second preset threshold, deleting the non-divided mode in the plurality of divided modes to obtain a corresponding deleted divided mode.
For another example, the third puncturing condition for performing the preliminary puncturing of the partition mode by the configured first puncturing model includes: deleting four partition modes in the multiple partition modes if the value of the first variance is larger than the value of the second variance of the third preset threshold multiple, and obtaining a corresponding deleted partition mode; or deleting the four partition modes in the multiple partition modes if the value of the second variance is larger than the value of the first variance of the third preset threshold multiple, so as to obtain the corresponding deleted partition mode.
It should be noted that, the first, second and third deleting conditions for preliminary deleting are prioritized, that is: when the first deleting condition is met, continuing deleting by adopting the second deleting condition in order to further delete; when the second puncturing condition is satisfied, further puncturing is continued using a third puncturing condition for further puncturing.
In one possible implementation manner, the encoding method provided by the embodiment of the disclosure further includes the following steps:
and configuring a first deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the first deleting condition comprises the following steps:
if the value of the second variance is larger than the value of the first variance of the first preset threshold multiple, deleting the horizontal two-division mode and the I-shaped water division mode in the multiple division modes to obtain a corresponding deleted division mode; or alternatively, the process may be performed,
and deleting the vertical two-division mode and the I-shaped vertical division mode in the multiple division modes if the value of the first variance is larger than the value of the second variance of the first preset threshold multiple, so as to obtain a corresponding deleted division mode.
In an actual application scenario, according to experience, a reference value of the first preset threshold is 1.2, but in the encoding method provided by the embodiment of the application, the first preset threshold is not specifically limited.
In another possible implementation manner, the encoding method provided by the embodiment of the present disclosure further includes the following steps:
and configuring a second deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the second deleting condition comprises the following steps:
and if the variance is larger than a second preset threshold, deleting the non-divided mode in the plurality of divided modes to obtain a corresponding deleted divided mode.
In an actual application scenario, according to experience, the reference value of the second preset threshold is 6, but in the encoding method provided by the embodiment of the application, the first preset threshold is not specifically limited.
In another possible implementation manner, the encoding method provided by the embodiment of the present disclosure further includes the following steps:
and configuring a third deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the third deleting condition comprises the following steps:
deleting four partition modes in the multiple partition modes if the value of the first variance is larger than the value of the second variance of the third preset threshold multiple, and obtaining a corresponding deleted partition mode; or alternatively, the process may be performed,
and deleting the four partition modes in the multiple partition modes if the value of the second variance is larger than the value of the first variance of the third preset threshold multiple, so as to obtain the corresponding deleted partition mode.
In an actual application scenario, according to experience, the reference value of the third preset threshold is 4, but in the encoding method provided by the embodiment of the application, the third preset threshold is not specifically limited.
S106: and acquiring the variance of the current sub-block variance.
In the embodiment of the application, before the variance of the current block sub-block variance is obtained, the variance of the current block sub-block variance needs to be calculated.
The calculation formula for calculating the variance of the current block sub-block variance is:
var_var=var(var1,var2)
=((var1-(var1+var2)/2) 2 +(var2-(var1+var2)/2) 2 )/2
in the above formula, var_var is the variance of the current block sub-block variance; when the horizontal two-division mode is adopted, the current block is divided into two sub-blocks, and the variances of the two sub-blocks are respectively expressed as: var1 and var2.
S108: and re-deleting the plurality of initial dividing modes according to a second deleting model for deleting the dividing modes and the variance of the current block sub-block variance, so as to obtain n dividing modes after deleting, wherein n is the set maximum dividing mode number, and n is a positive integer which is more than 1 and less than 6.
In this step, the deleting condition corresponding to the second deleting model is often configured according to the requirements of different application scenes; multiple erasure conditions can be configured and are prioritized, i.e.: in the case that the fourth puncturing condition is satisfied, in order to further perform puncturing, a fifth puncturing condition is adopted for puncturing, and so on. The above is merely an example, and the number of configured erasure conditions is not particularly limited.
For example, the fourth puncturing condition for performing division mode re-puncturing by the configured second puncturing model includes: and if the absolute value of the difference value between the variance of the current block sub-block in the gradient direction and the variance of the current block sub-block in the dividing direction is larger than a preset value, reducing the numerical value of the variance of the current block sub-block variance.
For another example, the fifth puncturing condition for performing division mode re-puncturing by the configured second puncturing model includes: and deleting the non-partition mode in the multiple partition modes to obtain the corresponding deleted partition mode if the maximum value of the variances of the corresponding current sub-blocks in any one of the multiple partition modes is larger than a fourth preset threshold.
In an actual application scenario, according to experience, a reference value of the fourth preset threshold is 1.2×t2, where t2 is the second preset threshold, but in the encoding method provided by the embodiment of the present application, the fourth preset threshold is not specifically limited.
For another example, the sixth puncturing condition for configuring the second puncturing model for partition mode re-puncturing includes:
if the current dividing mode is an I-shaped water dividing mode and/or an I-shaped vertical dividing mode and the variance difference of the corresponding middle two sub-blocks is larger than a fifth preset threshold, reducing the variance of the corresponding current sub-block variances in the horizontal two dividing modes and/or the variance of the corresponding current sub-block variances in the vertical two dividing modes, and deleting the I-shaped water dividing mode and/or the I-shaped vertical dividing mode; or alternatively, the process may be performed,
If the current dividing mode is a horizontal two-dividing mode and/or a vertical two-dividing mode and the variance difference of the corresponding middle two sub-blocks is larger than a fifth preset threshold, reducing the variance of the corresponding current sub-block in the I-shaped water dividing mode and/or the variance of the corresponding current sub-block in the I-shaped vertical dividing mode, and deleting the horizontal two-dividing mode and/or the vertical two-dividing mode.
In an actual application scenario, according to experience, the reference value of the fifth preset threshold is 8, but in the encoding method provided by the embodiment of the application, the fifth preset threshold is not specifically limited.
For another example, the seventh puncturing condition for performing division mode re-puncturing by the configured second puncturing model includes:
if the non-divided mode is one of the candidate divided modes, the non-divided mode is used as one of n divided modes after the deletion, and n-1 divided modes are determined according to the variance of the current sub-block variance; or if the non-divided mode is not one of the candidate divided modes, determining n divided modes according to the variance of the current block sub-block variance.
The fourth, fifth, sixth and seventh conditions for re-puncturing are prioritized, that is: when the fourth deleting condition is met, continuing deleting by adopting a fifth deleting condition in order to further delete; when the fifth deleting condition is met, continuing deleting by adopting the sixth deleting condition in order to further delete; when the sixth puncturing condition is satisfied, further puncturing is continued using the seventh puncturing condition for further puncturing.
In one possible implementation manner, the encoding method provided by the embodiment of the disclosure further includes the following steps:
and configuring a fourth deleting condition for carrying out division mode deleting again by the second deleting model, wherein the fourth deleting condition comprises the following steps:
and if the absolute value of the difference value between the variance of the current block sub-block in the gradient direction and the variance of the current block sub-block in the dividing direction is larger than a preset value, reducing the numerical value of the variance of the current block sub-block variance.
In another possible implementation manner, the encoding method provided by the embodiment of the present disclosure further includes the following steps:
and configuring a fifth deleting condition for carrying out division mode deleting again by the second deleting model, wherein the fifth deleting condition comprises the following steps:
and deleting the non-partition mode in the multiple partition modes to obtain the corresponding deleted partition mode if the maximum value of the variances of the corresponding current sub-blocks in any one of the multiple partition modes is larger than a fourth preset threshold.
In another possible implementation manner, the encoding method provided by the embodiment of the present disclosure further includes the following steps:
and configuring a sixth deleting condition for carrying out division mode deleting again by the second deleting model, wherein the sixth deleting condition comprises the following steps:
If the current dividing mode is an I-shaped water dividing mode and/or an I-shaped vertical dividing mode and the variance difference of the corresponding middle two sub-blocks is larger than a fifth preset threshold, reducing the variance of the corresponding current sub-block variances in the horizontal two dividing modes and/or the variance of the corresponding current sub-block variances in the vertical two dividing modes, and deleting the I-shaped water dividing mode and/or the I-shaped vertical dividing mode; or alternatively, the process may be performed,
if the current dividing mode is a horizontal two-dividing mode and/or a vertical two-dividing mode and the variance difference of the corresponding middle two sub-blocks is larger than a fifth preset threshold, reducing the variance of the corresponding current sub-block in the I-shaped water dividing mode and/or the variance of the corresponding current sub-block in the I-shaped vertical dividing mode, and deleting the horizontal two-dividing mode and/or the vertical two-dividing mode.
In another possible implementation manner, the encoding method provided by the embodiment of the present disclosure further includes the following steps:
and configuring a seventh deleting condition for carrying out division mode deleting again by the second deleting model, wherein the seventh deleting condition comprises the following steps:
if the non-divided mode is one of the candidate divided modes, the non-divided mode is used as one of n divided modes after the deletion, and n-1 divided modes are determined according to the variance of the current sub-block variance; or alternatively, the process may be performed,
If the non-divided mode is not one of the candidate divided modes, n divided modes are determined according to the variance of the current block sub-block variance.
S110: and video coding is carried out based on the n selected dividing modes, so that coded video is obtained and output.
In the embodiment of the application, n is a set maximum division mode number, and n is a positive integer greater than 1 and less than 6. The video coding method for video coding based on the n selected division modes is a conventional video coding method, and will not be described here again.
The coding method provided by the embodiment of the application can combine the variance and gradient of the current block to perform primary selection and deletion on the AVS3 partition mode, thus greatly improving the deletion efficiency of partition mode deletion.
In addition, the coding method provided by the embodiment of the application adopts the variance of the sub-block variance to select the mode number with a determined number, has flexible and configurable performance and is beneficial to hardware realization.
Furthermore, in the encoding method provided by the embodiment of the application, whether the direction of the sub-block texture is matched with the dividing direction is utilized to adjust the variance of the sub-block variance so as to realize the optimization of the dividing mode; thus, the accuracy of the division mode optimization is greatly improved.
In the embodiment of the disclosure, according to a second deleting model for deleting the dividing modes again and the variance of the current block sub-block variance, deleting the plurality of initial dividing modes again to obtain n dividing modes after deleting; and video coding is carried out based on the n selected division modes, so that coded video is obtained and output. Therefore, when the embodiment of the application is adopted for intra-frame coding, the optimal n kinds of the 6 kinds of division modes can be selected, wherein n is a positive integer which is more than 1 and less than 6; thus, flexible configuration can be performed according to performance requirements; in addition, the coding mode has simple algorithm, obvious improvement of coding efficiency and smaller performance loss.
The following is an embodiment of an encoding apparatus for a fast intra coding unit of an AVS3 hardware encoder, which may be used to perform an embodiment of an encoding method for a fast intra coding unit of an AVS3 hardware encoder. For details not disclosed in the embodiment of the encoding apparatus of the fast intra-frame encoding unit of the AVS3 hardware encoder, please refer to the embodiment of the encoding method of the fast intra-frame encoding unit of the AVS3 hardware encoder.
Referring to fig. 3, a schematic diagram of an encoding apparatus for a fast intra-frame encoding unit of an AVS3 hardware encoder according to an exemplary embodiment of the present application is shown. The encoding means may be implemented as whole or part of the terminal by software, hardware or a combination of both. The encoding device includes a first acquisition module 302, a partition mode preliminary puncturing module 304, a second acquisition module 306, a partition mode re-puncturing module 308, and an encoding and output module 310.
Specifically, a first obtaining module 302, configured to obtain a first variance of the current block in a horizontal direction, a second variance of the current block in a vertical direction, and a variance of the current block;
the partition mode preliminary deleting module 304 is configured to perform initial deleting on multiple partition modes according to the first deleting model for preliminary deleting of the partition modes, the first variance, the second variance and the variance acquired by the first acquiring module 302, so as to obtain multiple initial partition modes;
a second obtaining module 306, configured to obtain a variance of the current sub-block variances;
the partition mode re-deleting module 308 is configured to delete multiple initial partition modes again according to the second deleting module for deleting the partition modes again and the variance of the current block sub-block variance acquired by the second acquiring module 306, so as to obtain n deleted partition modes, where n is a set maximum partition mode number and n is a positive integer greater than 1 and less than 6;
the encoding and output module 310 is configured to perform video encoding based on the n types of the deleted division modes that are deleted by the deletion module 308, so as to obtain and output encoded video.
Optionally, the plurality of division modes include any one of a non-division mode, a horizontal two-division mode, a vertical two-division mode, an i-shaped moisture division mode, an i-shaped vertical division mode, and a four-division mode.
Optionally, the apparatus further includes:
a first configuration module (not shown in fig. 3) configured to configure a first puncturing condition of the first puncturing model for performing partition mode preliminary puncturing, where the first puncturing condition configured by the first configuration module includes:
if the value of the second variance is larger than the value of the first variance of the first preset threshold multiple, deleting the horizontal two-division mode and the I-shaped water division mode in the multiple division modes to obtain a corresponding deleted division mode; or alternatively, the process may be performed,
and deleting the vertical two-division mode and the I-shaped vertical division mode in the multiple division modes if the value of the first variance is larger than the value of the second variance of the first preset threshold multiple, so as to obtain a corresponding deleted division mode.
Optionally, the apparatus further includes:
a second configuration module (not shown in fig. 3) configured to configure a second puncturing condition of the first puncturing model for performing the preliminary puncturing of the partition mode, where the second puncturing condition configured by the second configuration module includes:
and if the variance is larger than a second preset threshold, deleting the non-divided mode in the plurality of divided modes to obtain a corresponding deleted divided mode.
Optionally, the apparatus further includes:
A third configuration module (not shown in fig. 3) configured to configure a third puncturing condition of the first puncturing model for performing partition mode preliminary puncturing, where the third puncturing condition configured by the third configuration module includes:
deleting four partition modes in the multiple partition modes if the value of the first variance is larger than the value of the second variance of the third preset threshold multiple, and obtaining a corresponding deleted partition mode; or alternatively, the process may be performed,
and deleting the four partition modes in the multiple partition modes if the value of the second variance is larger than the value of the first variance of the third preset threshold multiple, so as to obtain the corresponding deleted partition mode.
Optionally, the apparatus further includes:
a fourth configuration module (not shown in fig. 3) configured to configure a fourth puncturing condition for the second puncturing model to perform partition mode re-puncturing, where the fourth puncturing condition configured by the fourth configuration module includes:
and if the absolute value of the difference value between the variance of the current block sub-block in the gradient direction and the variance of the current block sub-block in the dividing direction is larger than a preset value, reducing the numerical value of the variance of the current block sub-block variance.
Optionally, the apparatus further includes:
a fifth configuration module (not shown in fig. 3) configured to configure a fifth puncturing condition for the second puncturing model to perform partition mode re-puncturing, where the fifth puncturing condition configured by the fifth configuration module includes:
And deleting the non-partition mode in the multiple partition modes to obtain the corresponding deleted partition mode if the maximum value of the variances of the corresponding current sub-blocks in any one of the multiple partition modes is larger than a fourth preset threshold.
Optionally, the apparatus further includes:
a sixth configuration module (not shown in fig. 3) configured to configure a sixth puncturing condition for the second puncturing model to perform partition mode re-puncturing, where the sixth puncturing condition configured by the sixth configuration module includes:
if the current dividing mode is an I-shaped water dividing mode and/or an I-shaped vertical dividing mode and the variance difference of the corresponding middle two sub-blocks is larger than a fifth preset threshold, reducing the variance of the corresponding current sub-block variances in the horizontal two dividing modes and/or the variance of the corresponding current sub-block variances in the vertical two dividing modes, and deleting the I-shaped water dividing mode and/or the I-shaped vertical dividing mode; or alternatively, the process may be performed,
if the current dividing mode is a horizontal two-dividing mode and/or a vertical two-dividing mode and the variance difference of the corresponding middle two sub-blocks is larger than a fifth preset threshold, reducing the variance of the corresponding current sub-block in the I-shaped water dividing mode and/or the variance of the corresponding current sub-block in the I-shaped vertical dividing mode, and deleting the horizontal two-dividing mode and/or the vertical two-dividing mode.
Optionally, the apparatus further includes:
a seventh configuration module (not shown in fig. 3) configured to configure a seventh puncturing condition for the second puncturing model to perform partition mode re-puncturing, where the seventh puncturing condition configured by the seventh configuration module includes:
if the non-divided mode is one of the candidate divided modes, the non-divided mode is used as one of n divided modes after the deletion, and n-1 divided modes are determined according to the variance of the current sub-block variance; or alternatively, the process may be performed,
if the non-divided mode is not one of the candidate divided modes, n divided modes are determined according to the variance of the current block sub-block variance.
It should be noted that, when the encoding apparatus for a fast intra-frame encoding unit of an AVS3 hardware encoder provided in the foregoing embodiment performs the encoding method for a fast intra-frame encoding unit of an AVS3 hardware encoder, only the division of the foregoing functional modules is illustrated, and in practical application, the foregoing functional allocation may be performed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the encoding device for the fast intra-frame encoding unit of the AVS3 hardware encoder provided in the foregoing embodiment and the encoding method embodiment for the fast intra-frame encoding unit of the AVS3 hardware encoder belong to the same concept, which embody the implementation process in detail and are not described herein.
In the embodiment of the disclosure, the partition mode re-deleting module is configured to re-delete multiple initial partition modes according to a second deleting model for deleting the partition modes and the variance of the current block sub-block variance acquired by the second acquiring module, so as to obtain n deleted partition modes, where n is a set maximum partition mode number, and n is a positive integer greater than 1 and less than 6; and the coding and outputting module is used for carrying out video coding on the n selected division modes obtained by the secondary selection module based on the division modes, so as to obtain and output coded videos. Therefore, when the embodiment of the application is adopted for intra-frame coding, the optimal n kinds of the 6 kinds of division modes can be selected, wherein n is a positive integer which is more than 1 and less than 6; thus, flexible configuration can be performed according to performance requirements; in addition, the coding algorithm adopted by the coding device is simple, coding efficiency is improved obviously, and performance loss is small.
In one embodiment, a computer device is presented, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring a first variance of a current block in a horizontal direction, a second variance of the current block in a vertical direction and a variance of the current block; according to a first deleting model, a first variance, a second variance and a variance which are used for primarily deleting the dividing modes, carrying out initial deleting on the plurality of dividing modes to obtain a plurality of initial dividing modes; acquiring the variance of the current block sub-block variance; re-deleting the plurality of initial dividing modes according to a second deleting model for deleting the dividing modes again and the variance of the current block sub-block variance to obtain n dividing modes after deleting, wherein n is the set maximum dividing mode number, and n is a positive integer greater than 1 and less than 6; and video coding is carried out based on the n selected dividing modes, so that coded video is obtained and output.
In one embodiment, a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of: acquiring a first variance of a current block in a horizontal direction, a second variance of the current block in a vertical direction and a variance of the current block; according to a first deleting model, a first variance, a second variance and a variance which are used for primarily deleting the dividing modes, carrying out initial deleting on the plurality of dividing modes to obtain a plurality of initial dividing modes; acquiring the variance of the current block sub-block variance; re-deleting the plurality of initial dividing modes according to a second deleting model for deleting the dividing modes again and the variance of the current block sub-block variance to obtain n dividing modes after deleting, wherein n is the set maximum dividing mode number, and n is a positive integer greater than 1 and less than 6; and video coding is carried out based on the n selected dividing modes, so that coded video is obtained and output.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (12)

1. A method of encoding a fast intra coding unit for an AVS3 hardware encoder, the method comprising:
acquiring a first variance of a current block in a horizontal direction, a second variance of the current block in a vertical direction and a variance of the current block;
according to a first deleting model, the first variance, the second variance and the variance which are used for primarily deleting the dividing modes, carrying out initial deleting on the plurality of dividing modes to obtain a plurality of initial dividing modes;
Acquiring the variance of the current block sub-block variance;
performing re-puncturing on the plurality of initial partitioning modes according to a second puncturing model for re-puncturing the partitioning modes and the variance of the current sub-block variance to obtain n partitioning modes after puncturing, wherein n is a set maximum partitioning mode number, and n is a positive integer greater than 1 and less than 6;
and video coding is carried out based on the n selected dividing modes, so that coded video is obtained and output.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the plurality of division modes include any one of a non-division mode, a horizontal two-division mode, a vertical two-division mode, an I-shaped moisture division mode, an I-shaped vertical division mode, and a four-division mode.
3. The method according to claim 2, wherein the method further comprises:
and configuring a first deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the first deleting condition comprises the following steps:
if the value of the second variance is larger than the value of the first variance of a first preset threshold multiple, deleting the horizontal two-division mode and the I-shaped water division mode in the multiple division modes to obtain a corresponding deleted division mode; or alternatively, the process may be performed,
And deleting the vertical two-division mode and the I-shaped vertical division mode in the multiple division modes if the value of the first variance is larger than the value of the second variance of the first preset threshold multiple, so as to obtain a corresponding deleted division mode.
4. The method according to claim 2, wherein the method further comprises:
and configuring a second deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the second deleting condition comprises the following steps:
and deleting the non-divided mode in the plurality of divided modes if the variance is larger than a second preset threshold value, so as to obtain a corresponding deleted divided mode.
5. The method according to claim 2, wherein the method further comprises:
and configuring a third deleting condition for carrying out preliminary deleting on the dividing mode by the first deleting model, wherein the third deleting condition comprises the following steps:
deleting the four partition modes in the multiple partition modes if the value of the first variance is larger than the value of the second variance of a third preset threshold multiple, so as to obtain corresponding deleted partition modes; or alternatively, the process may be performed,
and deleting the four partition modes in the multiple partition modes if the value of the second variance is larger than the value of the first variance of the third preset threshold multiple, so as to obtain a corresponding deleted partition mode.
6. The method according to claim 2, wherein the method further comprises:
and configuring a fourth deleting condition for carrying out division mode re-deleting on the second deleting model, wherein the fourth deleting condition comprises the following steps:
and if the absolute value of the difference value between the variance of the current block sub-block in the gradient direction and the variance of the current block sub-block in the dividing direction is larger than a preset value, reducing the value of the variance of the current block sub-block variance.
7. The method according to claim 2, wherein the method further comprises:
and configuring a fifth deleting condition for carrying out division mode re-deleting on the second deleting model, wherein the fifth deleting condition comprises the following steps:
and deleting the non-divided mode in the plurality of divided modes to obtain a corresponding deleted divided mode if the maximum value of the variances of the corresponding current sub-blocks in any divided mode selected from the plurality of divided modes is larger than a fourth preset threshold.
8. The method according to claim 2, wherein the method further comprises:
and configuring a sixth deleting condition for carrying out division mode re-deleting on the second deleting model, wherein the sixth deleting condition comprises the following steps:
If the current dividing mode is the I-shaped water dividing mode and/or the I-shaped vertical dividing mode and the variance difference of the corresponding middle two sub-blocks is larger than a fifth preset threshold, reducing the variance of the corresponding current sub-block variances in the horizontal two dividing modes and/or the variance of the corresponding current sub-block variances in the vertical two dividing modes, and deleting the I-shaped water dividing mode and/or the I-shaped vertical dividing mode; or alternatively, the process may be performed,
if the current division mode is the horizontal division mode and/or the vertical division mode and the variance difference of the corresponding middle two sub-blocks is larger than the fifth preset threshold, the variance of the corresponding current sub-block variance in the I-shaped water division mode and/or the variance of the corresponding current sub-block variance in the I-shaped vertical division mode is reduced, and the horizontal division mode and/or the vertical division mode are deleted.
9. The method according to claim 2, wherein the method further comprises:
configuring a seventh deleting condition for carrying out partition mode re-deleting on the second deleting model, wherein the seventh deleting condition comprises the following steps:
If the non-divided mode is one of the candidate divided modes, using the non-divided mode as one of the n divided modes after the deletion, and determining n-1 divided modes according to the variance of the current block sub-block variance; or alternatively, the process may be performed,
and if the non-partition mode is not one of the candidate partition modes, determining n partition modes according to the variance of the current block sub-block variance.
10. An encoding apparatus for a fast intra coding unit of an AVS3 hardware encoder, the apparatus comprising:
a first obtaining module, configured to obtain a first variance of a current block in a horizontal direction, a second variance of the current block in a vertical direction, and a variance of the current block;
the partition mode preliminary deleting module is used for carrying out initial deleting on multiple partition modes according to a first deleting model for preliminary deleting of the partition modes, the first variance, the second variance and the variance acquired by the first acquisition module, so as to obtain multiple initial partition modes;
the second acquisition module is used for acquiring the variance of the current sub-block variance;
the partition mode re-deleting module is used for deleting the plurality of initial partition modes again according to a second deleting model for deleting the partition modes again and the variance of the current block sub-block variance acquired by the second acquiring module, so as to obtain n deleted partition modes, wherein n is a set maximum partition mode number, and n is a positive integer which is more than 1 and less than 6;
And the coding and outputting module is used for carrying out video coding on the n deleted division modes obtained by deleting the division mode deleting module again, so as to obtain and output coded videos.
11. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the encoding method of any of claims 1 to 9.
12. A storage medium storing computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the encoding method of any one of claims 1 to 9.
CN202110749305.2A 2021-07-01 2021-07-01 Encoding method of fast intra-frame encoding unit for AVS3 hardware encoder Active CN113612992B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110749305.2A CN113612992B (en) 2021-07-01 2021-07-01 Encoding method of fast intra-frame encoding unit for AVS3 hardware encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110749305.2A CN113612992B (en) 2021-07-01 2021-07-01 Encoding method of fast intra-frame encoding unit for AVS3 hardware encoder

Publications (2)

Publication Number Publication Date
CN113612992A CN113612992A (en) 2021-11-05
CN113612992B true CN113612992B (en) 2023-11-03

Family

ID=78337195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110749305.2A Active CN113612992B (en) 2021-07-01 2021-07-01 Encoding method of fast intra-frame encoding unit for AVS3 hardware encoder

Country Status (1)

Country Link
CN (1) CN113612992B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120090584A (en) * 2011-02-08 2012-08-17 연세대학교 산학협력단 Intra prediction mode decision method and apparatus
CN102724509A (en) * 2012-06-19 2012-10-10 清华大学 Method and device for selecting optimal intra-frame coding mode for video sequence
CN103327339A (en) * 2013-06-09 2013-09-25 深圳市云宙多媒体技术有限公司 Intra-frame prediction block partition coding method and system
WO2018233411A1 (en) * 2017-06-23 2018-12-27 腾讯科技(深圳)有限公司 Prediction mode selection method, video encoding device and storage medium
CN109120928A (en) * 2018-04-18 2019-01-01 北方工业大学 Improvement intra block based on Character segmentation copies algorithm
WO2020182157A1 (en) * 2019-03-11 2020-09-17 杭州海康威视数字技术股份有限公司 Encoding method and device, and decoding method and device
CN112911285A (en) * 2021-01-26 2021-06-04 北京博雅慧视智能技术研究院有限公司 Hardware encoder intra mode decision circuit, method, apparatus, device and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009094828A (en) * 2007-10-10 2009-04-30 Hitachi Ltd Device and method for encoding image, and device and method for decoding image
US9282344B2 (en) * 2011-11-04 2016-03-08 Qualcomm Incorporated Secondary boundary filtering for video coding
US20130308698A1 (en) * 2012-05-18 2013-11-21 Industrial Technology Research Institute Rate and distortion estimation methods and apparatus for coarse grain scalability in scalable video coding

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120090584A (en) * 2011-02-08 2012-08-17 연세대학교 산학협력단 Intra prediction mode decision method and apparatus
CN102724509A (en) * 2012-06-19 2012-10-10 清华大学 Method and device for selecting optimal intra-frame coding mode for video sequence
CN103327339A (en) * 2013-06-09 2013-09-25 深圳市云宙多媒体技术有限公司 Intra-frame prediction block partition coding method and system
WO2018233411A1 (en) * 2017-06-23 2018-12-27 腾讯科技(深圳)有限公司 Prediction mode selection method, video encoding device and storage medium
CN109120928A (en) * 2018-04-18 2019-01-01 北方工业大学 Improvement intra block based on Character segmentation copies algorithm
WO2020182157A1 (en) * 2019-03-11 2020-09-17 杭州海康威视数字技术股份有限公司 Encoding method and device, and decoding method and device
CN112911285A (en) * 2021-01-26 2021-06-04 北京博雅慧视智能技术研究院有限公司 Hardware encoder intra mode decision circuit, method, apparatus, device and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AVS实时编码的VBR码率控制;郑从卓等;《计算机工程》;正文全文 *

Also Published As

Publication number Publication date
CN113612992A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
US10397575B2 (en) Image coding apparatus, image coding method, and program, and image decoding apparatus, image decoding method, and program
US10003792B2 (en) Video encoder for images
CN108322747B (en) Coding unit division optimization method for ultra-high definition video
RU2706228C1 (en) Scanning order selection method and device
US11785216B2 (en) Point cloud coding methods, encoder, and decoder
CN113347416B (en) Chroma intra prediction method and device, and computer storage medium
WO2021185022A1 (en) Method and apparatus for determining coding mode, and device and storage medium
JP2021502786A (en) Coding unit division determination method and device, computing device and readable storage medium
CN111316642A (en) Method and apparatus for signaling image coding and decoding partition information
WO2023082834A1 (en) Video compression method and apparatus, and computer device and storage medium
US20240171772A1 (en) Method and device for intra prediction
Lin et al. Fast binary tree partition decision in H. 266/FVC intra Coding
CN113612992B (en) Encoding method of fast intra-frame encoding unit for AVS3 hardware encoder
US20200351518A1 (en) Prediction direction selection method and apparatus in image encoding, and storage medium
CN112437307B (en) Video coding method, video coding device, electronic equipment and video coding medium
Liu et al. A fast mode selection for depth modelling modes of intra depth coding in 3D-HEVC
CN113489996B (en) Encoding method based on fast inter-frame encoding unit size decision model
CN114520916B (en) Video encoding method, video encoding device, terminal equipment and storage medium
CN111246218B (en) CU segmentation prediction and mode decision texture coding method based on JND model
CN114071138A (en) Intra-frame prediction encoding method, intra-frame prediction encoding device, and computer-readable medium
US20130136374A1 (en) Method and apparatus for encoding that intra prediction based on mode of variable size partition is applied in macro block
Ren et al. Fast Algorithm of Video Coding Based on AVS3
CN112004099B (en) Intra-frame block copy prediction method and device and computer readable storage medium
CN109788283B (en) Coding unit partitioning method, system, device and storage medium thereof
US20240155137A1 (en) Multimedia data processing method and apparatus, computer device, computer-readable storage medium, and computer program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant