AVS3 video encoding method, apparatus, device and computer storage medium

By generating conversion information to adjust quantization parameters, the problem of quantization step size mismatch in AVS3 video encoding was solved, thus improving visual quality.

CN120881277BActive Publication Date: 2025-12-05MALANSHAN AUDIO & VIDEO LABORATORY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511406301.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2025-12-05
Estimated Expiration
2045-09-29

Smart Images

  • Figure CN120881277B_ABST
    Figure CN120881277B_ABST
Patent Text Reader

Abstract

The application discloses an AVS3 video encoding method, device and equipment and a computer storage medium, relates to the technical field of video processing, and obtains a target video to be encoded; a basic quantization parameter determined according to a set encoding mode is obtained; a first quantization scaling, a first quantization offset, a first quantization boundary and a first quantization step of the set encoding mode are obtained; a second quantization step of the AVS3 video encoding is obtained; conversion information between the second quantization step and the first quantization step is generated; the first quantization scaling, the first quantization offset and the first quantization boundary are respectively converted according to the conversion information, and a second quantization scaling, a second quantization offset and a second quantization boundary are obtained; the basic quantization parameter is adjusted based on the second quantization scaling, the second quantization offset and the second quantization boundary, and a target quantization parameter is obtained; and the target video is subjected to AVS3 video encoding based on the target quantization parameter, and an encoding result is obtained. The visual quality of the AVS3 video encoding is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of video processing, more particularly, to an AVS3 video encoding method, device, equipment and computer storage medium. BACKGROUND

[0002] AVS3 is an audio and video source coding standard for 8K and 5G industry applications. In the AVS3 video encoding standard, the low delay coding (LD) mode is suitable for real-time communication scenarios, including video conferencing, live streaming, etc. In low delay coding, the encoding order is only coded in the actual display order, so the accuracy of the encoding control is particularly strict. Generally, the low delay coding result is divided according to the GOP (Group Of Picture, picture group) size, and within each GOP, the time domain is layered. The purpose of layering is to define the coding quality and quantization parameter (QP) of different frames, so as to ensure that the quality fluctuation of low delay coding does not cause obvious visual difference to the user, and at the same time, the overall coding compression rate is guaranteed.

[0003] However, in the AVS3 video encoding process, the quantization parameter can be determined according to the existing set encoding mode, such as the encoding mode of the 265 standard encoder HM. However, this quantization parameter does not conform to the quantization step of the AVS3 video encoding, resulting in poor visual quality of the AVS3 video encoding.

[0004] In summary, how to improve the visual quality of AVS3 video encoding is a problem that needs to be solved by the technical personnel in the field. SUMMARY

[0005] The purpose of the present application is to provide an AVS3 video encoding method which can solve the technical problem of how to improve the visual quality of AVS3 video encoding to some extent. The present application also provides an AVS3 video encoding device, electronic equipment and computer readable storage medium.

[0006] In order to achieve the above purpose, the present application provides the following technical solution:

[0007] An AVS3 video encoding method, comprising:

[0008] obtaining a target video to be encoded;

[0009] obtaining a basic quantization parameter determined according to a set encoding mode;

[0010] obtaining a first quantization scaling, a first quantization offset, a first quantization boundary and a first quantization step of the set encoding mode;

[0011] obtaining a second quantization step of the AVS3 video encoding;

[0012] generating conversion information between the second quantization step and the first quantization step;

[0013] converting the first quantization scale, the first quantization offset and the first quantization boundary according to the conversion information respectively, to obtain a second quantization scale, a second quantization offset and a second quantization boundary;

[0014] adjusting the base quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary, to obtain a target quantization parameter;

[0015] performing AVS3 video encoding on the target video based on the target quantization parameter, to obtain an AVS3 video encoding result.

[0016] In an example embodiment, the generating of the conversion information between the second quantization step and the first quantization step comprises:

[0017] generating a first ratio between the second quantization step and the first quantization step;

[0018] generating the conversion information between the second quantization step and the first quantization step according to the first ratio.

[0019] In an example embodiment, the adjusting of the base quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary, to obtain a target quantization parameter comprises:

[0020] adjusting the base quantization parameter according to an encoding bit depth, to obtain a first quantization parameter;

[0021] adjusting the first quantization parameter according to a time domain hierarchy, to obtain a second quantization parameter;

[0022] for a frame with a non-zero time domain hierarchy, taking a difference value between the second quantization parameter and the encoding bit depth as a third quantization parameter, processing the third quantization parameter based on the second quantization scale and the second quantization offset, to generate a first offset;

[0023] performing boundary constraint on the first offset according to the second quantization boundary, to obtain a second offset;

[0024] adjusting the second quantization parameter based on the second offset, to obtain a target quantization parameter.

[0025] In an example embodiment, the processing of the third quantization parameter based on the second quantization scale and the second quantization offset, to generate a first offset comprises:

[0026] generate a product value of the second quantization offset and the third quantization parameter as first processing data;

[0027] generate a sum value between the first processing data and the second quantization scaling and set compensation value as second processing data;

[0028] perform rounding processing on the second processing data to obtain a first offset.

[0029] In an exemplary embodiment, the boundary constraint of the first offset according to the second quantization boundary to obtain a second offset comprises:

[0030] in response to the first offset being less than or equal to zero, zero is taken as the second offset;

[0031] in response to the first offset being greater than zero and less than the value of the second quantization boundary, the first offset is taken as the second offset;

[0032] in response to the first offset being greater than or equal to the value of the second quantization boundary, the value of the second quantization boundary is taken as the second offset.

[0033] In an exemplary embodiment, the adjustment of the second quantization parameter based on the second offset to obtain a target quantization parameter comprises:

[0034] generate a sum value of the second offset and the second quantization parameter as a target quantization parameter.

[0035] In an exemplary embodiment, after the adjustment of the first quantization parameter according to the time domain hierarchy to obtain a second quantization parameter, it further comprises:

[0036] for a frame with a time domain hierarchy of zero, the second quantization parameter is taken as a target quantization parameter.

[0037] An AVS3 video encoding device comprises:

[0038] a target video acquisition module for acquiring a target video to be encoded;

[0039] a basic quantization parameter acquisition module for acquiring a basic quantization parameter determined according to a set encoding mode;

[0040] a set data acquisition module for acquiring a first quantization scaling, a first quantization offset, a first quantization boundary and a first quantization step of the set encoding mode;

[0041] a second quantization step determination module for acquiring a second quantization step of AVS3 video encoding;

[0042] a conversion information generation module configured to generate conversion information between the second quantization step and the first quantization step;

[0043] a conversion module configured to convert the first quantization scale, the first quantization offset and the first quantization boundary according to the conversion information respectively to obtain a second quantization scale, a second quantization offset and a second quantization boundary;

[0044] a quantization parameter adjustment module configured to adjust the base quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary to obtain a target quantization parameter;

[0045] an AVS3 video encoding module configured to perform AVS3 video encoding on the target video based on the target quantization parameter to obtain an AVS3 video encoding result.

[0046] An electronic device, comprising:

[0047] a memory configured to store a computer program;

[0048] a processor configured to implement the steps of the AVS3 video encoding method as claimed in any one of the preceding claims when executing the computer program.

[0049] A computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the AVS3 video encoding method as claimed in any one of the preceding claims.

[0050] The application provides an AVS3 video coding method, obtains a target video to be coded; obtains a basic quantization parameter determined according to a set coding mode; obtains a first quantization scaling, a first quantization offset, a first quantization boundary and a first quantization step of the set coding mode; obtains a second quantization step of the AVS3 video coding; generates conversion information between the second quantization step and the first quantization step; converts the first quantization scaling, the first quantization offset and the first quantization boundary respectively according to the conversion information to obtain a second quantization scaling, a second quantization offset and a second quantization boundary; adjusts the basic quantization parameter based on the second quantization scaling, the second quantization offset and the second quantization boundary to obtain a target quantization parameter; and codes the target video based on the target quantization parameter to obtain an AVS3 video coding result. The application needs to generate conversion information between the second quantization step of the AVS3 video coding and the first quantization step of the set coding mode. Since the quantization parameter is associated with the quantization step, the first quantization scaling, the first quantization offset and the first quantization boundary can be converted respectively according to the conversion information to obtain the second quantization scaling, the second quantization offset and the second quantization boundary. Then, the basic quantization parameter is adjusted based on the second quantization scaling, the second quantization offset and the second quantization boundary to obtain the target quantization parameter suitable for the second quantization step of the AVS3 video coding, so as to ensure the consistency between the target quantization parameter and the second quantization step used in the AVS3 video coding, avoid picture blur lines caused by the inconsistency between the quantization parameter and the quantization step of the AVS3 video coding, and improve the visual quality of the AVS3 video coding. The AVS3 video coding system, the electronic device and the computer readable storage medium provided by the application also solve the corresponding technical problems. BRIEF DESCRIPTION OF DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of the provided drawings.

[0052] Figure 1 A flowchart of an AVS3 video coding method provided by the embodiments of the present application;

[0053] Figure 2 A flowchart of the AVS3 video coding for testing;

[0054] Figure 3 A test result graph of SC sequence on Y;

[0055] Figure 4 A test result graph of SC sequence on U;

[0056] Figure 5 a test result graph for the SC sequence pair YUV;

[0057] Figure 6 a test result graph for the SC sequence pair YUV;

[0058] Figure 7 a test result graph for the OG sequence pair Y;

[0059] Figure 8 a test result graph for the OG sequence pair U;

[0060] Figure 9 a test result graph for the OG sequence pair V;

[0061] Figure 10 a test result graph for the OG sequence pair YUV;

[0062] Figure 11 a structural schematic diagram of an AVS3 video coding device provided by an embodiment of the present application;

[0063] Figure 12 a structural schematic diagram of an electronic device provided by an embodiment of the present application;

[0064] Figure 13 another structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0065] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.

[0066] Please refer to Figure 1 , Figure 1 a flowchart of an AVS3 video coding method provided by an embodiment of the present application.

[0067] The AVS3 video coding method provided by an embodiment of the present application can include the following steps:

[0068] Step S101: obtaining a target video to be coded.

[0069] In actual application, the target video to be encoded by the AVS3 video coding can be acquired according to a specific scenario. For example, in a live streaming scenario, a live streaming video can be taken as the target video to be encoded; in a live streaming playback scenario, a recorded video can be taken as the target video to be encoded; in a camera monitoring scenario, a video captured by a monitoring camera can be taken as the target video to be encoded, and the like.

[0070] Step S102: acquiring a basic quantization parameter determined according to a set coding mode.

[0071] In actual application, the AVS3 video coding needs to refer to the basic quantization parameter, and therefore the basic quantization parameter determined according to the set coding mode needs to be acquired. For example, a quantization parameter input by a user can be acquired, and the quantization parameter input by the user is processed according to the set coding mode to obtain the basic quantization parameter. The set coding mode refers to a coding mode referred by the AVS3 video coding, and the type of the set coding mode can be flexibly determined according to actual needs.

[0072] Step S103: acquiring a first quantization scale, a first quantization offset, a first quantization boundary and a first quantization step of the set coding mode.

[0073] Step S104: acquiring a second quantization step of the AVS3 video coding.

[0074] In actual application, the coding also needs to rely on a quantization scale (qp_scale), a quantization offset (qp_offset) and a quantization step, and therefore the first quantization scale, the first quantization offset, the first quantization boundary and the first quantization step of the set coding mode need to be acquired, and the second quantization step of the AVS3 video coding needs to be acquired.

[0075] Step S105: generating conversion information between the second quantization step and the first quantization step.

[0076] Step S106: converting the first quantization scale, the first quantization offset and the first quantization boundary respectively according to the conversion information to obtain a second quantization scale, a second quantization offset and a second quantization boundary.

[0077] Step S107: adjusting the basic quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary to obtain a target quantization parameter.

[0078] In actual applications, since the quantization parameter corresponds to the quantization step, and the basic quantization parameter is determined based on the set encoding mode, in the case that the first quantization step of the set encoding mode and the second quantization step of the AVS3 video encoding are known, the conversion information between the second quantization step and the first quantization step can be generated according to the corresponding relationship between the quantization parameter and the quantization step; the first quantization scaling, the first quantization offset and the first quantization boundary are converted according to the conversion information to obtain the second quantization scaling, the second quantization offset and the second quantization boundary, and the basic quantization parameter is adjusted based on the second quantization scaling, the second quantization offset and the second quantization boundary to obtain the target quantization parameter adapted to the second quantization step of the AVS3 video encoding. The type of the set encoding mode known can be flexibly determined according to the application scene, such as the encoding mode of the 265 standard encoder.

[0079] In the example embodiments, in the process of generating the conversion information between the second quantization step and the first quantization step, the first ratio between the second quantization step and the first quantization step can be generated; the conversion information between the second quantization step and the first quantization step can be generated according to the first ratio, such as taking the first ratio as the conversion information, or adjusting the first ratio within the allowed fluctuation range and taking the adjusted first ratio as the conversion information, etc. Correspondingly, in the process of converting the first quantization scaling, the first quantization offset and the first quantization boundary according to the conversion information to obtain the second quantization scaling, the second quantization offset and the second quantization boundary, the conversion information can be multiplied by the first quantization scaling, the first quantization offset and the first quantization boundary respectively to obtain the second quantization scaling, the second quantization offset and the second quantization boundary. For the convenience of understanding, it is assumed that the first quantization step is 6, the first quantization scaling is 0.2590, the first quantization offset is -6.5000, the first quantization boundary is 3, and the second quantization step is 8, then the second quantization scaling can be 0.3543, the second quantization offset can be -8.6667, and the second quantization boundary can be 4, etc.

[0080] In the example embodiment, in the process of adjusting the base quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary to obtain the target quantization parameter, the base quantization parameter needs to be adjusted according to the coding bit depth and the time domain hierarchy, that is, the base quantization parameter needs to be adjusted according to the coding bit depth to obtain the first quantization parameter, such as taking the sum of the coding bit depth corresponding value and the base quantization parameter as the first quantization parameter, wherein in the case of gop_size=8, the coding bit depth corresponding value is 16 when the coding bit depth is 10bit, the coding bit depth corresponding value is 8 when the coding bit depth is 8bit, etc.; the first quantization parameter is adjusted according to the time domain hierarchy to obtain the second quantization parameter, such as taking the sum of the time domain hierarchy corresponding value and the first quantization parameter as the second quantization parameter; for the frame whose time domain hierarchy is not zero, the difference between the second quantization parameter and the coding bit depth is taken as the third quantization parameter, the third quantization parameter is processed based on the second quantization scale and the second quantization offset to generate the first offset, the first offset is boundary-constrained according to the second quantization boundary to obtain the second offset, and the second quantization parameter is adjusted based on the second offset to obtain the target quantization parameter, such as taking the sum of the second offset and the second quantization parameter as the target quantization parameter, etc.

[0081] In a specific application scenario, in the process of processing the third quantization parameter based on the second quantization scale and the second quantization offset to generate the first offset, the product value of the second quantization offset and the third quantization parameter can be generated as the first processing data, the sum between the first processing data and the second quantization scale and the set compensation value is generated as the second processing data, and the set compensation value can be flexibly set according to actual needs, such as the set compensation value can be 0.5, etc. The second processing data is rounded to obtain the first offset.

[0082] In a specific application scenario, in the process of boundary-constraining the first offset according to the second quantization boundary to obtain the second offset, in response to the first offset being less than or equal to zero, zero is taken as the second offset; in response to the first offset being greater than zero and less than the value of the second quantization boundary, the first offset is taken as the second offset; in response to the first offset being greater than or equal to the value of the second quantization boundary, the value of the second quantization boundary is taken as the second offset.

[0083] In a specific application scenario, after adjusting the first quantization parameter according to the time domain layering to obtain the second quantization parameter, the frame with the time domain layering of zero can not be adjusted according to the second quantization scaling, the second quantization offset and the second quantization boundary, that is, the second quantization parameter can be directly used as the target quantization parameter. For example, when gop_size=8, the time domain layering corresponding value qp_offset_layer=[0, 3, 2, 3, 2, 3, 2, 3], wherein the frame with the time domain layering of zero is not adjusted, and the frame with the time domain layering not being zero needs to be adjusted.

[0084] Step S108: based on the target quantization parameter, performing AVS3 video coding on the target video to obtain an AVS3 video coding result.

[0085] In actual application, after obtaining the target quantization parameter adapted to the second quantization step of the AVS3 video coding, the target video can be coded based on the target quantization parameter to obtain the AVS3 video coding result.

[0086] The application provides an AVS3 video coding method, which comprises the following steps: obtaining a target video to be coded; obtaining a basic quantization parameter determined according to a set coding mode; obtaining a first quantization scaling, a first quantization offset, a first quantization boundary and a first quantization step of the set coding mode; obtaining a second quantization step of the AVS3 video coding; generating conversion information between the second quantization step and the first quantization step; converting the first quantization scaling, the first quantization offset and the first quantization boundary respectively according to the conversion information to obtain a second quantization scaling, a second quantization offset and a second quantization boundary; adjusting the basic quantization parameter based on the second quantization scaling, the second quantization offset and the second quantization boundary to obtain a target quantization parameter; and coding the target video based on the target quantization parameter to obtain an AVS3 video coding result. The application needs to generate conversion information between the second quantization step of the AVS3 video coding and the first quantization step of the set coding mode. Since the quantization parameter is associated with the quantization step, the first quantization scaling, the first quantization offset and the first quantization boundary can be converted respectively according to the conversion information to obtain the second quantization scaling, the second quantization offset and the second quantization boundary. Then, the basic quantization parameter is adjusted based on the second quantization scaling, the second quantization offset and the second quantization boundary to obtain the target quantization parameter adapted to the second quantization step of the AVS3 video coding, which ensures the consistency between the target quantization parameter and the second quantization step of the AVS3 video coding, avoids picture blur line caused by the inconsistency between the quantization parameter and the quantization step of the AVS3 video coding, and improves the visual quality of the AVS3 video coding.

[0087] In order to facilitate understanding of the effect of the AVS3 video coding scheme provided in the present application, the AVS3 video coding provided in the present application is tested, and the process of testing the AVS3 video coding can be as shown in the following figure: Figure 2 The process includes the following processes:

[0088] Start low-delay coding according to the AVS3 video coding;

[0089] Obtain current frame parameters;

[0090] Read the basic quantization parameter input by the user;

[0091] Adjust the basic quantization parameter according to the coding bit depth and the time domain hierarchy to obtain a second quantization parameter;

[0092] For the frame with the time domain hierarchy being non-zero, take the difference between the second quantization parameter and the coding bit depth as a third quantization parameter, adjust the third quantization parameter based on the second quantization scaling, the second quantization offset and the second quantization boundary to obtain a target quantization parameter, and for the frame with the time domain hierarchy being zero, take the second quantization parameter as the target quantization parameter;

[0093] Detect whether all frames are processed, and if not, return to the step of obtaining the current frame parameters;

[0094] If yes, perform quantization operation, execute DCT (Discrete Cosine Transform) transformation, entropy coding, and thus generate a code stream.

[0095] The test conditions of the present application all adopt the AVS3 ultra-low-delay general test conditions, the existing HPM15.8 is taken as an anchor, the changes of HPM15.8 and the present scheme are taken as a test, and the configuration file adopts encode_LDP.cfg and encode_LD.cfg. The test data can come from the low-delay scene coding sequence of the low-delay scene standard test sequence of the AVS3 working group, which can be divided into four categories, SC (screen content), RC (remote control), OG (online game) and MSS (instant messaging). According to the general test conditions, the SC and RC sequences select encode_LDP.cfg, and the OG and MSS select encode_LD.cfg. The test data is as shown in the following table 1.

[0096] Table 1 Test data

[0097]

[0098] Among them, the result curve of the program_vidyo-FullHD-8bit sequence in the SC sequence is as shown in the following figure: Figures 3 to 6 The result curve of the AOV sequence in the OG sequence is as shown in the following figure: Figures 7 to 10As shown, the solid line in the figure represents anchor, the dashed line represents test, the solid circle represents anchor QP=[45 38 32 27], the solid square represents anchor QP=[45 38 32 27], the abscissa represents the code rate bitrate, the unit is kbps, and the ordinate represents the peak signal-to-noise ratio psnr. Through analysis of experimental data and reference software, the linear relationship between the basic quantization parameter and the second offset is determined, which shows that the conversion information of the application can adaptively adjust the second offset according to the change of the basic quantization parameter and the time domain hierarchical result, so as to realize accurate quantization of coding.

[0099] Please refer to Figure 11 , Figure 11 A structure schematic diagram of an AVS3 video coding device provided by an embodiment of the application.

[0100] An AVS3 video coding device provided by an embodiment of the application can include:

[0101] The target video acquisition module 101 is configured to acquire a target video to be coded.

[0102] The basic quantization parameter acquisition module 102 is configured to acquire a basic quantization parameter determined according to a set coding mode.

[0103] The set data acquisition module 103 is configured to acquire a first quantization scale, a first quantization offset, a first quantization boundary and a first quantization step of the set coding mode.

[0104] The second quantization step determination module 104 is configured to acquire a second quantization step of AVS3 video coding.

[0105] The conversion information generation module 105 is configured to generate conversion information between the second quantization step and the first quantization step.

[0106] The conversion module 106 is configured to convert the first quantization scale, the first quantization offset and the first quantization boundary respectively according to the conversion information, to obtain a second quantization scale, a second quantization offset and a second quantization boundary.

[0107] The quantization parameter adjustment module 107 is configured to adjust the basic quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary, to obtain a target quantization parameter.

[0108] The AVS3 video coding module 108 is configured to perform AVS3 video coding on the target video based on the target quantization parameter, to obtain an AVS3 video coding result.

[0109] The conversion information generation module of the AVS3 video coding device provided by an embodiment of the application can include:

[0110] The first ratio generating unit is configured to generate a first ratio between the second quantization step and the first quantization step.

[0111] The conversion information generating unit is configured to generate conversion information between the second quantization step and the first quantization step according to the first ratio.

[0112] The AVS3 video coding device provided by the embodiment of the present application can comprise:

[0113] The first adjusting unit is configured to adjust the base quantization parameter according to the coding bit depth to obtain a first quantization parameter.

[0114] The second adjusting unit is configured to adjust the first quantization parameter according to the temporal layering to obtain a second quantization parameter.

[0115] The third adjusting unit is configured to, for a frame with a non-zero temporal layering, take a difference value between the second quantization parameter and the coding bit depth as a third quantization parameter, process the third quantization parameter based on a second quantization scaling and a second quantization offset to generate a first offset, perform boundary constraint on the first offset according to a second quantization boundary to obtain a second offset, and adjust the second quantization parameter based on the second offset to obtain a target quantization parameter.

[0116] The third adjusting unit can be configured to: generate a product value of the second quantization offset and the third quantization parameter as first processing data, generate a sum value between the first processing data and the second quantization scaling and a set compensation value as second processing data, and perform rounding processing on the second processing data to obtain the first offset.

[0117] The third adjusting unit can be configured to: in response to the first offset being less than or equal to zero, take zero as the second offset; in response to the first offset being greater than zero and less than a value of the second quantization boundary, take the first offset as the second offset; and in response to the first offset being greater than or equal to the value of the second quantization boundary, take the value of the second quantization boundary as the second offset.

[0118] The third adjusting unit can be configured to generate a sum value of the second offset and the second quantization parameter as the target quantization parameter.

[0119] The AVS3 video coding device provided by the embodiment of the present application can further comprise:

[0120] The fourth adjusting unit is configured to adjust the first quantization parameter according to the time domain layering to obtain a second quantization parameter, and then take the second quantization parameter as the target quantization parameter for a frame with a time domain layering of zero.

[0121] The application further provides an electronic device and a computer readable storage medium, both of which have the corresponding effects of the AVS3 video encoding method provided in the embodiments of the application. Please refer to Figure 12 , Figure 12 The application provides a structural schematic diagram of an electronic device.

[0122] The electronic device provided in the embodiments of the application comprises a memory 201 and a processor 202, the memory 201 stores a computer program, and the processor 202 implements the steps of the AVS3 video encoding method described in any of the above embodiments when executing the computer program.

[0123] Please refer to Figure 13 The electronic device provided in the embodiments of the application can further comprise: an input port 203 connected with the processor 202, configured to transmit a command input by the outside to the processor 202; a display unit 204 connected with the processor 202, configured to display the processing result of the processor 202 to the outside; and a communication module 205 connected with the processor 202, configured to realize the communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc. The communication mode adopted by the communication module 205 includes but is not limited to Mobile High-Definition Link (MHL), Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), wireless connection: WIreless Fidelity (WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and IEEE 802.11s-based communication technology.

[0124] The computer readable storage medium provided in the embodiments of the application stores a computer program, and the computer program is executed by the processor to implement the steps of the AVS3 video encoding method described in any of the above embodiments.

[0125] The computer readable storage medium involved in the present application includes random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, compact disc read-only memory (CD-ROM), or any other form of storage medium known in the technical field.

[0126] The computer program product provided in the embodiment of the present application comprises computer programs / instructions, which, when executed by a processor, implement the steps of the AVS3 video encoding method described in any of the above embodiments.

[0127] The related parts of the AVS3 video encoding device, electronic equipment and computer readable storage medium provided in the embodiments of the present application are described in detail in the corresponding part of the AVS3 video encoding method provided in the embodiments of the present application, which will not be described here. In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail, so as not to be too verbose.

[0128] It should also be noted that, in this document, relational terms such as first and second, and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element preceded by "comprises... " does not, without more limitations, foreclose the existence of additional identical elements in the process, method, article, or apparatus that includes the recited element.

[0129] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An AVS3 video encoding method, characterized by, The method comprises: acquiring a target video to be encoded; acquiring a basic quantization parameter determined according to a set encoding mode; acquiring a first quantization scale, a first quantization offset, a first quantization boundary and a first quantization step of the set encoding mode; acquiring a second quantization step of AVS3 video encoding; generating conversion information between the second quantization step and the first quantization step; respectively converting the first quantization scale, the first quantization offset and the first quantization boundary according to the conversion information to obtain a second quantization scale, a second quantization offset and a second quantization boundary; adjusting the basic quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary to obtain a target quantization parameter; performing AVS3 video encoding on the target video based on the target quantization parameter to obtain an AVS3 video encoding result; wherein the adjusting the basic quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary to obtain a target quantization parameter comprises: adjusting the basic quantization parameter according to an encoding bit depth to obtain a first quantization parameter; adjusting the first quantization parameter according to a time domain hierarchy to obtain a second quantization parameter; for a frame with a non-zero time domain hierarchy, taking a difference value between the second quantization parameter and the encoding bit depth as a third quantization parameter, processing the third quantization parameter based on the second quantization scale and the second quantization offset to generate a first offset; performing boundary constraint on the first offset according to the second quantization boundary to obtain a second offset; adjusting the second quantization parameter based on the second offset to obtain a target quantization parameter.

2. The AVS3 video encoding method of claim 1, wherein, The generating conversion information between the second quantization step and the first quantization step comprises: generating a first ratio between the second quantization step and the first quantization step; generating conversion information between the second quantization step and the first quantization step according to the first ratio.

3. The AVS3 video encoding method of claim 1, wherein, The processing the third quantization parameter based on the second quantization scale and the second quantization offset to generate a first offset comprises: generating a product value of the second quantization offset and the third quantization parameter as first processing data; generating a sum value between the first processing data and the second quantization scale and a set compensation value as second processing data; performing rounding processing on the second processing data to obtain a first offset.

4. The AVS3 video encoding method of claim 3, wherein, The performing boundary constraint on the first offset according to the second quantization boundary to obtain a second offset comprises: in response to the first offset being less than or equal to zero, taking zero as the second offset; in response to the first offset being greater than zero and less than a value of the second quantization boundary, taking the first offset as the second offset; in response to the first offset being greater than or equal to the value of the second quantization boundary, taking the value of the second quantization boundary as the second offset.

5. The AVS3 video encoding method of claim 1, wherein, The adjusting the second quantization parameter based on the second offset to obtain a target quantization parameter comprises: generating a sum value of the second offset and the second quantization parameter as a target quantization parameter.

6. The AVS3 video encoding method of claim 1, wherein, The method further comprises: for a frame with a time domain layer of 0, taking the second quantization parameter as a target quantization parameter.

7. An AVS3 video encoding apparatus, characterized by, The method comprises: an object video acquisition module configured to acquire a target video to be encoded; a basic quantization parameter acquisition module configured to acquire a basic quantization parameter determined according to a set encoding mode; a set data acquisition module configured to acquire a first quantization scale, a first quantization offset, a first quantization boundary and a first quantization step of the set encoding mode; a second quantization step determination module configured to acquire a second quantization step of AVS3 video encoding; a conversion information generation module configured to generate conversion information between the second quantization step and the first quantization step; a conversion module configured to convert the first quantization scale, the first quantization offset and the first quantization boundary according to the conversion information to obtain a second quantization scale, a second quantization offset and a second quantization boundary; a quantization parameter adjustment module configured to adjust the basic quantization parameter based on the second quantization scale, the second quantization offset and the second quantization boundary to obtain a target quantization parameter; an AVS3 video encoding module configured to perform AVS3 video encoding on the target video based on the target quantization parameter to obtain an AVS3 video encoding result. The quantization parameter adjustment module comprises: a first adjustment unit configured to adjust the basic quantization parameter according to an encoding bit depth to obtain a first quantization parameter; a second adjustment unit configured to adjust the first quantization parameter according to a time domain layer to obtain a second quantization parameter; a third adjustment unit configured to, for a frame with a time domain layer of 0, take the second quantization parameter and a difference between the encoding bit depth as a third quantization parameter, process the third quantization parameter based on the second quantization scale and the second quantization offset to generate a first offset, perform boundary constraint on the first offset according to the second quantization boundary to obtain a second offset, and adjust the second quantization parameter based on the second offset to obtain a target quantization parameter.

8. An electronic device, comprising: The method comprises: a memory configured to store a computer program; a processor configured to implement the steps of the AVS3 video encoding method according to any one of claims 1 to 6 when the computer program is executed.

9. A computer-readable storage medium, characterized in that, The computer program stored in the computer readable storage medium is executed by the processor to implement the steps of the AVS3 video encoding method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for controlling code rate of secondary AVS encoding of video signal

    CN101547349A

  • Video decoding method and device, video encoding method and device, equipment and storage medium

    CN111526368A