Video encoding method and apparatus
By introducing a temporal adaptive quantization method that weights distortion sensitivity and human eye sensitivity into video coding, the bitrate allocation of video coding is optimized, solving the problem of limited coding efficiency and quality improvement in existing technologies, and achieving higher coding efficiency and quality.
Patent Information
- Application Number
- CN202310498210.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-05
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-05-05
AI Technical Summary
Existing video coding technologies fail to effectively consider distortion propagation and texture complexity, resulting in limited improvements in coding efficiency and quality. In particular, high-efficiency video coding standards lack a unified spatiotemporal adaptive quantization algorithm.
By identifying the coded blocks that overlap with the reference block, and calculating the sub-temporal propagation parameters based on the distortion sensitivity and human eye sensitivity of each coded block, video coding is performed, and human eye sensitivity weighting is introduced to optimize bitrate allocation.
Without increasing computational complexity, it improves the subjective quality and coding efficiency of video coding, and increases the coding performance of BD-Rate structural similarity by 0.5%.
Smart Images

Figure CN116366848B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of video technology. More particularly, the present disclosure relates to a video encoding method and apparatus. BACKGROUND
[0002] In modern video coding standards, each frame in a video is usually divided into blocks of different sizes, and each block is encoded as the minimum unit. Therefore, the strategy for selecting the quantization parameter of each block becomes an important factor affecting the efficiency of video encoding.
[0003] Block-level adaptive quantization parameter adjustment can be divided into spatial domain and temporal domain. Spatial domain adaptive quantization mainly adjusts the block-level quantization parameter according to the complexity of each block in the current frame. Temporal domain adaptive quantization uses the distortion propagation effect caused by inter-frame prediction to use a smaller quantization parameter for blocks that are referenced more frequently by subsequent frames. SUMMARY
[0004] An exemplary embodiment of the present disclosure is to provide a video encoding method and apparatus to at least solve the problem of video encoding in the related art.
[0005] According to an exemplary embodiment of the present disclosure, a video encoding method is provided, comprising: determining at least one coding block at least partially overlapping with a reference block of a current block; determining, for each coding block in the at least one coding block, a sub-temporal propagation parameter of the current block to each coding block based on a distortion sensitivity of each coding block, respectively; determining a temporal propagation parameter of the current block based on the sub-temporal propagation parameter of each coding block; and video encoding the current block based on the temporal propagation parameter.
[0006] Optionally, the determining, for each coding block in the at least one coding block, a sub-temporal propagation parameter of the current block to each coding block based on a distortion sensitivity of each coding block, respectively, can include: determining the distortion sensitivity of each coding block; determining a propagation information amount of each coding block based on the distortion sensitivity of each coding block; determining a ratio of an overlapping area to a total area in each coding block as a ratio of each coding block, wherein the overlapping area refers to an area of the coding block overlapping with the reference block, and the total area refers to an area of the coding block; and determining the sub-temporal propagation parameter of the current block to each coding block based on the propagation information amount of each coding block and the ratio of each coding block.
[0007] Optionally, the determining the distortion sensitivity of each coding block can include: determining the distortion sensitivity of each coding block based on a variance of pixel values of each coding block.
[0008] Optionally, the determining the distortion sensitivity of each coding block based on the variance of pixel values of each coding block comprises: determining the distortion sensitivity of each coding block based on curBlock_infor=floor(2-q / 6>>8), wherein curBlock_infor represents the distortion sensitivity, floor() represents a floor function, q=strength*log(a*??2+1)-b,??2 represents the variance of pixel values of the current block, strength, a, and b are setting parameters, and log() represents a log function.
[0009] Optionally, the determining the propagation information amount of each coding block based on the distortion sensitivity of each coding block comprises: determining a propagation coefficient of each coding block based on an intra-coding loss and an inter-coding loss of each coding block; and determining the propagation information amount of each coding block based on the propagation coefficient of each coding block, the distortion sensitivity of each coding block, and a time-domain propagation parameter of each coding block.
[0010] Optionally, the determining the propagation information amount of each coding block based on the propagation coefficient of each coding block, the distortion sensitivity of each coding block, and the time-domain propagation parameter of each coding block comprises: determining a sum value of the distortion sensitivity of each coding block and the time-domain propagation parameter of each coding block as a sum value of each coding block; and determining a product of the sum value of each coding block and the propagation coefficient of each coding block as the propagation information amount of each coding block.
[0011] Optionally, the determining the propagation coefficient of each coding block based on the intra-coding loss and the inter-coding loss of each coding block comprises: determining a difference value obtained by subtracting a first predetermined value from a ratio of the intra-coding loss to the inter-coding loss of each coding block as the propagation coefficient of each coding block.
[0012] Optionally, the determining the sub-time-domain propagation parameter of each coding block of the current block based on the ratio of the propagation information amount of each coding block to each coding block comprises: determining a product of the ratio of the propagation information amount of each coding block to each coding block as the sub-time-domain propagation parameter of each coding block of the current block.
[0013] Optionally, the determining the time-domain propagation parameter of the current block based on the sub-time-domain propagation parameter of each coding block comprises: determining a sum value of the sub-time-domain propagation parameter of each coding block as the time-domain propagation parameter of the current block.
[0014] Optionally, the video coding of the current block based on the time-domain propagation parameter comprises: determining a time-domain quantization offset of the current block based on the time-domain propagation parameter; and performing the video coding based on the time-domain quantization offset.
[0015] Optionally, the determining the time-domain quantization offset of the current block based on the time-domain propagation parameter can comprise: determining the time-domain quantization offset of the current block based on QP_offset = -strength*log(c+propagation_cost / d), wherein QP_offset represents the time-domain quantization offset, propagation_cost represents the time-domain propagation parameter, and strength, c and d are setting parameters.
[0016] According to an example embodiment of the present disclosure, a video encoding apparatus is provided, comprising: an overlapping block determination unit configured to determine at least one encoding block at least partially overlapping with a reference block of a current block; a sub-parameter determination unit configured to determine, for each of the at least one encoding block, a sub-time-domain propagation parameter of the current block to each of the encoding blocks based on a distortion sensitivity of each of the encoding blocks, respectively; a propagation parameter determination unit configured to determine a time-domain propagation parameter of the current block based on the sub-time-domain propagation parameters of each of the encoding blocks; and a video encoding unit configured to video encode the current block based on the time-domain propagation parameter.
[0017] Optionally, the sub-parameter determination unit can be configured to: determine the distortion sensitivity of each of the encoding blocks; determine a propagation information amount of each of the encoding blocks based on the distortion sensitivity of each of the encoding blocks; determine a ratio of an overlapping area to a total area in each of the encoding blocks as a ratio of each of the encoding blocks, wherein the overlapping area refers to an area of an overlapping region of the encoding block with the reference block, and the total area refers to an area of the encoding block; and determine the sub-time-domain propagation parameter of the current block to each of the encoding blocks based on the propagation information amount of each of the encoding blocks and the ratio of each of the encoding blocks.
[0018] Optionally, the sub-parameter determination unit can be configured to determine the distortion sensitivity of each of the encoding blocks based on a variance of pixel values of each of the encoding blocks.
[0019] Optionally, the sub-parameter determination unit can be configured to determine the distortion sensitivity of each of the encoding blocks based on curBlock_infor = floor(2-q / 6>>8), wherein curBlock_infor represents the distortion sensitivity, floor() represents a floor function, q = strength*log(a*var(curBlock)+1)–b, var(curBlock) represents the variance of the pixel values of the current block, strength, a and b are setting parameters, and log() represents a log function.
[0020] Optionally, the sub-parameter determination unit can be configured to determine a propagation coefficient of each coding block based on the intra-coding loss and the inter-coding loss of each coding block; and determine the propagation information amount of each coding block based on the propagation coefficient of each coding block, the distortion sensitivity of each coding block and the time-domain propagation parameter of each coding block.
[0021] Optionally, the sub-parameter determination unit can be configured to determine a sum value of the distortion sensitivity of each coding block and the time-domain propagation parameter of each coding block as a sum value of each coding block; and determine a product of the sum value of each coding block and the propagation coefficient of each coding block as the propagation information amount of each coding block.
[0022] Optionally, the sub-parameter determination unit can be configured to determine a difference value obtained by subtracting a first predetermined value from a ratio of the intra-coding loss and the inter-coding loss of each coding block as the propagation coefficient of each coding block.
[0023] Optionally, the sub-parameter determination unit can be configured to determine a product of the propagation information amount of each coding block and the ratio of each coding block as the sub-time-domain propagation parameter of each coding block for the current block.
[0024] Optionally, the propagation parameter determination unit can be configured to determine a sum value of the sub-time-domain propagation parameter of each coding block as the time-domain propagation parameter of the current block.
[0025] Optionally, the video encoding unit can be configured to determine a time-domain quantization offset of the current block based on the time-domain propagation parameter; and perform video encoding based on the time-domain quantization offset.
[0026] Optionally, the video encoding unit can be configured to determine a time-domain quantization offset of the current block based on QP_offset = -strength*log(c+propagation_cost / d), wherein QP_offset represents the time-domain quantization offset, propagation_cost represents the time-domain propagation parameter, and strength, c and d are setting parameters.
[0027] According to an example embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a video encoding method according to an example embodiment of the present disclosure.
[0028] According to an example embodiment of the present disclosure, a computer readable storage medium is provided, having stored thereon a computer program, which, when executed by a processor of an electronic device, causes the electronic device to perform a video encoding method according to an example embodiment of the present disclosure.
[0029] According to an example embodiment of the present disclosure, a computer program product is provided, comprising computer programs / instructions which, when executed by a processor, implement a video encoding method according to an example embodiment of the present disclosure.
[0030] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0031] By determining at least one coding block at least partially overlapping with the reference block of the current block, for each coding block in the at least one coding block, respectively determining a sub-temporal propagation parameter of the current block to each coding block based on a distortion sensitivity degree of each coding block, determining a temporal propagation parameter of the current block based on the sub-temporal propagation parameter of each coding block, and video encoding the current block based on the temporal propagation parameter, the code rate can be better allocated by weighting all blocks in the propagation chain with human eye sensitivity, thereby improving the subjective quality and coding efficiency of video encoding without increasing the computational complexity.
[0032] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0033] The accompanying drawings incorporated in and forming a part of the specification, illustrate examples consistent with the present disclosure and serve to explain the principles of the present disclosure, and do not constitute an undue limitation on the present disclosure.
[0034] Figure 1 An example system architecture in which example embodiments of the present disclosure can be applied is shown.
[0035] Figure 2 A flowchart of a video encoding method according to an example embodiment of the present disclosure is shown.
[0036] Figure 3 A block diagram of a video encoding apparatus according to an example embodiment of the present disclosure is shown.
[0037] Figure 4 is a block diagram of an electronic device 400 according to an example embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the accompanying drawings.
[0039] It is to be noted that the terms "first", "second", and the like in the description and in the claims of the present disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged, where appropriate, so that the embodiments of the present disclosure described herein can be carried out in other sequences than the one illustrated or described herein. The implementations described in the following embodiments are not meant to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0040] It is to be noted herein that "at least one of a plurality" appearing in the present disclosure means that three types of alternatives are included, i.e., "any one of the plurality", "a combination of any number of items from the plurality", and "all of the plurality". For example, "including at least one of A and B" includes the following three alternatives: (1) including A; (2) including B; and (3) including A and B. For another example, "performing at least one of step one and step two" means the following three alternatives: (1) performing step one; (2) performing step two; and (3) performing step one and step two.
[0041] At present, there are two block-level adaptive quantization algorithms in the encoder, i.e., spatial domain (AQ) and time domain (MBTree / CUTree). AQ does not consider distortion propagation, and MBTree / CUTree does not well introduce texture complexity. When both of them are enabled, only the offset of the quantization parameters of the two algorithms is simply added. There is no general unified adaptive quantization algorithm combining time and spatial domains. In the High Efficiency Video Coding (HEVC) reference software HM and the new generation of video coding (VVC) reference software VTM, there is also a spatial domain adaptive quantization algorithm, which can improve the subjective quality of the reconstructed video, but does not consider distortion propagation, so the code rate is not well allocated.
[0042] The present disclosure proposes a time domain adaptive quantization method based on distortion sensitivity. Texture complexity weights are introduced in the original time domain quantization back propagation chain, and all blocks in the propagation chain are weighted by human eye sensitivity, so as to better allocate the code rate and further improve the coding quality and coding efficiency of video coding.
[0043] Below, the video coding method and device according to the exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. Figures 1 to 4 The video coding method and device according to the exemplary embodiments of the present disclosure will be described in detail below.
[0044] Figure 1An exemplary system architecture 100 in which exemplary embodiments of the present disclosure can be applied is shown.
[0045] As shown in Figure 1 , the system architecture 100 can include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. A user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages (e.g., a video encoding request, an encoded video), etc. The terminal devices 101, 102, 103 can be installed with various video applications, such as video recording software, video playing software, video encoding software, video editing software, etc. The terminal devices 101, 102, 103 can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various electronic devices with a display screen and capable of video playing, recording, editing, encoding, etc., including but not limited to smartphones, tablet computers, laptop computers, desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices and can be implemented as multiple software or software modules (e.g., to provide distributed services) or as a single software or software module. No specific limitation is made herein.
[0046] The terminal devices 101, 102, 103 can be installed with image acquisition devices (e.g., cameras) to acquire video data. In practice, the smallest visual unit constituting a video is a frame. Each frame is a static image. A sequence of frames in time is combined together to form a dynamic video. In addition, the terminal devices 101, 102, 103 can also be installed with components for converting electrical signals into sound (e.g., speakers) to play sound, and can also be installed with devices for converting analog audio signals into digital audio signals (e.g., microphones) to acquire sound.
[0047] The server 105 can be a server providing various services, such as a background server providing support for video applications installed on the terminal devices 101, 102, 103. The background server can analyze, store, etc. received video encoding requests, etc. and can also receive video encoding requests sent by the terminal devices 101, 102, 103 and feed back video encoding results corresponding to the video encoding requests to the terminal devices 101, 102, 103.
[0048] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module. No specific limitation is made herein.
[0049] It should be noted that the video encoding method provided by the embodiments of the present disclosure is generally executed by a terminal device, but can also be executed by a server, or can also be executed by the terminal device and the server in cooperation. Correspondingly, the video encoding apparatus can be arranged in the terminal device, the server, or both the terminal device and the server.
[0050] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above-mentioned system is only illustrative. According to the needs of implementation, there can be any number of terminal devices, networks and servers, and the present disclosure has no limitation in this regard.
[0051] Figure 2 A flowchart of a video encoding method according to an example embodiment of the present disclosure is shown.
[0052] During the encoding process, the encoder first reads a frame of a pre-encoding length N, down-samples the read frame to, for example, 1 / 2 resolution, and divides it into, for example, 8x8 blocks. Pre-analysis is performed on the blocks. The pre-analysis process includes calculating the intra prediction loss (intra_cost) and the inter prediction loss (inter_cost) of each block. For example, both losses can be measured using the Sum of Absolute Transformed Difference (SATD) index after transformation. After pre-analysis, the encoder makes a frame type decision based on the calculated losses, and decides the frame structure (for example, the positions of I, P and B frames and the corresponding levels) of all frames (for example, N frames) of the video. After determining the frame structure of all frames in the N frames, starting from the N-1 frame and proceeding backward, the time-domain propagation parameters of each block are calculated according to the decided frame structure.
[0053] Referring to Figure 2 At step S201, at least one encoding block that at least partially overlaps with the reference block of the current block is determined.
[0054] Since the reference block of the current block does not necessarily lie strictly within the grid (for example, an 8x8 grid) of the reference frame. Therefore, in the reference frame, there can be one or more blocks (for example, 8x8 blocks) that overlap at least partially with the reference block of the current block.
[0055] In the case that the reference block of the current block is strictly located within the grid (e.g., 8x8 grid) of the reference frame, in each reference frame, there can be one block (e.g., 8x8 block) that completely overlaps with the reference block of the current block. In this case, if there is only one reference frame, there can be one block (e.g., 8x8 block) that completely overlaps with the reference block of the current block; if there are multiple reference frames, there can be multiple blocks (e.g., 8x8 blocks) respectively located in multiple different frames that completely overlap with the reference block of the current block.
[0056] In the case that the reference block of the current block is not strictly located within the grid (e.g., 8x8 grid) of the reference frame, in each reference frame, there can be multiple blocks (e.g., 8x8 blocks) that completely overlap with the reference block of the current block. In this case, if there is only one reference frame, there can be multiple blocks (e.g., 8x8 blocks) located in the reference frame that partially overlap with the reference block of the current block; if there are multiple reference frames, in each of the multiple reference frames, there can be multiple blocks (e.g., 8x8 blocks) that partially overlap with the reference block of the current block.
[0057] In step S202, for each of the at least one coding block, a sub-temporal propagation parameter of the current block to each coding block is determined based on a distortion sensitivity degree of each coding block, respectively. Here, the sub-temporal propagation parameter represents an amount of information of the current block transmitted into each coding block by motion compensation, respectively.
[0058] For the traditional temporal adaptive quantization method, the amount of information of the current block itself is usually represented by intra_cost. However, the intra_cost can only reflect the spatial complexity of the current block to a certain extent, and cannot well measure the sensitivity degree of the human eye. Moreover, the intra_cost of a block with complex texture is usually higher, and for the block with complex texture, the traditional method considers that the amount of information contributed to the group of pictures (GOP) by the block is higher. Here, the group of pictures refers to the interval between two key frames (I frame / P frame). However, the human eye is not sensitive to the distortion of the block with complex texture. In view of the above shortcomings, the present disclosure introduces the sensitivity of the human eye when calculating the amount of information of the current block itself, so that the code rate can be better allocated by weighting all the blocks in the propagation chain with the sensitivity of the human eye, thereby improving the subjective quality and coding efficiency of video coding without increasing the computational complexity.
[0059] In the example embodiments of the present disclosure, when determining the sub-time-domain propagation parameters of each coding block by the current block, the distortion sensitivity of each coding block can be determined first, the propagation information amount of each coding block is determined based on the distortion sensitivity of each coding block, the ratio of the overlapping area to the total area in each coding block is determined as the ratio of each coding block, and then the sub-time-domain propagation parameters of each coding block by the current block are determined based on the propagation information amount of each coding block and the ratio of each coding block. Here, the overlapping area refers to the area of the region in the coding block that overlaps with the reference block, and the total area refers to the area of the coding block.
[0060] In the example embodiments of the present disclosure, when determining the distortion sensitivity of each coding block, the distortion sensitivity of each coding block can be determined based on the variance of the pixel value of each coding block.
[0061] In addition, when determining the distortion sensitivity of each coding block, the distortion sensitivity of each coding block can also be determined based on a more complex human eye sensitivity measurement index (for example, but not limited to, for example, Just noticeable difference (JND)) than the variance of the pixel value of the coding block.
[0062] In the example embodiments of the present disclosure, when determining the distortion sensitivity of each coding block based on the variance of the pixel value of each coding block, the distortion sensitivity of each coding block can be determined based on curBlock_infor=floor(2-q / 6>>8). Here, curBlock_infor represents the distortion sensitivity, floor() represents the floor function, q=strength*log(a*??2+1)-b,??2 represents the variance of the pixel value of the current block, strength, a, and b are setting parameters, log() represents the log function.??2 can effectively measure the texture complexity and human eye sensitivity of the current block.
[0063] As an example, a and b are model parameters, which are set to 0.000067 and 2.367, respectively. In order to reduce the computational complexity, curBlock_infor can be right-shifted by 8 bits to retain the decimal precision and then converted to an integer. As can be seen from the above formula, for blocks with more complex textures, the value of curBlock_infor will be smaller, and for areas with more flat textures, curBlock_infor will be larger. For each block, if most of the blocks on the reference chain that refer to this block are flat blocks, then the contribution of this block to the subjective quality of the entire image group is greater, and the quality of this block should be improved. Conversely, if most of the blocks on the reference chain are blocks with complex textures, then the contribution of this block to the subjective quality of the entire image group is smaller, and the quality of this block can be appropriately reduced.
[0064] In exemplary embodiments of the present disclosure, when determining the propagation information amount of each coding block based on the distortion sensitivity of each coding block, the propagation fraction of each coding block can be first determined based on the intra coding loss and the inter coding loss of each coding block, and then the propagation information amount of each coding block can be determined based on the propagation fraction of each coding block, the distortion sensitivity of each coding block, and the temporal propagation parameter of each coding block. Here, the propagation fraction can reflect the coefficient of motion compensation for reducing coding error for a coding block.
[0065] As an example, the propagation fraction is calculated for each 8x8 block of each frame, respectively. The propagation fraction of an 8x8 coding block is calculated using the intra coding loss and the inter coding loss calculated by pre-processing. In addition, the coding block can also be a coding block of other sizes other than the 8x8 coding block, such as, but not limited to, a 16x16 coding block, a 32x32 coding block, etc.
[0066] For example, the propagation fraction of a coding block can be calculated by the formula Progation_fraction = (1 - inter_cost / intra_cost). Here, Progation_fraction represents the propagation fraction, inter_cost represents the intra prediction loss, and intra_cost represents the inter coding loss.
[0067] In exemplary embodiments of the present disclosure, when determining the propagation information amount of each coding block based on the propagation fraction of each coding block, the distortion sensitivity of each coding block, and the temporal propagation parameter of each coding block, the sum value of the distortion sensitivity of each coding block and the temporal propagation parameter of each coding block can be first determined as the sum value of each coding block, and then the product of the sum value of each coding block and the propagation fraction of each coding block can be determined as the propagation information amount of each coding block.
[0068] As an example, the propagation amount of the current 8x8 block to the whole group of pictures can be calculated by the formula: Propagation amount = (curBlock_infor + Propagation_cost) * Propagation_fraction. Here, Propagation amount represents the propagation amount, curBlock_infor represents the distortion sensitivity, Propagation_cost represents the temporal propagation parameter of the encoding block, and Propagation_fraction represents the propagation coefficient. Here, the temporal propagation parameter of the encoding block represents the total amount of information of the encoding block propagated into the subsequent frame through motion compensation. For all 8x8 blocks of the last frame of the encoding sequence in the group of pictures, Propagation_cost is initialized to 0.
[0069] In the exemplary embodiments of the present disclosure, when determining the propagation coefficient of each encoding block based on the intra-frame encoding loss and the inter-frame encoding loss of each encoding block, the difference between the first predetermined value and the ratio of the intra-frame encoding loss and the inter-frame encoding loss of each encoding block can be determined as the propagation coefficient of each encoding block.
[0070] In the exemplary embodiments of the present disclosure, when determining the sub-temporal propagation parameter of each encoding block by the current block based on the ratio of the propagation amount of each encoding block and each encoding block, the product of the propagation amount of each encoding block and the ratio of each encoding block can be determined as the sub-temporal propagation parameter of each encoding block by the current block.
[0071] In step S203, the temporal propagation parameter of the current block is determined based on the sub-temporal propagation parameter of each encoding block.
[0072] The temporal propagation parameter is used to measure the sum of all information of the current block propagated to the future frame.
[0073] In the exemplary embodiments of the present disclosure, when determining the temporal propagation parameter of the current block based on the sub-temporal propagation parameter of each encoding block, the sum of the sub-temporal propagation parameters of each encoding block can be determined as the temporal propagation parameter of the current block.
[0074] Since the information of the current block is propagated to several frames after the encoding sequence through motion estimation (ME), we start from the N-1 frame, and calculate the temporal propagation parameter from back to front according to the motion vector (MV) obtained by ME.
[0075] For the current block, the temporal propagation parameter of the current block is calculated by accumulating the sub-temporal propagation parameters of all the blocks (e.g., 8x8 blocks) in the reference frame that overlap with the reference block of the current block according to the formula Propagation_cost += (overlap_area / MB_area)*Propagation_amount.
[0076] Here, the overlap_area represents the overlapping area of the block (e.g., 8x8 block) in the reference frame and the reference block, and the MB_area represents the area of the block (e.g., 8x8 block), for example, the area of the 8x8 block is 64.
[0077] In step S204, the current block is video encoded based on the temporal propagation parameter.
[0078] In an exemplary embodiment of the present disclosure, when the current block is video encoded based on the temporal propagation parameter, the temporal quantization offset of the current block can be first determined based on the temporal propagation parameter, and then video encoded based on the temporal quantization offset.
[0079] In an exemplary embodiment of the present disclosure, when the temporal quantization offset of the current block is determined based on the temporal propagation parameter, the temporal quantization offset of the current block can be determined based on QP_offset = -strength*log(c+propagation_cost / d). Here, QP_offset represents the temporal quantization offset, propagation_cost represents the temporal propagation parameter, and strength, c, and d are setting parameters.
[0080] As an example, c can be 1 and d can be 256. That is, when calculating the temporal quantization offset QP_offset of the current block, the formula QP_offset = -strength*log(1+propagation_cost / 256) can be used for calculation. For the propagation_cost of each block, the amount of information is no longer divided by itself, but is scaled by 256, and the scaling scale of all blocks in a single frame is unified.
[0081] In the example embodiment of the present disclosure, by determining at least one coded block at least partially overlapping with a reference block of a current block, determining, for each coded block in the at least one coded block, a sub-temporal propagation parameter of the current block to each coded block based on a distortion sensitivity of each coded block respectively, determining a temporal propagation parameter of the current block based on the sub-temporal propagation parameter of each coded block, and video encoding the current block based on the temporal propagation parameter, the subsequent block of the current block on the propagation chain is weighted based on texture complexity by introducing human eye sensitivity weight in temporal adaptive quantization, thereby improving the coding quality and coding efficiency of the video without increasing the computational complexity.
[0082] Structural Similarity (SSIM) is a full-reference index for measuring structural similarity. Compared with Peak Signal to Noise Ratio (PSNR), structural similarity can better reflect the subjective quality of video coding (e.g., reconstructed image). The scheme in the present disclosure can improve the 0.5% BD-Rate structural similarity coding performance without increasing the computational complexity. Here, BD-Rate is an objective index for measuring coding performance.
[0083] The above has been described in combination with Figures 1 to 2 A video encoding method according to the example embodiment of the present disclosure is described. Hereinafter, a video encoding apparatus according to the example embodiment of the present disclosure and units thereof will be described with reference to Figure 3 A video encoding apparatus according to the example embodiment of the present disclosure and units thereof will be described.
[0084] Figure 3 A block diagram of a video encoding apparatus according to the example embodiment of the present disclosure is shown.
[0085] With reference to Figure 3 , the video encoding apparatus includes an overlapping block determination unit 31, a sub-parameter determination unit 32, a propagation parameter determination unit 33, and a video encoding unit 34.
[0086] The overlapping block determination unit 31 is configured to determine at least one coded block at least partially overlapping with a reference block of a current block.
[0087] The sub-parameter determination unit 32 is configured to determine, for each coded block in the at least one coded block, a sub-temporal propagation parameter of the current block to each coded block based on a distortion sensitivity of each coded block respectively.
[0088] In an example embodiment of the present disclosure, the sub-parameter determination unit 32 can be configured to determine a distortion sensitivity of each coding block; determine an amount of propagation information of each coding block based on the distortion sensitivity of each coding block; determine a ratio of each coding block as a ratio of each coding block, wherein the overlapping area refers to an area of an overlapping region of the coding block with the reference block, and the total area refers to an area of the coding block; and determine a sub-temporal propagation parameter of each coding block for the current block based on the amount of propagation information of each coding block and the ratio of each coding block.
[0089] In an example embodiment of the present disclosure, the sub-parameter determination unit 32 can be configured to determine a distortion sensitivity of each coding block based on a variance of pixel values of each coding block.
[0090] In an example embodiment of the present disclosure, the sub-parameter determination unit 32 can be configured to determine a distortion sensitivity of each coding block based on curBlock_infor = floor(2-q / 6>>8), wherein curBlock_infor represents the distortion sensitivity, floor() represents a floor function, q = strength*log(a*var(2)+1)-b, var(2) represents a variance of pixel values of the current block, strength, a, and b are setting parameters, and log() represents a log function.
[0091] In an example embodiment of the present disclosure, the sub-parameter determination unit 32 can be configured to determine a propagation coefficient of each coding block based on an intra coding loss and an inter coding loss of each coding block; and determine an amount of propagation information of each coding block based on the propagation coefficient of each coding block, the distortion sensitivity of each coding block, and a temporal propagation parameter of each coding block.
[0092] In an example embodiment of the present disclosure, the sub-parameter determination unit 32 can be configured to determine a sum value of each coding block as a sum value of each coding block based on the distortion sensitivity of each coding block and the temporal propagation parameter of each coding block; and determine the amount of propagation information of each coding block as a product of the sum value of each coding block and the propagation coefficient of each coding block.
[0093] In an example embodiment of the present disclosure, the sub-parameter determination unit 32 can be configured to determine the propagation coefficient of each coding block as a difference value obtained by subtracting a ratio of the intra coding loss and the inter coding loss of each coding block from a first predetermined value.
[0094] In an example embodiment of the present disclosure, the sub-parameter determination unit 32 can be configured to determine a sub-temporal propagation parameter of each coding block for the current block as a product of the amount of propagation information of each coding block and the ratio of each coding block.
[0095] The propagation parameter determination unit 33 is configured to determine the time-domain propagation parameter of the current block based on the sub-time-domain propagation parameters of each coding block.
[0096] In an exemplary embodiment of the present disclosure, the propagation parameter determination unit 33 can be configured to determine a sum value of the sub-time-domain propagation parameters of each coding block as the time-domain propagation parameter of the current block.
[0097] The video encoding unit 34 is configured to video encode the current block based on the time-domain propagation parameter.
[0098] In an exemplary embodiment of the present disclosure, the video encoding unit 34 can be configured to determine a time-domain quantization offset of the current block based on the time-domain propagation parameter; and video encode based on the time-domain quantization offset.
[0099] In an exemplary embodiment of the present disclosure, the video encoding unit 34 can be configured to determine a time-domain quantization offset of the current block based on QP_offset = -strength*log(c+propagation_cost / d), wherein QP_offset represents the time-domain quantization offset, propagation_cost represents the time-domain propagation parameter, and strength, c, and d are setting parameters.
[0100] As to the apparatus in the above-described embodiments, the specific manner in which each unit performs operations has been described in detail in the embodiments related to the method, and thus will not be described in detail here.
[0101] The above has been described in conjunction with Figure 3 A video encoding apparatus according to an exemplary embodiment of the present disclosure is described. Next, an electronic device according to an exemplary embodiment of the present disclosure is described. Figure 4 An electronic device according to an exemplary embodiment of the present disclosure is described.
[0102] Figure 4 is a block diagram of an electronic device 400 according to an exemplary embodiment of the present disclosure.
[0103] Referring to Figure 4 , the electronic device 400 includes at least one memory 401 having a set of computer executable instructions stored therein and at least one processor 402, which, when the set of computer executable instructions is executed, performs a method of video encoding according to an exemplary embodiment of the present disclosure.
[0104] In exemplary embodiments of the present disclosure, the electronic device 400 can be a PC computer, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above-mentioned set of instructions. Here, the electronic device 400 is not necessarily a single electronic device, but can be a collection of any devices or circuits capable of executing the above-mentioned instructions (or set of instructions) individually or jointly. The electronic device 400 can also be a part of an integrated control system or a system manager, or can be configured to interface with a local or remote (e.g., via wireless transmission) portable electronic device.
[0105] In the electronic device 400, the processor 402 can include a central processor (CPU), a graphics processor (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processor can also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0106] The processor 402 can execute instructions or codes stored in the memory 401, where the memory 401 can also store data. The instructions and data can also be sent and received via a network through a network interface device, which can employ any known transmission protocol.
[0107] The memory 401 can be integrated with the processor 402, e.g., arranging RAM or flash memory within an integrated circuit microprocessor, etc. In addition, the memory 401 can include a separate device, such as an external disk drive, a storage array, or other storage device usable by any database system. The memory 401 and the processor 402 can be operatively coupled or can communicate with each other, e.g., through an I / O port, a network connection, etc., so that the processor 402 can read files stored in the memory.
[0108] In addition, the electronic device 400 can also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.). All components of the electronic device 400 can be connected to each other via a bus and / or a network.
[0109] According to exemplary embodiments of the present disclosure, a computer-readable storage medium including instructions, e.g., the memory 401 including instructions, is also provided, which can be executed by the processor 402 of the device 400 to complete the above-mentioned method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0110] According to exemplary embodiments of the present disclosure, a computer program product including computer programs / instructions, which, when executed by a processor, implement the method of video coding according to exemplary embodiments of the present disclosure, can also be provided.
[0111] The above has been described with reference to Figures 1 to 4 The method and apparatus for video coding according to exemplary embodiments of the present disclosure have been described. However, it should be understood that: Figure 3 The video coding apparatus and its units shown in the above can be respectively configured as software, hardware, firmware or any combination thereof which performs certain functions, Figure 4 The electronic device shown in the above is not limited to include the components shown above, but some components can be added or deleted as needed, and the above components can also be combined.
[0112] According to the method and apparatus for video coding of the present disclosure, by determining at least one coding block at least partially overlapping with a reference block of a current block, determining a sub-temporal propagation parameter of the current block to each coding block based on a distortion sensitivity of each coding block, respectively, determining a temporal propagation parameter of the current block based on the sub-temporal propagation parameter of each coding block, and video coding the current block based on the temporal propagation parameter, the code rate can be better allocated by weighting all blocks in a propagation chain with human eye sensitivity, and thus the subjective quality and coding efficiency of video coding are improved without increasing the computational complexity.
[0113] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0114] It should be understood that the present disclosure is not limited to the precise structures as has been described above and shown in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method of video coding, the method comprising: The method comprises: determining at least one coding block at least partially overlapping with a reference block of a current block; determining, for each coding block of the at least one coding block, a sub-temporal propagation parameter of the current block to the coding block based on a distortion sensitivity of the coding block respectively, wherein the distortion sensitivity represents a sensitivity of a human eye to distortion of the coding block; determining a temporal propagation parameter of the current block based on the sub-temporal propagation parameter of each coding block; video encoding the current block based on the temporal propagation parameter.
2. The video coding method of claim 1, wherein, The determining, for each coding block of the at least one coding block, a sub-temporal propagation parameter of the current block to the coding block based on a distortion sensitivity of the coding block respectively, comprises: determining the distortion sensitivity of each coding block; determining a propagation information amount of each coding block based on the distortion sensitivity of the coding block; determining a ratio of an overlapping area to a total area in each coding block as a ratio of each coding block, wherein the overlapping area refers to an area of the coding block overlapping with the reference block, and the total area refers to an area of the coding block; determining the sub-temporal propagation parameter of the current block to each coding block based on the propagation information amount of each coding block and the ratio of each coding block.
3. The video coding method of claim 2, wherein, The determining the distortion sensitivity of each coding block comprises: determining the distortion sensitivity of each coding block based on a variance of pixel values of the coding block.
4. The video coding method of claim 2, wherein, The determining a propagation information amount of each coding block based on the distortion sensitivity of the coding block comprises: determining a propagation coefficient of each coding block based on an intra coding loss and an inter coding loss of the coding block; determining the propagation information amount of each coding block based on the propagation coefficient of the coding block, the distortion sensitivity of the coding block, and a temporal propagation parameter of the coding block.
5. The video coding method of claim 4, wherein, The determining the propagation information amount of each coding block based on the propagation coefficient of the coding block, the distortion sensitivity of the coding block, and the temporal propagation parameter of the coding block comprises: determining a sum value of the distortion sensitivity of each coding block and the temporal propagation parameter of the coding block as a sum value of each coding block; determining a product of the sum value of each coding block and the propagation coefficient of the coding block as the propagation information amount of each coding block.
6. The video coding method of claim 1, wherein, The video encoding the current block based on the temporal propagation parameter comprises: determining a temporal quantization offset of the current block based on the temporal propagation parameter; video encoding based on the temporal quantization offset.
7. A video encoding apparatus, comprising: The method comprises: an overlapping block determining unit configured to determine at least one coding block at least partially overlapping with a reference block of a current block; a sub-parameter determining unit configured to determine, for each coding block of the at least one coding block, a sub-temporal propagation parameter of the current block to the coding block based on a distortion sensitivity of the coding block respectively, wherein the distortion sensitivity represents a sensitivity of a human eye to distortion of the coding block; a propagation parameter determining unit configured to determine a temporal propagation parameter of the current block based on the sub-temporal propagation parameter of each coding block; and a video encoding unit configured to video encode the current block based on the temporal propagation parameter.
8. An electronic device, comprising: The method comprises: a processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the video encoding method in any one of claims 1 to 6.
9. A computer readable storage medium storing a computer program, characterized in that, The computer program, when executed by the processor of the electronic device, causes the electronic device to perform the video encoding method in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and system for determining parameters of coding tree unit
CN113596483A