Screen content video coding perception code rate control method and device based on DCT domain JND
The DCT domain JND-based screen content video coding perceptual rate control method solves the problem of low screen content video coding efficiency in the existing technology. By classifying texture energy and edge information and combining the visual characteristics of the human eye, the rate allocation is optimized, and the coding quality and transmission efficiency are improved.
Patent Information
- Application Number
- CN202511145934.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-08-15
AI Technical Summary
The existing video coding standards have obviously insufficient compression efficiency when processing screen content videos, and cannot fully utilize the visual characteristics of the human eye to allocate bit rates, resulting in coding redundancy and increased computational complexity, which cannot effectively solve specific problems.
A perceptual rate control method for screen content video coding based on DCT domain JND is proposed. By obtaining the DCT coefficients of the screen content video, block classification is performed based on texture energy and edge information, and combined with the visual characteristics of the human eye, a perceptual distortion model is constructed to optimize the rate allocation.
It improves the encoding quality and rate-distortion performance of screen content video, enhances the perceived rate control accuracy, and optimizes the quality and transmission efficiency of the encoded video sequence.
Smart Images

Figure CN120751139A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video coding, and in particular to a method and device for perceptual bit rate control of screen content video coding based on DCT domain JND (Just Noticeable Difference). Background Art
[0002] With the continuous development of computer and multimedia technologies, modern society is rapidly entering an era dominated by visual information. As a core medium for information expression and communication, video has become an indispensable component of a wide range of fields, including education, communications, and entertainment. The booming rise of self-media, in particular, has profoundly transformed the production and dissemination of video content, significantly driving the advancement of video technology.
[0003] In recent years, the continuous evolution of cloud computing and mobile internet technologies has driven the rapid adoption of screen content video (SCV) applications, such as screen sharing, wireless projection, and distance education. Unlike natural video captured by cameras, screen content video is primarily generated by computers and other devices. Its characteristics include large, uniform backgrounds, repetitive patterns and characters, limited but highly saturated colors, high image contrast, and sharp edges. These characteristics significantly reduce the compression efficiency of traditional coding standards designed for natural video when processing screen content video. Therefore, it is necessary to develop specialized coding strategies tailored to the characteristics of screen content video, distinct from natural video.
[0004] Iterative upgrades in video technology are driving a shift in coding paradigms. The emergence of new video formats, featuring high resolution, high dynamic range, strong interactivity, and full-viewing angles, places higher demands on the compression performance and transmission efficiency of traditional video coding standards. To address this challenge, international standards organizations have jointly developed the next-generation video coding standard H.266 / VVC (Versatile Video Coding). Compared to its predecessor, HEVC, VVC achieves approximately 50% bitrate savings while maintaining the same subjective quality. Notably, VVC integrates several tools specifically designed for screen content video into its coding architecture, such as Intra Block Copy (IBC), Palette Mode (PLT), Adaptive Color Transform (ACT), and Adaptive Motion Vector Resolution (AMVR), significantly improving compression efficiency for screen content videos.
[0005] Rate control, a core component of the video encoding process, aims to efficiently utilize network bandwidth and optimize transmission performance. Its core task is to establish a precise mapping between bitrate and quantization parameters, ensuring that the output bitstream meets the target bitrate while simultaneously achieving an optimal balance between video quality and compression efficiency. While existing rate control algorithms have achieved high levels of optimization for removing spatial and temporal redundancy, further reducing redundancy beyond current levels within a hybrid coding framework often requires a significant increase in computational complexity.
[0006] Therefore, recent research has shifted towards incorporating the perceptual characteristics of the human visual system into the rate control process. Through a perception-driven bit resource allocation strategy, more bits are allocated to visually sensitive areas (such as those with complex textures and motion), effectively improving the user's subjective viewing experience while maintaining a limited or insignificant increase in bitrate. This perceptually integrated rate control approach has become a key development direction for breaking through coding performance bottlenecks and optimizing visual quality. Summary of the Invention
[0007] The main purpose of the present invention is to combine the characteristics of screen content and human visual characteristics, and propose a screen content video coding perceptual bit rate control method and device based on DCT domain JND to solve the technical problems mentioned in the above background technology, and improve the screen content video coding quality, rate-distortion performance and perceptual bit rate control accuracy.
[0008] The present invention adopts the following technical solutions:
[0009] In one aspect, a method for perceptual rate control of screen content video coding based on DCT domain JND includes:
[0010] S101, DCT coefficient acquisition step, obtaining a screen content video, performing discrete cosine transform (DCT) on the screen content video in blocks, and obtaining DCT coefficients of each block;
[0011] S102, texture energy and target bit number acquisition step, based on the DCT coefficients of each block, respectively obtain the sum of the absolute values of the low-frequency, medium-frequency and high-frequency coefficients in the DCT block; based on the sum of the absolute values of the medium-frequency coefficients and the high-frequency coefficients, obtain the texture energy of each DCT block; based on the low-frequency, medium-frequency and high-frequency coefficients, obtain edge information of each DCT block; based on the sum of the texture energies of all DCT blocks in each coding unit (CTU), obtain the texture energy of each CTU; based on the sum of the texture energies of all CTUs in each frame, obtain the texture energy of each frame; based on the texture energy of each CTU, obtain a CTU-level texture energy weight, perform CTU-level bit allocation based on the CTU-level texture energy weight, and obtain the CTU-level target bit number; based on the texture energy of each frame, obtain a frame-level texture energy weight, perform frame-level bit allocation based on the frame-level texture energy weight, and obtain the frame-level target bit number;
[0012] S103, a JND threshold acquisition step, obtaining a spatial contrast sensitivity threshold, a luminance masking modulation factor, and a contrast intensity based on the DCT coefficients of each block; classifying each DCT block into a flat block, an edge block, or a texture block based on the texture energy and edge information of each DCT block; obtaining a contrast masking adjustment factor based on the contrast intensity, the classification type, and the DCT frequency linear function; and obtaining a JND threshold in the DCT domain based on the product of the spatial contrast sensitivity threshold, the luminance masking modulation factor, and the contrast masking adjustment factor.
[0013] S104, a rate control quantization parameter acquisition step, obtaining a perceptual distortion index based on a JND threshold in the DCT domain; obtaining a Lagrange multiplier for a corresponding coding unit (CTU) based on the perceptual distortion index and a traditional Lagrange multiplier; and obtaining a final rate control quantization parameter based on the Lagrange multiplier.
[0014] S105, encoding control step, guides the actual encoding process and performs encoding control based on the CTU-level target bit number, the frame-level target bit number and the rate control quantization parameter.
[0015] Preferably, in said S101, for DCT block size, DCT coefficients The calculation formula is as follows:
[0016] ;
[0017] in, Indicates the image pixels, ; and Respectively represent and The compensation coefficient is calculated as follows:
[0018] .
[0019] Preferably, in S102, the texture energy of each DCT block is obtained based on the sum of the absolute values of the mid-frequency coefficients and the high-frequency coefficients, which is expressed as follows:
[0020] ;
[0021] in, It represents the sum of the absolute values of the intermediate frequency coefficients, that is, the sum of the absolute values of all DCT coefficients in the intermediate frequency region of the DCT block; It represents the sum of the absolute values of high-frequency coefficients, that is, the sum of the absolute values of all DCT coefficients in the high-frequency region of the DCT block;
[0022] Based on the low-frequency, mid-frequency, and high-frequency coefficients, the edge information of each DCT block is obtained, including:
[0023] Calculate the first edge information of each DCT block and the second edge information ,as follows:
[0024] ;
[0025] ;
[0026] in, Represents the average value of low-frequency energy, equal to Except for the number of DCT coefficients in the low-frequency region, Represents the sum of the absolute values of the low-frequency coefficients, that is, the sum of the absolute values of all DCT coefficients in the low-frequency region of the DCT block; Represents the average value of the intermediate frequency energy, which is equal to Except the number of DCT coefficients in the intermediate frequency region; Represents the average value of high-frequency energy, equal to Except the number of DCT coefficients in the high-frequency area.
[0027] Preferably, in S102, obtaining a CTU-level texture energy weight based on the texture energy of each CTU, performing CTU-level bit allocation based on the CTU-level texture energy weight, and obtaining a CTU-level target number of bits; obtaining a frame-level texture energy weight based on the texture energy of each frame, performing frame-level bit allocation based on the frame-level texture energy weight, and obtaining a frame-level target number of bits, includes:
[0028] The texture energy of the corresponding CTU is obtained based on the texture energy of all DCT blocks in each CTU , the texture energy of the frame is obtained based on the texture energy of all CTUs in the frame ;
[0029] Calculate frame-level texture energy weights separately and CTU-level texture energy weights ,as follows:
[0030] ;
[0031] ;
[0032] in, Represents the sum of texture energies of all frames in the current GOP, which is obtained by sequentially adding the texture energies of each frame in the GOP; It represents the total texture energy of the encoded frames in the current GOP, which is obtained by adding the texture energy of each frame that has been encoded; Indicates the total texture energy of the encoded CTU in the current frame;
[0033] Perform CTU-level bit allocation based on CTU-level texture energy weight to obtain the CTU-level target bit number ,as follows:
[0034] ;
[0035] in, Refers to the total number of bits available for the uncoded CTUs of the current frame, which is obtained by subtracting the target number of bits of the coded CTUs from the total bit budget of the current frame. Indicates the number of CTUs that have been encoded in the current frame. After each CTU is encoded, Add 1; Indicates the target total number of bits for the encoded CTUs in the current frame, which is obtained by summing the target number of bits previously allocated to these CTUs; Indicates the actual total number of bits of the coded CTU in the current frame, which is obtained by summing the actual number of bits generated by the coded CTU; Represents the smoothing window, which is used to adjust the target bit allocation of the remaining CTU according to and Deviation, dynamically correct the next bit allocation;
[0036] Based on the texture energy of each frame, the frame-level texture energy weight is obtained, and the frame-level bit allocation is performed based on the frame-level texture energy weight to obtain the frame-level target bit number. ,as follows:
[0037] ;
[0038] in, Indicates the total bit budget of the current GOP, which is calculated by the encoder based on the set bit rate and GOP frame number; Indicates the total number of bits actually used by the encoded frames in the current GOP. When encoding, the number of bits actually generated by each frame is summed up after encoding, and the total number is gradually updated. .
[0039] Preferably, in S103, obtaining a spatial contrast sensitivity threshold, a brightness masking modulation factor, and a contrast intensity based on the DCT coefficients of each block specifically includes:
[0040] Based on spatial frequency contrast sensitivity, obtain the spatial contrast sensitivity threshold ,as follows:
[0041] ;
[0042] in, and is the DCT normalization coefficient; represents the human eye tilt effect, The value is 0.6; represents the collective effect; Indicates the direction angle of the corresponding DCT coefficient;
[0043] represents the initial spatial contrast sensitivity threshold, as follows:
[0044] ;
[0045] in, 、 and represents a constant; Indicates the DCT coefficients The corresponding sub-band frequency;
[0046] Luminance masking modulation factor , which is expressed as follows:
[0047] ;
[0048] in, Indicates the average intensity value of the nth DCT block; The calculation is as follows:
[0049] ;
[0050] in, Represents the DC coefficient in the DCT block, which is used to approximate the average brightness value of the image block; N represents the block size of the DCT block;
[0051] Contrast intensity , which is expressed as follows:
[0052] ;
[0053] Among them, R represents DCT blocks of size, Indicates that a certain spatial frequency is The DCT coefficient value at this time; K represents the value range of pixel intensity.
[0054] Preferably, in S103, each DCT block is classified into a flat block, an edge block or a texture block based on the texture energy and edge information of each DCT block, specifically including:
[0055] When the texture energy of a DCT block satisfies When , it is directly judged as a flat block;
[0056] When satisfied When the DCT block or satisfy both , then the DCT block is determined to be an edge block, otherwise it is a flat block; and Respectively represent the first edge information and the second edge information of the DCT block;
[0057] When satisfied When the DCT block or satisfy both , it is divided into edge blocks, otherwise it is judged as texture blocks;
[0058] when When the DCT block or , it is determined to be an edge block, otherwise it is a texture block;
[0059] in, , , , , , .
[0060] Preferably, in said S103, a contrast masking adjustment factor is obtained based on contrast intensity, classification type and DCT frequency linear function. , as follows:
[0061] ;
[0062] Where t represents the adjustment factor, which is used to adjust the contrast intensity of flat blocks, texture blocks, and edge blocks; Indicates contrast intensity; Represents the gradient of the frequency linear function.
[0063] Preferably, in S104, a perceptual distortion index is obtained based on a JND threshold in the DCT domain; and a Lagrange multiplier of a corresponding coding unit CTU is obtained based on the perceptual distortion index and a traditional Lagrange multiplier, which is expressed as follows:
[0064] ;
[0065] in, represents the Lagrange multiplier of the mth coding unit CTU; represents the JND threshold of the mth coding unit, which is obtained by summing the JND thresholds of the DCT domain within the coding unit; is a preset constant, set to 0.01; represents the traditional Lagrange multiplier.
[0066] Preferably, in said S104, the final rate control quantization parameter is obtained based on the Lagrange multiplier , which is expressed as follows:
[0067] .
[0068] On the other hand, a device for perceptual rate control of screen content video coding based on DCT domain JND includes:
[0069] A DCT coefficient acquisition module is used to acquire screen content video, perform discrete cosine transform (DCT) on the screen content video in blocks, and obtain DCT coefficients of each block;
[0070] a texture energy and target bit number acquisition module, configured to obtain, based on the DCT coefficients of each block, the sum of the absolute values of the low-frequency, medium-frequency, and high-frequency coefficients in the DCT block; obtain the texture energy of each DCT block based on the sum of the absolute values of the medium-frequency coefficients and the high-frequency coefficients; obtain edge information of each DCT block based on the low-frequency, medium-frequency, and high-frequency coefficients; obtain the texture energy of each coding unit CTU based on the sum of the texture energies of all DCT blocks in the CTU; obtain the texture energy of each frame based on the sum of the texture energies of all CTUs in each frame; obtain a CTU-level texture energy weight based on the texture energy of each CTU, perform CTU-level bit allocation based on the CTU-level texture energy weight, and obtain a CTU-level target bit number; obtain a frame-level texture energy weight based on the texture energy of each frame, perform frame-level bit allocation based on the frame-level texture energy weight, and obtain a frame-level target bit number;
[0071] A JND threshold acquisition module is configured to obtain a spatial contrast sensitivity threshold, a luminance masking modulation factor, and a contrast intensity based on the DCT coefficients of each block; classify each DCT block into a flat block, an edge block, or a texture block based on the texture energy and edge information of each DCT block; obtain a contrast masking adjustment factor based on the contrast intensity, the classification type, and a linear function of the DCT frequency; and obtain a JND threshold in the DCT domain based on the product of the spatial contrast sensitivity threshold, the luminance masking modulation factor, and the contrast masking adjustment factor.
[0072] The rate control quantization parameter acquisition module is used to obtain the perceptual distortion index based on the JND threshold in the DCT domain; obtain the Lagrange multiplier of the corresponding coding unit (CTU) based on the perceptual distortion index and the traditional Lagrange multiplier; and obtain the final rate control quantization parameter based on the Lagrange multiplier;
[0073] The encoding control module is used to guide the actual encoding process and perform encoding control based on the CTU-level target bit number, frame-level target bit number and bit rate control quantization parameters.
[0074] Compared with the prior art, the present invention has the following beneficial effects:
[0075] (1) The present invention fully considers the content characteristics of screen content video and the characteristics of the human visual system, and uses the texture energy in the DCT domain to guide the target bit allocation. Compared with the allocation method in the standard that does not consider the screen content characteristics and visual redundancy, the target bit rate allocation scheme of the present invention is more accurate;
[0076] (2) The present invention fully considers the problem that the rate-distortion model in the standard does not take into account the characteristics of screen content video. Using the DCT domain JND threshold, a perceptual rate-distortion model of screen content video is constructed to obtain a perceptual distortion index. Based on the perceptual distortion index and the traditional Lagrange multiplier, the Lagrange multiplier of the corresponding coding unit CTU is obtained. Based on the Lagrange multiplier, the final rate control quantization parameter is obtained, which improves the quality and rate-distortion performance of the encoded video sequence and improves the perceptual rate control accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 A flowchart of a method for perceptual rate control of screen content video coding based on DCT domain JND provided by an embodiment of the present invention;
[0078] Figure 2 A flowchart of the overall process of the DCT domain JND-based screen content video coding perceptual rate control method provided by an embodiment of the present invention;
[0079] Figure 3A schematic diagram of a DCT block classification process for a method for perceptual rate control of screen content video coding based on DCT domain JND provided by an embodiment of the present invention;
[0080] Figure 4 A schematic diagram comparing the performance of the DCT-domain JND-based screen content video coding perceptual rate control method provided by an embodiment of the present invention and the VTM-20.0 default rate control algorithm on a Map sequence;
[0081] Figure 5 A schematic diagram showing a performance comparison between the DCT domain JND-based screen content video coding perceptual rate control method provided by an embodiment of the present invention and the VTM-20.0 default rate control algorithm on a Web_browsing sequence;
[0082] Figure 6 This is a structural block diagram of a device for perceptual rate control of screen content video coding based on DCT domain JND provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0083] Below in conjunction with specific embodiment, further set forth the present invention.Should be understood that these embodiments are only used to illustrate the present invention and are not used in limiting the scope of the present invention.In addition, should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall equally within the scope limited by the appended claims of the application.
[0084] See also Figure 1 and Figure 2 As shown, this embodiment provides a perceptual rate control method for screen content video coding based on DCT domain JND, including the following steps.
[0085] S101, DCT coefficient acquisition step, obtains screen content video, performs block discrete cosine transform DCT on the screen content video, and obtains DCT coefficients of each block.
[0086] Specifically, the input screen content video is subjected to block DCT (Discrete Cosine Transform), where the DCT block size is selected to be 8. DCT block size, The DCT coefficient calculation formula is as follows:
[0087] ;
[0088] in, Indicates the image pixels, , N=8. and is the compensation coefficient, calculated as follows:
[0089] .
[0090] S102, texture energy and target bit number acquisition step, based on the DCT coefficients of each block, respectively obtain the sum of the absolute values of the low-frequency, medium-frequency and high-frequency coefficients in the DCT block; based on the sum of the absolute values of the medium-frequency coefficients and the high-frequency coefficients, obtain the texture energy of each DCT block; based on the low-frequency, medium-frequency and high-frequency coefficients, obtain the edge information of each DCT block; based on the sum of the texture energies of all DCT blocks in each coding unit CTU, obtain the texture energy of each CTU; based on the sum of the texture energies of all CTUs in each frame, obtain the texture energy of each frame; based on the texture energy of each CTU, obtain a CTU-level texture energy weight, perform CTU-level bit allocation based on the CTU-level texture energy weight, and obtain the CTU-level target bit number; based on the texture energy of each frame, obtain a frame-level texture energy weight, perform frame-level bit allocation based on the frame-level texture energy weight, and obtain the frame-level target bit number.
[0091] Specifically, assuming 、 and Respectively represent The sum of the absolute values of the low-frequency, mid-frequency, and high-frequency coefficients in a block. In a DCT block, the frequency increases from the upper left corner to the lower right corner, and the block is divided into low-frequency, mid-frequency, and high-frequency regions. It represents the sum of the absolute values of the intermediate frequency coefficients, that is, all DCT coefficients in the intermediate frequency region of the DCT block The sum of the absolute values of . Represents the sum of the absolute values of the intermediate frequency coefficients, that is, all DCT coefficients in the intermediate frequency region of the DCT block The sum of the absolute values of Represents the sum of the absolute values of high-frequency coefficients, that is, all DCT coefficients in the high-frequency region of the DCT block The sum of the absolute values of .
[0092] The texture energy of a DCT block is expressed by the sum of the mid-frequency coefficient and the high-frequency coefficient. The calculation is as follows:
[0093] ;
[0094] use and To reflect edge information, the following definitions are made:
[0095] ;
[0096] ;
[0097] in, Represents the average value of low-frequency energy, equal to Except for the number of DCT coefficients in the low-frequency region, Represents the sum of the absolute values of the low-frequency coefficients, that is, the sum of the absolute values of all DCT coefficients in the low-frequency region of the DCT block; Represents the average value of the intermediate frequency energy, which is equal to Except the number of DCT coefficients in the intermediate frequency region;
[0098] Represents the average value of high-frequency energy, equal to Except the number of DCT coefficients in the high-frequency area.
[0099] The texture energy of the corresponding CTU is obtained based on the texture energy of all DCT blocks in each CTU , the texture energy of the frame is obtained based on the texture energy of all CTUs in the frame ;
[0100] Calculate frame-level texture energy weights separately and CTU-level texture energy weights ,as follows:
[0101] ;
[0102] ;
[0103] in, Represents the sum of texture energies of all frames in the current GOP, which is obtained by sequentially adding the texture energies of each frame in the GOP; It represents the total texture energy of the encoded frames in the current GOP, which is obtained by adding the texture energy of each frame that has been encoded; Indicates the total texture energy of the coded CTU in the current frame.
[0104] It should be noted that GOP (Group of Pictures) is an independent processing unit composed of consecutive frames in video encoding, usually consisting of I frames, P frames and B frames, and is used to achieve inter-frame compression.
[0105] Perform CTU-level bit allocation based on CTU-level texture energy weight to obtain the CTU-level target bit number ,as follows:
[0106] ;
[0107] in, Refers to the total number of bits available for the uncoded CTUs of the current frame, which is obtained by subtracting the target number of bits of the coded CTUs from the total bit budget of the current frame. Indicates the number of CTUs that have been encoded in the current frame. After each CTU is encoded, Add 1; Indicates the target total number of bits for the encoded CTUs in the current frame, which is obtained by summing the target number of bits previously allocated to these CTUs; Indicates the actual total number of bits of the coded CTU in the current frame, which is obtained by summing the actual number of bits generated by the coded CTU; Represents the smoothing window, which is used to adjust the target bit allocation of the remaining CTU according to and Deviation, dynamically correct the next bit allocation;
[0108] Based on the texture energy of each frame, the frame-level texture energy weight is obtained, and the frame-level bit allocation is performed based on the frame-level texture energy weight to obtain the frame-level target bit number. ,as follows:
[0109] ;
[0110] in, Indicates the total bit budget of the current GOP, which is calculated by the encoder based on the set bit rate and GOP frame number; Indicates the total number of bits actually used by the encoded frames in the current GOP. When encoding, the number of bits actually generated by each frame is summed up after encoding, and the total number is gradually updated. .
[0111] S103, JND threshold acquisition step, based on the DCT coefficients of each block, obtains the spatial contrast sensitivity threshold, the brightness masking modulation factor and the contrast intensity; based on the texture energy and edge information of each DCT block, classifies each DCT block into a flat block, an edge block or a texture block; based on the contrast intensity, the classification type and the DCT frequency linear function, obtains the contrast masking adjustment factor; based on the product of the spatial contrast sensitivity threshold, the brightness masking modulation factor and the contrast masking adjustment factor, obtains the JND threshold in the DCT domain.
[0112] Specifically, the spatial contrast sensitivity function describes the relationship between contrast sensitivity (usually measured by the inverse of the contrast perception threshold) and spatial frequency under different conditions. In general, the spatial contrast sensitivity CSF (Contrast Sensitivity Function) spatial model can be expressed as:
[0113] ;
[0114] in, 、 and Represent constants, and their specific values are 1.33, 0.11, and 0.18 respectively. Represents the spatial frequency, for size The size of the DCT block, the first DCT coefficients The corresponding subband frequency The calculation is as follows:
[0115] ;
[0116] ;
[0117] in, Indicates the horizontal or vertical viewing angle of a pixel. Indicates the ratio of viewing distance to screen height, Indicates the number of pixels that the screen height comprises.
[0118] According to the definition of contrast sensitivity, the spatial contrast sensitivity function and the distortion threshold defined based on the contrast sensitivity function are reciprocals of each other. Therefore, for a certain spatial frequency, the initial spatial contrast sensitivity JND threshold can be expressed as:
[0119] ;
[0120] Since the human eye has differences in visual stimulation in different directions, it is usually more sensitive to the frequency components in the horizontal and vertical directions, but insensitive to the frequency components in the oblique direction. The existence of this difference causes the JND threshold to increase accordingly. Therefore, the threshold is corrected accordingly to obtain the spatial contrast sensitivity threshold. ,as follows:
[0121] ;
[0122] in, and is the DCT normalization coefficient.
[0123] .
[0124] represents the human eye tilt effect, The value is 0.6, It represents the collective effect and its value is 0.25. Represents the direction angle of the corresponding DCT coefficient, calculated as follows:
[0125] ;
[0126] The luminance masking effect states that as luminance intensity increases, the difference in luminance changes that the human eye can perceive increases. In other words, as luminance levels gradually rise, the human eye's JND threshold for luminance changes also increases. In 8-bit images, the threshold for the luminance masking modulation factor is typically estimated using a pixel intensity of 128 as a reference. The greater the deviation of the pixel value from this reference, the higher the corresponding luminance masking modulation factor. The actual measured value of the luminance masking modulation factor is set as the ratio of two actual measured JND thresholds, as shown below:
[0127] ;
[0128] in, Indicates the number of the nth block The brightness intensity value corresponding to each DCT coefficient. The symbol (^) indicates that the value is obtained through measurement. Indicates the brightness intensity is The measurement JND threshold of the DCT coefficient; The measured JND threshold for the DCT coefficient with a luminance intensity of 128 is shown. Analysis shows that the luminance masking modulation factor exhibits a U-shaped curve, so a piecewise linear function is proposed to describe the relationship between the average background luminance and the visual threshold. This method uses this function to calculate the luminance masking modulation factor. The specific calculation method is as follows:
[0129] ;
[0130] in, Indicates the average intensity value of the nth DCT block; The calculation is as follows:
[0131] ;
[0132] in, Represents the DC coefficient in the DCT block, which is used to approximate the average brightness value of the image block, that is, when i and j are both 0 ; N represents the block size of the DCT block.
[0133] The contrast masking effect of the human eye is specifically manifested as follows: when there is another signal with different contrast in the field of view, the visual sensitivity of the human eye to the target signal that the eye currently wants to focus on will be weakened. Generally speaking, as the complexity of the image texture changes, the visual sensitivity of the human eye will also change. Therefore, in the process of constructing the contrast modulation factor model, the complexity of the image texture must be considered, which is usually determined based on the calculation results of the contrast intensity. Since the contrast masking modulation factor is positively correlated with the standard deviation value and negatively correlated with the normalized power spectral density peak value. Therefore, the contrast intensity It is characterized by the ratio of the standard deviation of the DCT block to the peak value of the normalized power spectral density, which is calculated as follows:
[0134] ;
[0135] Among them, the parameters and Set to 1.4 and 0.7 respectively, Represents the standard deviation value, which is calculated as follows:
[0136] ;
[0137] ;
[0138] Among them, P represents the size of the AC component in the DCT block, R represents DCT blocks of size, Indicates that a certain spatial frequency is The DCT coefficient value when It is a two-dimensional form, indicating the position DCT coefficients of It is a one-dimensional form, indicating that a certain spatial frequency is To ensure that the calculated result falls within the reasonable range of 0 to 1, a normalization factor K / 2 is introduced, where K represents the range of pixel intensity. For an 8-bit image format, the value of K is 255.
[0139] Normalized power spectral density peak It can be calculated by the following formula:
[0140] ;
[0141] in, It is the k-th moment of the probability distribution (k is usually 1 to 4), defined as:
[0142] ;
[0143] ;
[0144] In summary, the contrast intensity can be obtained by solving The specific values are:
[0145] ;
[0146] From the perspective of visual attention mechanism, edge blocks are more favored by the human eye than texture blocks. In view of this, the image is divided into three categories: flat blocks, texture blocks and edge blocks by using DCT domain texture energy. Then a specific adjustment factor t is introduced to adjust the contrast intensity of flat blocks, texture blocks and edge blocks. The adjusted contrast intensity can be expressed as Specifically, for edge blocks, texture blocks, and flat blocks, the values of t are set to 0.5, 1, and 0.5, respectively. The specific classification process is as follows: Figure 3 shown.
[0147] exist Figure 3 In the process, after dividing the screen content video frame into blocks, DCT transform is applied to each block and its texture energy is calculated. Next, according to The size of the block is combined with the frequency domain energy characteristics to divide the block into a flat block, an edge block or a texture block. The specific judgment process is as follows:
[0148] Case 1: When the texture energy of a block satisfies ( ), it means that the block has less texture information and is directly judged as a flat block.
[0149] Case 2: When the ( ), if the block ( ) or both ( ), the block is determined to be an edge block, otherwise it is a flat block.
[0150] Case 3: When satisfied ( ), the judgment logic is the same as case2. If the block or satisfy both , it is divided into an edge block, otherwise it is judged as a texture block.
[0151] Case 4: When When the block or , , it is determined to be an edge block, otherwise it is a texture block.
[0152] The contrast masking modulation factor is linearly positively correlated with the background texture contrast. As the contrast increases, its frequency domain response is positively correlated and exhibits a bandpass characteristic. Based on this relationship, the contrast masking threshold is modeled as a linear function of contrast intensity and DCT frequency, as follows:
[0153] ;
[0154] in, is the gradient of the frequency linear function, which can be calculated by the following formula:
[0155] ;
[0156] in, express The maximum parameter is 4.12cpd (cycles per degree). 、 and It is calculated based on the least squares solution, and the specific values are as follows:
[0157] ;
[0158] ;
[0159] Solve 、 and Finally, the final DCT domain JND threshold is calculated using the following formula:
[0160] ;
[0161] in, Represents the DCT domain JND threshold (spatial contrast sensitivity threshold), n is the block index, i, j are the indices of the DCT coefficients, represents the spatial CSF threshold, represents the brightness masking modulation factor, Represents the contrast masking adjustment factor.
[0162] S104, a rate control quantization parameter acquisition step, obtaining a perceptual distortion index based on a JND threshold in the DCT domain; obtaining a Lagrange multiplier of a corresponding coding unit (CTU) based on the perceptual distortion index and a traditional Lagrange multiplier; and obtaining a final rate control quantization parameter based on the Lagrange multiplier.
[0163] Specifically, the DCT domain JND model is used to determine the JND threshold of each coding unit. (The JND threshold DJND for a coding unit is obtained by summing the DCT domain JND thresholds within the coding unit.) This threshold is then used as a perceptual sensitivity factor to measure the objective distortion and to correct the objective distortion in the rate-distortion formula, as shown below:
[0164] ;
[0165] Where c is a constant set to 0.01; is the sum of squared errors, which represents the sum of squares of pixel differences between the reconstructed image and the original image.
[0166] For each coding unit, the proposed perceptual distortion index replaces the traditional distortion index, and a new rate-distortion equation is constructed based on it, which is expressed as follows:
[0167]
[0168] in, represents the perceptual Lagrange multiplier; Indicates the actual number of coded bits.
[0169] Further solving the adjustment factor of the Lagrange multiplier, when perceptual distortion is used as the distortion indicator, the following formula can be derived:
[0170] ;
[0171] Wherein, m represents the serial number of the coding unit, the mth coding unit; Represents the mth coding unit ; represents the number of bits consumed by the mth coding unit; c is a smoothing constant to prevent the denominator from being zero; Nblock represents the total number of coding units.
[0172] By taking the derivative of the above formula, we can get the optimal solution for each coding unit to minimize the rate-distortion cost, as shown below:
[0173] ;
[0174] Then, the Lagrange multiplier calculation formula of the mth coding unit can be derived as follows:
[0175] ;
[0176] in, represents the Lagrange multiplier of the mth coding unit CTU; represents the JND threshold of the mth coding unit, which is obtained by summing the JND thresholds of the DCT domain within the coding unit; is a preset constant, set to 0.01; represents the traditional Lagrange multiplier.
[0177] From the above formula, we can know that the adaptive Lagrange multiplier adjustment factor of the mth coding unit based on the DCT domain JND is :
[0178] ;
[0179] The final rate control model quantization parameters are:
[0180] .
[0181] S105, encoding control step, guides the actual encoding process and performs encoding control based on the CTU-level target bit number, the frame-level target bit number and the rate control quantization parameter.
[0182] Based on the derivation of S104, the quantization parameter applicable to the current coding unit is obtained , Used to control the quantization strength and guide the actual encoding process.
[0183] according to Calculate the quantization step size of the current CTU, and then perform encoding and quantization based on the quantization step size. To maintain the continuity of the encoding quality of adjacent CTUs, As the initial quantization parameter for the next CTU.
[0184] After completing the actual encoding of each CTU, the corresponding actual encoding output data, such as the actual number of bits, perceived distortion, And the quantization parameters used Then, the parameters of the perceptual rate-distortion model are updated based on the encoded output data to optimize the accuracy of model prediction and the parameter estimation performance in the subsequent encoding process.
[0185] This closed-loop control process of "perceptual quantization parameter generation - encoding execution - actual encoding data acquisition - model update" is performed one by one according to the CTU scanning order until the entire current frame is encoded. This enables adaptive estimation of perceptual quantization parameters and continuous updating of the rate-distortion model, thereby improving the overall optimization capability of screen content video encoding between bitrate control accuracy and subjective visual quality.
[0186] In summary, the embodiment of the present application provides a method for perceptual rate control of screen content video coding based on DCT domain JND, including:
[0187] Constructing a DCT domain JND model: Constructing a DCT domain JND model from three aspects: spatial contrast sensitivity function, brightness masking effect, and contrast masking effect, to describe the human eye's perception threshold of distortion at different frequencies, brightness, and texture complexity. Ultimately, the JND threshold on each DCT coefficient is formed. ;
[0188] Perceptual distortion modeling: In traditional rate-distortion optimization models, the distortion term is usually expressed as the mean square error in the pixel domain. This paper introduces the JND model into the distortion modeling process and proposes the perceptual distortion term This reflects the difference in the human eye's sensitivity to different distortions, so that imperceptible distortions do not excessively affect bit allocation.
[0189] Constructing a Perceptual Lagrange Multiplier Model :Introduce the perceptual distortion into the rate-distortion cost function, then derive and infer the rate-distortion cost function to obtain the perceptual Lagrange multiplier , is the adaptive Lagrange multiplier adjustment factor, is the traditional Lagrange multiplier.
[0190] Mapping to perceptual quantization parameters : Final By fitting the function Mapping to perceptually optimized quantization parameters , used to guide the bit allocation and quantization control of each CTU in actual encoding.
[0191] Rate-distortion performance is a key metric for evaluating the quality of a rate control algorithm, reflecting the balance between compression efficiency and reconstruction quality. Common evaluation parameters include Bjøntegaard Delta Bit Rate (BDBR) and Bjøntegaard Delta PSNR (BDPSNR). A lower BDBR indicates greater bitrate savings at the same quality, while a higher BDPSNR indicates better image quality at the same bitrate. These two metrics comprehensively evaluate an algorithm's rate-distortion performance.
[0192] Table 1 below compares the rate-distortion performance of the proposed DJND-RC algorithm and the VTM-20.0 default rate control algorithm. Using the VTM-20.0 platform default algorithm as a benchmark, the proposed rate control method achieves an average bitrate savings of 2.78% and an average BDPSNR improvement of 0.34dB for the standard test set video sequences. These experimental results demonstrate significant advantages for the proposed rate control method, effectively improving bandwidth utilization.
[0193] Figure 4 and Figure 5 The figure shows a comparison of the rate-distortion performance obtained using the DJND-RC method of the present invention and the default rate control algorithm of the VTM-20.0 platform for video test sequences with different screen contents. Under the same bit rate conditions, a higher PSNR value indicates better encoding quality. The red curve in the figure represents the performance of the DJND-RC method, and the blue curve represents the performance of the default rate control algorithm of VTM-20.0. As can be seen from the figure, the red curve is significantly higher than the blue curve in all the listed test sequences, fully demonstrating that the present invention is superior to the platform default algorithm in encoding performance, and further verifying that DJND-RC has good encoding performance.
[0194] Table 1 Comparison of rate-distortion performance of DJND-RC and VTM-20.0 of the present invention;
[0195]
[0196] See also Figure 6 As shown, the present invention also discloses a screen content video coding perception rate control device based on DCT domain JND, comprising:
[0197] DCT coefficient acquisition module 601, used to acquire screen content video, perform discrete cosine transform (DCT) on the screen content video in blocks, and obtain DCT coefficients of each block;
[0198] The texture energy and target bit number acquisition module 602 is configured to obtain, based on the DCT coefficients of each block, the sum of the absolute values of the low-frequency, mid-frequency, and high-frequency coefficients in the DCT block; obtain the texture energy of each DCT block based on the sum of the absolute values of the mid-frequency coefficients and the high-frequency coefficients; obtain edge information of each DCT block based on the low-frequency, mid-frequency, and high-frequency coefficients; obtain the texture energy of each coding unit (CTU) based on the sum of the texture energies of all DCT blocks in the CTU; obtain the texture energy of each frame based on the sum of the texture energies of all CTUs in each frame; obtain a CTU-level texture energy weight based on the texture energy of each CTU, perform CTU-level bit allocation based on the CTU-level texture energy weight, and obtain a CTU-level target bit number; obtain a frame-level texture energy weight based on the texture energy of each frame, perform frame-level bit allocation based on the frame-level texture energy weight, and obtain a frame-level target bit number;
[0199] The JND threshold acquisition module 603 is configured to obtain a spatial contrast sensitivity threshold, a luminance masking modulation factor, and a contrast intensity based on the DCT coefficients of each block; classify each DCT block into a flat block, an edge block, or a texture block based on the texture energy and edge information of each DCT block; obtain a contrast masking adjustment factor based on the contrast intensity, the classification type, and the DCT frequency linear function; and obtain a JND threshold in the DCT domain based on the product of the spatial contrast sensitivity threshold, the luminance masking modulation factor, and the contrast masking adjustment factor.
[0200] The rate control quantization parameter acquisition module 604 is configured to obtain a perceptual distortion index based on a JND threshold in the DCT domain; obtain a Lagrange multiplier for a corresponding coding unit (CTU) based on the perceptual distortion index and a traditional Lagrange multiplier; and obtain a final rate control quantization parameter based on the Lagrange multiplier.
[0201] The encoding control module 605 is used to guide the actual encoding process and perform encoding control based on the CTU-level target bit number, the frame-level target bit number and the bit rate control quantization parameter.
[0202] The specific implementation of each module of the device for perceptual rate control of screen content video coding based on DCT domain JND is the same as the perceptual rate control method for screen content video coding based on DCT domain JND, and will not be repeated in this embodiment.
[0203] In addition, an embodiment of the present invention further provides an electronic device. The electronic device of this embodiment includes a processor and a memory; the memory is configured to store computer-executable instructions; and the processor is configured to execute the computer-executable instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant description in the aforementioned method embodiment.
[0204] Optionally, the memory can be independent or integrated with the processor.
[0205] When the memory is independently provided, the electronic device further includes a bus for connecting the memory and the processor.
[0206] An embodiment of the present invention further provides a computer storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0207] An embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by a processor, the above method is implemented.
[0208] In the embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not implemented. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, which may be electrical, mechanical or other forms.
[0209] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.
[0210] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each module may exist physically separately, or two or more modules may be integrated into a single unit. The units formed by the above modules may be implemented in the form of hardware or hardware plus software functional units.
[0211] The above-mentioned integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0212] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), or application-specific integrated circuits (ASICs). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.
[0213] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.
[0214] The bus can be an Industry Standard Architecture (ISA), a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0215] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0216] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0217] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0218] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for perceptual rate control of screen content video coding based on DCT domain JND, characterized in that: include: S101, DCT coefficient acquisition step, obtaining a screen content video, performing discrete cosine transform (DCT) on the screen content video in blocks, and obtaining DCT coefficients of each block; S102, a texture energy and target bit number acquisition step, based on the DCT coefficients of each block, respectively obtaining the sum of the absolute values of the low-frequency, mid-frequency and high-frequency coefficients in the DCT block; The texture energy of each DCT block is obtained based on the sum of the absolute values of the mid-frequency coefficients and the high-frequency coefficients; the edge information of each DCT block is obtained based on the low-frequency, mid-frequency and high-frequency coefficients; the texture energy of each coding unit (CTU) is obtained based on the sum of the texture energies of all DCT blocks in the CTU; the texture energy of each frame is obtained based on the sum of the texture energies of all CTUs in each frame; the CTU-level texture energy weight is obtained based on the texture energy of each CTU, and the CTU-level bit allocation is performed based on the CTU-level texture energy weight to obtain the CTU-level target bit number; Based on the texture energy of each frame, a frame-level texture energy weight is obtained, and frame-level bit allocation is performed based on the frame-level texture energy weight to obtain a frame-level target bit number; S103, a JND threshold acquisition step, obtaining a spatial contrast sensitivity threshold, a luminance masking modulation factor, and a contrast intensity based on the DCT coefficients of each block; classifying each DCT block into a flat block, an edge block, or a texture block based on the texture energy and edge information of each DCT block; and obtaining a contrast masking adjustment factor based on the contrast intensity, the classification type, and the DCT frequency linear function; The JND threshold in the DCT domain is obtained based on the product of the spatial contrast sensitivity threshold, the brightness masking modulation factor and the contrast masking adjustment factor; S104, a rate control quantization parameter acquisition step, obtaining a perceptual distortion index based on a JND threshold in the DCT domain; obtaining a Lagrange multiplier for a corresponding coding unit (CTU) based on the perceptual distortion index and a traditional Lagrange multiplier; and obtaining a final rate control quantization parameter based on the Lagrange multiplier. S105, encoding control step, guides the actual encoding process and performs encoding control based on the CTU-level target bit number, the frame-level target bit number and the rate control quantization parameter.
2. The method for perceptual rate control of screen content video coding based on DCT domain JND according to claim 1, wherein in S101, DCT block size, DCT coefficients The calculation formula is as follows: ; in, Indicates the image pixels, ; and Respectively represent and The compensation coefficient is calculated as follows: 。 3. The perceptual rate control method for screen content video coding based on DCT domain JND according to claim 1, wherein in S102, the texture energy of each DCT block is obtained based on the sum of the absolute values of the mid-frequency coefficients and the high-frequency coefficients, and is expressed as follows: ; in, It represents the sum of the absolute values of the intermediate frequency coefficients, that is, the sum of the absolute values of all DCT coefficients in the intermediate frequency region of the DCT block; It represents the sum of the absolute values of high-frequency coefficients, that is, the sum of the absolute values of all DCT coefficients in the high-frequency region of the DCT block; Based on the low-frequency, mid-frequency, and high-frequency coefficients, the edge information of each DCT block is obtained, including: Calculate the first edge information of each DCT block and the second edge information ,as follows: ; ; in, Represents the average value of low-frequency energy, equal to Except for the number of DCT coefficients in the low-frequency region, Represents the sum of the absolute values of the low-frequency coefficients, that is, the sum of the absolute values of all DCT coefficients in the low-frequency region of the DCT block; Represents the average value of the intermediate frequency energy, which is equal to Except the number of DCT coefficients in the intermediate frequency region; Represents the average value of high-frequency energy, equal to Except the number of DCT coefficients in the high-frequency area.
4. The method for perceptual rate control of screen content video coding based on DCT domain JND according to claim 1, wherein in S102, a CTU-level texture energy weight is obtained based on the texture energy of each CTU, and CTU-level bits are allocated based on the CTU-level texture energy weight to obtain a CTU-level target bit number; Based on the texture energy of each frame, a frame-level texture energy weight is obtained, and frame-level bit allocation is performed based on the frame-level texture energy weight to obtain a frame-level target bit number, including: The texture energy of the corresponding CTU is obtained based on the texture energy of all DCT blocks in each CTU , the texture energy of the frame is obtained based on the texture energy of all CTUs in the frame ; Calculate frame-level texture energy weights separately and CTU-level texture energy weights ,as follows: ; ; in, Represents the sum of texture energies of all frames in the current GOP, which is obtained by sequentially adding the texture energies of each frame in the GOP; It represents the total texture energy of the encoded frames in the current GOP, which is obtained by adding the texture energy of each frame that has been encoded; Indicates the total texture energy of the encoded CTU in the current frame; Perform CTU-level bit allocation based on CTU-level texture energy weight to obtain the CTU-level target bit number ,as follows: ; in, Refers to the total number of bits available for the uncoded CTUs of the current frame, which is obtained by subtracting the target number of bits of the coded CTUs from the total bit budget of the current frame. Indicates the number of CTUs that have been encoded in the current frame. After each CTU is encoded, Add 1; Indicates the target total number of bits for the encoded CTUs in the current frame, which is obtained by summing the target number of bits previously allocated to these CTUs; Indicates the actual total number of bits of the coded CTU in the current frame, which is obtained by summing the actual number of bits generated by the coded CTU; Represents the smoothing window, which is used to adjust the target bit allocation of the remaining CTU according to and Deviation, dynamically correct the next bit allocation; Based on the texture energy of each frame, the frame-level texture energy weight is obtained, and the frame-level bit allocation is performed based on the frame-level texture energy weight to obtain the frame-level target bit number. ,as follows: ; in, Indicates the total bit budget of the current GOP, which is calculated by the encoder based on the set bit rate and GOP frame number; Indicates the total number of bits actually used by the encoded frames in the current GOP. When encoding, the number of bits actually generated by each frame is summed up after encoding, and the total number is gradually updated. .
5. The method for perceptual rate control of screen content video coding based on DCT domain JND according to claim 1, wherein in step S103, obtaining a spatial contrast sensitivity threshold, a luminance masking modulation factor, and a contrast intensity based on the DCT coefficients of each block specifically comprises: Based on spatial frequency contrast sensitivity, obtain the spatial contrast sensitivity threshold ,as follows: ; in, and is the DCT normalization coefficient; represents the human eye tilt effect, The value is 0.6; represents the collective effect; Indicates the direction angle of the corresponding DCT coefficient; represents the initial spatial contrast sensitivity threshold, as follows: ; in, 、 and represents a constant; Indicates the DCT coefficients The corresponding sub-band frequency; Luminance masking modulation factor , which is expressed as follows: ; in, Indicates the average intensity value of the nth DCT block; The calculation is as follows: ; in, Represents the DC coefficient in the DCT block, which is used to approximate the average brightness value of the image block; N represents the block size of the DCT block; Contrast intensity , which is expressed as follows: ; Among them, R represents DCT blocks of size, Indicates that a certain spatial frequency is The DCT coefficient value at this time; K represents the value range of pixel intensity.
6. The method for perceptual rate control of screen content video coding based on DCT domain JND according to claim 1, wherein in step S103, each DCT block is classified into a flat block, an edge block, or a texture block based on texture energy and edge information of each DCT block, specifically comprising: When the texture energy of a DCT block satisfies When , it is directly judged as a flat block; When satisfied When the DCT block or satisfy both , then the DCT block is determined to be an edge block, otherwise it is a flat block; and Respectively represent the first edge information and the second edge information of the DCT block; When satisfied When the DCT block or satisfy both , it is divided into edge blocks, otherwise it is judged as texture blocks; when When the DCT block or , it is determined to be an edge block, otherwise it is a texture block; in, , , , , , .
7. The method for perceptual rate control of screen content video coding based on DCT domain JND according to claim 1, wherein in step S103, a contrast masking adjustment factor is obtained based on contrast intensity, classification type, and DCT frequency linear function. , as follows: ; in, t represents the adjustment factor, which is used to adjust the contrast intensity of flat blocks, texture blocks and edge blocks; Indicates contrast intensity; Represents the gradient of the frequency linear function.
8. The DCT-domain JND-based perceptual rate control method for screen content video coding according to claim 1, wherein in S104, a perceptual distortion index is obtained based on a DCT-domain JND threshold; and a Lagrangian multiplier for a corresponding coding unit (CTU) is obtained based on the perceptual distortion index and a traditional Lagrangian multiplier, which is expressed as follows: ; in, represents the Lagrange multiplier of the mth coding unit CTU; represents the JND threshold of the mth coding unit, which is obtained by summing the JND thresholds of the DCT domain within the coding unit; is a preset constant, set to 0.01; represents the traditional Lagrange multiplier.
9. The method for perceptual rate control of screen content video coding based on DCT domain JND according to claim 8, wherein in step S104, the final rate control quantization parameter is obtained based on Lagrange multipliers. , which is expressed as follows: 。 10. A device for perceptual rate control of screen content video coding based on DCT domain JND, characterized in that: include: A DCT coefficient acquisition module is used to acquire screen content video, perform discrete cosine transform (DCT) on the screen content video in blocks, and obtain DCT coefficients of each block; A texture energy and target bit number acquisition module is used to obtain the sum of the absolute values of the low-frequency, medium-frequency and high-frequency coefficients in the DCT block based on the DCT coefficients of each block; The texture energy of each DCT block is obtained based on the sum of the absolute values of the mid-frequency coefficients and the high-frequency coefficients; the edge information of each DCT block is obtained based on the low-frequency, mid-frequency and high-frequency coefficients; the texture energy of each coding unit (CTU) is obtained based on the sum of the texture energies of all DCT blocks in the CTU; the texture energy of each frame is obtained based on the sum of the texture energies of all CTUs in each frame; the CTU-level texture energy weight is obtained based on the texture energy of each CTU, and the CTU-level bit allocation is performed based on the CTU-level texture energy weight to obtain the CTU-level target bit number; Based on the texture energy of each frame, a frame-level texture energy weight is obtained, and frame-level bit allocation is performed based on the frame-level texture energy weight to obtain a frame-level target bit number; A JND threshold acquisition module is used to obtain a spatial contrast sensitivity threshold, a brightness masking modulation factor, and a contrast intensity based on the DCT coefficients of each block; classify each DCT block into a flat block, an edge block, or a texture block based on the texture energy and edge information of each DCT block; and obtain a contrast masking adjustment factor based on the contrast intensity, the classification type, and the DCT frequency linear function; The JND threshold in the DCT domain is obtained based on the product of the spatial contrast sensitivity threshold, the brightness masking modulation factor and the contrast masking adjustment factor; The rate control quantization parameter acquisition module is used to obtain the perceptual distortion index based on the JND threshold in the DCT domain; obtain the Lagrange multiplier of the corresponding coding unit (CTU) based on the perceptual distortion index and the traditional Lagrange multiplier; and obtain the final rate control quantization parameter based on the Lagrange multiplier; The encoding control module is used to guide the actual encoding process and perform encoding control based on the CTU-level target bit number, frame-level target bit number and bit rate control quantization parameters.
Citation Information
Patent Citations
Method for guiding multi-view video coding quantization process by visual perception characteristics
CN103124347A
Visual perceptual coding method based on multi-domain JND (Just Noticeable Difference) model
CN107241607A
Screen content video coding perception code rate control method and device based on just noticeable distortion of human eyes
CN115567712A
Method and apparatus for video coding by ABT-based just noticeable difference model
US20110243228A1
Perceptually Coding Images and Videos
US20140169451A1
Cited By
Perception-geometry combined code rate control method and system and medium
CN121397222A
Perception-geometry joint code rate control method, system, and medium
CN121397222B