A video encoding method, a video encoder, and an electronic device, a storage medium, and a computer program product
By combining the temporal layer of video frames and the ROI mapping map to adjust quantization parameters and coding unit modes, the encoding process of the video encoder is optimized, solving the problem that existing technologies cannot adjust for ROI regions, and achieving more efficient encoding and quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MOORE THREADS TECH CO LTD
- Filing Date
- 2025-07-04
- Publication Date
- 2026-05-08
AI Technical Summary
Existing video encoders fail to adjust for the region of interest (ROI) during rate-distortion optimization, resulting in insufficient encoding efficiency and quality.
By adjusting the quantization parameter QP value, coding unit (CU) partitioning method, and CU prediction mode based on the temporal layer and ROI map of the video frame, the video coding process is optimized, especially the ROI region is enhanced.
While ensuring video quality, it effectively saves encoding bitrate and improves encoding efficiency, especially with more significant processing effects in the ROI area.
Smart Images

Figure CN120547334B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a video encoding method, a video encoder, as well as electronic devices, storage media, and computer program products. Background Technology
[0002] In recent years, mobile smart terminals have become widely popular, and with the rapid upgrading of network speeds, vivid and intuitive video services are increasingly favored by people. At the same time, people's visual perception is constantly improving, resulting in ever-increasing demands for video quality, such as clarity and smoothness. Therefore, mainstream video coding standards such as HEVC, AVC, and AV1 are being used more widely. The main purpose of video coding is to minimize the bitrate while maintaining a certain level of video quality, or to minimize coding distortion under mobile bitrate constraints, in order to achieve optimal coding performance.
[0003] Existing video encoder solutions mainly compress video frames through operations such as prediction, transformation, quantization, and filtering. In the rate-distortion optimization process, they only optimize objective quality. Furthermore, in the subsequent filtering process, they mainly optimize for distortions such as blockiness and ringing generated in the encoding, without adjusting the encoding based on the Region of Interest (ROI). Summary of the Invention
[0004] In view of this, this disclosure proposes a video encoding method, a video encoder, as well as electronic devices, storage media, and computer program products.
[0005] According to one aspect of this disclosure, a video coding method is provided, comprising: for any block to be encoded in a video frame to be encoded, adjusting a preset quantization parameter QP value of the block to be encoded based on the time layer of the video frame to be encoded and a preset region of interest map (ROIMAP) corresponding to the block to be encoded, to obtain a target QP value of the block to be encoded; determining a target coding unit (CU) partitioning method and a target CU prediction mode of the block to be encoded based on the preset ROIMAP corresponding to the block to be encoded; and encoding the block to be encoded based on the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain a target encoding result of the block to be encoded.
[0006] In one possible implementation, the block to be encoded includes multiple first sub-blocks, and the preset ROIMAP corresponding to the block to be encoded includes preset QP adjustment parameters for each first sub-block, preset CU partitioning parameters for each first sub-block, and preset CU mode parameters for each first sub-block.
[0007] In one possible implementation, adjusting the preset quantization parameter QP value of the block to be encoded based on the temporal layer of the video frame to be encoded and the preset region of interest (ROIMAP) corresponding to the block to be encoded to obtain the target QP value of the block to be encoded includes: for any first sub-block in the block to be encoded, determining the QP adjustment value of the first sub-block based on the preset QP adjustment parameter of the first sub-block, the temporal layer of the video frame to be encoded, and the preset QP value; determining the target QP adjustment value of the block to be encoded based on the QP adjustment value of each first sub-block in the block to be encoded; and adjusting the preset QP value based on the target QP adjustment value to obtain the target QP value.
[0008] In one possible implementation, determining the QP adjustment value of any first sub-block in the block to be encoded, based on the preset QP adjustment parameters of the first sub-block, the time layer of the video frame to be encoded, and the preset QP value, includes: determining a time layer threshold based on the total number of time layers in the Group of Pictures (GOP) to which the video frame to be encoded belongs; determining the QP adjustment value of any first sub-block in the block to be encoded, if the time layer of the video frame to be encoded is greater than the time layer threshold, based on the preset QP adjustment parameters of the first sub-block, the preset QP value, and a first preset QP adjustment strategy; and determining the QP adjustment value of the first sub-block, if the time layer of the video frame to be encoded is less than or equal to the time layer threshold, based on the preset QP adjustment parameters of the first sub-block, the preset QP value, and a second preset QP adjustment strategy; wherein the QP adjustment magnitude of the second preset QP adjustment strategy is greater than that of the first preset QP adjustment strategy.
[0009] In one possible implementation, determining the target coding unit (CU) partitioning method and target CU prediction mode of the block to be encoded based on the preset ROIMAP corresponding to the block to be encoded includes: for any candidate CU partitioning method, determining at least one second sub-block obtained by the block to be encoded under that candidate CU partitioning method, wherein the size of the second sub-block is greater than or equal to the size of the first sub-block and less than or equal to the size of the block to be encoded; for any second sub-block, if the preset CU partitioning parameters of each first sub-block included in the second sub-block indicate support for the candidate CU partitioning method, and the preset CU mode parameters of each first sub-block included in the second sub-block are the same, determining the candidate CU partitioning method as the target CU partitioning method for the second sub-block; determining the CU prediction mode indicated by the preset CU mode parameters of each first sub-block included in the second sub-block as the candidate CU prediction mode for the second sub-block; and for any second sub-block under any target CU partitioning method, determining the target CU prediction mode for the second sub-block based on the candidate CU prediction mode of the second sub-block.
[0010] In one possible implementation, determining the target CU prediction mode of any second sub-block under any target CU partitioning method, based on the candidate CU prediction mode of the second sub-block, includes: when the block to be encoded has a preset CU prediction mode, determining the preset CU prediction mode as the target CU prediction mode of the second sub-block for any second sub-block under any target CU partitioning method; when the block to be encoded does not have a preset CU prediction mode, determining the candidate CU prediction mode of the second sub-block as the target CU prediction mode of the second sub-block for any second sub-block under any target CU partitioning method.
[0011] In one possible implementation, the step of encoding the block to be encoded according to the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the encoding result of the block to be encoded includes: for any second sub-block under any target CU partitioning method, encoding the second sub-block according to the target QP value, the target CU partitioning method of the second sub-block, and the target CU prediction mode of the second sub-block to obtain the encoding result of the second sub-block; and comparing the rate-distortion cost of the encoding result of each second sub-block of the block to be encoded under each target CU partitioning method to determine the target encoding result of the block to be encoded.
[0012] In one possible implementation, the preset ROIMAP corresponding to the block to be encoded further includes: a position indication parameter for each first sub-block, wherein the position indication parameter for each first sub-block is used to indicate whether the block to be encoded is the first encoded block in the video frame to be encoded; the method further includes: determining whether there is a transmission misalignment in the preset ROIMAP corresponding to the block to be encoded based on the position indication parameter for each first sub-block included in the block to be encoded.
[0013] According to another aspect of this disclosure, a video encoder is provided, comprising: a first determining module, configured to, for any block to be encoded in a video frame to be encoded, adjust a preset quantization parameter QP value of the block to be encoded based on the time layer of the video frame to be encoded and a preset region of interest map (ROIMAP) corresponding to the block to be encoded, to obtain a target QP value of the block to be encoded; a second determining module, configured to, based on the preset ROIMAP corresponding to the block to be encoded, determine a target coding unit (CU) partitioning method and a target CU prediction mode of the block to be encoded; and an encoding module, configured to, based on the target QP value, the target CU partitioning method, and the target CU prediction mode, encode the block to be encoded to obtain a target encoding result of the block to be encoded.
[0014] According to another aspect of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method.
[0015] According to another aspect of this disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method.
[0016] According to another aspect of this disclosure, a computer program product is provided, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0017] According to the video coding method of this disclosure, for any block to be encoded in a video frame, the preset QP value of the block to be encoded is adjusted according to the time layer of the video frame and the preset ROIMAP corresponding to the block to be encoded, to obtain the target QP value of the block to be encoded; the target CU partitioning method and the target CU prediction mode of the block to be encoded are determined according to the preset ROIMAP corresponding to the block to be encoded; the block to be encoded is encoded according to the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the target encoding result of the block to be encoded. Thus, in the video coding process, the time layer of different video frames and the ROI region in the video frame are comprehensively considered, and different processing is performed on video frames of different time layers and the ROI region and non-ROI region in the video frame, so as to effectively save the coding bitrate while enhancing the ROI region.
[0018] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0019] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.
[0020] Figure 1 This diagram illustrates the time layers of different video frames in a GOP according to an embodiment of the present disclosure.
[0021] Figure 2 A flowchart illustrating a video encoding method according to an embodiment of this disclosure is shown.
[0022] Figure 3 This diagram illustrates a preset ROIMAP corresponding to a video frame to be encoded, according to an embodiment of the present disclosure.
[0023] Figure 4 This diagram illustrates the specific allocation of 1-byte ROI information transmitted in each 8×8-sized first sub-block according to an embodiment of this disclosure.
[0024] Figure 5 A block diagram of a video encoder according to an embodiment of the present disclosure is shown.
[0025] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0026] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0027] As used herein, the terms “comprising,” “including,” “having,” or variations thereof are open-ended and include one or more of the stated features, integrals, elements, steps, components, or functions, but do not exclude the presence or addition of one or more other features, integrals, elements, steps, components, functions, or groups thereof.
[0028] When an element is referred to as “connected,” “coupled,” “responding,” or a variation thereof relative to another element, it may be directly connected, coupled, or responding to another element, or there may be an intermediate element present.
[0029] Although the terms first, second, third, etc., may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another. Therefore, without departing from the teachings of the inventive concept, a first element / operation in some embodiments may be referred to as a second element / operation in other embodiments.
[0030] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0031] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0032] The quantization parameter (QP) in video coding is a crucial factor determining the quantization effect. A smaller QP value results in a smaller quantization step size and less distortion; conversely, a larger QP value results in a larger quantization step size and more noticeable distortion.
[0033] The temporal layer (TL) is a concept in video coding. The temporal layer of the current video frame can be determined based on its position within the current Group of Pictures (GOP). Figure 1This diagram illustrates the temporal layers of different video frames within a Group of Pictures (GOP) according to an embodiment of this disclosure. Multiple video frames within the GOP are divided into different temporal layers based on the time interval between each video frame and its reference video frame. For example... Figure 1 As shown, video frames of the same color are in the same time layer. The first 8 video frames belong to one GOP, and the 0th video frame (… Figure 1 Frame 0 (in the video) does not belong to any GOP. Frame 0 and Frame 8 (in the video) Figure 1 The 8th frame is a keyframe, with the lowest time layer, set to TL=0. Non-keyframes are divided into 3 layers, the 4th video frame (…). Figure 1 The 4th frame in the video is located at TL=1, and the 2nd video frame ( Figure 1 The second and sixth video frames (in the middle) Figure 1 The 6th frame (in the middle) is located at TL=2, and the 1st, 3rd, 5th, and 7th video frames ( Figure 1 Frames 1, 3, 5, and 7 are located at TL=3.
[0034] A Region of Interest (ROI) refers to a specific area or object in an image that is of particular interest and typically contains key information that you want to identify, analyze, or process.
[0035] Existing video encoder solutions primarily compress video frames through operations such as prediction, transformation, quantization, and filtering. Rate-distortion optimization only addresses objective quality, and subsequent filtering mainly targets distortions such as blockiness and ringing introduced during encoding. The video encoding process does not consider the temporal layer of the video frame or its Region of Interest (ROI).
[0036] This disclosure provides a video encoding method that, during the video encoding process, comprehensively considers the temporal layers of different video frames and the Regions of Interest (ROI) within the video frames, and performs different processing on video frames at different temporal layers, as well as on ROI and non-ROI regions within the video frames. The video encoding method of this disclosure is described in detail below.
[0037] Figure 2 A flowchart illustrating a video encoding method according to an embodiment of this disclosure is shown. Figure 2 As shown, the method includes:
[0038] In step S21, for any block to be encoded in the video frame to be encoded, the preset QP value of the block to be encoded is adjusted according to the time layer of the video frame to be encoded and the preset ROIMAP corresponding to the block to be encoded, so as to obtain the target QP value of the block to be encoded.
[0039] In existing video encoders, an ROI interface and an ROI module are added during the video encoding process. This allows the preset ROIMAP to be sent to the ROI module by calling the ROI interface of the video encoder.
[0040] In one example, for any video frame to be encoded, the ROI map is constructed by taking the first sub-block (e.g., an 8×8 size first sub-block) included in the video frame as the unit, with each unit containing 1 byte of ROI information.
[0041] Using the first sub-block as the unit allows for more precise control of ROI information. Furthermore, the size of the first sub-block is smaller than the size of the block to be encoded in the video frame to be encoded. This means that during the video encoding process, only a single pass needs to be performed on the preset ROIMAP corresponding to a single video frame to be encoded, which can complete the encoding process of a single video frame to be encoded, thus facilitating the hardware implementation of the video encoder.
[0042] The specific size of the first sub-block and the specific size of each unit of ROI information in the ROIMAP can be flexibly set according to the actual application scenario, and this disclosure does not impose specific limitations on them.
[0043] In one example, for certain hardware video encoders or real-time encoding scenarios, there may be specific requirements for the format of the video frames to be encoded in order to improve parallel processing efficiency or memory access alignment. For instance, the number of macroblocks (16×16 size) in a horizontal row of the video frame to be encoded may be a multiple of 32. If the number of macroblocks (16×16 size) in a horizontal row of the video frame to be encoded is 21 (corresponding to 336 pixels), then the number of macroblocks needs to be padded to 32 (corresponding to 512 pixels). The number of macroblocks (16×16 size) in a vertical column of the video frame to be encoded can be an integer.
[0044] When there are specific requirements for the format of the video frame to be encoded, there are also specific requirements for the corresponding preset ROIMAP. Similarly, assuming there are n macroblocks (16×16 size) in a horizontal row of the preset ROIMAP corresponding to the video frame to be encoded, then n is padded with 32. For a vertical column, the number of macroblocks (16×16 size) is simply an integer multiple of the number of macroblocks. If the number of macroblocks (16×16 size) in the vertical column is not an integer, then it is padded to an integer.
[0045] Figure 3 This diagram illustrates a preset ROIMAP corresponding to a video frame to be encoded, according to an embodiment of this disclosure. Figure 3As shown, blk_16×16_x is the x-coordinate of the number of macroblocks (16×16 size), and blk_16×16_y is the y-coordinate of the number of macroblocks (16×16 size). In the default ROIMAP, a horizontal row includes 30.5 original macroblocks (16×16 size), padded to 32, which means 3 padding blocks (8×8 size first sub-blocks) are added; in the default ROIMAP, a vertical column includes 12.5 original macroblocks (16×16 size), padded to an integer of 13, which means 1 padding block (8×8 size first sub-block) is added. Figure 3 The first sub-block, which is 8x8 in size and is yellow in the center, is a fill block.
[0046] In one example, for the preset ROIMAP corresponding to the video frame to be encoded, each first sub-block (8×8 size) transmits 1 byte of ROI information; for the padding blocks, the transmission value is 0, that is, no ROI information is transmitted.
[0047] The preset ROIMAP corresponding to the video frame to be encoded includes the preset ROIMAP corresponding to each block to be encoded in the video frame.
[0048] When encoding a video frame to be encoded, firstly, the address information of the preset ROIMAP corresponding to the video frame to be encoded is obtained; then, the preset ROIMAP corresponding to the video frame to be encoded is read according to the address information; then, each block to be encoded is encoded by traversing each block to be encoded in the video frame to be encoded and according to the preset ROIMAP corresponding to each block to be encoded in the video frame to be encoded.
[0049] The size of the block to be encoded is N×N. The specific value of N can be flexibly set according to the actual application scenario. For example, N can be 128, 64, 32, 16, 8, etc. This disclosure does not make a specific limitation on this.
[0050] For any block to be encoded in a video frame, the target QP value of the block is obtained by comprehensively adjusting the preset QP value of the block based on the time layer of the video frame and the preset ROIMAP corresponding to the block.
[0051] The preset QP value of the block to be encoded is pre-allocated to the block to be encoded. The specific allocation method can be referred to relevant technologies, and this disclosure does not make specific limitations on it.
[0052] The following sections will describe in detail how to adjust the preset QP value of the block to be encoded based on the time layer of the video frame to be encoded and the preset ROIMAP corresponding to the block to be encoded, in conjunction with the possible implementation methods of this disclosure, so as to obtain the target QP value of the block to be encoded. These details will not be elaborated here.
[0053] In step S22, the target CU partitioning method and target CU prediction mode of the block to be encoded are determined according to the preset ROIMAP corresponding to the block to be encoded.
[0054] Based on the preset ROIMAP corresponding to the block to be encoded, the target CU partitioning method and target CU prediction mode of the block to be encoded in the encoding process are determined based on the ROI region.
[0055] The following sections will describe in detail how to determine the target CU partitioning method and target CU prediction mode of the block to be encoded based on the preset ROIMAP corresponding to the block to be encoded, in conjunction with the possible implementation methods of this disclosure. These details will not be elaborated here.
[0056] In step S23, the block to be encoded is encoded according to the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the target encoding result of the block to be encoded.
[0057] After determining the target QP value, target CU partitioning method, and target CU prediction mode of the block to be encoded, the block to be encoded can be effectively encoded to obtain the target encoding result of the block to be encoded.
[0058] The following sections will describe in detail the specific process of encoding the block to be encoded based on the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the target encoding result of the block to be encoded, in conjunction with the possible implementation methods of this disclosure. These details will not be elaborated here.
[0059] According to the video coding method of this disclosure, for any block to be encoded in a video frame, the preset QP value of the block to be encoded is adjusted according to the time layer of the video frame and the preset ROIMAP corresponding to the block to be encoded, to obtain the target QP value of the block to be encoded; the target CU partitioning method and the target CU prediction mode of the block to be encoded are determined according to the preset ROIMAP corresponding to the block to be encoded; the block to be encoded is encoded according to the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the target encoding result of the block to be encoded. Thus, in the video coding process, the time layer of different video frames and the ROI region in the video frame are comprehensively considered, and different processing is performed on video frames of different time layers and the ROI region and non-ROI region in the video frame, so as to effectively save the coding bitrate while enhancing the ROI region.
[0060] In one possible implementation, the block to be encoded includes multiple first sub-blocks. The preset ROIMAP corresponding to the block to be encoded includes preset QP adjustment parameters, preset CU partitioning parameters, preset CU mode parameters, and position indication parameters for each first sub-block. The position indication parameters for each first sub-block are used to indicate whether the block to be encoded is the first encoding block in the video frame to be encoded.
[0061] The ROIMAP corresponding to the video frame to be encoded is divided into units based on the first sub-block, which is used to indicate the ROI information of the first sub-block.
[0062] In one example, the first sub-block is 8×8 in size, and each 8×8 first sub-block in the ROIMAP corresponding to the video frame to be encoded transmits 1 byte of ROI information.
[0063] Figure 4 This diagram illustrates the specific allocation of 1-byte ROI information transmitted in each 8×8-sized first sub-block according to an embodiment of this disclosure. Figure 4 As shown, the 1-byte ROI information transmitted in each 8×8 first sub-block includes 8 bits. Bit 0 is the position indication parameter Is_first_blk_in_frame for the first sub-block; bits 1-2 are the preset QP adjustment parameter qp_level for the first sub-block; bits 3-4 are the preset CU partitioning parameter cu_size for the first sub-block; and bits 5-6 are the preset CU mode parameter cu_mode for the first sub-block. Bit 7 can be empty, or other parameters can be specified in bit 7 depending on the actual application scenario; this disclosure does not impose specific limitations on this.
[0064] In addition to the above, the ROI information transmitted in each first sub-block Figure 4 In addition to the form shown, other forms can be set according to the actual application scenario, and this disclosure does not make specific limitations on this.
[0065] In one possible implementation, the method further includes: determining whether there is a transmission misalignment in the preset ROIMAP corresponding to the block to be encoded based on the position indication parameter of each first sub-block included in the block to be encoded.
[0066] For any first sub-block, if the position indicator parameter Is_first_blk_in_frame = 0, it indicates that the block to be encoded containing the first sub-block is not the first encoded block in the video frame to be encoded; if the position indicator parameter Is_first_blk_in_frame = 1, it indicates that the block to be encoded containing the first sub-block is the first encoded block in the video frame to be encoded.
[0067] by Figure 4 For example, for any first sub-block, when the 0th bit of the 1-byte ROI information transmitted by the first sub-block is 0, it indicates that the position indication parameter Is_first_blk_in_frame in the first sub-block is 0; when the 0th bit of the 1-byte ROI information transmitted by the first sub-block is 1, it indicates that the position indication parameter Is_first_blk_in_frame in the first sub-block is 1.
[0068] During video encoding, for the first block to be encoded in the video frame to be encoded, if the position indicator parameter of each first sub-block included in the block to be encoded is Is_first_blk_in_frame = 1, it is determined that the preset ROIMAP corresponding to the block to be encoded does not have a transmission misalignment; if the position indicator parameter of any first sub-block included in the block to be encoded is Is_first_blk_in_frame = 0, it is determined that the preset ROIMAP corresponding to the block to be encoded has a transmission misalignment.
[0069] During video encoding, for any non-first block in the video frame to be encoded, if the position indicator parameter of each first sub-block included in the block to be encoded is Is_first_blk_in_frame = 0, it is determined that the preset ROIMAP corresponding to the block to be encoded does not have a transmission misalignment; if the position indicator parameter of any first sub-block included in the block to be encoded is Is_first_blk_in_frame = 1, it is determined that the preset ROIMAP corresponding to the block to be encoded has a transmission misalignment.
[0070] During the video encoding process, for any block to be encoded in the video frame to be encoded, if there is no transmission misalignment in the preset ROIMAP corresponding to the block to be encoded, the encoding of the block to be encoded continues to be performed according to the preset ROIMAP corresponding to the block to be encoded.
[0071] In one possible implementation, the preset QP value of the block to be encoded is adjusted according to the time layer of the video frame to be encoded and the preset ROIMAP corresponding to the block to be encoded, to obtain the target QP value of the block to be encoded. This includes: for any first sub-block in the block to be encoded, determining the QP adjustment value of the first sub-block according to the preset QP adjustment parameters of the first sub-block, the time layer of the video frame to be encoded, and the preset QP value; determining the target QP adjustment value of the block to be encoded according to the QP adjustment value of each first sub-block in the block to be encoded; and adjusting the preset QP value according to the target QP adjustment value to obtain the target QP value.
[0072] For the block to be encoded in the video frame to be encoded, taking into account both the temporal layer and ROIMAP, the QP adjustment value of each first sub-block in the block to be encoded is determined.
[0073] In one possible implementation, for any first sub-block in the block to be encoded, the QP adjustment value of the first sub-block is determined based on the preset QP adjustment parameters of the first sub-block, the time layer of the video frame to be encoded, and the preset QP value. This includes: determining a time layer threshold based on the total number of time layers in the GOP containing the video frame to be encoded; for any first sub-block in the block to be encoded, if the time layer of the video frame to be encoded is greater than the time layer threshold, determining the QP adjustment value of the first sub-block based on the preset QP adjustment parameters, the preset QP value, and a first preset QP adjustment strategy; if the time layer of the video frame to be encoded is less than or equal to the time layer threshold, determining the QP adjustment value of the first sub-block based on the preset QP adjustment parameters, the preset QP value, and a second preset QP adjustment strategy; wherein the QP adjustment range of the second preset QP adjustment strategy is greater than that of the first preset QP adjustment strategy.
[0074] For any given first sub-block, if the preset QP adjustment parameter qp_level = 0, the first sub-block is indicated as a non-ROI region; if the preset QP adjustment parameter qp_level = 1, the first sub-block is indicated as an ROI region with a low QP adjustment level; if the preset QP adjustment parameter qp_level = 2, the first sub-block is indicated as an ROI region with a medium QP adjustment level; and if the preset QP adjustment parameter qp_level = 3, the first sub-block is indicated as an ROI region with a high QP adjustment level.
[0075] by Figure 4 For example, for any first sub-block, when the first two bits of the 1-byte ROI information transmitted by the first sub-block are 00, it indicates that the preset QP adjustment parameter qp_level of the first sub-block is 0; when the first two bits of the 1-byte ROI information transmitted by the first sub-block are 01, it indicates that the preset QP adjustment parameter qp_level of the first sub-block is 1; when the first two bits of the 1-byte ROI information transmitted by the first sub-block are 10, it indicates that the preset QP adjustment parameter qp_level of the first sub-block is 2; when the first two bits of the 1-byte ROI information transmitted by the first sub-block are 11, it indicates that the preset QP adjustment parameter qp_level of the first sub-block is 3.
[0076] For the GOP containing the video frame to be encoded, firstly, obtain the total number of time layers TL_num of the GOP; then, calculate the time layer threshold T = TL_num / 2 of the GOP; use the time layer threshold T to classify the video frames in different time layers within the GOP into time layers, resulting in: video frames with time layer TL greater than the time layer threshold T, and video frames with time layer TL less than or equal to the time layer threshold T.
[0077] Among them, video frames with a time layer TL greater than the time layer threshold T represent video frames at a higher time layer, which are generally non-reference frames or reference frames that are referenced less frequently; video frames with a time layer TL less than or equal to the time layer threshold T represent video frames at a lower time layer, which play an important reference role in the encoding of subsequent video frames.
[0078] Based on the above Figure 1 For example, the total number of time layers in a GOP is TL_num = 4. Therefore, the time layer threshold T of a GOP is TL_num / 2 = 2. At this time, the 1st, 3rd, 5th, and 7th video frames located at time layer TL = 3 are video frames whose time layer TL is greater than the time layer threshold T; the 1st and 8th video frames located at time layer TL = 0, the 4th video frame located at TL = 1, and the 2nd and 6th video frames located at TL = 2 are video frames whose time layer TL is less than or equal to the time layer threshold T.
[0079] Video frames with a time layer TL greater than the time layer threshold T correspond to the first preset QP adjustment strategy, while video frames with a time layer TL less than or equal to the time layer threshold T correspond to the second preset QP adjustment strategy. Since the QP adjustment magnitude of the second preset QP adjustment strategy is greater than that of the first preset QP adjustment strategy, a larger enhancement process is applied to video frames with a lower time layer, while a weaker enhancement process is applied to video frames with a higher time layer.
[0080] In one example, the first preset QP adjustment strategy and the second preset QP adjustment strategy are shown in Table 1 below.
[0081] Table 1
[0082]
[0083]
[0084] For any first sub-block in the block to be encoded, the QP adjustment value delta_qp of the first sub-block is determined based on the relationship between the time layer TL and the time layer threshold T of the video frame to be encoded, the preset QP adjustment parameter qp_level of the first sub-block, the preset QP value qp of the block to be encoded, and in conjunction with Table 1 above.
[0085] As shown in Table 1 above, for video frames with lower temporal levels (TL≤T), the second preset QP adjustment strategy is adopted, which performs a stronger enhancement (reducing qp) on ROI blocks (the first sub-blocks with qp_level=1, 2, or 3), while leaving non-ROI blocks (the first sub-blocks with qp_level=0) unprocessed (qp unchanged). For video frames with higher temporal levels (TL>T), the first preset QP adjustment strategy is adopted, which performs a weaker enhancement (reducing qp) on ROI blocks (the first sub-blocks with qp_level=1, 2, or 3), while weakening non-ROI blocks (the first sub-blocks with qp_level=0) by increasing qp. This allows for enhancement of ROI regions while saving some coding bitrate.
[0086] As shown in Table 1, for any time layer, when qp≤x3=19, qp is not adjusted. This is because qp is already too small, and further reducing qp would increase the number of bits significantly, and the gain in image quality would be minimal, making it not worthwhile.
[0087] As shown in Table 1, for video frames with higher time layers (TL>T), when qp>x1=39, non-ROI blocks (the first sub-block with qp_level=0) will not be weakened. This is because when qp is already too large, increasing qp further will not save many bits, so it is not worthwhile.
[0088] The specific values of x1, x2, and x3 in Table 1, as well as the specific values of each delta_qp, can be flexibly set to other values according to the actual situation, in addition to those shown in Table 1. This disclosure does not impose specific limitations on this.
[0089] For the block to be encoded in the video frame to be encoded, after determining the QP adjustment value of each first sub-block in the block to be encoded, the QP adjustment value of each first sub-block in the block to be encoded is combined to determine the overall target QP adjustment value of the block to be encoded, so as to adjust the preset QP parameters of the block to be encoded and obtain the target QP value of the block to be encoded.
[0090] For example, the block to be encoded is 32×32 in size, and the first sub-block is 8×8 in size. First, considering both the time layer and the ROIMAP, based on Table 1 above, the QP adjustment value delta_qp_8×8 for each 8×8 first sub-block in the 32×32 block to be encoded is determined. Then, the QP adjustment values delta_qp_8×8 of all 8×8 first sub-blocks in the 32×32 block to be encoded are averaged to obtain the target QP adjustment value delta_qp_32×32 for the 32×32 block to be encoded. Finally, the preset QP value qp_32×32 and the target QP adjustment value delta_qp_32×32 for the 32×32 block to be encoded are summed to obtain the target QP value qp'_32×32 for the 32×32 block to be encoded.
[0091] For any first sub-block, if the preset CU partitioning parameter cu_size = 0, it indicates that the CU partitioning method of the first sub-block is determined according to the Rate-Distortion Optimization (RDO); if the preset CU partitioning parameter cu_size = 1, it indicates that the first sub-block does not support 32×32 partitioning, but only supports 16×16 partitioning and 8×8 partitioning; if the preset CU partitioning parameter cu_size = 2, it indicates that the first sub-block does not support 32×32 partitioning and 16×16 partitioning, but only supports 8×8 partitioning.
[0092] by Figure 4 For example, for any first sub-block, when the 3rd and 4th bits of the 1-byte ROI information transmitted by the first sub-block are 00, it indicates that the preset CU partitioning parameter cu_size of the first sub-block is 0; when the 3rd and 4th bits of the 1-byte ROI information transmitted by the first sub-block are 01, it indicates that the preset CU partitioning parameter cu_size of the first sub-block is 1; when the 3rd and 4th bits of the 1-byte ROI information transmitted by the first sub-block are 10, it indicates that the preset CU partitioning parameter cu_size of the first sub-block is 2.
[0093] For any first sub-block, if the preset CU mode parameter cu_mode = 0, the CU prediction mode of the first sub-block is indicated to be determined according to RDO; if the preset CU mode parameter cu_mode = 1, the first sub-block is indicated to specify the intra-prediction mode; if the preset CU mode parameter cu_mode = 2, the first sub-block is indicated to specify the inter-prediction skip mode.
[0094] by Figure 4 For example, for any first sub-block, when the 5th and 6th bits of the 1-byte ROI information transmitted by the first sub-block are 00, it indicates that the preset CU mode parameter cu_mode of the first sub-block is 0; when the 5th and 6th bits of the 1-byte ROI information transmitted by the first sub-block are 01, it indicates that the preset CU mode parameter cu_mode of the first sub-block is 1; when the 5th and 6th bits of the 1-byte ROI information transmitted by the first sub-block are 10, it indicates that the preset CU mode parameter cu_mode of the first sub-block is 2.
[0095] For any first sub-block, the preset CU partitioning parameter cu_size and the preset CU mode parameter cu_mode of the first sub-block may have four cases: 1. cu_size is determined by RDO and cu_mode is determined by RDO; 2. cu_size is specified and cu_mode is determined by RDO; 3. cu_size is specified and cu_mode is specified; 4. cu_size is determined by RDO and cu_mode is specified.
[0096] However, in the actual encoding process, the preset CU mode parameter cu_mode has a higher priority than the preset CU partitioning parameter cu_size. That is, for any block to be encoded, the CU prediction modes within the partitioned blocks obtained by any CU partitioning method must be consistent.
[0097] For example, for a 16×16 block to be encoded, assuming that the 16×16 block to be encoded supports the 16×16 partitioning method based on the preset ROIMAP, but the CU prediction modes of the four internal 8×8 blocks are inconsistent, then the 16×16 block to be encoded needs to be modified to not support the 16×16 partitioning method.
[0098] Therefore, before encoding the block to be encoded, it is necessary to check whether there is a mismatch between the preset CU mode parameter cu_mode and the preset CU partition parameter cu_size according to the preset ROIMAP corresponding to the block to be encoded. If there is a mismatch, it may cause subsequent encoding errors.
[0099] For example, if a 16×16 block to be encoded allows for 16×16 partitioning, but the cu_mode of its four internal 8×8 blocks is inconsistent, then the current 16×16 block to be encoded is modified to not allow 16×16 partitioning. In other words, the target CU partitioning method and target CU prediction mode cannot be directly determined based on the ROIMAP, as this may lead to confusion. Self-correction processing is required on the preset CU partitioning parameter cu_size and preset CU mode parameter cu_mode read from the ROIMAP to determine the final target CU partitioning method and target CU prediction mode.
[0100] In one possible implementation, the target CU partitioning method and target CU prediction mode of the block to be encoded are determined according to the preset ROIMAP corresponding to the block to be encoded. This includes: for any candidate CU partitioning method, determining at least one second sub-block obtained by the block to be encoded under the candidate CU partitioning method, wherein the size of the second sub-block is greater than or equal to the size of the first sub-block and less than or equal to the size of the block to be encoded; for any second sub-block, if the preset CU partitioning parameters of each first sub-block included in the second sub-block indicate support for the candidate CU partitioning method, and the preset CU mode parameters of each first sub-block included in the second sub-block are the same, then the candidate CU partitioning method is determined as the target CU partitioning method of the second sub-block; the CU prediction mode indicated by the preset CU mode parameters of each first sub-block included in the second sub-block is determined as the candidate CU prediction mode of the second sub-block; for any second sub-block under any target CU partitioning method, the target CU prediction mode of the second sub-block is determined according to the candidate CU prediction mode of the second sub-block.
[0101] Taking a 32×32 block to be encoded (blk_32×32_0) as an example, the process of self-correction based on the preset ROIMAP corresponding to the 32×32 block to be encoded (blk_32×32_0) can be as follows.
[0102] The candidate CU partitioning methods corresponding to the 32×32 block to be encoded (blk_32×32_0) include: 32×32 partitioning, 16×16 partitioning, and 8×8 partitioning.
[0103] The following processing is performed for the 8×8 candidate partitioning method.
[0104] The 32×32 block to be encoded (blk_32×32_0) is divided into 16 8×8 second sub-blocks (also the first sub-blocks) (blk_8×8_0 to blk_8×8_15) under the 8×8 candidate partitioning method.
[0105] Taking the 8×8 second sub-block (blk_8×8_0) as an example, since the preset CU partitioning parameter cu_size of the 8×8 second sub-block (blk_8×8_0) can be any value of 0, 1, or 2, it indicates that the 8×8 partitioning method is supported. Therefore, the target CU partitioning parameter cu_size_8×8[0] = 1 of the 8×8 second sub-block (blk_8×8_0) indicates that the 8×8 partitioning method is supported, that is, the 8×8 partitioning method is the target CU partitioning method of the 8×8 second sub-block (blk_8×8_0).
[0106] The candidate CU mode parameter cu_mode_8×8[0] of the 8×8 second sub-block (blk_8×8_0) is the preset CU mode parameter cu_mode of the 8×8 second sub-block (blk_8×8_0). For example, if the preset CU mode parameter cu_mode of the 8×8 second sub-block (blk_8×8_0) is 1 (specifying the Intra prediction mode), then the candidate CU mode parameter cu_mode_8×8[0] of the 8×8 second sub-block (blk_8×8_0) can be determined to be 1, that is, the candidate CU prediction mode of the 8×8 second sub-block (blk_8×8_0) is the Intra prediction mode.
[0107] By analogy, the target CU partitioning parameter cu_size_8×8[0-15] and the candidate CU mode parameter cu_mode_8×8[0-15] of each of the 16 8×8 second sub-blocks (blk_8×8_0 to blk_8×8_15) can be determined.
[0108] In one example, the target CU partitioning parameter cu_size_8×8 = 1 indicates that 8×8 partitioning is supported; the target CU partitioning parameter cu_size_8×8 = 0 indicates that 8×8 partitioning is not supported. Based on the preset CU partitioning parameter cu_size, it is known that 8×8 partitioning is always supported; therefore, the target CU partitioning parameter cu_size_8×8 is always 1.
[0109] In one example, the candidate CU mode parameter cu_mode_8×8 = 0 indicates that the candidate CU prediction mode is determined by RDO; cu_mode_8×8 = 1 indicates that the candidate CU prediction mode indicates intra-frame prediction (Intra) mode; cu_mode_8×8 = 2 indicates that the candidate CU prediction mode indicates inter-frame prediction (skip) mode; and cu_mode_8×8 = 3 indicates that 8×8 partitioning mode is not supported. Since 8×8 partitioning is always supported, the candidate CU mode parameter cu_mode_8×8 cannot be 3.
[0110] The following processing is performed for the 16×16 candidate partitioning method.
[0111] The 32×32 block to be encoded (blk_32×32_0) is divided into four 16×16 second sub-blocks (blk_16×16_0 to blk_16×16_3) under the 16×16 candidate partitioning method. The 16×16 second sub-block (blk_16×16_0) includes four 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_3); the 16×16 second sub-block (blk_16×16_1) includes four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7); the 16×16 second sub-block (blk_16×16_2) includes four 8×8 first sub-blocks (blk_8×8_8 to blk_8×8_11); and the 16×16 second sub-block (blk_16×16_3) includes four 8×8 first sub-blocks (blk_8×8_12 to blk_8×8_15).
[0112] Taking the 16×16 second sub-block (blk_16×16_1) as an example, if the preset CU partitioning parameter cu_size of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) included in the 16×16 second sub-block (blk_16×16_1) is less than 2 (that is, cu_size is 0 or 1), it is determined that the preset CU partitioning parameter cu_size of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) all indicate support for the 16×16 partitioning method; if at least one of the preset CU partitioning parameters cu_size of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) is 2, it is determined that the preset CU partitioning parameter cu_size of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) indicates that the 16×16 partitioning method is not supported.
[0113] If the preset CU partitioning parameter cu_size of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) all indicate support for 16×16 partitioning, and the preset CU mode parameter cu_mode of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) is the same, then the target CU partitioning parameter cu_size_16×16[1] of the 16×16 second sub-block (blk_16×16_1) can be determined to be 1, indicating support for 16×16 partitioning, that is, 16×16 partitioning is the target CU partitioning method of the 16×16 second sub-block (blk_16×16_1). Moreover, the candidate CU mode parameter cu_mode_16×16[1] of the 16×16 second sub-block (blk_16×16_1) is the preset CU mode parameter cu_mode of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7). For example, if the preset CU mode parameter cu_mode of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) is 2 (specifying the inter-frame prediction skip mode), then the candidate CU mode parameter cu_mode_16×16[1] of the 16×16 second sub-block (blk_16×16_1) can be determined to be 2, that is, the candidate CU prediction mode of the 16×16 second sub-block (blk_16×16_1) is the inter-frame prediction skip mode.
[0114] If the preset CU partitioning parameter cu_size of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) indicates that the 16×16 partitioning method is not supported, or if the preset CU partitioning parameter cu_size of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) all indicate that the 16×16 partitioning method is supported, but the preset CU mode parameter cu_mode of the four 8×8 first sub-blocks (blk_8×8_4 to blk_8×8_7) is different, then it can be determined that the target CU partitioning parameter cu_size_16×16[1] of the 16×16 second sub-block (blk_16×16_1) is 0, indicating that the 16×16 partitioning method is not supported, that is, the 16×16 partitioning method is the non-target CU partitioning method of the 16×16 second sub-block (blk_16×16_1). At this time, the candidate CU mode parameter cu_mode_16×16[1] of the second sub-block (blk_16×16_1) is 3, indicating that the 16×16 partitioning mode is not supported.
[0115] By analogy, the target CU partitioning parameter cu_size_16×16[0-3] and the candidate CU mode parameter cu_mode_16×16[0-3] of each of the four 16×16 second sub-blocks (blk_16×16_0 to blk_16×16_3) can be determined.
[0116] In one example, the target CU partitioning parameter cu_size_16×16 = 1 indicates that 16×16 partitioning is supported; the target CU partitioning parameter cu_size_16×16 = 0 indicates that 16×16 partitioning is not supported.
[0117] In one example, the candidate CU mode parameter cu_mode_16×16 = 0 indicates that the candidate CU prediction mode is determined by RDO; the candidate CU mode parameter cu_mode_16×16 = 1 indicates that the candidate CU prediction mode indicates intra-frame prediction (Intra) mode; the candidate CU mode parameter cu_mode_16×16 = 2 indicates that the candidate CU prediction mode indicates inter-frame prediction (skip) mode; and the candidate CU mode parameter cu_mode_16×16 = 3 indicates that 16×16 partitioning mode is not supported.
[0118] The following processing is performed for the 32×32 candidate partitioning method.
[0119] The 32×32 block to be encoded (blk_32×32_0) is partitioned into one 32×32 second sub-block (blk_32×32_0) under the 32×32 candidate partitioning method. The 32×32 second sub-block (blk_32×32_0) includes 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15).
[0120] If the preset CU partitioning parameter cu_size of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) included in the 32×32 second sub-block (blk_32×32_0) is less than 1 (i.e., cu_size is 0 for all of them), then the preset CU partitioning parameter cu_size of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) indicates that the 32×32 partitioning mode is supported. If the preset CU partitioning parameter cu_size of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) has at least one 1 or 2, then the preset CU partitioning parameter cu_size of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) indicates that the 32×32 partitioning mode is not supported.
[0121] If the preset CU partitioning parameter cu_size of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) all indicate support for 32×32 partitioning, and the preset CU mode parameter cu_mode of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) is the same, then the target CU partitioning parameter cu_size_32×32[0] of the 32×32 second sub-block (blk_32×32_0) can be determined to be 1, indicating support for 32×32 partitioning, that is, 32×32 partitioning is the target CU partitioning method of the 32×32 second sub-block (blk_32×32_0). Furthermore, the candidate CU mode parameter cu_mode_32×32[0] of the 32×32 second sub-block (blk_32×32_0) is the preset CU mode parameter cu_mode of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15). For example, if the preset CU mode parameter cu_mode of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) is 0 (the CU prediction mode is determined by RDO), then the candidate CU mode parameter cu_mode_32×32[0] of the 32×32 second sub-block (blk_32×32_0) can be determined to be 0, that is, the candidate CU prediction mode of the 32×32 second sub-block (blk_32×32_0) is determined by RDO.
[0122] If the preset CU partitioning parameter cu_size of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) indicates that the 32×32 partitioning method is not supported, or if the preset CU partitioning parameter cu_size of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) all indicate that the 32×32 partitioning method is supported, but the preset CU mode parameter cu_mode of the 16 8×8 first sub-blocks (blk_8×8_0 to blk_8×8_15) is different, then it can be determined that the target CU partitioning parameter cu_size_32×32[0] of the 32×32 second sub-block (blk_32×32_0) is 0, indicating that the 32×32 partitioning method is not supported, that is, the 32×32 partitioning method is the non-target CU partitioning method of the 32×32 second sub-block (blk_32×32_0). At this time, the candidate CU mode parameter cu_mode_32×32[0] of the second sub-block (blk_32×32_0) is 3, indicating that the 32×32 partitioning mode is not supported.
[0123] In one example, the target CU partitioning parameter cu_size_32×32 = 1 indicates that the 32×32 partitioning method is supported; the target CU partitioning parameter cu_size_32×32 = 0 indicates that the 32×32 partitioning method is not supported.
[0124] In one example, the candidate CU mode parameter cu_mode_32×32 = 0 indicates that the candidate CU prediction mode is determined by RDO; the candidate CU mode parameter cu_mode_32×32 = 1 indicates that the candidate CU prediction mode indicates intra-frame prediction (Intra) mode; the candidate CU mode parameter cu_mode_32×32 = 2 indicates that the candidate CU prediction mode indicates inter-frame prediction (skip) mode; and the candidate CU mode parameter cu_mode_32×32 = 3 indicates that 32×32 partitioning mode is not supported.
[0125] Taking a 32×32 block to be encoded (blk_32×32_0) as an example, based on the preset ROIMAP corresponding to the block to be encoded (blk_32×32_0), after the above processing, we get cu_size_32×32[0], cu_size_16×16[0-3], cu_size_8×8[0-15], cu_mode_32×32[0], cu_mode_16×16[0-3], cu_mode_8×8[0-15], and qp'_32×32.
[0126] In one possible implementation, for any second sub-block under any target CU partitioning method, the target CU prediction mode of the second sub-block is determined according to the candidate CU prediction mode of the second sub-block, including: if a preset CU prediction mode exists for the block to be encoded, the preset CU prediction mode is determined as the target CU prediction mode of the second sub-block for any second sub-block under any target CU partitioning method; if no preset CU prediction mode exists for the block to be encoded, the candidate CU prediction mode of the second sub-block is determined as the target CU prediction mode of the second sub-block for any second sub-block under any target CU partitioning method.
[0127] When a preset CU prediction mode exists for the block to be encoded, the preset CU prediction mode has a higher priority. Therefore, for any second sub-block under any target CU partitioning method, without considering the candidate CU prediction modes of the second sub-block, the preset CU prediction mode needs to be determined as the target CU prediction mode of the second sub-block.
[0128] The block to be encoded corresponds to either the preset CU mode parameter `forced_intra` or `force_skip`. `forced_intra = 1` or `force_skip = 1` indicates that the block to be encoded has a preset CU prediction mode; `forced_intra = 0` and `force_skip = 0` indicates that the block to be encoded does not have a preset CU prediction mode. `forced_intra = 1` indicates that the preset CU prediction mode of the block to be encoded is the intra-frame prediction (Intra) mode; `force_skip = 1` indicates that the preset CU prediction mode of the block to be encoded is the inter-frame prediction (skip) mode.
[0129] Taking a 32×32 block to be encoded (blk_32×32_0) as an example, when the preset CU mode parameters forced_intra=1 or force_skip=1 for the 32×32 block to be encoded (blk_32×32_0) are forced_intra=1 or force_skip=1, cu_mode_32×32[0], cu_mode_16×16[0-3], and cu_mode_8×8[0-15] need to be adjusted to 0. That is, for the 32×32 block to be encoded (blk_32×32_0) in any For any second sub-block under a target CU partitioning method, the preset CU prediction mode indicated by the preset CU mode parameter is determined as the target CU prediction mode of the second sub-block; when the preset CU mode parameter forced_intra=0 and force_skip=0 of the 32×32 block to be encoded (blk_32×32_0) remains unchanged, cu_mode_32×32[0], cu_mode_16×16[0-3], and cu_mode_8×8[0-15] remain unchanged.
[0130] In one possible implementation, the block to be encoded is encoded according to the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the encoding result of the block to be encoded. This includes: for any second sub-block under any target CU partitioning method, encoding the second sub-block according to the target QP value, the target CU partitioning method of the second sub-block, and the target CU prediction mode of the second sub-block to obtain the encoding result of the second sub-block; and comparing the rate-distortion cost of the encoding result of each second sub-block of the block to be encoded under each target CU partitioning method to determine the target encoding result of the block to be encoded.
[0131] Based on the target QP value, the target CU partitioning method and the target CU prediction mode for each second sub-block, each second sub-block in the block to be encoded is encoded. By comparing the rate-distortion cost, the optimal CU partitioning method and the optimal CU prediction mode for the block to be encoded are determined, and the encoding results corresponding to the optimal CU partitioning method and the optimal CU prediction mode are determined as the target encoding results for the block to be encoded.
[0132] Taking a 32×32 block to be encoded (blk_32×32_0) as an example, the encoding process can be as follows.
[0133] Step 1: Based on cu_size_32×32[0] and cu_mode_32×32[0], determine whether 32×32 block encoding is possible. If possible, adjust the preset CU mode parameters forced_intra and forced_skip, encode the 32×32 block, and compare the rate-distortion cost after processing various CU prediction modes to obtain the optimal CU prediction mode under 32×32 blocks. If not possible, continue processing the 16×16 partitioning method.
[0134] If cu_size_32×32[0]=1 and cu_mode_32×32[0]≠3, adjust forced_intra and forced_skip according to cu_size_32×32[0] and cu_mode_32×32[0]. The adjustment rules are as follows:
[0135] If cu_mode_32×32[0]=0, then forced_intra and forced_skip remain unchanged;
[0136] If cu_mode_32×32[0]=1, then forced_intra=1;
[0137] If cu_mode_32×32[0]=2, then forced_skip=1;
[0138] Encode the 32×32 block (blk_32×32_0) based on the adjusted forced_intra and forced_skip.
[0139] Step 2: For any 16×16 block, based on its `cu_size_16×16` and `cu_mode_16×16`, determine if the 16×16 block can be encoded. If so, adjust the preset CU mode parameters `forced_intra` and `forced_skip`, encode the 16×16 block, and compare the rate-distortion costs after processing various CU prediction modes to obtain the optimal CU prediction mode for the 16×16 block. If not, continue processing the next 16×16 block until four 16×16 blocks have been traversed, then continue processing the 8×8 partitioning method.
[0140] Taking a 16×16 block (blk_16×16_0) as an example:
[0141] If cu_size_16×16[0]=1 and cu_mode_16×16[0]≠3, adjust forced_intra and forced_skip according to cu_size_16×16[0] and cu_mode_16×16[0]. The adjustment rules are as follows:
[0142] If cu_mode_16×16[0]=0, then forced_intra and forced_skip remain unchanged;
[0143] If cu_mode_16×16[0]=1, then forced_intra=1;
[0144] If cu_mode_16×16[0]=2, then forced_skip=1;
[0145] The 16×16 block (blk_16×16_0) is encoded in 16×16 format based on the adjusted forced_intra and forced_skip.
[0146] The processing method for the other three 16×16 blocks (blk_16×16_1 to blk_16×16_3) is similar and will not be elaborated here.
[0147] Step 3: For any given 8×8 block, determine whether it can be encoded using 8×8 block encoding based on its cu_size_8×8 and cu_mode_8×8 parameters. If it can, adjust the preset CU mode parameters forced_intra and forced_skip, encode the 8×8 block, and compare the rate-distortion costs after processing various CU prediction modes to obtain the optimal CU prediction mode for that 8×8 block. If it cannot, continue to the next 8×8 block until all 16 8×8 blocks have been traversed.
[0148] Taking an 8×8 block (blk_8×8_0) as an example:
[0149] If cu_size_8×8[0]=1 and cu_mode_8×8[0]≠3, adjust forced_intra and forced_skip according to cu_size_8×8[0] and cu_mode_8×8[0], and the adjustment rules are as follows:
[0150] If cu_mode_8×8[0]=0, then forced_intra and forced_skip remain unchanged;
[0151] If cu_mode_8×8[0]=1, then forced_intra=1;
[0152] If cu_mode_8×8[0]=2, then forced_skip=1;
[0153] Encode the 8×8 block (blk_8×8_0) in 8×8 division based on the adjusted forced_intra and forced_skip.
[0154] The processing method for the other 15 8×8 blocks (blk_8×8_1 to blk_8×8_15) is similar and will not be repeated here.
[0155] Finally, rate-distortion costs were compared between the optimal CU prediction modes for 32×32 blocks, four 16×16 blocks, and sixteen 8×8 blocks to determine the optimal CU partitioning method and optimal CU prediction mode for the 32×32 block to be encoded (blk_32×32_0), and the corresponding encoding results were determined as the target encoding results for the 32×32 block to be encoded (blk_32×32_0).
[0156] According to the video coding method of this disclosure, for any block to be encoded in a video frame, the preset QP value of the block to be encoded is adjusted according to the time layer of the video frame and the preset ROIMAP corresponding to the block to be encoded, to obtain the target QP value of the block to be encoded; the target CU partitioning method and the target CU prediction mode of the block to be encoded are determined according to the preset ROIMAP corresponding to the block to be encoded; the block to be encoded is encoded according to the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the target encoding result of the block to be encoded. Thus, in the video coding process, the time layer of different video frames and the ROI region in the video frame are comprehensively considered, and different processing is performed on video frames of different time layers and the ROI region and non-ROI region in the video frame, so as to effectively save the coding bitrate while enhancing the ROI region.
[0157] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0158] In addition, this disclosure also provides a video encoder, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any of the video encoding methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the relevant section on methods and will not be repeated here.
[0159] Figure 5 A block diagram of a video encoder according to an embodiment of this disclosure is shown. Figure 5 As shown, the video encoder 50 includes:
[0160] The first determining module 51 is used to adjust the preset QP value of any block to be encoded in the video frame to be encoded according to the time layer of the video frame to be encoded and the preset ROIMAP corresponding to the block to be encoded, so as to obtain the target QP value of the block to be encoded.
[0161] The second determining module 52 is used to determine the target CU partitioning method and target CU prediction mode of the block to be encoded based on the preset ROIMAP corresponding to the block to be encoded.
[0162] The encoding module 53 is used to encode the block to be encoded according to the target QP value, the target CU partitioning method, and the target CU prediction mode, so as to obtain the target encoding result of the block to be encoded.
[0163] In one possible implementation, the block to be encoded includes multiple first sub-blocks, and the preset ROIMAP corresponding to the block to be encoded includes preset QP adjustment parameters, preset CU partitioning parameters, and preset CU mode parameters for each first sub-block.
[0164] In one possible implementation, the first determining module 51 is specifically used for:
[0165] For any first sub-block in the block to be encoded, the QP adjustment value of the first sub-block is determined based on the preset QP adjustment parameters of the first sub-block, the time layer of the video frame to be encoded, and the preset QP value.
[0166] Determine the target QP adjustment value of the block to be encoded based on the QP adjustment value of each first sub-block in the block to be encoded;
[0167] The preset QP value is adjusted based on the target QP adjustment value to obtain the target QP value.
[0168] In one possible implementation, the first determining module 51 is specifically used for:
[0169] The time layer threshold is determined based on the total number of time layers in the group of pictures (GOP) to which the video frame to be encoded belongs.
[0170] For any first sub-block in the block to be encoded, if the time layer of the video frame to be encoded is greater than the time layer threshold, the QP adjustment value of the first sub-block is determined according to the preset QP adjustment parameters, the preset QP value, and the first preset QP adjustment strategy of the first sub-block.
[0171] When the time layer of the video frame to be encoded is less than or equal to the time layer threshold, the QP adjustment value of the first sub-block is determined according to the preset QP adjustment parameters, the preset QP value, and the second preset QP adjustment strategy of the first sub-block.
[0172] Among them, the QP adjustment range of the second preset QP adjustment strategy is greater than that of the first preset QP adjustment strategy.
[0173] In one possible implementation, the second determining module 52 is specifically used for:
[0174] For any candidate CU partitioning method, determine at least one second sub-block obtained by the block to be encoded under that candidate CU partitioning method, wherein the size of the second sub-block is greater than or equal to the size of the first sub-block and less than or equal to the size of the block to be encoded;
[0175] For any second sub-block, if the preset CU partitioning parameters of each first sub-block included in the second sub-block indicate support for the candidate CU partitioning method, and the preset CU mode parameters of each first sub-block included in the second sub-block are the same, then the candidate CU partitioning method is determined as the target CU partitioning method of the second sub-block.
[0176] The CU prediction mode indicated by the preset CU mode parameters of each of the first sub-blocks included in the second sub-block is determined as the candidate CU prediction mode of the second sub-block.
[0177] For any second sub-block under any target CU partitioning method, determine the target CU prediction mode of the second sub-block based on the candidate CU prediction mode of the second sub-block.
[0178] In one possible implementation, the second determining module 52 is specifically used for:
[0179] When a preset CU prediction mode exists for the block to be encoded, the preset CU prediction mode is determined as the target CU prediction mode for any second sub-block under any target CU partitioning method.
[0180] If there is no preset CU prediction mode for the block to be encoded, for any second sub-block under any target CU partitioning method, the candidate CU prediction mode of the second sub-block is determined as the target CU prediction mode of the second sub-block.
[0181] In one possible implementation, encoding module 53 is specifically used for:
[0182] For any second sub-block under any target CU partitioning method, the second sub-block is encoded according to the target QP value, the target CU partitioning method of the second sub-block, and the target CU prediction mode of the second sub-block to obtain the encoding result of the second sub-block.
[0183] For each second sub-block of the block to be encoded under each target CU partitioning method, rate-distortion cost is compared to determine the target encoding result of the block to be encoded.
[0184] In one possible implementation, the preset ROIMAP corresponding to the block to be encoded also includes: a position indication parameter for each first sub-block, wherein the position indication parameter for each first sub-block is used to indicate whether the block to be encoded is the first coded block in the video frame to be encoded;
[0185] The video encoder 50 also includes:
[0186] The judgment module is used to determine whether there is a transmission misalignment in the preset ROIMAP corresponding to the block to be encoded, based on the position indication parameters of each first sub-block included in the block to be encoded.
[0187] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0188] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.
[0189] This disclosure also provides a non-volatile computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0190] This disclosure also provides a computer program product, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above method.
[0191] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. (Refer to...) Figure 6 Device 1900 can be provided as a server or terminal device. (See reference...) Figure 6 The apparatus 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0192] Device 1900 may also include a power supply component 1926 configured to perform power management of device 1900, a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input / output interface 1958 (I / O interface). Device 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM macOS X TM Unix TM Linux TM FreeBSD TM Or similar.
[0193] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of the device 1900 to perform the above-described method.
[0194] Computer-readable storage media can be tangible devices capable of holding and storing programs / instructions used by instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0195] The computer program (or computer-readable program instructions) described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage medium in the respective computing / processing device.
[0196] The computer program (or computer program instructions) used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information of computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of this disclosure.
[0197] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0198] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0199] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0200] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0201] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A video encoding method, characterized in that, include: For any block to be encoded in a video frame, the preset quantization parameter QP value of the block to be encoded is adjusted according to the time layer of the video frame to be encoded and the preset region of interest map (ROIMAP) corresponding to the block to be encoded, so as to obtain the target QP value of the block to be encoded. The block to be encoded includes multiple first sub-blocks; the time layer of the video frame to be encoded and the preset ROIMAP corresponding to the block to be encoded are used to comprehensively determine the QP adjustment value of each first sub-block in the block to be encoded; Based on the preset ROIMAP corresponding to the block to be encoded, determine the target coding unit (CU) partitioning method and target CU prediction mode of the block to be encoded; The target QP value, the target CU partitioning method, and the target CU prediction mode are used to encode the block to be encoded to obtain the target encoding result of the block to be encoded. The preset ROIMAP corresponding to the block to be encoded includes preset QP adjustment parameters for each first sub-block, preset CU partitioning parameters for each first sub-block, and preset CU mode parameters for each first sub-block. The method further includes: The time layer threshold is determined based on the total number of time layers in the Group of Pictures (GOP) to which the video frame to be encoded belongs. For any first sub-block in the block to be encoded, if the time layer of the video frame to be encoded is greater than the time layer threshold, the QP adjustment value of the first sub-block is determined according to the preset QP adjustment parameters of the first sub-block, the preset QP value, and the first preset QP adjustment strategy. If the time layer of the video frame to be encoded is less than or equal to the time layer threshold, the QP adjustment value of the first sub-block is determined according to the preset QP adjustment parameters of the first sub-block, the preset QP value, and the second preset QP adjustment strategy. The QP adjustment range of the second preset QP adjustment strategy is greater than that of the first preset QP adjustment strategy.
2. The method according to claim 1, characterized in that, The step of adjusting the preset quantization parameter QP value of the block to be encoded based on the time layer of the video frame to be encoded and the preset region of interest (ROIMAP) corresponding to the block to be encoded, to obtain the target QP value of the block to be encoded, includes: The target QP adjustment value of the block to be encoded is determined based on the QP adjustment value of each first sub-block in the block to be encoded. The preset QP value is adjusted according to the target QP adjustment value to obtain the target QP value.
3. The method according to claim 1, characterized in that, The step of determining the target coding unit (CU) partitioning method and target CU prediction mode of the block to be encoded based on the preset ROIMAP corresponding to the block to be encoded includes: For any candidate CU partitioning method, determine at least one second sub-block obtained by the block to be encoded under that candidate CU partitioning method, wherein the size of the second sub-block is greater than or equal to the size of the first sub-block and less than or equal to the size of the block to be encoded; For any second sub-block, if the preset CU partitioning parameters of each first sub-block included in the second sub-block indicate support for the candidate CU partitioning method, and the preset CU mode parameters of each first sub-block included in the second sub-block are the same, then the candidate CU partitioning method is determined as the target CU partitioning method of the second sub-block. The CU prediction mode indicated by the preset CU mode parameters of each of the first sub-blocks included in the second sub-block is determined as the candidate CU prediction mode of the second sub-block. For any second sub-block under any target CU partitioning method, determine the target CU prediction mode of the second sub-block based on the candidate CU prediction mode of the second sub-block.
4. The method according to claim 3, characterized in that, The step of determining the target CU prediction mode for any second sub-block under any target CU partitioning method, based on the candidate CU prediction mode of the second sub-block, includes: When the block to be encoded has a preset CU prediction mode, for any second sub-block under any target CU partitioning method, the preset CU prediction mode is determined as the target CU prediction mode of the second sub-block. If there is no preset CU prediction mode for the block to be encoded, for any second sub-block under any target CU partitioning method, the candidate CU prediction mode of the second sub-block is determined as the target CU prediction mode of the second sub-block.
5. The method according to claim 3, characterized in that, The step of encoding the block to be encoded based on the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the encoding result of the block to be encoded includes: For any second sub-block under any target CU partitioning method, the second sub-block is encoded according to the target QP value, the target CU partitioning method of the second sub-block, and the target CU prediction mode of the second sub-block to obtain the encoding result of the second sub-block. For the encoding results of each second sub-block of the block to be encoded under each target CU partitioning method, a rate-distortion cost comparison is performed to determine the target encoding result of the block to be encoded.
6. The method according to claim 1, characterized in that, The preset ROIMAP corresponding to the block to be encoded also includes: a position indication parameter for each first sub-block, wherein the position indication parameter for each first sub-block is used to indicate whether the block to be encoded is the first encoding block in the video frame to be encoded; The method further includes: Based on the position indication parameters of each first sub-block included in the block to be encoded, determine whether there is a transmission misalignment in the preset ROIMAP corresponding to the block to be encoded.
7. A video encoder, characterized in that, include: The first determining module is used to adjust the preset quantization parameter QP value of any block to be encoded in the video frame to be encoded, based on the time layer of the video frame to be encoded and the preset region of interest mapping (ROIMAP) corresponding to the block to be encoded, to obtain the target QP value of the block to be encoded. The block to be encoded includes multiple first sub-blocks; the time layer of the video frame to be encoded and the preset ROIMAP corresponding to the block to be encoded are used to comprehensively determine the QP adjustment value of each first sub-block in the block to be encoded; The second determining module is used to determine the target coding unit (CU) partitioning method and target CU prediction mode of the block to be encoded based on the preset ROIMAP corresponding to the block to be encoded. The encoding module is used to encode the block to be encoded according to the target QP value, the target CU partitioning method, and the target CU prediction mode to obtain the target encoding result of the block to be encoded. The preset ROIMAP corresponding to the block to be encoded includes preset QP adjustment parameters for each first sub-block, preset CU partitioning parameters for each first sub-block, and preset CU mode parameters for each first sub-block. The first determining module is used for: The time layer threshold is determined based on the total number of time layers in the Group of Pictures (GOP) to which the video frame to be encoded belongs. For any first sub-block in the block to be encoded, if the time layer of the video frame to be encoded is greater than the time layer threshold, the QP adjustment value of the first sub-block is determined according to the preset QP adjustment parameters of the first sub-block, the preset QP value, and the first preset QP adjustment strategy. If the time layer of the video frame to be encoded is less than or equal to the time layer threshold, the QP adjustment value of the first sub-block is determined according to the preset QP adjustment parameters of the first sub-block, the preset QP value, and the second preset QP adjustment strategy. The QP adjustment range of the second preset QP adjustment strategy is greater than that of the first preset QP adjustment strategy.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
9. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-stage area-of-interest-based multi-view video coding method
CN103179405A
KR20230170597A