Chroma quantification method, system, medium, equipment and program product
By adaptively adjusting the chroma quantization method, obtaining the brightness component value of the image frame, calculating the chroma component offset and performing boundary constraints and entropy coding, the problem of insufficient chroma component performance in the AVS3 video coding standard is solved, and efficient coding in HDR scenarios is achieved.
Patent Information
- Application Number
- CN202511069670.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-10-10
AI Technical Summary
The existing AVS3 video coding standard has weak performance in the chrominance (UV) component, resulting in poor overall HDR performance. How to optimize the chrominance quantization method to achieve a smoother rate-distortion curve and higher coding efficiency is an urgent problem that needs to be solved.
By obtaining the frame parameters of the image frame, reading the luminance component value, calculating the chrominance component offset, and performing boundary constraints and entropy coding on it, a bitstream is generated. The chrominance quantization parameters are adjusted using mapping relationships and Bayesian optimization, and the chrominance quantization is optimized by combining the CLIP limiting function and filtering correction algorithm.
It achieves the optimal subjective quality and bit rate of the image in HDR scenarios, accurately quantizes while saving bit rate and maintaining color accuracy, eliminates visible banding artifacts, and improves the coding efficiency of the chrominance component.
Smart Images

Figure CN120769052A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a chroma quantization method, system, medium, device and program product. BACKGROUND
[0002] In the AVS3 (Audio Video Coding Standard 3) video coding standard, high dynamic range (HDR) content is usually encoded using a perceptual quantizer (PQ). Existing chroma quantization methods, such as the adaptive chroma quantization parameter (QP) calculation method described in the AVS M6621 proposal, aim to reduce banding artifacts and improve overall coding efficiency by adjusting the chroma QP. However, through analysis, the performance of the AVS3 reference software (HPM15.7) in the chroma (UV) component is significantly inferior to other standards such as H.266 and H.265. For example, in terms of key indicators such as PSNRYUV, wPSNRYUV, PSNRL100 and DE100, the performance of HPM15.7 is about 4.75%, 10.3% and 25.35% lower than that of H.266, respectively. Although HPM15.7 is slightly better than H.266 in the luminance (Y) component, its performance in the chroma (UV) component is weak, resulting in poor overall HDR performance. Therefore, how to optimize the chroma quantization method to achieve a smoother rate-distortion (RD) curve and higher coding efficiency is a technical problem that needs to be solved by those skilled in the art. SUMMARY
[0003] The purpose of the present application is to provide a chroma quantization method, system, computer-readable storage medium, electronic device and computer-readable program product, which can effectively optimize chroma quantization and improve image quality.
[0004] To solve the above technical problems, the present application provides a chroma quantization method, and the specific technical solutions are as follows:
[0005] An image frame is obtained, and a frame parameter of the current image frame is determined;
[0006] A luminance component value in the frame parameter is read;
[0007] A chroma component offset is calculated according to the luminance component value;
[0008] The chroma component offset is subjected to boundary constraint, and a final chroma is calculated; the final chroma is used to quantize the chroma component and perform entropy coding to generate a bitstream.
[0009] Optionally, calculating the chroma component offset according to the luminance component value comprises:
[0010] Call the mapping relationship between the basic chroma quantization parameters and the chroma component offset;
[0011] Substituting the luminance component value into the mapping relationship, the chrominance component offset is obtained.
[0012] Optionally, before calling the mapping relationship between the basic chroma quantization parameters and the chroma component offsets, the following is also included:
[0013] A mapping relationship between a basic chrominance quantization parameter and a chrominance component offset is constructed according to the first coefficient, the second coefficient, and the rounding correction.
[0014] Optionally, also include:
[0015] When the chromaticity quantization parameter allows adjustment, calculating the chromaticity quantization parameter offset for the image frame;
[0016] Setting a threshold value of a chroma component offset, a first coefficient range of the first coefficient, and a second coefficient range of the second coefficient;
[0017] When the first coefficient satisfies the first coefficient range and the second coefficient satisfies the second coefficient range, Bayesian optimization is used to determine the first coefficient and the second coefficient corresponding to the optimal bit rate distortion gain.
[0018] Optionally, setting the threshold of the chroma component offset includes:
[0019] The clipping interval of the CLIP clipping function corresponding to the chroma component offset is set according to the threshold.
[0020] Optionally, after performing boundary constraints on the chroma component offset and calculating the final chroma, the method further includes:
[0021] Calculating high dynamic range imaging chromatic aberration and / or weighted peak signal-to-noise ratio based on the final chromaticity imaging;
[0022] If the high dynamic range imaging chromatic aberration is greater than the set chromatic aberration range, or the weighted peak signal-to-noise ratio is lower than the set signal-to-noise ratio threshold,
[0023] An optional filtering correction is performed on the chroma component offset, and a debanding algorithm or a dithering algorithm is called in the smooth gradient area; the debanding algorithm and the dithering algorithm are both used to eliminate visible banding artifacts.
[0024] The present application also provides a colorimetric quantification system, comprising:
[0025] An image frame processing module, used for acquiring an image frame and determining frame parameters of a current image frame;
[0026] A brightness reading module, used for reading the brightness component value in the frame parameters;
[0027] a chroma component calculation module, configured to calculate a chroma component offset according to the luminance component value;
[0028] The quantization processing module is used to perform boundary constraints on the chroma component offset and calculate the final chroma; the final chroma is used to quantize the chroma component and perform entropy coding to generate a code stream.
[0029] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the colorimetric quantization method described above are implemented.
[0030] The present application also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the colorimetric quantization method described above are implemented.
[0031] The present application provides a chroma quantization method, comprising: acquiring an image frame and determining frame parameters of the current image frame; reading a luminance component value in the frame parameters; calculating a chroma component offset based on the luminance component value; performing boundary constraints on the chroma component offset and calculating a final chroma; the final chroma is used to quantize the chroma component and perform entropy coding to generate a bitstream.
[0032] This application calculates the chroma component offset by reading the luminance component value in the frame parameters, and can adaptively adjust the chroma component offset according to the change of the luminance component value of the image frame, thereby achieving accurate quantization of the chroma component, ensuring that the chroma of bright scenes is slightly coarse and the chroma of dark scenes is extremely fine, so that the subjective quality and bit rate of the image are optimized at the same time, and accurate quantization that saves bit rate and maintains color accuracy is achieved in HDR scenarios.
[0033] The present application also provides a colorimetric quantification system, a computer-readable storage medium, an electronic device, and a computer program product, which have the above-mentioned beneficial effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0035] Figure 1 A flow chart of a colorimetric quantification method provided in an embodiment of the present application;
[0036] Figure 2 A mapping relationship diagram between the quantization parameter and the chroma component offset provided in an embodiment of the present application;
[0037] Figure 3 A schematic diagram of the structure of a colorimetric quantification system provided in an embodiment of the present application;
[0038] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0040] In existing solutions, the following problems exist with the Cb component (blue chromaticity component, i.e., blue-luminance difference (BY), which is used to describe the degree of deviation of blue from luminance in pixel color):
[0041] First, the QP offset lower limit is improperly set; the current offset lower limit is -6, and the chroma component offset QP lower limit is -12 in the JVET series reference encoder, while the ratio of the AVS series QP to the JVET series QP is 8:6;
[0042] Second, the chroma offset is allowed to be positive;
[0043] At the same time, there are serious flaws in using a fixed offset in the calculation of the Cr component (representing the red chromaticity component, namely the red-luminance difference (RY), which is used to describe the degree of offset of red relative to luminance in pixel color).
[0044] To solve the above technical defects, see Figure 1 , Figure 1 A flow chart of a colorimetric quantification method provided in an embodiment of the present application, the method comprising:
[0045] S101: Acquire an image frame and determine frame parameters of the current image frame;
[0046] S102: Read the brightness component value in the frame parameters;
[0047] S103: Calculating a chrominance component offset according to the luminance component value;
[0048] S104: performing boundary constraints on the chroma component offset and calculating the final chroma; the final chroma is used to quantize the chroma component and perform entropy coding to generate a bit stream.
[0049] There are no restrictions on how to obtain the image frame. You can read a frame of image data from a video source (such as a camera, video file, or live stream) in YUV (such as YUV420, YUV422) or RGB format. If the format is RGB, convert it to YUV format to separate the luma (Y) and chroma (U / V) components.
[0050] After that, the width (W), height (H) of the frame and the chroma sampling format (such as 4:2:0, 4:4:4) can be recorded to determine the resolution of the chroma component (for example, in 4:2:0 mode, the chroma width is W / 2 and the height is H / 2).
[0051] Quantization parameter (QP): Read the base QP value of the luma component (QP_ luma) from the encoder configuration and initialize the chroma QP to:
[0052] (hdr_chroma_qp_offset is the preset offset).
[0053] When executing step S102 , a two-dimensional matrix of the luminance component (Y) can be extracted from the YUV data, with a size of W×H. If the chrominance component is stored independently (such as half-resolution chrominance of YUV420), the Y data of the corresponding area is directly read.
[0054] The luminance component is divided into fixed-size blocks (e.g., 8×8 or 4×4) to facilitate subsequent calculations. In one possible implementation, the luminance mean (avg_Y) or variance (var_Y) of each block can be calculated to dynamically adjust the chrominance offset.
[0055] In step S103, chroma component offsets need to be calculated based on the luma component value. Specifically, a mapping relationship between base chroma quantization parameters and chroma component offsets can be invoked, and the luma component value can be substituted into the mapping relationship to obtain the chroma component offsets. For example, a lookup table of luma QP and chroma QP offsets can be pre-stored in an encoder configuration table. There is no limitation on how this mapping relationship is determined; the mapping relationship between base chroma quantization parameters and chroma component offsets can be pre-established based on the first coefficient, the second coefficient, and rounding correction.
[0056] For the first coefficient and the second coefficient, when the chroma quantization parameter allows adjustment, the chroma quantization parameter offset can be calculated for the image frame. The threshold of the chroma component offset, the first coefficient range of the first coefficient, and the second coefficient range of the second coefficient are first set. Thereafter, when the first coefficient satisfies the first coefficient range and the second coefficient satisfies the second coefficient range, Bayesian optimization is used to determine the first coefficient and the second coefficient corresponding to the optimal bit rate distortion gain.
[0057] Those skilled in the art may also use other methods, such as a grid search method, to determine the first coefficient and the second coefficient.
[0058] An exemplary calculation is shown below:
[0059] ;
[0060] ;
[0061] in, is the first coefficient, is the second coefficient, is the chroma component offset, is the brightness component value, and is the threshold for the chroma component offset.
[0062] If the experimental method is used, a limited number of experiments (such as dozens to hundreds of test groups) can be performed. and The optimal coefficients, adjusted for HPM version 15.7 through limited experiments, are -0.613 and 12.347, respectively; 0.5 represents rounding compensation. Rounding compensation is a correction introduced during numerical calculations to offset deviations caused by accumulated rounding errors. Its purpose is to maintain the overall balance of the numerical system and prevent unilateral error accumulation from distorting the results. If rounding down (such as truncation) is repeatedly used during calculations, the error will systematically shift toward negative values (results will be undervalued). In this case, a positive correction can correct the deviation and bring the result closer to the true value.
[0063] In a feasible implementation, to prevent the chroma component offset from exceeding the limit, the clipping interval of the CLIP clipping function corresponding to the chroma component offset can be set according to a threshold, for example, adding a CLIP function to limit its value range to [-16, 0].
[0064] chroma_qp_scale=-0.613 (negative value means that the chroma component offset decreases as the luma component value increases, that is, the chroma quantization is finer);
[0065] chroma_qp_bias=12.347 (a positive value indicates that the overall chroma component bias is shifted upward to prevent over-quantization).
[0066] In step S103, a numerical range limit is set for the adjusted chroma component to ensure that its value does not exceed the maximum or minimum value allowed by the device or coding standard. If it exceeds the range, it is fixed at the boundary value. The constrained chroma component is combined with the original chroma base value to generate the final chroma data. This data is used to replace the original chroma information to make the image color more harmonious. The final chroma data is quantized to convert the continuous chroma values into discrete numerical levels to facilitate subsequent compression coding. For example, entropy coding technology (such as Huffman coding or arithmetic coding) is used to compress the quantized chroma data to generate a compact code stream while retaining the key color information of the image.
[0067] After obtaining the final chroma, input the chroma component (U / V) data (two-dimensional matrix), quantization parameter (QP_chroma) and block size (such as 8x8 or 4x4), and determine the DCT block size and entropy coding type. The chroma components can be divided into fixed-size blocks (such as 8x8) to facilitate subsequent DCT and quantization.
[0068] There are no restrictions on any block processing here, and blocks can be divided according to the chroma sampling format (such as 4:2:0). For example, for a chroma component with a width and height of W×H, the number of horizontal blocks = W / block width (such as 8), and the number of vertical blocks = H / block height (such as 8). In this case, data can be extracted block by block to generate multiple 8x8 chroma blocks.
[0069] The DCT (Discrete Cosine Transform) transforms spatial pixel values into frequency coefficients, concentrating energy in the low-frequency region. Quantization reduces coefficient precision and bitrate, controlling compression strength through chroma component offsets.
[0070] Specifically, the quantization compensation can be calculated first, and then uniform quantization can be performed on each DCT coefficient. It should also be noted that the DC coefficient (low frequency) retains more accuracy, and the AC coefficient (high frequency) may be quantized to zero.
[0071] The entropy coding process is used to efficiently encode the quantized coefficients and compress redundant information. Taking CAVLC as an example, it can include the following steps:
[0072] Step 1: Execution Scan, and press the two-dimensional quantization coefficients Convert the sequence into a one-dimensional run-length coded sequence.
[0073] Step 2: Encode non-zero coefficients:
[0074] Run-length encoding: records the number of consecutive zeros (Run) and the next non-zero coefficient (Level).
[0075] Sign bit encoding: the sign of the non-zero coefficient.
[0076] Step 3: Total coefficient number encoding: record the total number of non-zero coefficients in the block.
[0077] Step 4: Entropy coding: Allocate variable-length codewords (such as UVLC table) based on the context (such as Run / Level distribution).
[0078] After entropy coding, the entropy coding results can be encapsulated into a standard bitstream when generating the bitstream. The entropy coding results of each chroma block are sequentially spliced together, including block type (such as chroma DC / AC), QP parameters, sampling format, etc., and finally combined with other data (such as luma component and frame header) to form a complete compressed frame to obtain the bitstream.
[0079] The embodiment of the present application reads the brightness component value in the frame parameters and calculates the chroma component offset. It can adaptively adjust the chroma component offset according to the change of the brightness component value of the image frame, thereby achieving accurate quantization of the chroma component, ensuring that the chroma of bright scenes is slightly coarse and the chroma of dark scenes is extremely fine, so that the subjective quality and bit rate of the image are optimized at the same time, and accurate quantization that saves bit rate and maintains color accuracy is achieved in HDR scenarios.
[0080] As can be seen, this application can determine the mapping relationship between the basic chroma quantization parameters and the chroma component offsets, and adaptively adjust the chroma component offsets according to the changes in the luma component value, thereby achieving accurate quantization of the chroma components. At the same time, to prevent the chroma component offsets from exceeding a reasonable range and affecting the stability and quality of the encoding, the CLIP clipping function is introduced to limit the calculated chroma component offsets.
[0081] See also Figure 2 , Figure 2 This is a relationship diagram of the chroma component offset provided in the embodiment of the present application, Figure 2 In the figure, the horizontal axis represents the quantization parameter (QP Value), ranging from 0 to 60. The vertical axis represents the chroma offset (Chroma Offset), ranging from -16 to 0. The blue line represents the chroma offset value after clipping. The red dotted line represents the vertical reference line of QP value 23. The chroma offset values corresponding to different QP value intervals are as follows, for example It means that the QP value starts from 23 and the chroma offset changes from 0 to -1, that is, QP23 is the first non-zero offset point.
[0082] As can be seen, with the increase of QP value, the chroma offset value gradually decreases and tends to the clipping boundary, so the clipping process is needed to ensure that the chroma offset value does not exceed the upper and lower limits (-16 to 0) set.
[0083] On the basis of the above-mentioned embodiments, as a preferred embodiment, after the chroma component offset is subjected to boundary constraint and the final chroma is calculated, the color band effect can be further reduced. The specific process is as follows:
[0084] First step: calculate the high dynamic range imaging color difference and / or weighted peak signal-to-noise ratio after imaging based on the final chroma;
[0085] Second step: if the high dynamic range imaging color difference is greater than the set color difference range, or the weighted peak signal-to-noise ratio is lower than the set signal-to-noise ratio threshold,
[0086] Third step: perform optional filtering correction on the chroma component offset, and call a color band elimination algorithm or a dithering algorithm in a smooth transition area; the color band elimination algorithm and the dithering algorithm are both used to eliminate visible banding artifacts.
[0087] In the first step, the high dynamic range processed image including luminance and chroma components can be obtained first. The processed image is compared with the original standard image or the preset reference image pixel by pixel or region by region, and the areas with obvious color difference are focused on. The color offset degree between different chroma channels (such as red, green and blue) in the image is judged by human eye vision or automatic tools, and the color offset phenomenon beyond the normal range is recorded. The noise distribution in the flat area or low contrast area of the image is analyzed, and the weighted peak signal-to-noise ratio value is calculated in combination with the sensitivity of human eye to brightness and color.
[0088] If it is found that there are obvious color block fractures, unnatural color transition, or chroma offset beyond the preset allowable error range in the image, it is determined that the color difference is out of limit. If the weighted peak signal-to-noise ratio is lower than the threshold required by the device or scene (such as the appearance of graininess, blurred details or color noise in the picture), it is determined that the signal-to-noise ratio is not up to standard. When either of the above two conditions is not met, the subsequent image optimization process is started.
[0089] The offset of the chroma component (such as red, green and blue channels) is subjected to smoothing processing, for example, by local averaging or gradual adjustment, to reduce the fault feeling caused by color mutation. The color overflow problem in the highlight or shadow area is preferentially processed, so that the color in the transition area is more continuous.
[0090] Locate areas in the image where color or brightness changes slowly (e.g. sky, wall, etc.), which are prone to visible artifacts due to insufficient quantization. In smooth areas, alleviate the banding problem caused by insufficient color scale by blending the color values of neighboring pixels. For example, slightly diffuse the color boundaries to make the transition more natural. If the debanding effect is not enough, add a small amount of random color perturbation (e.g. very low frequency noise) to the smooth area without affecting the details, breaking the visual stiffness of the uniform color block, while avoiding introducing new noise.
[0091] Referring to Figure 3 , Figure 3 A color quantization system structure schematic diagram provided by an embodiment of the present application, the system comprises:
[0092] An image frame processing module, configured to acquire an image frame and determine a frame parameter of the current image frame;
[0093] A brightness reading module, configured to read a brightness component value in the frame parameter;
[0094] A chroma component calculation module, configured to calculate a chroma component offset according to the brightness component value;
[0095] A quantization processing module, configured to perform boundary constraint on the chroma component offset and calculate a final chroma; the final chroma is used for quantizing a chroma component and performing entropy encoding to generate a bitstream.
[0096] Based on the above embodiment, as a preferred embodiment, the chroma component calculation module comprises:
[0097] A mapping relationship acquisition unit, configured to call a mapping relationship between a basic chroma quantization parameter and a chroma component offset;
[0098] A calculation unit, configured to substitute the brightness component value into the mapping relationship to obtain the chroma component offset.
[0099] Based on the above embodiment, as a preferred embodiment, further comprising:
[0100] A mapping relationship generation module, configured to construct a mapping relationship between a basic chroma quantization parameter and a chroma component offset according to a first coefficient, a second coefficient and a rounding correction.
[0101] Based on the above embodiment, as a preferred embodiment, the mapping relationship generation module further comprises:
[0102] The coefficient screening unit is configured to calculate a chroma quantization parameter offset for the image frame when the chroma quantization parameter is allowed to be adjusted; set a threshold of the chroma component offset, a first coefficient range of the first coefficient, and a second coefficient range of the second coefficient; and determine the first coefficient and the second coefficient corresponding to the optimal bit rate distortion gain by using Bayesian optimization when the first coefficient meets the first coefficient range and the second coefficient meets the second coefficient range.
[0103] Based on the above-mentioned embodiments, as a preferred embodiment, the coefficient screening unit comprises:
[0104] The clipping function setting sub-unit is configured to set a clipping interval of a CLIP clipping function corresponding to the chroma component offset according to the threshold.
[0105] Based on the above-mentioned embodiments, as a preferred embodiment, the coefficient screening unit further comprises:
[0106] The correction module is configured to calculate a high dynamic range imaging color difference and / or a weighted peak signal-to-noise ratio after the final chroma imaging; perform optional filtering correction on the chroma component offset if the high dynamic range imaging color difference is greater than a set color difference range or the weighted peak signal-to-noise ratio is lower than a set signal-to-noise ratio threshold; and call a debanding algorithm or a dithering algorithm in a smooth transition area; and the debanding algorithm and the dithering algorithm are both configured to eliminate visible banding artifacts.
[0107] The present application also provides an embodiment corresponding to a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method described in the above method embodiment.
[0108] It can be understood that if the method in the above-mentioned embodiments is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and executes all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0109] The computer readable storage medium provided in the present embodiment includes the above-mentioned method, and the effects are the same as above.
[0110] The present application also provides an electronic device, which is described with reference to Figure 4, a structural diagram of an electronic device provided in an embodiment of the present application, such as Figure 4 As shown, a processor 1410 and a memory 1420 may be included.
[0111] The processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1410 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1410 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0112] The memory 1420 may include one or more computer-readable storage media, which may be non-transitory. The memory 1420 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 1420 is at least used to store the following computer program 1421, wherein, after the computer program is loaded and executed by the processor 1410, it can implement the relevant steps in the method performed by the electronic device side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 1420 may also include an operating system 1422 and data 1423, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 1422 may include Windows, Linux, Android, etc.
[0113] In some embodiments, the electronic device may further include a display screen 1430 , an input / output interface 1440 , a communication interface 1450 , a sensor 1460 , a power supply 1470 , and a communication bus 1480 .
[0114] certainly, Figure 4The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 4 More or fewer components than shown, or combinations of certain components.
[0115] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems provided in the embodiments, since they correspond to the methods provided in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0116] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core ideas of this application. It should be noted that for those skilled in the art, without departing from the principles of this application, various improvements and modifications can be made to this application, and such improvements and modifications also fall within the scope of protection of this application.
[0117] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
Claims
1. A colorimetric quantification method, characterized in that: include: Acquire an image frame and determine the frame parameters of the current image frame; Reading the brightness component value in the frame parameters; Calculate the chrominance component offset according to the luminance component value; Performing boundary constraints on the chroma component offset and calculating the final chroma; The final chroma is used to quantize the chroma components and perform entropy coding to generate a bit stream.
2. The colorimetric quantification method according to claim 1, wherein: Calculating the chrominance component offset according to the luminance component value includes: Call the mapping relationship between the basic chroma quantization parameters and the chroma component offset; Substituting the luminance component value into the mapping relationship, the chrominance component offset is obtained.
3. The colorimetric quantification method according to claim 2, wherein: Before calling the mapping relationship between the basic chroma quantization parameters and the chroma component offset, it also includes: A mapping relationship between a basic chrominance quantization parameter and a chrominance component offset is constructed according to the first coefficient, the second coefficient, and the rounding correction.
4. The colorimetric quantification method according to claim 3, wherein: Also includes: When the chromaticity quantization parameter allows adjustment, calculating the chromaticity quantization parameter offset for the image frame; Setting a threshold value of a chroma component offset, a first coefficient range of the first coefficient, and a second coefficient range of the second coefficient; When the first coefficient satisfies the first coefficient range and the second coefficient satisfies the second coefficient range, Bayesian optimization is used to determine the first coefficient and the second coefficient corresponding to the optimal bit rate distortion gain.
5. The colorimetric quantification method according to claim 4, characterized in that: The threshold value of setting the chroma component offset includes: The clipping interval of the CLIP clipping function corresponding to the chroma component offset is set according to the threshold.
6. The colorimetric quantification method according to claim 1, wherein: After performing boundary constraints on the chroma component offset and calculating the final chroma, the method further includes: Calculating high dynamic range imaging chromatic aberration and / or weighted peak signal-to-noise ratio based on the final chromaticity imaging; If the high dynamic range imaging chromatic aberration is greater than the set chromatic aberration range, or the weighted peak signal-to-noise ratio is lower than the set signal-to-noise ratio threshold, An optional filtering correction is performed on the chroma component offset, and a debanding algorithm or a dithering algorithm is called in the smooth gradient area; the debanding algorithm and the dithering algorithm are both used to eliminate visible banding artifacts.
7. A colorimetric quantification system, characterized in that: include: An image frame processing module, used for acquiring an image frame and determining frame parameters of a current image frame; A brightness reading module, used for reading the brightness component value in the frame parameters; a chroma component calculation module, configured to calculate a chroma component offset according to the luminance component value; The quantization processing module is used to perform boundary constraints on the chroma component offset and calculate the final chroma; the final chroma is used to quantize the chroma component and perform entropy coding to generate a code stream.
8. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which implements the steps of the method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the steps of the method according to any one of claims 1 to 6 when the computer program is executed.