Method and apparatus for quantization parameter offset determination in video coding
By determining the frame complexity of video frames and selecting fewer operation pixels than the number of encoding blocks during video encoding, and calculating the quantization parameter offset, the problem of increased processing time when video frames are large is solved, thus improving the video encoding speed.
Patent Information
- Application Number
- CN202310082340.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-17
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2043-01-17
AI Technical Summary
When the video frame rate is large, the processing time of the video encoder increases significantly, resulting in a decrease in video encoding performance and an increase in overall processing time.
By obtaining the frame complexity of the video frame, it is determined that the number of operation pixels in the coding block is less than the number of pixels in the coding block. Based on the pixel value and offset of the operation pixels, the quantization parameter offset is calculated using a calculation model to reduce the amount of data computation.
The calculation mechanism for quantization parameter offset has been optimized, which improves video encoding speed and solves the problem of increased processing time when the video frame size is large.
Smart Images

Figure CN116132672B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video processing technology, and in particular to a method and apparatus for determining quantization parameter offset in video encoding. Background Technology
[0002] Video, as a mainstream method of information dissemination and display, is widely used in various fields. To improve the efficiency of video transmission and storage, lossy encoding and compression are usually applied to videos. In lossy video coding standards, the compression level and bit rate of the video coding sequence can be controlled by quantization parameters.
[0003] In related technologies, adaptive quantization parameter technology is applied to video encoders to improve their performance and subjective video quality. This technology can allocate different quantization parameter values to different parts of the video frame. However, when the video frame is large, the processing time for calculating the quantization parameter offset of each coded block in the video frame will increase significantly, resulting in a decrease in video encoder performance and an increase in the overall video encoding time. Summary of the Invention
[0004] This application provides a method and apparatus for determining the quantization parameter offset in video encoding, which solves the problem in related technologies that when the video frame size is large, the processing time increases significantly, leading to a decrease in the performance of the video encoder and an increase in the overall video encoding time. The method optimizes the calculation mechanism of the quantization parameter offset in video encoding, and improves the video encoding speed while balancing video quality.
[0005] In a first aspect, embodiments of this application provide a method for determining the quantization parameter offset in video coding, the method comprising:
[0006] Obtain the current video frame to be encoded and determine the frame complexity of the video frame;
[0007] The number of computed pixels in the coded block of the video frame is determined based on the frame complexity, and the number of computed pixels is less than the number of pixels in the coded block.
[0008] The quantization parameter offset of the coding block is calculated based on the pixel value of the operation pixel and the set offset calculation model.
[0009] Secondly, embodiments of this application also provide a device for determining quantization parameter offset in video encoding, comprising:
[0010] The complexity determination module is configured to acquire the current video frame to be encoded and determine the frame complexity of the video frame;
[0011] The pixel determination module is configured to determine the computational pixels of the coded block in the video frame based on the frame complexity, wherein the number of computational pixels is less than the number of pixels in the coded block;
[0012] The offset calculation module is configured to calculate the quantization parameter offset of the coding block based on the pixel value of the operation pixel and the set offset calculation model.
[0013] Thirdly, embodiments of this application also provide a device for determining quantization parameter offset in video encoding, the device comprising:
[0014] One or more processors;
[0015] Storage device for storing one or more programs.
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the quantization parameter offset determination method in video encoding as described in the embodiments of this application.
[0017] Fourthly, embodiments of this application also provide a non-volatile storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform the quantization parameter offset determination method in video encoding described in embodiments of this application.
[0018] Fifthly, embodiments of this application also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads from the computer-readable storage medium and executes the computer program, causing the device to perform the quantization parameter offset determination method in video encoding as described in embodiments of this application.
[0019] In this embodiment, when calculating the quantization parameter offset of a coding block in a video frame, the current video frame to be encoded is obtained, the frame complexity of the video frame is determined, and the number of computation pixels for the coding block in the video frame is determined based on the frame complexity. The number of computation pixels is less than the number of pixels in the coding block. Then, the quantization parameter offset of the coding block is calculated based on the pixel values of the computation pixels and the set offset calculation model. In the original calculation process of the quantization parameter offset of the coding block, it is necessary to use the pixel values of each pixel in the coding block for calculation. This scheme selects a smaller number of computation pixels than the number of pixels in the coding block, which reduces the amount of data computation. Furthermore, the selection of computation pixels is based on the frame complexity of the video frame; the higher the frame complexity, the more computation pixels are selected, and the lower the frame complexity, the fewer computation pixels are selected. By balancing video quality, the calculation mechanism of the quantization parameter offset in video encoding is optimized, which can improve the calculation speed of the quantization parameter offset. This solves the problem that when the video frame is large, the processing time during video encoding increases significantly, leading to a decrease in video encoder performance and an increase in the overall video encoding time, thus improving the video encoding speed. Attached Figure Description
[0020] Figure 1 A flowchart illustrating a method for determining quantization parameter offset in video coding, provided in an embodiment of this application;
[0021] Figure 2 A flowchart illustrating a method for determining computational pixels provided in an embodiment of this application;
[0022] Figure 3 A flowchart illustrating a method for determining the block level corresponding to the calculation of quantization parameter offset, provided in an embodiment of this application;
[0023] Figure 4 A schematic diagram illustrating the division of a video frame into coding blocks according to an embodiment of this application;
[0024] Figure 5 This is a schematic diagram of pixel selection provided in an embodiment of this application;
[0025] Figure 6 This is another schematic diagram of pixel selection provided in an embodiment of this application;
[0026] Figure 7 A structural block diagram of a quantization parameter offset determination device in video coding provided in this application embodiment;
[0027] Figure 8 This is a schematic diagram of a device for determining the quantization parameter offset in video encoding, provided in an embodiment of this application. Detailed Implementation
[0028] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the scope of the embodiments. Furthermore, it should be noted that, for ease of description, only the parts relevant to the embodiments of this application are shown in the accompanying drawings, not the entire structure.
[0029] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0030] The quantization parameter offset determination method provided in this application can be applied to the video encoding process, specifically the calculation of quantization parameter offsets for encoded blocks of video frames. For example, it can be used during the video encoding process when uploading or storing a video file locally after it has been generated by a computing device. The implementing entity of this method can be a computing device corresponding to a client or server; exemplary computing devices include desktop computers, laptops, tablets, and smartphones.
[0031] Figure 1 A flowchart of a method for determining quantization parameter offset in video coding, provided in this application embodiment, specifically includes the following steps:
[0032] Step S101: Obtain the current video frame to be encoded and determine the frame complexity of the video frame.
[0033] In one embodiment, during video encoding, each video frame in a video file consisting of a sequence of video frames is encoded. For the current video frame to be encoded, its complexity is determined, denoted here as the frame complexity. This frame complexity characterizes the degree of complexity of the current video frame; for example, the more complex the content displayed in the video frame, the higher its frame complexity; conversely, if the content displayed is relatively flat, its frame complexity is relatively low.
[0034] Optionally, the frame complexity can be determined by using the intra-frame coding cost of the acquired video frame as the frame complexity of the current video frame. This intra-frame coding cost can be calculated by the encoder during preprocessing of the video frame. Alternatively, multiple pixels at different positions can be randomly selected in the video frame, and the frame complexity can be determined based on the differences in pixel values of the selected pixels; a larger difference corresponds to a higher frame complexity, and vice versa.
[0035] Step S102: Determine the number of computed pixels in the coded block of the video frame based on the frame complexity, wherein the number of computed pixels is less than the number of pixels in the coded block.
[0036] In one embodiment, a video frame is divided into multiple coding blocks. When calculating the quantization parameter offset, a preset size coding block is determined, such as an 8*8 or 16*16 coding block. This quantization parameter offset characterizes the degree of quantization parameter offset. The quantization parameter reflects the spatial detail compression during video frame encoding. Optionally, a smaller quantization parameter value indicates that most details in the video frame image are preserved, resulting in a higher encoding bitrate; conversely, a larger quantization parameter value indicates that more details are lost in the video frame image, resulting in a lower encoding bitrate. For example, to determine the quantization parameter offset corresponding to a 16*16 coding block, assuming the video frame size is 256*256, it can be divided into 256 16*16 coding blocks. Of course, for cases where a fixed unit size is used as the division basis, such as a fixed unit size of 64*64, it can be divided into 16 16*16 coding blocks. In related technologies, taking the calculation of the quantization parameter offset of a 16*16 coded block as an example, it is necessary to use the pixel value of each pixel in the 16*16 coded block for calculation. In this scheme, the number of operation pixels of the coded block is determined based on the frame complexity, where the number of operation pixels is less than the number of pixels in the coded block, that is, the pixels of the entire coded block are not used for calculation.
[0037] In one embodiment, different frame complexities correspond to different proportions of the number of pixels selected for computation. Optionally, when the frame complexity is determined to be medium, half of the pixels in the coding block are used to calculate the quantization parameter offset, and when the frame complexity is determined to be low, one-quarter of the pixels in the coding block are used to calculate the quantization parameter offset.
[0038] In another embodiment, the quantization parameter offset of the coded block is calculated at different block levels. For example, taking the quantization parameter offset of a coded block size of 16*16 as an example, it can be calculated at different block levels such as 16*16, 32*32, or 64*64. For example, taking a 32x32 block size level, a calculation pixel is selected within the 32x32 block. The calculation is performed using the pixel value of the selected pixel, and the result is assigned to each 16x16 block within that 32x32 block. Similarly, once one 32x32 block has been calculated, the next 32x32 block is calculated, and so on, until all 32x32 blocks of the video frame have been calculated. Similarly, taking a 64x64 block size level, a calculation pixel is selected within the 64x64 block. The calculation is performed using the pixel value of the selected pixel, and the result is assigned to each 16x16 block within that 64x64 block. Similarly, once one 64x64 block has been calculated, the next 64x64 block is calculated, and so on, until all 64x64 blocks of the video frame have been calculated.
[0039] In one embodiment, the corresponding block level can be determined based on the frame complexity of the video frame and a set threshold, and the quantization parameter offset of the coded block can be calculated using this block level as the unit of computation. Optionally, when determining the computational pixels of the coded block in the video frame based on the frame complexity, such as... Figure 2 As shown, Figure 2 A flowchart of a method for determining operational pixels provided in this application embodiment includes:
[0040] Step S1021: Determine the block level corresponding to the calculation of the quantization parameter offset based on the frame complexity and the set threshold.
[0041] Optionally, when determining the block level corresponding to the calculation of the quantization parameter offset based on the frame complexity and the set threshold, it can be as follows: Figure 3 As shown, Figure 3 A flowchart illustrating a method for determining the block level corresponding to the calculation of quantization parameter offset, provided in this application embodiment, includes:
[0042] Step S10211: When the frame complexity is less than or equal to the first threshold, determine the block level corresponding to the calculation of the quantization parameter offset as the first block level.
[0043] Step S10212: If the frame complexity is greater than the first threshold, determine the block level corresponding to the calculation of the quantization parameter offset as the second block level.
[0044] In this design, the block size corresponding to the first block level is larger 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. Furthermore, a second threshold can be set, which is smaller than the first threshold. When the frame complexity is greater than the second threshold but less than or equal to the first threshold, the block level corresponding to the calculation of the quantization parameter offset is determined to be the first block level. When the frame complexity is less than or equal to the second threshold, the block level corresponding to the calculation of the quantization parameter offset is determined to be the third block level. The size of the third block level is larger than the size of the first block level; for example, the size of the third block level could be 64*64.
[0045] Optionally, taking the frame complexity as a representation of intra-frame coding cost as an example, the first threshold and the second threshold can be 90 and 70, respectively.
[0046] Step S1022: Determine the operational pixels of the coded blocks in the video frame according to the block level.
[0047] In one embodiment, when calculating the quantization parameter offset of the coding block at different computational block levels, the computational pixels can be selected based on that block level. Optionally, the computational pixels of the coding block in the video frame can be determined based on the block level and the set computational pixel selection rules. Different block levels correspond to different computational pixel selection rules. Optionally, taking a 16*16 coding block size as an example, the first block level size is 32*32, the second block level size is 16*16, and the third block level size is 64*64. When the block level is the first and third levels, the selection rules are the same: one-quarter of the pixels in the coding block are selected as computational pixels. Alternatively, one-quarter of the pixels in the coding block can be selected for computation at the first block level, while one-fifth or one-sixth of the pixels in the coding block can be selected at the third level. When the block level is the second block level, half of the pixels in the coding block are selected as computational pixels.
[0048] Optionally, when selecting half of the pixels in the coding block as the operation pixels, the selection rule can be: select the pixels corresponding to any one of the odd rows, odd columns, even rows, or even columns in the coding block as the operation pixels. Of course, half of the pixels can also be selected as operation pixels by dividing them with diagonal lines. Figure 4 This application provides a schematic diagram of a fixed-size video frame unit for coding block division, as shown in the embodiment of the present application. Figure 4As shown, the fixed-size unit is 64*64. Assuming the video frame image size is 256*256, it can be divided into 16 units of size 64*64. During the determination of the quantization parameter offset for the 16*16 coding block, this 64*64 unit is correspondingly divided into 16 16*16 coding blocks. At this point, assuming that the quantization parameter offset is calculated using the 16*16 block level (i.e., the second block level described in the previous example), half of the pixels in each 16*16 coding block are selected as the calculation pixels, the calculation is performed at the 16*16 block level. For example, as shown... Figure 5 As shown, Figure 5 This illustration shows a pixel selection method provided in an embodiment of the present application. For a 16*16 coded block, pixels in even-numbered rows are selected as computational pixels, meaning a total of half the pixels participate in the calculation of the quantization parameter offset. In another embodiment, for example, assuming the block level is 32*32 when calculating the quantization parameter offset of a 16*16 coded block, one-quarter of the pixels are selected as computational pixels. Figure 6 As shown, Figure 6 This is another pixel selection diagram provided in an embodiment of this application. As can be seen from the figure, the pixels corresponding to odd-numbered rows and odd-numbered columns are selected as operation pixels, and a total of one-quarter of the pixels participate in the calculation process of the quantization parameter offset.
[0049] Step S103: Calculate the quantization parameter offset of the coding block based on the pixel value of the operation pixel and the set offset calculation model.
[0050] In one embodiment, the quantization parameter offset of the coded block is calculated based on the pixel values of the selected pixels to be computed (i.e., the computed pixels) and the set offset calculation model. Optionally, the offset calculation model can be a model in the encoder used to calculate the quantization parameter offset, wherein the parameters of the model are adaptively adjusted. This adjustment can be achieved by fitting the collected data to obtain the corresponding parameters when using a subset of computed pixels for calculation.
[0051] Optionally, one calculation method is to calculate the pixel variance value based on the pixel values of the computed pixels, and then use this pixel variance value to calculate the quantization parameter offset of the encoding block using a preset function. Specifically, this pixel variance value, for computed pixels, is obtained by subtracting the product of the sum of the pixel values of all computed pixels and the average pixel value from the sum of the squares of all computed pixels. After obtaining the pixel variance value, it is then used to calculate the quantization parameter offset of the encoding block using a preset function, which can be the pow function provided by the encoder. The original model calculation formula is as follows:
[0052] qp_offset=pow(variance+1,0.1)
[0053] Where qp_offset is the quantization parameter offset, pow() is the preset function, variance is the pixel variance value, and 0.1 is the parameter of the original calculation model. After the adaptive adjustment in this scheme, for example, this parameter can be adjusted to 0.11.
[0054] In one embodiment, when calculating the quantization parameter offset of a coding block, the quantization parameter offset of the coding block corresponding to each block level is calculated sequentially. For example, assuming the determined quantization parameter offset of a coding block is 16*16, and the corresponding block level is 32*32, then for a 32*32 block, one-quarter of its pixels is selected as the computational pixel for calculation. The calculated pixel variance of this one-quarter pixel is substituted into the aforementioned offset calculation model to obtain the quantization parameter offset calculation result. This result is used as the quantization parameter offset for each corresponding 16*16 coding block within the 32*32 block. Optionally, the calculation result can be stored in a cache. Accordingly, after the calculation of the 32*32 block is completed, the calculation of the next 32*32 block continues until all 32*32 blocks in the video frame have been calculated.
[0055] As described above, when calculating the quantization parameter offset of a coding block in a video frame, the current video frame to be encoded is obtained, the frame complexity of the video frame is determined, and the number of operands for the coding block in the video frame is determined based on the frame complexity. The number of operands is less than the number of pixels in the coding block. Then, the quantization parameter offset of the coding block is calculated based on the pixel values of the operands and the set offset calculation model. In the original calculation process, the quantization parameter offset of the coding block required calculation using the pixel values of each pixel in the coding block. This scheme selects fewer operands than the number of pixels in the coding block, reducing the amount of data computation. Furthermore, the selection of operands is based on the frame complexity of the video frame; the higher the frame complexity, the more operands are selected, and the lower the frame complexity, the fewer operands are selected. By balancing video quality, the calculation mechanism of the quantization parameter offset in video encoding is optimized, solving the problem that when the video frame is large, the processing time increases significantly, leading to a decrease in video encoder performance and an increase in overall video encoding time, thus improving the video encoding speed.
[0056] Figure 7This is a structural block diagram of a quantization parameter offset determination device in video encoding provided in an embodiment of this application. The device is used to execute the quantization parameter offset determination method in video encoding provided in the above embodiment, and has corresponding functional modules and beneficial effects for executing the method. Figure 7 As shown, the device specifically includes: a complexity determination module 101, a pixel determination module 102, and an offset calculation module 103, wherein,
[0057] The complexity determination module 101 is configured to acquire the current video frame to be encoded and determine the frame complexity of the video frame;
[0058] The pixel determination module 102 is configured to determine the computational pixels of the coding block in the video frame based on the frame complexity, wherein the number of computational pixels is less than the number of pixels in the coding block;
[0059] The offset calculation module 103 is configured to calculate the quantization parameter offset of the coding block based on the pixel value of the operation pixel and the set offset calculation model.
[0060] As described above, when calculating the quantization parameter offset of a coding block in a video frame, the current video frame to be encoded is obtained, the frame complexity of the video frame is determined, and the number of operands for the coding block in the video frame is determined based on the frame complexity. The number of operands is less than the number of pixels in the coding block. Then, the quantization parameter offset of the coding block is calculated based on the pixel values of the operands and the set offset calculation model. In the original calculation process, the quantization parameter offset of the coding block required calculation using the pixel values of each pixel in the coding block. This scheme selects fewer operands than the number of pixels in the coding block, reducing the amount of data computation. Furthermore, the selection of operands is based on the frame complexity of the video frame; the higher the frame complexity, the more operands are selected, and the lower the frame complexity, the fewer operands are selected. By balancing video quality, the calculation mechanism of the quantization parameter offset in video encoding is optimized, solving the problem that when the video frame is large, the processing time increases significantly, leading to a decrease in video encoder performance and an increase in overall video encoding time, thus improving the video encoding speed.
[0061] In one possible embodiment, the pixel determination module 102 is configured as follows:
[0062] The block level corresponding to the calculation of the quantization parameter offset is determined based on the frame complexity and the set threshold.
[0063] The computational pixels of the coded blocks in the video frame are determined based on the block level.
[0064] In one possible embodiment, the pixel determination module 102 is configured as follows:
[0065] When the frame complexity is less than or equal to the first threshold, the block level corresponding to the calculation of the quantization parameter offset is determined to be the first block level;
[0066] If the frame complexity is greater than the first threshold, the block level corresponding to the calculation of the quantization parameter offset is determined to be the second block level, and the block size corresponding to the first block level is greater than the block size corresponding to the second block level.
[0067] In one possible embodiment, the pixel determination module 102 is configured as follows:
[0068] The computational pixels of the coded blocks in the video frame are determined based on the block level and the set computational pixel selection rules.
[0069] In one possible embodiment, the pixel determination module 102 is configured as follows:
[0070] When the block level is the first block level, one-quarter of the pixels in the coded block are selected as the operation pixels;
[0071] When the block level is the second block level, half of the pixels in the coded block are selected as the operation pixels.
[0072] In one possible embodiment, the pixel determination module 102 is configured as follows:
[0073] The pixel corresponding to any one of the odd-numbered rows, odd-numbered columns, even-numbered rows, or even-numbered columns in the coded block is selected as the operation pixel;
[0074] The pixel determination module 102 is configured as follows:
[0075] The pixel corresponding to any one of the following in the encoded block—odd row and odd column, odd row and even column, even row and odd column, or even row and even column—is selected as the operation pixel.
[0076] In one possible embodiment, the offset calculation module 103 is configured as follows:
[0077] Calculate the pixel variance value based on the pixel value of the operation pixel;
[0078] The pixel variance value is substituted into a preset function to calculate the quantization parameter offset of the coding block.
[0079] Figure 8 A schematic diagram of a device for determining quantization parameter offset in video encoding, provided in an embodiment of this application, is shown below. Figure 8As shown, the device includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of processors 201 in the device can be one or more. Figure 8 Taking a processor 201 as an example; the processor 201, memory 202, input device 203, and output device 204 in the device can be connected via a bus or other means. Figure 8 Taking a bus connection as an example, the memory 202, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the quantization parameter offset determination method in video encoding in this embodiment. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 302, thereby implementing the aforementioned quantization parameter offset determination method in video encoding. The input device 203 can be used to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device 204 may include a display screen or other display device.
[0080] This application also provides a non-volatile storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a quantization parameter offset determination method in video coding as described in the above embodiments, wherein the method includes:
[0081] Obtain the current video frame to be encoded and determine the frame complexity of the video frame;
[0082] The number of computed pixels in the coded block of the video frame is determined based on the frame complexity, and the number of computed pixels is less than the number of pixels in the coded block.
[0083] The quantization parameter offset of the coding block is calculated based on the pixel value of the operation pixel and the set offset calculation model.
[0084] It is worth noting that in the embodiments of the quantization parameter offset determination device in the above video encoding, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this application.
[0085] In some possible implementations, various aspects of the methods provided in this application can also be implemented as a program product comprising program code that, when run on a computer device, causes the computer device to perform the steps of the methods according to the various exemplary embodiments of this application described above. For example, the computer device may perform a quantization parameter offset determination method in video coding as described in embodiments of this application. The program product may be implemented using any combination of one or more readable media.
Claims
1. A method for determining a quantization parameter offset in video coding, characterized by, The method comprises the following steps: acquiring a current video frame to be encoded, and determining a frame complexity of the video frame; determining a corresponding block level for calculating a quantization parameter offset according to the frame complexity and a set threshold, and determining operation pixels of a coding block in the video frame based on the block level and a set operation pixel selection rule, wherein a number of the operation pixels is less than a number of pixels of the coding block; calculating the quantization parameter offset of the coding block according to pixel values of the operation pixels and a set offset calculation model.
2. The method of quantization parameter offset determination in video coding according to claim 1, wherein, The step of determining the corresponding block level for calculating the quantization parameter offset according to the frame complexity and the set threshold comprises the following steps: in a case where the frame complexity is less than or equal to a first threshold, determining that the corresponding block level for calculating the quantization parameter offset is a first block level; in a case where the frame complexity is greater than the first threshold, determining that the corresponding block level for calculating the quantization parameter offset is a second block level, wherein a block size corresponding to the first block level is greater than a block size corresponding to the second block level.
3. The method of quantization parameter offset determination in video coding according to claim 1, wherein, The step of determining the operation pixels of the coding block in the video frame based on the block level and the set operation pixel selection rule comprises the following steps: in a case where the block level is the first block level, selecting one fourth of pixels in the coding block as the operation pixels; in a case where the block level is the second block level, selecting one half of pixels in the coding block as the operation pixels.
4. The method of quantization parameter offset determination in video coding according to claim 3, wherein, The step of selecting one half of pixels in the coding block as the operation pixels comprises the following steps: selecting pixels corresponding to any one of an odd row, an odd column, an even row or an even column in the coding block as the operation pixels. The step of selecting one fourth of pixels in the coding block as the operation pixels comprises the following steps: selecting pixels corresponding to any one of an odd row and an odd column, an odd row and an even column, an even row and an odd column or an even row and an even column in the coding block as the operation pixels.
5. The method of quantization parameter offset determination in video coding according to any of claims 1-4, characterized by, The step of calculating the quantization parameter offset of the coding block according to the pixel values of the operation pixels and the set offset calculation model comprises the following steps: calculating a pixel variance value according to the pixel values of the operation pixels; calculating the quantization parameter offset of the coding block by inputting the pixel variance value into a preset function.
6. Apparatus for determining a quantization parameter offset in video coding, characterized in that The method comprises the following steps: a complexity determination module configured to acquire a current video frame to be encoded, and determine a frame complexity of the video frame; a pixel determination module configured to determine a corresponding block level for calculating a quantization parameter offset according to the frame complexity and a set threshold, and determine operation pixels of a coding block in the video frame based on the block level and a set operation pixel selection rule, wherein a number of the operation pixels is less than a number of pixels of the coding block; an offset calculation module configured to calculate the quantization parameter offset of the coding block according to pixel values of the operation pixels and a set offset calculation model.
7. An apparatus for quantization parameter offset determination in video coding, the apparatus comprising: one or more processors; a storage device configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for determining a quantization parameter offset in video encoding according to any one of claims 1-5.
8. A non-transitory storage medium storing computer-executable instructions that, when executed by a computer processor, perform the method of quantization parameter offset determination in video coding of any of claims 1-5.
9. A computer program product comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the method of quantization parameter offset determination in video coding of any of claims 1-5.
Citation Information
Patent Citations
Video coding method, device, system and computer readable storage medium
CN112584143A