CN115802038A - Quantization parameter determination method and device and video coding method and device - Google Patents

Quantization parameter determination method and device and video coding method and device Download PDF

Info

Publication number
CN115802038A
CN115802038A CN202211598180.9A CN202211598180A CN115802038A CN 115802038 A CN115802038 A CN 115802038A CN 202211598180 A CN202211598180 A CN 202211598180A CN 115802038 A CN115802038 A CN 115802038A
Authority
CN
China
Prior art keywords
region
quantization parameter
image
complexity
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211598180.9A
Other languages
Chinese (zh)
Inventor
王星睿
陈瑶
管健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Emerging Intelligent Technology Co ltd
Original Assignee
Suzhou Emerging Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Emerging Intelligent Technology Co ltd filed Critical Suzhou Emerging Intelligent Technology Co ltd
Priority to CN202211598180.9A priority Critical patent/CN115802038A/en
Publication of CN115802038A publication Critical patent/CN115802038A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the disclosure discloses a quantization parameter determination method and device, a video coding method and device, a video file and video coding equipment. The quantization parameter determination method comprises the following steps: dividing an image to be coded into a plurality of regions, wherein each region consists of one coding tree unit; calculating a complexity score for each of the regions; determining a quantization parameter for the region based on the complexity fraction of the region, the quantization parameter being used to encode the region. According to the embodiment of the invention, different QP values are set for the complexity of the image complex area and the non-complex area based on the CTU, so that the coding quality of the image complex area to be coded can be improved, and the detail information of the image is more highlighted.

Description

Quantization parameter determination method and device and video coding method and device
Technical Field
The present disclosure relates to the field of video coding related technologies, and in particular, to a quantization parameter determination method and apparatus, and a video coding method and apparatus.
Background
The Quantization Parameter QP (Quantization Parameter) is an important Parameter in video coding and decoding. The QP value corresponds to the sequence number of the quantization step, the smaller the value is, the smaller the quantization step is, the higher the quantization precision is, the better the detailed expression degree of the picture is, the higher the code rate is, and the larger the coded file is.
The conventional video coding and decoding algorithm sets a fixed QP for all frame images, but if the QP is set too large, the detail texture is very fuzzy, and if the QP is set too small, the transmission file after coding is too large, and the determination of the optimal QP value needs high skill. The improved method can set different QP values for different frames to achieve the same code rate. But some regions of the intra image have abundant details and some regions have less details. The method of setting the same QP value for the complex region and the non-complex region of the intra-frame image will not highlight the detail information of the complex region.
Disclosure of Invention
The embodiment of the disclosure provides a quantization parameter determining method, a quantization parameter determining device, a video encoding method, a video encoding device, a video file and a video encoding device, so as to solve the problem that in the prior art, the same QP value is set for a complex region and a non-complex region of an intra-frame image, so that detailed information of the complex region cannot be highlighted.
A first aspect of the embodiments of the present disclosure provides a quantization parameter determination method, including:
dividing an image to be coded into a plurality of regions, wherein each region consists of one coding tree unit;
calculating a complexity score for each of the regions;
determining a quantization parameter for the region based on the complexity fraction of the region, the quantization parameter being used to encode the region.
In some embodiments, the size of the coding tree unit is 64 x 64.
In some embodiments, said calculating the complexity score for each of said regions comprises:
determining a gray level co-occurrence matrix of the region, and calculating the energy, contrast, information entropy, homogeneity and correlation of the region based on the gray level co-occurrence matrix;
calculating an edge ratio of the region;
calculating a complexity score for the region based on the energy, contrast, entropy, homogeneity, correlation, and edge ratio of the region.
In some embodiments, said calculating a complexity score for the region based on the energy, contrast, entropy, homogeneity, relevance, and edge ratio of the region comprises:
complexity fraction = -energy + contrast + entropy of information + homogeneity + (1-correlation) + edge ratio.
In some embodiments, the determining a quantization parameter for the region based on the complexity score for the region comprises:
QP=51-(QPmax-QPmin)/((Xmax-Xmin)*(score-Xmin))+QPmin
wherein QP is a quantization parameter, QPmax =51, qpmin =0, score is a complexity score of the image, and Xmax and Xmin are a maximum value and a minimum value of the complexity score obtained by calculating the complexity score for the hevc testsequence data set, respectively.
A second aspect of the embodiments of the present disclosure provides a quantization parameter determination apparatus, including:
the device comprises a segmentation module, a coding module and a decoding module, wherein the segmentation module is used for segmenting an image to be coded into a plurality of regions, and each region consists of a coding tree unit;
a complexity score calculation module for calculating a complexity score for each of the regions;
a quantization parameter determination module to determine a quantization parameter for the region based on the complexity fraction of the region, the quantization parameter being used to encode the region.
A third aspect of an embodiment of the present disclosure provides a video encoding method, including:
acquiring an image to be coded of each frame in a video file, and determining a quantization parameter of each region in the image based on the method in the first aspect of the embodiment of the present disclosure, wherein the region is formed by segmenting the image, and each region is composed of a coding tree unit;
encoding the region based on the quantization parameter;
and repeating the steps until all the areas of all the images to be coded in the video file are coded.
A fourth aspect of an embodiment of the present disclosure provides a video encoding apparatus, including:
the determining module is used for acquiring an image to be coded of each frame in a video file, and determining a quantization parameter of each region in the image based on the method of the first aspect of the embodiment of the disclosure, wherein the region is formed by dividing the image, and each region is composed of a coding tree unit;
an encoding module for encoding the region based on the quantization parameter;
and the circulating module is used for repeating the steps until all the areas of all the images to be coded in the video file are coded.
A fifth aspect of the embodiments of the present disclosure provides a video file encoded from an original video file according to the video encoding method of the third aspect of the embodiments of the present disclosure.
A sixth aspect of an embodiment of the present disclosure provides a video encoding apparatus comprising a memory for storing a computer program and a processor; the processor is configured to, when executing the computer program, implement the quantization parameter determination method according to the first aspect of the embodiments of the present disclosure and the video encoding method according to the third aspect of the embodiments of the present disclosure.
A seventh aspect of embodiments of the present disclosure provides a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the quantization parameter determination method according to the first aspect of embodiments of the present disclosure and the video encoding method according to the third aspect of embodiments of the present disclosure.
An eighth aspect of embodiments of the present disclosure provides a computer program product comprising a computer program, instructions which, when executed by a processor, implement the quantization parameter determination method according to the first aspect of embodiments of the present disclosure and the video encoding method according to the third aspect of embodiments of the present disclosure.
According to the embodiment of the disclosure, the quantization parameter QP value is set at the CTU level based on the complexity of the CTU, and different QP values can be set for the complex region and the non-complex region of the intra-frame image based on the complexity of the CTU, so that the encoding quality of the complex region of the image to be encoded can be improved, and the detail information of the image can be more highlighted.
Drawings
The features and advantages of the present disclosure will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the disclosure in any way, and in which:
FIG. 1 is a schematic diagram of a computer system suitable for use in accordance with the present disclosure;
fig. 2 is a flow diagram illustrating a method of video encoding in accordance with some embodiments of the present disclosure;
FIG. 3 is a detailed flowchart of step S202 in FIG. 2;
FIG. 4 is a diagram illustrating one embodiment of calculating the complexity score at step S202;
FIG. 5 is a comparison test of quantization parameters obtained according to the method of the present disclosure versus quantization parameters determined based on other methods for compression encoding the same video;
fig. 6 is a schematic diagram of a video encoding apparatus according to some embodiments of the present disclosure;
fig. 7 is a schematic diagram of a video encoding device shown in accordance with some embodiments of the present disclosure;
Detailed Description
In the following detailed description, numerous specific details of the present disclosure are set forth by way of examples in order to provide a thorough understanding of the relevant disclosure. However, it will be apparent to one of ordinary skill in the art that the present disclosure may be practiced without these specific details. It should be understood that the use of the terms "system," "apparatus," "unit" and/or "module" in this disclosure is a method for distinguishing between different components, elements, portions or assemblies at different levels of sequence. However, these terms may be replaced by other expressions if the other expressions can achieve the same purpose.
It will be understood that when a device, unit or module is referred to as being "on" \8230; \8230 "", "connected to" or "coupled to" another device, unit or module, it can be directly on, connected or coupled to or in communication with the other device, unit or module or intervening devices, units or modules may be present unless the context clearly dictates otherwise. For example, as used in this disclosure, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present disclosure. As used in this disclosure and in the claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" are intended to cover only the explicitly identified features, integers, steps, operations, elements, and/or components, but not to constitute an exclusive list of such features, integers, steps, operations, elements, and/or components.
These and other features and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structure and the combination of parts and economies of manufacture, will be better understood by reference to the following description and drawings, which form a part of this specification. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended as a definition of the limits of the disclosure. It will be understood that the figures are not drawn to scale.
Various block diagrams are used in this disclosure to illustrate various variations of embodiments according to the disclosure. It should be understood that the foregoing and following structures are not intended to limit the present disclosure. The protection scope of the present disclosure is subject to the claims.
FIG. 1 is a schematic diagram of a computer system to which the present disclosure is applicable. The system shown in fig. 1 includes a video file to be encoded, a video encoding server, and a video stream formed by encoding the video file.
When the continuous image changes more than 24 frames (fps) of pictures per second, human eyes cannot distinguish a single static picture according to the principle of persistence of vision, and the static picture looks smooth and continuous in visual effect, so that the continuous picture is a video. Each video file is composed of images of one frame.
Because the video information is very abundant, the video files generally have huge data volume and are very inconvenient to share. For example, 1 640 × 480 resolution color image (24 bits/pixel) has a data size of 0.92MB, and if the image is played at a speed of 30 frames per second, the digital rate of the video signal is as high as 27.6Mbps. Especially when sharing over a network, the increase in network bandwidth can never be matched by an increase in the amount of video file data. The solution is to transmit the video file in the form of video stream. Video streaming is a means of transmitting video data information in such a way that a user can process the received information without receiving the complete data information. The mode of receiving and processing simultaneously well solves the problem of transmission of video data information on the network. Secondly, in order to complete video transmission under a certain bandwidth condition, the information content of the video file must be compressed, and certain video quality degradation is tolerated.
H.264 is the compression algorithm that is currently the mainstream, and video conferencing devices generally use this encoding format. The underlying h.264 may support the transmission of 720P30 frames/second of images at 1M bandwidth; h.264HIGH PROFILE supports the transmission of 720P30 frames/second images at a bandwidth of 512K. H.265 is a relatively new compression algorithm, the compression ratio can be further improved, and the H.265 supports 720P30 frames/second transmitted under 384K bandwidth. With the popularity of 1080P and to 4K, the video formats we now appear in life are larger and larger, and therefore new compression algorithms like h.265 are more popular.
The video coding server shown in fig. 1 is used for compressing an original video file to compress the data size of the video file on the premise of keeping useful information as much as possible, so that video transmission can be completed in the form of video stream under certain bandwidth conditions. The video coding server may be any of a stand-alone, a cluster, or a distributed server.
Fig. 2 is a flow chart illustrating a video encoding method according to some embodiments of the present disclosure. In some embodiments, the video encoding method may be performed by a video encoding server shown in fig. 1.
As shown in fig. 2, the video encoding method includes the steps of:
s201, acquiring an image to be coded of each frame in a video file, and dividing the image into a plurality of regions, wherein each region consists of a Coding Tree Unit (CTU).
Specifically, the video file is composed of a frame of image, and the compression coding of the video file is to perform compression coding on the frame of image composing the video file. Video coding in h.264 is implemented on a macroblock basis, each macroblock containing one 16 × 16 sized luminance block and two 8 × 8 sized chrominance blocks for video in the 4. In consideration of the characteristics of ultra high definition video, the h.265 standard introduces a coding tree unit CTU, whose size is specified by the encoder and can be larger than the macroblock size. One luma CTB and two chroma CTBs at the same location, plus the corresponding syntax elements, form one CTU. In the coding of high resolution video, better compression performance can be obtained using larger CTBs.
A Coding tree Unit is a basic Coding Unit of h.265, and can be divided down into a Coding Unit (CU), a Prediction Unit (PU), and a Transform Unit (TU).
In this step, the video coding server divides each frame image in the video file to be coded into a plurality of regions, and each region is composed of one coding tree unit. That is, each frame image is divided into a plurality of CTU blocks, each of which is a region.
In some embodiments, the size of the coding tree unit is 64 x 64.
S202, calculating the complexity score of each region
S203, determining a quantization parameter QP for the region based on the complexity score of the region.
Specifically, the Quantization Parameter QP (Quantization Parameter) is an important Parameter in video coding and decoding. The QP value corresponds to the sequence number of the quantization step, the smaller the QP value is, the smaller the quantization step is, the higher the quantization precision is, the better the detailed expression degree of the picture is, the higher the code rate is, and the larger the coded file is.
There is no well-established definition of image complexity. One prevailing definition is that image complexity refers to the inherent difficulty of finding or extracting a real object in a given image. Therefore, for a region with high complexity, we must give a smaller quantization parameter QP value to improve the coding quality of the region, highlighting more details of the region.
We try to quantify the image complexity to give a complexity score.
Then, we map to the setting of QP values in the codec framework according to the complexity score of the region, with high complexity giving small QPs and low complexity giving high QPs.
In some embodiments, the QP mapping to the region complexity score is:
QP=51-(QPmax-QPmin)/((Xmax-Xmin)*(score-Xmin))+QPmin
wherein QPmax =51, qpmin =0, score is the complexity score of the image, which is obtained from the complexity score formula given in step S202-3. Xmax and Xmin are maximum and minimum complexity values obtained by performing a Test based on the complexity score formula given in S202-3 by using the HEVC Test Sequence data set (Test data set in the standard codec framework).
S204, encoding the region based on the quantization parameter;
after determining the quantization parameter QP value for the region, we encode the region according to the general encoding method of the h.265 standard.
S205, repeating the steps until all the areas of all the images to be coded in the video file are coded.
In some embodiments, S202 includes the specific steps shown in fig. 3, which, as described in fig. 3, include:
s202-1: determining a gray level co-occurrence matrix of the region, and calculating the energy, the contrast, the information entropy, the homogeneity and the correlation of the region based on the gray level co-occurrence matrix;
in particular, the gray level co-occurrence matrix is a common method for describing texture by studying the spatial correlation characteristics of gray levels. When the gray level of the gray image is N, the gray co-occurrence matrix is an N × N matrix. The gray level of a picture generally has 256 levels, 0-255, but because of large calculation amount, 4, 8 and 16 are generally selected as the gray level; the size of the sliding window matrix selected for calculating the characteristic value each time can be selected according to the requirement, such as selecting 5x5 or 7x 7; the directions of the gray level co-occurrence matrix are generally four directions of 0 degree, 45 degrees, 90 degrees and 135 degrees; after the eigenvalues of the four direction matrixes are solved, the average value of the four eigenvalues can be calculated to serve as a final eigenvalue co-occurrence matrix; when the gray level co-occurrence matrix is calculated, step distance d =1 is generally selected, namely, a central pixel directly performs comparison operation with an adjacent pixel point;
through the gray level co-occurrence matrix, a series of image complexity evaluation factors can be obtained. Such as:
the correlation degree is as follows: the degree of similarity of the gray levels of the image in the row or column direction is measured, so that the value of the similarity reflects the local gray level correlation degree, and the higher the value is, the higher the correlation degree is.
The formula for calculating the correlation is:
Figure BDA0003997663600000081
wherein, P is a gray level co-occurrence matrix, μ is approximately equal to the mean value of the co-occurrence matrix P in the x and y directions, and σ is approximately equal to the variance of the co-occurrence matrix P in the x and y directions, which is specifically defined as follows:
Figure BDA0003997663600000091
Figure BDA0003997663600000092
Figure BDA0003997663600000093
information entropy: is a measure of the randomness of the amount of information contained in an image. When all values in the co-occurrence matrix are equal or the pixel value shows the maximum randomness, the entropy is the maximum; therefore, the entropy value indicates the complexity of the image gray level distribution, and the larger the entropy value is, the more complex the image is.
Entropy=∑ ij p(i,j)logp(i,j)
Contrast ratio: the inertia moment near the main diagonal of the gray level co-occurrence matrix reflects how the values of the matrix are distributed, and reflects the definition of the image and the depth of texture grooves.
The formula for calculating the contrast is:
Cont=∑ ij |i-j| 2 p(i,j)
energy: the energy is the sum of the squares of the elements of the gray level co-occurrence matrix, also known as the angular second order distance. The method is a measure for uniform change of the image texture gray level, and reflects the uniformity degree of the image gray level distribution and the thickness degree of the texture.
The formula for calculating the energy is:
Energy=∑ i,j p(i,j) 2
homogeneity: homogeneity reflects the homogeneity of the image texture, measures how much the image changes locally, and the larger the value of the homogeneity, the less the changes in different areas of the image texture are, and the local uniformity is very high.
The calculation formula for homogeneity is:
Figure BDA0003997663600000101
s202-2: calculating an edge ratio of the region;
the edge ratio reflects the ratio of the texture information in the image to the whole image, measures the texture of the local information in the image, and indicates that complex information exists in the image region and the local information is not uniform if the numerical value of the texture information is larger.
The formula for calculating the edge ratio is:
Figure BDA0003997663600000102
wherein b represents the binary image after canny edge detection, and N represents the length and width information of the input image.
In order to obtain the edge ratio, denoising the image by Gaussian blur, and after obtaining a smooth image, performing Canny edge detection.
The gaussian blur is essentially a low-pass filter, and each pixel point of the output image is the weighted sum of a corresponding pixel point and surrounding pixel points on the original image, so that the effect of smoothing the image to remove noise interference is achieved.
Canny edge detection comprises the following steps:
firstly: the partial derivatives of the image gray along the horizontal direction Gx and the vertical direction Gy are found by using a first order partial derivative operator, and the magnitude and azimuth of the gradient are obtained according to the following equation.
The amplitude formula:
Figure BDA0003997663600000111
the azimuth formula:
Figure BDA0003997663600000112
secondly, the method comprises the following steps: and carrying out non-maximum suppression on the gradient amplitude to find a local maximum. The method is that in a 3X3 domain window, a given pixel P is compared with two pixels along the gradient line direction, if the gradient amplitude of P is not larger than that of the two pixels, P =0 is set, otherwise, the original amplitude is kept. Here, we divide the gradient direction into 4 directions of the horizontal direction, the vertical direction, and the positive-45 ° direction to compare the strength of the gradient magnitude.
And finally: edges are detected and linked using a dual threshold algorithm. The method is that all the edges which are larger than the high threshold value T1 are necessarily edges, and all the edges which are smaller than the low threshold value T2 are not necessarily edges; if the detection result is greater than the low threshold value and less than the high threshold value, whether the adjacent pixels of the pixel have edge pixels greater than the high threshold value is checked, if so, the edge is determined, otherwise, the edge is not determined.
S202-3: calculating a complexity score for the region based on the energy, contrast, entropy, homogeneity, correlation, and edge ratio of the region.
Specifically, in some embodiments, the calculation formula for the complexity score is:
complexity fraction = -energy + contrast + entropy of information + homogeneity + (1-correlation) + edge ratio.
S202 is further described below by way of specific examples. FIG. 4 illustrates one particular embodiment of the disclosed computation of complexity scores. As shown in fig. 4, the upper left portion of fig. 4 is a frame of picture of a video file to be encoded. The frame picture is subjected to the following steps to calculate a complexity score:
1. graying the frame picture;
2. and (3) dividing: dividing the grayed frame picture into a plurality of regions by taking the CTU with the size of 64 × 64 as a basic unit, wherein each region has the size of one CTU;
3. selecting one of the regions;
4. calculating an edge ratio of the selected region;
5. computing a co-occurrence matrix for the selected region;
6. calculating the energy, contrast, information entropy, homogeneity and correlation of the selected region based on the co-occurrence matrix of the selected region
7. Based on the energy, contrast, information entropy, homogeneity, correlation and edge ratio of the selected region,
a complexity score for the selected region is calculated.
Fig. 5 is a comparison experiment of quantization parameters obtained by the method of the present disclosure and quantization parameters determined based on other methods to compression encode the same video. As shown in fig. 5, for both the skin and the comic test videos, the method of calculating the quantization parameter QP based on the complexity of the CTU at the CTU level to compression-encode a video file shown in the present disclosure can obtain the best video quality while obtaining a large compression efficiency, where the VMAF is a video quality evaluation score.
The foregoing is a specific embodiment of a video encoding method provided in the present disclosure.
Fig. 6 is a schematic diagram of a video encoding apparatus according to some embodiments of the present disclosure. As shown in fig. 6, the video encoding device 600 includes a partitioning module 610, a complexity score calculation module 620, a quantization parameter determination module 630, an encoding module 640, and a looping module 650. The video encoding functions may be performed by the video encoding server of fig. 1. Wherein:
a dividing module 610, configured to obtain a frame image to be encoded in a video file, and divide the frame image into a plurality of regions, where each region is composed of a Coding Tree Unit (CTU); see step S201 for details.
A complexity score calculating module 620, configured to calculate a complexity score of each of the regions, which is described in step S202.
A quantization parameter determining module 630, configured to determine the quantization parameter QP of the region based on the complexity score of the region, which is described in detail with reference to step S202.
The encoding module 640 encodes the region based on the quantization parameter, which is described in step S202.
And a loop module 650, configured to repeat the above steps until all regions of all frame images to be encoded in the video file are encoded.
In some optional embodiments, the complexity score calculating module 620 specifically includes:
and the first calculation module is used for determining a gray level co-occurrence matrix of the region and calculating the energy, the contrast, the information entropy, the homogeneity and the correlation of the region based on the gray level co-occurrence matrix.
A second calculation module for calculating an edge ratio of the region.
A third calculation module for calculating a complexity score for the region based on the energy, contrast, entropy, homogeneity, correlation, and edge ratio of the region.
In some embodiments, the first computing module may further specifically include:
the gray level co-occurrence matrix determining submodule is used for determining a gray level co-occurrence matrix of the region;
and the complexity parameter determination submodule is used for determining the energy, the contrast, the information entropy, the homogeneity and the correlation of the region based on the gray level co-occurrence matrix of the region.
One embodiment of the present application provides a video file encoded by the video encoding method described in S201-S205 on an original video file.
One embodiment of the present application provides a video encoding apparatus 700 comprising a memory 720 for storing a computer program and a processor 710; the processor, when executing the computer program, is configured to implement the video encoding method described in S201-S205.
One embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the video encoding method described in S201-S205.
An embodiment of the present application provides a computer program product comprising a computer program, instructions, which when executed by a processor, implement the video encoding method described in S201-S205.
In summary, according to the video encoding method, apparatus, computer-readable storage medium, program product, and video file provided in the embodiments of the present application, the quantization parameter QP is calculated at the CTU level based on the complexity of the CTU, and the video file is encoded based on the quantization parameter QP, so that the encoding quality of a complex area can be improved, the detail information of a picture can be more highlighted, and a better video quality can be obtained while a greater compression efficiency is obtained.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding descriptions in the foregoing device embodiments, and are not repeated herein.
While the subject matter described herein is provided in the general context of execution in conjunction with the execution of an operating system and application programs on a computer system, those skilled in the art will recognize that other implementations may also be performed in combination with other types of program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform particular tasks or implement particular abstract data types. Those skilled in the art will appreciate that the subject matter described herein may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like, as well as distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is to be understood that the above-described specific embodiments of the present disclosure are merely illustrative of or illustrative of the principles of the present disclosure and are not to be construed as limiting the present disclosure. Accordingly, any modification, equivalent replacement, improvement or the like made without departing from the spirit and scope of the present disclosure should be included in the protection scope of the present disclosure. Further, it is intended that the following claims cover all such variations and modifications that fall within the scope and bounds of the appended claims, or equivalents of such scope and bounds.

Claims (10)

1. A quantization parameter determination method, comprising:
dividing an image to be coded into a plurality of regions, wherein each region consists of one coding tree unit;
calculating a complexity score for each of the regions;
determining a quantization parameter for the region based on the complexity fraction of the region, the quantization parameter being used to encode the region.
2. The method of claim 1, wherein:
the size of the code tree cell is 64 x 64.
3. The method of claim 1, wherein the calculating the complexity score for each of the regions comprises:
determining a gray level co-occurrence matrix of the region, and calculating the energy, contrast, information entropy, homogeneity and correlation of the region based on the gray level co-occurrence matrix;
calculating an edge ratio of the region;
calculating a complexity score for the region based on the energy, contrast, entropy, homogeneity, correlation, and edge ratio of the region.
4. The method of claim 3, wherein the calculating the complexity score for the region based on the energy, contrast, entropy, homogeneity, correlation, and edge ratio for the region comprises:
complexity fraction = -energy + contrast + entropy of information + homogeneity + (1-correlation) + edge ratio.
5. The method of claim 1, wherein the determining the quantization parameter for the region based on the complexity fraction of the region comprises:
QP=51-(QPmax-QPmin)/((Xmax-Xmin)*(score-Xmin))+QPmin
wherein QP is a quantization parameter, QPmax =51, qpmin =0, score is the complexity score of the image, xmax, xmin are the maximum and minimum of the complexity score resulting from calculating the complexity score for the hevctsequence dataset, respectively.
6. A quantization parameter determination apparatus, comprising:
the image coding device comprises a segmentation module, a coding module and a coding module, wherein the segmentation module is used for segmenting an image to be coded into a plurality of regions, and each region consists of a coding tree unit;
a complexity score calculation module for calculating a complexity score for each of the regions;
a quantization parameter determination module to determine a quantization parameter for the region based on the complexity fraction of the region, the quantization parameter being used to encode the region.
7. A video encoding method, comprising:
acquiring an image to be coded in each frame of a video file, and determining a quantization parameter of each region in the image based on the method according to any one of claims 1 to 5, wherein the region is formed by dividing the image, and each region consists of one coding tree unit;
encoding the region based on the quantization parameter;
and repeating the steps until all the areas of all the images to be coded in the video file are coded.
8. A video encoding apparatus, comprising:
a determining module, configured to obtain an image to be encoded in each frame of a video file, and determine a quantization parameter of each region in the image based on the method according to any one of claims 1 to 5, where the region is formed by dividing the image, and each region is composed of one coding tree unit;
an encoding module for encoding the region based on the quantization parameter;
and the circulating module is used for repeating the steps until all the areas of all the images to be coded in the video file are coded.
9. A video file, characterized by:
the video file is encoded from an original video file by the video encoding method according to claim 7.
10. A video encoding device characterized by: comprising a memory and a processor, wherein the processor is connected with the memory,
the memory for storing a computer program;
the processor, when executing the computer program, for implementing the method according to any of claims 1-5 or according to claim 7.
CN202211598180.9A 2022-12-14 2022-12-14 Quantization parameter determination method and device and video coding method and device Pending CN115802038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211598180.9A CN115802038A (en) 2022-12-14 2022-12-14 Quantization parameter determination method and device and video coding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211598180.9A CN115802038A (en) 2022-12-14 2022-12-14 Quantization parameter determination method and device and video coding method and device

Publications (1)

Publication Number Publication Date
CN115802038A true CN115802038A (en) 2023-03-14

Family

ID=85419724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211598180.9A Pending CN115802038A (en) 2022-12-14 2022-12-14 Quantization parameter determination method and device and video coding method and device

Country Status (1)

Country Link
CN (1) CN115802038A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116744006A (en) * 2023-08-14 2023-09-12 光谷技术有限公司 Video monitoring data storage method based on block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116744006A (en) * 2023-08-14 2023-09-12 光谷技术有限公司 Video monitoring data storage method based on block chain
CN116744006B (en) * 2023-08-14 2023-10-27 光谷技术有限公司 Video monitoring data storage method based on block chain

Similar Documents

Publication Publication Date Title
US10462459B2 (en) Non-local adaptive loop filter
WO2020061005A1 (en) Use of non-linear function applied to quantization parameters in machine-learning models for video coding
US9094681B1 (en) Adaptive segmentation
CN110505472B (en) Quality evaluation method for H.265 ultra-high-definition video
US20140321552A1 (en) Optimization of Deblocking Filter Parameters
CN111988611B (en) Quantization offset information determining method, image encoding device and electronic equipment
US11330254B2 (en) Video encoding method and apparatus, video decoding method and apparatus, computer device, and storage medium
CN104378636B (en) A kind of video encoding method and device
DE102020123396A1 (en) METHOD AND SYSTEM FOR CONTENT ADAPTIVE NOISE REDUCTION FOR VIDEO ENCODING
EP3743855A1 (en) Receptive-field-conforming convolution models for video coding
Hu et al. An adaptive two-layer light field compression scheme using GNN-based reconstruction
CN115802038A (en) Quantization parameter determination method and device and video coding method and device
CN110740316A (en) Data coding method and device
CN112637596B (en) Code rate control system
Xia et al. Visual sensitivity-based low-bit-rate image compression algorithm
CN115866277A (en) Video encoding control method, video encoding control apparatus, and readable storage medium
EP3926584A1 (en) Method, computer program and system for detecting changes and moving objects in a video view
Beling et al. ERP-based CTU splitting early termination for intra prediction of 360 videos
CN114222127A (en) Video coding method, video decoding method and device
KR101247024B1 (en) Method of motion estimation and compensation using in-loop preprocessing filtering
CN113542864A (en) Video flower screen area detection method, device, equipment and readable storage medium
JPH07203436A (en) Image coder
CN109495740A (en) A method of image is encoded based on environmental information
CN111327909B (en) Rapid depth coding method for 3D-HEVC
Zhang et al. Visual Saliency Guided Foveated Video Compression

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination