CN116132672A - Quantization parameter offset determination method and device in video coding - Google Patents
Quantization parameter offset determination method and device in video coding Download PDFInfo
- Publication number
- CN116132672A CN116132672A CN202310082340.2A CN202310082340A CN116132672A CN 116132672 A CN116132672 A CN 116132672A CN 202310082340 A CN202310082340 A CN 202310082340A CN 116132672 A CN116132672 A CN 116132672A
- Authority
- CN
- China
- Prior art keywords
- block
- quantization parameter
- coding
- pixels
- pixel
- 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.)
- Pending
Links
- 238000013139 quantization Methods 0.000 title claims abstract description 109
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000004364 calculation method Methods 0.000 claims abstract description 41
- 238000004590 computer program Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 8
- 230000002035 prolonged effect Effects 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 108091026890 Coding region Proteins 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012821 model calculation Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/146—Data rate or code amount at the encoder output
- H04N19/149—Data rate or code amount at the encoder output by estimating the code amount by means of a model, e.g. mathematical model or statistical model
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/172—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/182—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Algebra (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The embodiment of the application discloses a quantization parameter offset determining method and device in video coding, wherein the method comprises the following steps: acquiring a current video frame to be encoded, and determining the frame complexity of the video frame; determining operation pixels of a coding block in the video frame according to the frame complexity, wherein the number of the operation pixels is smaller than that of the coding block; and calculating the quantization parameter offset of the coding block according to the pixel value of the operation pixel and the set offset calculation model. According to the scheme, a calculation mechanism of the quantization parameter offset in video coding is optimized, and the video coding speed is improved on the premise of balancing video quality.
Description
Technical Field
The embodiment of the application relates to the technical field of video processing, in particular to a quantization parameter offset determination method and device in video coding.
Background
Video is widely used in various fields as an information transmission and display mode of the current mainstream. In order to improve the transmission and storage efficiency of video, lossy coding compression is usually performed on video, and in lossy video coding standards, the compression level and bit rate of a video coding sequence can be controlled by quantization parameters.
In the related art, in order to improve the performance of a video encoder and subjective video quality, quantization parameter adaptation techniques are applied to the video encoder, which can implement allocation of different quantization parameter values to different portions of video frames. However, when the video frame is large, the arithmetic processing time will be significantly increased when calculating the quantization parameter offset of each encoding block in the video frame, thereby resulting in a decrease in the performance of the video encoder and an increase in the overall time consumption of video encoding.
Disclosure of Invention
The embodiment of the application provides a method and a device for determining quantization parameter offset in video coding, which solve the problems that in the related art, when a video frame is large, the operation processing time is obviously increased, so that the performance of a video encoder is reduced, the whole time consumption of the video coding is prolonged, the calculation mechanism of the quantization parameter offset in the video coding is optimized, and the video coding speed is improved on the premise of balancing the video quality.
In a first aspect, an embodiment of the present application provides a quantization parameter offset determining method in video coding, where the method includes:
acquiring a current video frame to be encoded, and determining the frame complexity of the video frame;
determining operation pixels of a coding block in the video frame according to the frame complexity, wherein the number of the operation pixels is smaller than that of the coding block;
and calculating the quantization parameter offset of the coding block according to the pixel value of the operation pixel and the set offset calculation model.
In a second aspect, an embodiment of the present application further provides a quantization parameter offset determining apparatus in video coding, including:
the complexity determining module is configured to acquire a video frame to be currently encoded and determine the frame complexity of the video frame;
a pixel determination module configured to determine, according to the frame complexity, operation pixels of a coding block in the video frame, the number of operation pixels being smaller than the number of pixels of the coding block;
and the offset calculating module is configured to calculate the quantization parameter offset of the coding block according to the pixel value of the operation pixel and the set offset calculating model.
In a third aspect, embodiments of the present application further provide a quantization parameter offset determination apparatus in video coding, where the apparatus includes:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the quantization parameter offset determination method in video coding described in embodiments of the present application.
In a fourth aspect, embodiments of the present application also provide a non-volatile storage medium storing computer-executable instructions that, when executed by a computer processor, are configured to perform a quantization parameter offset determination method in video coding as described in embodiments of the present application.
In a fifth aspect, embodiments of the present application further provide a computer program product, which includes a computer program stored in a computer readable storage medium, from which at least one processor of the apparatus reads and executes the computer program, so that the apparatus performs the quantization parameter offset determination method in video encoding according to embodiments of the present application.
In the embodiment of the application, when the quantization parameter offset of a coding block in a video frame is calculated, the video frame to be coded is obtained, the frame complexity of the video frame is determined, the operation pixels of the coding block in the video frame are determined according to the frame complexity, wherein the number of the operation pixels is smaller than the number of the pixels of the coding block, and then the quantization parameter offset of the coding block is calculated according to the pixel values of the operation pixels and a set offset calculation model. In the original calculation process of the quantization parameter offset of the coding block, the pixel value of each pixel of the coding block is required to be used for calculation, the number of the selected operation pixels is smaller than that of the pixels of the coding block, the data operation amount can be reduced, meanwhile, the selection of the operation pixels is based on the frame complexity of video frames, the higher the frame complexity is, the more the number of the selected operation pixels is, the lower the frame complexity is, the less the number of the selected operation pixels is, on the premise of balancing the video quality, the calculation mechanism of the quantization parameter offset in video coding is optimized, the calculation speed of the quantization parameter offset can be improved, the problem that when the video frames are larger, the operation processing time in the video coding process is obviously increased, the performance of a video coder is reduced, the whole time consumption of video coding is prolonged is solved, and the video coding speed is improved.
Drawings
Fig. 1 is a flowchart of a quantization parameter offset determination method in video coding according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for determining an operand according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for determining a block level corresponding to calculating a quantization parameter offset according to an embodiment of the present application;
fig. 4 is a schematic diagram of coding block division performed by a video frame fixed size unit according to an embodiment of the present application;
fig. 5 is a schematic diagram of selecting a pixel point according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another pixel selection according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a quantization parameter offset determining device in video coding according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a quantization parameter offset determining apparatus in video coding according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the embodiments of the application and are not limiting of the embodiments of the application. It should be further noted that, for convenience of description, only some, but not all of the structures related to the embodiments of the present application are shown in the drawings.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The quantization parameter offset determining method provided by the embodiment of the invention can be applied to the video coding process, and the calculation process of the quantization parameter offset is carried out for the coding block of the video frame. For example, after the computing device generates the video file, a video encoding process is performed when the video file is uploaded or stored locally. The execution subject of the solution may be a computing device corresponding to the client or the server, where the computing device may be a desktop, a notebook, a tablet, a smart phone, and the like.
Fig. 1 is a flowchart of a quantization parameter offset determining method in video coding according to an embodiment of the present application, which specifically includes the following steps:
step S101, obtaining a current video frame to be encoded, and determining the frame complexity of the video frame.
In one embodiment, each video frame in a video file comprised of a sequence of video frames is encoded during video encoding. For the current video frame to be encoded, its complexity is determined, here denoted as the frame complexity of the video frame. The frame complexity represents the complexity of the current video frame, for example, the more complex the image picture display content of the video frame is, the higher the frame complexity is; accordingly, if the picture display content is relatively flat, its frame complexity is relatively low.
Alternatively, the frame complexity may be determined by determining the obtained intra-frame coding cost of the video frame as the frame complexity of the current video frame. The intra-frame coding cost may be calculated from the encoder when the video frame is preprocessed. Optionally, a plurality of pixel points at different positions may be randomly selected in the video frame, and the frame complexity of the video frame is determined according to the pixel value difference of the selected pixel points, where the larger the difference is, the higher the frame complexity is, and conversely, the lower the corresponding frame complexity is.
Step S102, determining operation pixels of the coding block in the video frame according to the frame complexity, wherein the number of the operation pixels is smaller than that of the coding block.
In one embodiment, a video frame is divided into a plurality of coding blocks, when the quantization parameter offset is calculated, the coding blocks with preset sizes are determined, for example, the quantization parameter offset corresponding to the coding blocks with the size of 8 x 8 or the size of 16 x 16 is determined, wherein the quantization parameter offset represents the offset degree of a quantization parameter, the quantization parameter reflects the space detail compression condition when the video frame is coded, and optionally, the smaller the quantization parameter value is, the more the detail representing the video frame image is kept, and the corresponding coding rate is larger; otherwise, the larger the quantization parameter value is, the more detail loss in the video frame image is represented, and the corresponding coding rate is smaller. Taking the quantization parameter offset corresponding to the coding block with the size of 16×16 as an example, assuming that the video frame size is 256×256, it can be divided into 256 coding blocks with the size of 16×16, and of course, for some cases with a fixed unit size as a division reference, if the fixed unit size is 64×64, the video frame size can be correspondingly divided into 16 coding blocks with the size of 16×16. In the related art, taking the quantization parameter offset calculated for a coding block of 16×16 size as an example, it is necessary to perform an operation using the pixel value of each pixel in the coding block of 16×16 size. In this scheme, the number of operation pixels of the coding block is determined based on the frame complexity, wherein the number of operation pixels is smaller than the number of pixels of the coding block, that is, the number of operation pixels is calculated without using all the pixels of the coding block.
In one embodiment, the different frame complexity corresponds to a different proportional number of selected operational pixels, optionally, for example, when the frame complexity is determined to be medium, the quantization parameter offset is operated with half of the pixels in the encoded block, and when the frame complexity is determined to be low, the quantization parameter offset is operated with quarter of the pixels in the encoded block.
In another embodiment, the calculation is performed at different block levels when performing the calculation of the quantization parameter offset of the encoded block. Illustratively, taking the example of a quantization parameter offset with a calculated coding block size of 16×16, it can be calculated at different block levels of 16×16, 32×32, or 64×64. Taking the level of 32×32 block size as an example, selecting an operation pixel in the 32×32 blocks, calculating by using the pixel value of the selected operation pixel, and assigning the calculation result to each 16×16 block in the 32×32 blocks, correspondingly, when one 32×32 block is calculated, calculating the next 32×32 block until each 32×32 block of the video frame is calculated; taking the level of 64×64 block sizes as an example, selecting an operation pixel in the 64×64 blocks, calculating by using the pixel value of the selected operation pixel, and assigning the calculation result to each 16×16 block in the 64×64 blocks, correspondingly, when one 64×64 block is calculated, calculating the next 64×64 block until each 64×64 block of the video frame is calculated.
In one embodiment, the corresponding block level may be determined according to the frame complexity of the video frame and a set threshold value, and the quantization parameter offset of the encoded block is calculated in units of calculation at the block level. Optionally, in determining an operation pixel of a coding block in a video frame according to a frame complexity, as shown in fig. 2, fig. 2 is a flowchart of a method for determining an operation pixel according to an embodiment of the present application, where the method includes:
step S1021, determining the corresponding block level when calculating the quantization parameter offset according to the frame complexity and the set threshold.
Optionally, when determining the block level corresponding to the quantization parameter offset according to the frame complexity and the set threshold, as shown in fig. 3, fig. 3 is a flowchart of a method for determining the block level corresponding to the quantization parameter offset according to the embodiment of the present application, where the method includes:
step S10211, determining that the corresponding block level is the first block level when calculating the quantization parameter offset when the frame complexity is less than or equal to the first threshold.
Step S10212, when the frame complexity is greater than the first threshold, determining that the corresponding block level is the second block level when calculating the quantization parameter offset.
The block size corresponding to the first block level is greater than the block size corresponding to the second block level, for example, the block size corresponding to the first block level is 32×32, and the block size corresponding to the second block level is 16×16. Further, a second threshold may be further set, where the second threshold is smaller than the first threshold, and when the frame complexity is greater than the second threshold and smaller than or equal to the first threshold, determining that the corresponding block level when calculating the quantization parameter offset is the first block level, and when the frame complexity is less than or equal to the second threshold, determining that the corresponding block level when calculating the quantization parameter offset is the third block level, where the size of the third block level is greater than the size of the first block level, for example, the size of the third block level may be 64×64.
Alternatively, the first and second thresholds may illustratively be 90 and 70, respectively, taking the frame complexity as an example characterized by the intra-coding cost.
Step S1022, determining the operation pixels of the coding block in the video frame according to the block level.
In one embodiment, when calculating the quantization parameter offset of the coding block for different calculation block levels, the selection of the operation pixels can be correspondingly performed based on the block level. Alternatively, it may be: the operational pixels of the encoded block in the video frame are determined based on the block level and the set operational pixel selection rules. Wherein, different block levels are correspondingly provided with different operation pixel selection rules. Optionally, taking the calculated size of the coding block as 16×16 as an example, the first block level is 32×32, the second block level is 16×16, the third block level is 64×64, when the block levels are the first block level and the third block level, the selection rules are the same, and the fourth pixel in the coding block is selected as an operation pixel, or of course, the fourth pixel in the coding block is selected as an operation pixel by the first block level, and the fifth or sixth pixel in the coding block is selected as an operation pixel by the third block level; in the case where the block level is the second block level, half of the pixels in the encoded block are selected as the operation pixels.
Alternatively, when half of the pixels in the coding block are selected as the operation pixels, the selection rule may be: the pixels corresponding to any one of the odd rows, the odd columns, the even rows or the even columns in the coding block are selected as the operation pixels, and half of the pixel points can be selected as the operation pixels in a diagonal dividing mode. Fig. 4 is a schematic diagram of coding block division by a video frame fixed size unit according to an embodiment of the present application, as shown in fig. 4, the fixed size unit is 64×64, and assuming that the video frame image size is 256×256, it can divide 16 units with 64×64 sizes, and in the process of determining the quantization parameter offset of the 16×16 coding block, the 64×64 units are correspondingly divided into 16 16×16 coding blocks. At this time, it is assumed that when the quantization parameter offset is calculated by determining the 16×16 encoded block by the frame complexity, a 16×16 block level, that is, the second block level described in the foregoing example is used for the operation, and half of the pixels are selected as the operation pixels for each 16×16 encoded block. As shown in fig. 5, fig. 5 is a schematic diagram of pixel selection provided in the embodiment of the present application, in which, for a coding block with a size of 16×16, pixels in an even row are selected as operation pixels, and then half of the pixels are involved in the calculation process of the quantization parameter offset. In another embodiment, for example, when calculating the quantization parameter offset of a coding block with a size of 16×16, the corresponding block level is 32×32, and a quarter of pixels are selected as operation pixels, as shown in fig. 6, fig. 6 is another schematic diagram of selecting pixels according to the embodiment of the present application, and as shown in the figure, the pixels corresponding to odd rows and odd columns are selected as operation pixels, and the total of the quarter of pixels participate in the calculation process of the quantization parameter offset.
And step S103, calculating the quantization parameter offset of the coding block according to the pixel value of the operation pixel and the set offset calculation model.
In one embodiment, the quantization parameter offset of the encoded block is calculated based on the pixel value of the selected operated pixel, i.e., the operated pixel, and the set offset calculation model. Alternatively, the offset calculation model may be a model for calculating a quantization parameter offset in the encoder, where parameters of the model are adaptively adjusted by fitting the collected data to obtain the parameters to be used when calculating using part of the operation pixels.
Alternatively, one calculation method may be: and calculating a pixel variance value according to the pixel value of the operation pixel, and carrying the pixel variance value into a preset function to calculate and obtain the quantization parameter offset of the coding block. The pixel variance value is obtained by subtracting the product of the sum of the pixel values of all the operation pixels and the average pixel value from the sum of the squares of the pixel values of all the operation pixels for the operation pixels. And after obtaining the pixel variance value, carrying the pixel variance value into a preset function to calculate the quantization parameter offset of the coding block, wherein the preset function can be a pow function provided by an encoder, and an original model calculation formula is as follows:
qp_offset=pow(variance+1,0.1)
wherein qp_offset is a quantization parameter offset, pow () is a preset function, variance is a pixel variance value, and 0.1 is a parameter of the original calculation model, and after adaptive adjustment in this scheme, the parameter may be adjusted to be deformed to 0.11, for example.
In one embodiment, when calculating the quantization parameter offset of the encoded block, the quantization parameter offset of the encoded block of the block size corresponding to each block level is calculated in turn according to the corresponding block level. For example, assuming that the determined quantization parameter offset of the encoded block is a quantization parameter offset of an encoded block with a size of 16×16 and the corresponding block level is 32×32, for a block with a size level of 32×32, a quarter pixel is selected as an operation pixel to perform calculation, for example, the calculated pixel variance value of the quarter pixel is substituted into the foregoing offset calculation model to obtain a calculation result of the quantization parameter offset, and the calculation result of the quantization parameter offset is used as the quantization parameter offset of each of the encoded blocks with sizes of 16×16, which are correspondingly divided in the block with a size of 32×32, optionally, the calculation result may be stored in a cache. Correspondingly, after the block of the 32×32 size level is calculated, calculating the next block of the 32×32 size until all the blocks divided into the blocks of the 32×32 size of the video frame are calculated.
From the above, when calculating the quantization parameter offset of the coding block in the video frame, the video frame to be coded is obtained, the frame complexity of the video frame is determined, the operation pixels of the coding block in the video frame are determined according to the frame complexity, wherein the number of the operation pixels is smaller than the number of the pixels of the coding block, and then the quantization parameter offset of the coding block is calculated according to the pixel value of the operation pixels and the set offset calculation model. In the original calculation process of the quantization parameter offset of the coding block, the pixel value of each pixel of the coding block is required to be used for calculation, the number of the selected operation pixels is smaller than that of the pixels of the coding block, the data operation amount can be reduced, meanwhile, the selection of the operation pixels is based on the frame complexity of video frames, the higher the frame complexity is, the more the number of the selected operation pixels is, the lower the frame complexity is, the less the number of the selected operation pixels is, the calculation mechanism of the quantization parameter offset in video coding is optimized on the premise of balancing the video quality, the problem that when the video frames are larger, the operation processing time is obviously increased, the performance of a video encoder is further reduced, the whole time consumption of video coding is prolonged is solved, and the video coding speed is improved.
Fig. 7 is a block diagram of a quantization parameter offset determining apparatus in video coding according to an embodiment of the present application, where the apparatus is configured to execute the quantization parameter offset determining method in video coding according to the foregoing embodiment, and the apparatus has functional modules and beneficial effects corresponding to the executing method. As shown in fig. 7, the apparatus specifically includes: a complexity determination module 101, a pixel determination module 102, and an offset calculation module 103, wherein,
the complexity determining module 101 is configured to acquire a video frame to be currently encoded and determine the frame complexity of the video frame;
a pixel determination module 102 configured to determine, according to the frame complexity, operation pixels of a coding block in the video frame, the number of operation pixels being smaller than the number of pixels of the coding block;
and the offset calculating module 103 is configured to calculate the quantization parameter offset of the coding block according to the pixel value of the operation pixel and the set offset calculating model.
According to the scheme, when the quantization parameter offset of the coding block in the video frame is calculated, the video frame to be coded is obtained, the frame complexity of the video frame is determined, the operation pixels of the coding block in the video frame are determined according to the frame complexity, the number of the operation pixels is smaller than that of the coding block, and then the quantization parameter offset of the coding block is calculated according to the pixel values of the operation pixels and the set offset calculation model. In the original calculation process of the quantization parameter offset of the coding block, the pixel value of each pixel of the coding block is required to be used for calculation, the number of the selected operation pixels is smaller than that of the pixels of the coding block, the data operation amount can be reduced, meanwhile, the selection of the operation pixels is based on the frame complexity of video frames, the higher the frame complexity is, the more the number of the selected operation pixels is, the lower the frame complexity is, the less the number of the selected operation pixels is, the calculation mechanism of the quantization parameter offset in video coding is optimized on the premise of balancing the video quality, the problem that when the video frames are larger, the operation processing time is obviously increased, the performance of a video encoder is further reduced, the whole time consumption of video coding is prolonged is solved, and the video coding speed is improved.
In one possible embodiment, the pixel determination module 102 is configured to:
determining a corresponding block level when calculating the quantization parameter offset according to the frame complexity and a set threshold;
and determining the operation pixels of the coding blocks in the video frames according to the block levels.
In one possible embodiment, the pixel determination module 102 is configured to:
determining that the corresponding block level is a first block level when calculating the quantization parameter offset under the condition that the frame complexity is smaller than or equal to a first threshold;
and under the condition that the frame complexity is larger than the first threshold value, determining that the corresponding block level when the quantization parameter offset is calculated is a second block level, wherein the block size corresponding to the first block level is larger than the block size corresponding to the second block level.
In one possible embodiment, the pixel determination module 102 is configured to:
and determining the operation pixels of the coding block in the video frame based on the block level and the set operation pixel selection rule.
In one possible embodiment, the pixel determination module 102 is configured to:
selecting one-fourth of pixels in the coding block as operation pixels under the condition that the block level is a first block level;
and selecting half of pixels in the coding block as operation pixels under the condition that the block level is the second block level.
In one possible embodiment, the pixel determination module 102 is configured to:
selecting pixels corresponding to any one of odd rows, odd columns, even rows or even columns in the coding block as operation pixels;
the pixel determination module 102 is configured to:
and selecting any pixel corresponding to any one of odd rows and odd columns, odd rows and even columns, even rows and odd columns or even rows and even columns in the coding block as an operation pixel.
In one possible embodiment, the offset calculation module 103 is configured to:
calculating a pixel variance value according to the pixel value of the operation pixel;
and carrying the pixel variance value into a preset function to calculate and obtain the quantization parameter offset of the coding block.
Fig. 8 is a schematic structural diagram of a quantization parameter offset determination apparatus in video coding according to an embodiment of the present application, and as shown in fig. 8, the apparatus includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of processors 201 in the device may be one or more, one processor 201 being taken as an example in fig. 8; the processor 201, memory 202, input devices 203, and output devices 204 in the apparatus may be connected by a bus or other means, for example in fig. 8. The memory 202 is used as a computer readable storage medium for storing software programs, computer executable programs and modules, such as program instructions/modules corresponding to the quantization parameter offset determination method in video coding in the embodiments of the present application. The processor 201 executes various functional applications of the apparatus and data processing by executing software programs, instructions and modules stored in the memory 302, i.e., implements the quantization parameter offset determination method in video coding described above. The input means 203 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output device 204 may include a display device such as a display screen.
The present application also provides a non-volatile storage medium containing computer executable instructions, which when executed by a computer processor, are configured to perform a quantization parameter offset determination method in video coding described in one of the above embodiments, where the method includes:
acquiring a current video frame to be encoded, and determining the frame complexity of the video frame;
determining operation pixels of a coding block in the video frame according to the frame complexity, wherein the number of the operation pixels is smaller than that of the coding block;
and calculating the quantization parameter offset of the coding block according to the pixel value of the operation pixel and the set offset calculation model.
It should be noted that, in the embodiment of the quantization parameter offset determining device in video coding, each unit and module included in the device are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present application.
In some possible implementations, various aspects of the methods provided herein may also be implemented in the form of a program product comprising program code for causing a computer device to perform the steps of the methods described herein above according to various exemplary embodiments of the present application, when the program product is run on the computer device, e.g., the computer device may perform the quantization parameter offset determination method in video coding as described in the examples herein. The program product may be implemented using any combination of one or more readable media.
Claims (11)
1. A quantization parameter offset determination method in video coding, comprising:
acquiring a current video frame to be encoded, and determining the frame complexity of the video frame;
determining operation pixels of a coding block in the video frame according to the frame complexity, wherein the number of the operation pixels is smaller than that of the coding block;
and calculating the quantization parameter offset of the coding block according to the pixel value of the operation pixel and the set offset calculation model.
2. The method according to claim 1, wherein said determining the operational pixels of the encoded blocks in the video frame according to the frame complexity comprises:
determining a corresponding block level when calculating the quantization parameter offset according to the frame complexity and a set threshold;
and determining the operation pixels of the coding blocks in the video frames according to the block levels.
3. The method for determining quantization parameter offset in video coding according to claim 2, wherein said determining a corresponding block level when calculating quantization parameter offset according to the frame complexity and a set threshold value comprises:
determining that the corresponding block level is a first block level when calculating the quantization parameter offset under the condition that the frame complexity is smaller than or equal to a first threshold;
and under the condition that the frame complexity is larger than the first threshold value, determining that the corresponding block level when the quantization parameter offset is calculated is a second block level, wherein the block size corresponding to the first block level is larger than the block size corresponding to the second block level.
4. The method according to claim 2, wherein said determining the operation pixels of the encoded blocks in the video frame according to the block level comprises:
and determining the operation pixels of the coding block in the video frame based on the block level and the set operation pixel selection rule.
5. The method according to claim 4, wherein determining the operation pixels of the encoded block in the video frame based on the block level and the set operation pixel selection rule comprises:
selecting one-fourth of pixels in the coding block as operation pixels under the condition that the block level is a first block level;
and selecting half of pixels in the coding block as operation pixels under the condition that the block level is the second block level.
6. The method according to claim 5, wherein selecting half of the pixels in the encoded block as operation pixels comprises:
selecting pixels corresponding to any one of odd rows, odd columns, even rows or even columns in the coding block as operation pixels;
the selecting the quarter pixel in the coding block as the operation pixel includes:
and selecting any pixel corresponding to any one of odd rows and odd columns, odd rows and even columns, even rows and odd columns or even rows and even columns in the coding block as an operation pixel.
7. The method according to any one of claims 1 to 6, wherein the calculating the quantization parameter offset of the encoded block according to the pixel value of the operation pixel and the set offset calculation model includes:
calculating a pixel variance value according to the pixel value of the operation pixel;
and carrying the pixel variance value into a preset function to calculate and obtain the quantization parameter offset of the coding block.
8. A quantization parameter offset determination apparatus in video coding, comprising:
the complexity determining module is configured to acquire a video frame to be currently encoded and determine the frame complexity of the video frame;
a pixel determination module configured to determine, according to the frame complexity, operation pixels of a coding block in the video frame, the number of operation pixels being smaller than the number of pixels of the coding block;
and the offset calculating module is configured to calculate the quantization parameter offset of the coding block according to the pixel value of the operation pixel and the set offset calculating model.
9. A quantization parameter offset determination apparatus in video coding, the apparatus comprising: one or more processors; storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the quantization parameter offset determination method in video coding of any of claims 1-7.
10. A non-transitory storage medium storing computer executable instructions which, when executed by a computer processor, are for performing the quantization parameter offset determination method in video coding of any one of claims 1-7.
11. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the quantization parameter offset determination method in video coding according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310082340.2A CN116132672A (en) | 2023-01-17 | 2023-01-17 | Quantization parameter offset determination method and device in video coding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310082340.2A CN116132672A (en) | 2023-01-17 | 2023-01-17 | Quantization parameter offset determination method and device in video coding |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116132672A true CN116132672A (en) | 2023-05-16 |
Family
ID=86300747
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310082340.2A Pending CN116132672A (en) | 2023-01-17 | 2023-01-17 | Quantization parameter offset determination method and device in video coding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116132672A (en) |
-
2023
- 2023-01-17 CN CN202310082340.2A patent/CN116132672A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021068598A1 (en) | Encoding method and device for screen sharing, and storage medium and electronic equipment | |
CN103188493B (en) | Image encoding apparatus and image encoding method | |
CN110602491A (en) | Intra-frame chroma prediction method, device and equipment and video coding and decoding system | |
WO2017041551A1 (en) | Spice protocol-based image transmission method and apparatus | |
CN107770525B (en) | Image coding method and device | |
CN114827662B (en) | Video resolution adaptive adjustment method, device, equipment and storage medium | |
CN108737818B (en) | Frame loss method and device under congestion network and terminal equipment | |
CN112437301B (en) | Code rate control method and device for visual analysis, storage medium and terminal | |
CN105208394B (en) | A kind of real-time digital image compression prediction technique and system | |
CN106572352A (en) | Keyframe size control method and device | |
CN116095355A (en) | Video display control method and device, equipment, medium and product thereof | |
CN110545417A (en) | image coding and decoding method for desktop scene and related device | |
CN109495742B (en) | Video frame coding method, device and equipment | |
CN104980764A (en) | Parallel coding/decoding method, device and system based on complexity balance | |
CN116760988B (en) | Video coding method and device based on human visual system | |
WO2023142715A1 (en) | Video coding method and apparatus, real-time communication method and apparatus, device, and storage medium | |
CN116132672A (en) | Quantization parameter offset determination method and device in video coding | |
CN116567246A (en) | AVC coding method and device | |
WO2021056216A1 (en) | Predicted value determination method, encoder, decoder, and computer storage medium | |
CN108668166B (en) | Coding method, device and terminal equipment | |
CN116320395A (en) | Image processing method, device, electronic equipment and readable storage medium | |
CN115442617A (en) | Video processing method and device based on video coding | |
CN111836051A (en) | Desktop image coding and decoding methods and related devices | |
CN113923453B (en) | Time domain filtering method and device for video, electronic equipment and storage medium | |
CN116546200A (en) | Mode skipping method, device, equipment and storage medium in video coding |
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 |