Method for determining quantization parameters in encoding, chip system, display device and medium
By adjusting the quantization parameters of the cells in row order during image compression, the distortion problem caused by inconsistent quantization parameters of image partition boundary cells is solved, thus improving image compression quality without changing the available space.
Patent Information
- Application Number
- CN202210609505.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-05-31
AI Technical Summary
In existing technologies, two units located at the boundary of an image partition contain the same image content but have different quantization parameters, which leads to image distortion and reduces the quality of image compression.
By determining the initial quantization parameters of each cell in each row of the image to be compressed based on the pre-saved correspondence between quantization parameters and available space and the preset target available space for each cell, and performing smoothing processing in row order, the difference in quantization parameters between adjacent cells is adjusted to ensure that the available space of each row remains unchanged.
Without changing the available space in each row, the difference in quantization parameters between adjacent cells is reduced, image distortion is reduced, and image compression quality is improved.
Smart Images

Figure CN115037935B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image and video compression technology, and in particular to methods for determining quantization parameters in encoding, chip systems, display devices, and media. Background Technology
[0002] Figure 1 A schematic diagram illustrating the process of compressing images using existing technology, such as... Figure 1 As shown, the compression process includes forward prediction, quantization, and encoding.
[0003] In existing technologies, the process of quantizing an image involves dividing each image into multiple blocks, and then further dividing each block into multiple units. For each block, the available space of each unit is determined sequentially according to a preset order, along with the sum of the remaining available space of the preceding units. A pre-saved mapping between quantization parameters and available spaces is used to find at least one quantization parameter whose available space does not exceed this sum. The quantization parameter with the largest available space is then selected as the quantization parameter for that unit.
[0004] Specifically, Figure 2 A schematic diagram illustrating the process of determining quantization parameters during quantization, provided for reference in existing technologies, is shown below. Figure 2 As shown, each unit has 35 bits of available space, the two optional quantization parameters q1 have 30 bits of available space, and q2 has 40 bits of available space. Each block is divided into two units. The first unit has 35 bits of available space, and the quantization parameter for the first unit is determined to be q1. The first unit has 5 bits of available space remaining. The second unit has 35 bits + 5 bits of available space, and the quantization parameter for the second unit is determined to be q2.
[0005] Figure 3 An illustration of an image obtained after quantization using existing technology, such as... Figure 3 As shown, any two adjacent partitions contain similar image content in the two units located at the boundary of the two partitions. However, the quantization parameters of the two units are different as determined by existing technology, resulting in different quantization results for the two units. This leads to banding artifacts in the quantized image, causing image distortion and reducing the image compression quality. Summary of the Invention
[0006] This application provides a method for determining quantization parameters in encoding, a chip system, a display device, and a medium to solve the problem in the prior art where, when determining the quantization parameters corresponding to each unit, two units located at the boundary of two partitions contain the same image content but have different determined quantization parameters, resulting in image distortion and reduced image compression quality.
[0007] In a first aspect, embodiments of this application provide a method for determining quantization parameters in encoding, the method comprising:
[0008] Based on the pre-saved correspondence between quantization parameters and available space, and the preset target available space for each unit, the initial quantization parameters corresponding to each unit of each row of the image to be compressed are determined.
[0009] According to the row order, the initial quantization parameter corresponding to each cell in the first row is determined as the target quantization parameter corresponding to each cell in the first row;
[0010] For each row other than the first row in the row order, the smoothing value corresponding to the other row is determined according to the first weight corresponding to each unit in the pre-set row and the target quantization parameter corresponding to each unit in the previous row; according to the smoothing value, the initial quantization parameter of each unit in the other row is smoothed to determine the target quantization parameter of each unit in the other row.
[0011] Secondly, embodiments of this application also provide a device for determining quantization parameters in encoding, the device comprising:
[0012] The processing module is used to determine the initial quantization parameters corresponding to each cell of each row of the image to be compressed based on the pre-saved correspondence between quantization parameters and available space and the preset target available space of each cell.
[0013] The determination module is used to determine the initial quantization parameter corresponding to each unit in the first row as the target quantization parameter corresponding to each unit in the first row, according to the row order.
[0014] The determining module is further configured to sequentially determine the smoothing value corresponding to each other row except the first row according to the row order, based on the first weight corresponding to each pre-set unit and the target quantization parameter corresponding to each unit in the previous row; and to smooth the initial quantization parameter of each unit in the other row according to the smoothing value, thereby determining the target quantization parameter of each unit in the other row.
[0015] Thirdly, embodiments of this application also provide a chip system, the chip system including a memory and a processor, the processor and the memory being coupled; wherein, the memory includes program instructions, the program instructions being executed by the processor to cause the chip system to perform the steps of the quantization parameter determination method in any of the above-described encodings.
[0016] Fourthly, embodiments of this application also provide a display device, the display device comprising:
[0017] Display screen;
[0018] The controller is configured to perform the steps of the quantization parameter determination method in the encoding as described in any of the above.
[0019] Fifthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the quantization parameter determination method in any of the above-described encodings.
[0020] In this embodiment, based on the pre-saved correspondence between quantization parameters and available space, and the preset target available space for each unit, the initial quantization parameters corresponding to each unit in each row of the image to be compressed are determined. Following row order, the initial quantization parameters corresponding to each unit in the first row are determined as the target quantization parameters for that first row. Then, sequentially for each other row except the first row, a smoothing value is determined based on the pre-set first weight corresponding to each unit and the target quantization parameters corresponding to each unit in the previous row. Based on this smoothing value, the initial quantization parameters of each unit in the other row are smoothed to determine the target quantization parameters for each unit in that other row. That is, in this embodiment, by smoothing the initial quantization parameters of each unit to determine the target quantization parameters, the difference between the quantization parameters of two adjacent units is reduced without changing the available space in each row, thus reducing image distortion and improving image compression quality. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic diagram illustrating the process of compressing images using existing technology;
[0023] Figure 2 A schematic diagram illustrating the process of determining quantization parameters during quantization, provided for existing technologies;
[0024] Figure 3 A schematic diagram of an image obtained after quantization using existing technology;
[0025] Figure 4 The diagram illustrates an operational scenario between a display device and a control device according to an embodiment.
[0026] Figure 5 The diagram illustrates a hardware configuration block diagram of a display device 200 according to an exemplary embodiment.
[0027] Figure 6 This is a schematic diagram illustrating a process for determining quantization parameters, as provided in an embodiment of this application.
[0028] Figure 7 A schematic diagram illustrating the division of each row of the image to be compressed, provided in an embodiment of this application;
[0029] Figure 8 A schematic diagram illustrating the division of each partition of the image to be compressed, provided in an embodiment of this application;
[0030] Figure 9 A schematic diagram illustrating the division of each unit of the image to be compressed, provided in an embodiment of this application;
[0031] Figure 10 This is a schematic diagram illustrating the segmentation of an image to be compressed, provided in an embodiment of this application.
[0032] Figure 11 A schematic diagram illustrating the process of determining quantization parameters provided in this application embodiment;
[0033] Figure 12 This is a schematic diagram of a quantization parameter determination device provided in an embodiment of this application;
[0034] Figure 13 This is a schematic diagram of a chip system structure provided in an embodiment of this application. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0036] Based on the exemplary embodiments shown in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application. Furthermore, although the disclosures in this application are presented by way of one or more exemplary examples, it should be understood that each aspect of these disclosures can constitute a complete technical solution on its own.
[0037] It should be understood that the terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate, for example, to allow implementation in orders other than those given in the embodiments illustrated or described in this application.
[0038] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclusively include, for example, a product or device that includes a series of components is not necessarily limited to those that are explicitly listed, but may include other components that are not explicitly listed or that are inherent to such product or device.
[0039] As used in this application, the term "module" means any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code capable of performing the functions associated with that element.
[0040] Figure 4 The diagram illustrates an operational scenario between a display device and a control device according to an embodiment. Figure 4 As shown, the user can operate the display device 200 through the control device 100.
[0041] The control device 100 can be a remote control 100A, including infrared or Bluetooth communication protocols, and other short-range communication methods, to control the display device 200 wirelessly or via wired means. Users can control the display device 200 by inputting user commands through buttons on the remote control, voice input, or control panel input. For example, users can input corresponding control commands through volume up / down buttons, channel control buttons, up / down / left / right movement buttons, voice input buttons, menu buttons, and power buttons on the remote control to achieve the function of controlling the display device 200.
[0042] The control device 100 can also be a smart device, such as a mobile terminal 100B, tablet computer, computer, laptop computer, etc. For example, an application running on the smart device can be used to control the display device 200. This application can provide the user with various controls through an intuitive user interface (UI) on the screen associated with the smart device.
[0043] For example, mobile terminal 100B can install software applications with display device 200 to establish a connection and communication via network communication protocols, achieving one-to-one control operations and data communication. For instance, mobile terminal 100B can establish a control command protocol with display device 200, synchronizing the remote control keyboard to mobile terminal 100B. By controlling the user interface on mobile terminal 100B, the user can control the display device 200. Alternatively, audio and video content displayed on mobile terminal 100B can be transmitted to display device 200 for synchronized display.
[0044] like Figure 4As shown, display device 200 also communicates with server 300 via various communication methods. Display device 200 can communicate via local area network (LAN), wireless local area network (WLAN), and other networks. Server 300 can provide display device 200 with various content and interactive features. For example, display device 200 can interact by sending and receiving information, as well as through electronic program guides (EPGs), receiving software updates, or accessing remotely stored digital media libraries. Server 300 can be a group or multiple groups, and can be one or more types of servers. Other network services such as video-on-demand and advertising services can be provided through server 300.
[0045] Display device 200 can be a liquid crystal display, an OLED display, or a projection display device. The specific type, size, and resolution of the display device are not limited. Those skilled in the art will understand that display device 200 can be modified in terms of performance and configuration as needed.
[0046] In addition to providing broadcast television reception functionality, display device 200 can also be equipped with smart network television functionality that provides computer support. Examples include network television, smart television, and Internet Protocol Television (IPTV).
[0047] Figure 5 The diagram illustrates a hardware configuration block diagram of a display device 200 according to an exemplary embodiment. Figure 5 As shown, the display device 200 may include a tuner 220, a communicator 230, a detector 240, an external device interface 250, a controller 210, a memory 290, a user input interface, a video processor 260-1, an audio processor 260-2, a display 280, an audio input interface 272, and a power supply.
[0048] The tuner / demodulator 220 receives broadcast television signals via wired or wireless means and can perform modulation and demodulation processes such as amplification, mixing, and resonance. It is used to demodulate the audio and video signals carried in the frequency of the television channel selected by the user from multiple wireless or wired broadcast television signals, as well as additional information (such as EPG data signals).
[0049] The tuner 220, as selected by the user and controlled by the controller 210, responds to the television channel frequency selected by the user and the television signal carried by that frequency.
[0050] The tuner / demodulator 220 can receive signals from various sources depending on the television broadcasting system, such as terrestrial broadcasting, cable broadcasting, satellite broadcasting, or internet broadcasting; it can also use digital modulation or analog modulation depending on the modulation type; and it can demodulate analog and digital signals depending on the type of television signal received.
[0051] In some other exemplary embodiments, the tuner 220 may also be in an external device, such as an external set-top box. In this way, the set-top box outputs television audio and video signals after modulation and demodulation, which are then input to the display device 200 via the input / output interface 250.
[0052] The communicator 230 is a component used to communicate with external devices or external servers according to various communication protocol types. For example, the communicator 230 may include a WIFI module 231, a Bluetooth communication protocol module 232, a wired Ethernet communication protocol module 233, and other network communication protocol modules or near-field communication protocol modules.
[0053] The display device 200 can establish a connection for control signals and data signals with an external control device or content providing device via a communicator 230. For example, the communicator can receive control signals from a remote controller 100A according to the controller's control.
[0054] Detector 240 is a component of display device 200 used to collect signals from the external environment or interact with the outside world. Detector 240 may include light receiver 242, a sensor for collecting ambient light intensity, which can adapt to changes in display parameters by collecting ambient light; it may also include image acquisition device 241, such as a camera, which can be used to collect external environmental scenes and to collect user attributes or user interaction gestures, which can adaptively change display parameters and recognize user gestures to achieve interactive functions with the user.
[0055] In some other exemplary embodiments, the detector 240 may also include a temperature sensor, such as by sensing the ambient temperature, so that the display device 200 can adaptively adjust the display color temperature of the image. For example, in a high-temperature environment, the display device 200 may adjust the color temperature of the displayed image to be cooler; in a low-temperature environment, the display device 200 may adjust the color temperature of the displayed image to be warmer.
[0056] In some other exemplary embodiments, the detector 240 may also include a sound acquisition device, such as a microphone, which can be used to receive the user's voice, including voice signals of the user controlling the display device 200's control commands, or to acquire ambient sound for identifying the type of environmental scene, wherein the display device 200 can adapt to ambient noise.
[0057] External device interface 250 provides a component for controller 210 to control data transmission between display device 200 and other external devices. The external device interface can connect to external devices such as set-top boxes, gaming devices, and laptops via wired / wireless connections, and can receive data from external devices such as video signals (e.g., moving images), audio signals (e.g., music), and additional information (e.g., EPG).
[0058] The external device interface 250 may include one or more of the following: an HDMI terminal 251, a composite video blanking synchronization (CVBS) terminal 252, an analog or digital component terminal 253, a universal serial bus (USB) terminal 254, and a red, green and blue (RGB) terminal (not shown in the figure).
[0059] The controller 210 controls the operation of the display device 200 and responds to user operations by running various software control programs (such as operating systems and various applications) stored in the memory 290.
[0060] like Figure 5 As shown, the controller 210 includes a random access memory (RAM) 213, a read-only memory (ROM) 214, a graphics processor (GPU) 216, a CPU processor (CPU) 212, a communication interface 218, and a communication bus. The RAM 213, ROM 214, GPU 216, CPU processor 212, and communication interface 218 are connected via the bus.
[0061] ROM 213 is used to store various system startup instructions. For example, when a power-on signal is received, the display device 200 starts up, the CPU processor 212 executes the system startup instructions in the ROM, copies the operating system stored in memory 290 to RAM 214, and then starts running the operating system. After the operating system has started, the CPU processor 212 copies various application programs from memory 290 to RAM 214, and then starts running the various application programs.
[0062] The graphics processor 216 is used to generate various graphical objects, such as icons, operation menus, and graphics displayed based on user input commands. It includes an arithmetic logic unit (ALU) that performs calculations based on various user-input interactive commands and displays various objects according to display attributes. It also includes a renderer that generates various objects based on the ALU's results and displays the rendered results on the monitor 280.
[0063] CPU processor 212 is used to execute operating system and application instructions stored in memory 290, as well as various interactive instructions received from external input, to execute various applications, data, and content, so as to ultimately display and play various audio and video content.
[0064] In some exemplary embodiments, the CPU processor 212 may include multiple processors. These multiple processors may include a main processor and multiple or one sub-processors. The main processor is used to perform some operations of the display device 200 in a pre-power-on mode and / or to display a screen in normal mode. The multiple or one sub-processors are used to perform an operation in a standby mode or other similar state.
[0065] The communication interface may include a first interface 218-1 to an nth interface 218-n. These interfaces may be network interfaces that are connected to external devices via a network.
[0066] The controller 210 can control the overall operation of the display device 200. For example, in response to receiving a user command to select a UI object to be displayed on the display 280, the controller 210 can perform operations related to the object selected by the user command.
[0067] The object can be any of the optional objects, such as a hyperlink or an icon. Operations related to the selected object include, for example, displaying links to hyperlinked pages, documents, images, etc., or executing operations corresponding to the icon. User commands for selecting UI objects can be input via various input devices connected to the display device 200 (e.g., mouse, keyboard, touchpad, etc.) or voice commands corresponding to spoken commands by the user.
[0068] The memory 290 includes various software modules for driving and controlling the display device 200. These software modules stored in the memory 290 include: a basic module, a detection module, a communication module, a display control module, a browser module, and various service modules.
[0069] The basic module is a low-level software module used for signal communication between various hardware components in the display device 200 and for sending processing and control signals to higher-level modules. The detection module is a management module used to collect various information from various sensors or user input interfaces, perform digital-to-analog conversion, and analyze and manage the data.
[0070] Meanwhile, the memory 290 is also used to store received external data and user data, images of various items in various user interfaces, and visual renderings of the focus object.
[0071] The user input interface is used to send user input signals to the controller 210, or to transmit signals output from the controller to the user. For example, a control device (e.g., a mobile terminal or remote control) can send user input signals such as power switch signals, channel selection signals, and volume adjustment signals to the user input interface, which then forwards them to the controller; or, the control device can receive output signals such as audio, video, or data output from the user input interface after processing by the controller, and display the received output signals or output the received output signals as audio or vibration.
[0072] In some embodiments, the user can input user commands through a graphical user interface (GUI) displayed on the display 280, and the user input interface receives the user input commands through the graphical user interface (GUI). Alternatively, the user can input user commands by inputting specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.
[0073] The video processor 260-1 is used to receive video signals and perform video data processing such as decompression, decoding, scaling, noise reduction, frame rate conversion, resolution conversion, and image synthesis according to the standard encoding and decoding protocol of the input signal, so as to obtain a video signal that can be directly displayed or played on the monitor 280.
[0074] For example, the video processor 260-1 includes a demultiplexing module, a video decoding module, an image compositing module, a frame rate conversion module, a display formatting module, etc.
[0075] The demultiplexing module is used to demultiplex the input audio and video data streams. For example, if the input is MPEG-2, the demultiplexing module will demultiplex it into video signals and audio signals.
[0076] The video decoding module is used to process the demultiplexed video signal, including decoding and scaling.
[0077] Image compositing modules, such as image synthesizers, are used to overlay and blend GUI signals generated by a graphics generator based on user input or its own data with scaled video images to generate displayable image signals.
[0078] The frame rate conversion module is used to convert the frame rate of the input video, such as converting the frame rate of an input video of 24Hz, 25Hz, 30Hz, or 60Hz to 60Hz, 120Hz, or 240Hz. The input frame rate can be related to the source video stream, and the output frame rate can be related to the display's refresh rate. Inputs in common formats are implemented using methods such as frame interpolation.
[0079] The display formatting module is used to change the signal output by the frame rate conversion module into a signal that conforms to a display format, such as converting the signal output by the frame rate conversion module to output RGB data signals.
[0080] Display 280 is used to receive image signals input from video processor 260-1 and to display video content, images, and a menu control interface. Display 280 includes a display screen assembly for presenting the image and a driving assembly for driving the image display. The displayed video content may be video from a broadcast signal received by tuner 220, or video content input from a communicator or external device interface. Display 280 also displays the user interface (UI) generated in display device 200 for controlling display device 200.
[0081] Depending on the type of display 280, it may also include a driving component for driving the display. Alternatively, if the display 280 is a projection display, it may also include a projection device and a projection screen.
[0082] The audio processor 260-2 is used to receive audio signals, perform decompression and decoding according to the standard encoding and decoding protocol of the input signals, as well as audio data processing such as noise reduction, digital-to-analog conversion and amplification, to obtain an audio signal that can be played in the speaker 272.
[0083] The audio output interface 270 is used to receive audio signals output by the audio processor 260-2 under the control of the controller 210. The audio output interface may include a speaker 272, or an external audio output terminal 274 for outputting to an external device, such as an external audio terminal or headphone output terminal.
[0084] In some other exemplary embodiments, the video processor 260-1 may include one or more chips. The audio processor 260-2 may also include one or more chips.
[0085] In addition, in some other exemplary embodiments, the video processor 260-1 and the audio processor 260-2 may be separate chips or integrated with the controller 210 into one or more chips.
[0086] The power supply, under the control of the controller 210, provides power to the display device 200 from an external power source. The power supply may be a built-in power circuit installed inside the display device 200, or it may be an external power source, such as a power interface within the display device 200 that provides an external power supply.
[0087] In order to reduce the difference in quantization parameters between two adjacent cells without changing the available space in each row, thereby reducing image distortion and improving image compression quality, embodiments of this application provide a method for determining quantization parameters in encoding, a chip system, a display device, and a medium.
[0088] In this embodiment, based on the pre-saved correspondence between quantization parameters and available space, and the preset target available space for each unit, the initial quantization parameters corresponding to each unit in each row of the image to be compressed are determined. Following the row order, the initial quantization parameters corresponding to each unit in the first row are determined as the target quantization parameters corresponding to each unit in that first row. Then, following the row order, for each other row except the first row, a smoothing value is determined based on the pre-set first weight corresponding to each unit and the target quantization parameters corresponding to each unit in the previous row. Based on this smoothing value, the initial quantization parameters of each unit in that row are smoothed to determine the target quantization parameters for each unit in that other row.
[0089] Figure 6 This application provides a schematic diagram of a quantization parameter determination process, which includes:
[0090] S601: Based on the pre-saved correspondence between quantization parameters and available space, and the preset target available space for each unit, determine the initial quantization parameters corresponding to each unit of each row of the image to be compressed.
[0091] The method for determining quantization parameters in encoding provided in this application is applied to a display device, which can be used to... Figure 4 or Figure 5 The display devices shown are examples of such devices.
[0092] In this embodiment of the application, for each row of pixels in the image, the row of pixels is divided into a preset number of blocks, and the pixels in each block are further divided into a preset number of units, wherein each block contains the same number of pixels and each unit contains the same number of pixels.
[0093] Figure 7 This is a schematic diagram of the division of each row of the image to be compressed provided in the embodiments of this application, as shown in the figure. Figure 7 As shown, the display device divides the image to be compressed into multiple rows based on the pixels of each row, and names them as line1, line2, etc.
[0094] Figure 8 This is a schematic diagram illustrating the division of each partition of the image to be compressed provided in the embodiments of this application, as shown below. Figure 8 As shown, the display device divides each row of pixels into two partitions, namely slice1 and slice2.
[0095] Figure 9 This is a schematic diagram illustrating the division of each unit of the image to be compressed provided in the embodiments of this application, as shown below. Figure 9 As shown, the display device divides the pixels of each partition into four units, namely packet1, packet2, packet3 and packet4.
[0096] Figure 10 This is a schematic diagram illustrating the segmentation of an image to be compressed, as provided in an embodiment of this application. Figure 10 As shown, the display device divides the image to be compressed into multiple rows, and divides the pixels of each row into two partitions, and divides the pixels of each partition into multiple units.
[0097] In the embodiments of this application, the display device pre-stores the correspondence between quantization parameters and available space, as well as the target available space of each unit. The display device determines the initial quantization parameters of each unit based on the target available space of each unit and the correspondence.
[0098] In the embodiments of this application, the process of determining the initial quantization parameters of each unit is the same as the process of determining the quantization parameters of each unit in the prior art.
[0099] Specifically, for each row of pixels in the image to be compressed, the display device divides the row of pixels into a preset number of blocks, and then divides the pixels in each block into a preset number of units, where each block contains the same number of pixels, and each unit contains the same number of pixels. For each block, the available space of each unit is determined sequentially according to the unit order, along with the sum of the remaining available space of the units preceding it. In a pre-saved correspondence between quantization parameters and available space, at least one quantization parameter whose available space does not exceed this sum is found, and the quantization parameter with the largest available space is used as the initial quantization parameter for that unit.
[0100] S602: According to the row order, determine the initial quantization parameter corresponding to each cell in the first row as the target quantization parameter corresponding to each cell in the first row.
[0101] In this embodiment, after determining the initial quantization parameters for each unit, since the display device determines the initial quantization parameters for each unit within each partition, this may result in a large difference in the initial quantization parameters between two units located at the edges of two adjacent partitions in the same row. However, in the image to be compressed, since these two units are adjacent, the difference in pixel values of the pixels contained in these two units should be small. This leads to a large difference in the quantization results corresponding to these two units if quantization is performed on the image to be compressed based on the initial quantization parameters. Consequently, block artifacts will be generated between these two partitions when the compressed image is decompressed. Furthermore, since each row uses the same partitioning method and the same method for determining the initial quantization parameters for each unit, if quantization is performed on the image to be compressed based on the initial quantization parameters, block artifacts will be generated at the boundaries of every two adjacent partitions in each row after the compressed image is decompressed, thus forming banded artifacts in the image.
[0102] Therefore, in order to improve the quality of image compression and avoid image distortion, in this embodiment of the application, after determining the initial quantization parameters of each unit, the initial quantization parameters of each unit in each row are adjusted to reduce the difference between the initial quantization parameters of two adjacent units.
[0103] Specifically, in this embodiment, when adjusting the initial quantization of each unit of the image to be compressed, the initial quantization parameters of each unit in each row are adjusted sequentially based on the row order of the image to be compressed. Furthermore, during adjustment, the initial quantization parameters of each unit in the current row are adjusted according to the target quantization parameters of each unit in the previous row. Therefore, since the first row of the image to be compressed does not have a previous row, in this embodiment, the initial quantization parameters corresponding to each unit in the first row are determined as the target quantization parameters corresponding to each unit in the first row.
[0104] S603: For each other row except the first row in the row order, determine the smoothing value corresponding to the other row according to the first weight corresponding to each unit in the preset row and the target quantization parameter corresponding to each unit in the previous row; according to the smoothing value, smooth the initial quantization parameter of each unit in the other row to determine the target quantization parameter of each unit in the other row.
[0105] In this embodiment of the application, when determining the target quantization parameter of each cell in each of the other rows except the first row, the target quantization parameter of each cell in each of the other rows is determined sequentially according to the row order. Specifically, for each of the other rows except the first row, the smoothing value corresponding to that other row is determined based on the target quantization parameter of each cell in the previous row, and then the initial quantization parameter of each cell in that other row is smoothed based on the smoothing value to obtain the target quantization parameter of each cell in that other row.
[0106] In this embodiment, the display device also stores a first weight corresponding to each unit. When determining the smoothing value corresponding to other rows, the smoothing value can be determined based on the first weight corresponding to each unit in the previous row and the target quantization parameter. It should be noted that when dividing each row of the image to be compressed into multiple units, the number of units in each row is the same, and the number of pixels contained in each unit is also the same. Therefore, in order to reduce the memory occupation of the display device, in this embodiment, when storing the first weight corresponding to each unit, the first weight corresponding to each unit in a row can be stored, and the first weight corresponding to other units is the same as the first weight corresponding to the unit with the same position in the row, that is, the first weight corresponding to the unit with the same position in each row is the same.
[0107] Furthermore, in this embodiment, the first weight corresponding to each unit can be set by a technician. The first weight corresponding to each unit in a row can be the same, or the first weight corresponding to each unit can be different. The units that exhibit banded artifacts are generally the two units at the boundary of two partitions. Therefore, in this embodiment, when configuring the first weight corresponding to each unit in a row, the value of the first weight corresponding to the unit closer to the boundary of two partitions is larger.
[0108] In this embodiment, when determining the smoothing value for each other row, the average value of the target quantization parameters of each unit in the previous row can be calculated based on the first weight of each unit in the previous row and the target quantization parameter of each unit. This average value is then used as the smoothing value for the other row. The initial quantization parameters of each unit in the other row are then smoothed based on this smoothing value, for example, by using a preset function, the initial quantization parameters of each unit, and the smoothing value, to determine the target quantization parameters for each unit.
[0109] In this embodiment, by smoothing the initial quantization parameters of each unit and determining the target quantization parameters of each unit, the difference between the quantization parameters of two adjacent units is reduced without changing the available space of each row, thereby reducing image distortion and improving image compression quality.
[0110] To determine the smoothing value corresponding to other rows, based on the above embodiments, in this embodiment, determining the smoothing value corresponding to the other rows according to the pre-set first weight corresponding to each unit and the target quantization parameter corresponding to each unit of the previous row includes:
[0111] For each cell in the previous row, determine the first product of the target quantization parameter corresponding to that cell and the first weight corresponding to that cell;
[0112] Determine the first sum of the first product of each cell in the previous row, and determine the first ratio of the first sum to the number of cells in the other row as the smoothing value corresponding to the other row.
[0113] In this embodiment, for each other row, when determining the smoothing value corresponding to that other row, for each cell in the previous row of that other row, a first product of the target quantization parameter corresponding to that cell and the first weight corresponding to that cell is determined. A first sum of the first products corresponding to each cell is determined, and the smoothing value corresponding to that other row is determined by the ratio of the first sum to the number of cells in that other row.
[0114] In existing technologies, display devices determine the quantization parameters of each cell in each partition of a row in parallel, so the quantization parameters of cells in any two partitions are not shared. However, in this embodiment, the smoothed value determined by the above method includes information about the target quantization parameters of each cell in the previous row. Then, the quantization parameters of each cell in the current other rows are smoothed according to the smoothed value, so that the target quantization parameters of each cell in the other rows after smoothing are affected by the target quantization parameters of each cell in the previous row.
[0115] For example, in this embodiment of the application, the previous row is divided into six units. According to the position order of each unit in the previous row, the target quantization parameters of the six units are determined to be 1, 3, 4, 3, 3 and 1, respectively. The first weights corresponding to each unit are 0.7, 0.8, 0.9, 1, 0.85 and 0.7, respectively. Then, the smoothing value corresponding to the current other rows is determined to be (0.7*1+0.8*3+0.9*4+1*3+0.85*3+0.7*1) / 6, that is, the smoothing value is 2.16.
[0116] To reduce the difference in quantization parameters between two adjacent units, reduce image distortion, and improve image compression quality, based on the above embodiments, in this embodiment, the step of smoothing the initial quantization parameters of each unit in the row according to the smoothing value, and determining the target quantization parameters of each unit in the other rows, includes:
[0117] Determine the difference between the initial quantization parameter corresponding to each cell of the other row and the smoothed value corresponding to the other row, and determine the second sum of the differences;
[0118] For each cell in the other row, the target quantization parameter of the cell is determined based on the difference between the initial quantization parameter of the cell and the smoothed value, the second sum value, and the initial quantization parameter of the cell.
[0119] In this embodiment of the application, in order to reduce image distortion during the compression process and improve the image compression quality, for each other row, the initial quantization parameters of each cell in that other row are smoothed according to the smoothing value corresponding to that other row.
[0120] Specifically, in this embodiment, for each cell in each other row, the difference between the initial quantization parameter and the smoothed value of that cell is determined, and a second sum of the differences corresponding to each cell is calculated. Then, based on the smoothed value, the second sum, and the difference corresponding to each cell, the initial quantization parameter of each cell in the other row is smoothed to determine the target quantization parameter corresponding to each cell.
[0121] In this embodiment, when determining the target quantization parameter for each unit based on the smoothing value, the second sum, and the difference corresponding to each unit, the sum of the available space for each unit in the other rows remains unchanged, and no additional space is used. That is, the available space for each row of pixels after compression in this embodiment remains unchanged compared to the prior art. Since the available space remains unchanged for each row, the compression ratio remains unchanged. In summary, this embodiment smooths the initial quantization parameters of each unit determined based on the prior art without changing the compression ratio, thus improving the quality of image compression.
[0122] To reduce the difference in quantization parameters between two adjacent units, reduce image distortion, and improve image compression quality, based on the above embodiments, in this embodiment, determining the target quantization parameter of the unit based on the difference between the smoothing value and the initial quantization parameter corresponding to the unit, the second sum value, and the initial quantization parameter corresponding to the unit includes:
[0123] Determine the first difference corresponding to the unit, and determine the second ratio between the first difference and the second sum;
[0124] Determine the second product of the second ratio and the first difference, and then determine the third sum of the second product and the initial quantization parameter corresponding to the unit as the target quantization parameter of the unit.
[0125] In the embodiments of this application, when determining the target quantization parameter for each cell in other rows, the influence of the cell's position in its partition on the target quantization parameter may be considered or not.
[0126] Specifically, for each cell in other rows, if the influence of the cell's position in its partition on the target quantization parameter is not considered, then the first difference between the smoothed value corresponding to the other row and the initial quantization parameter of the cell is determined, and the second sum of the absolute values of each difference between the initial quantization parameter and the smoothed value corresponding to each cell in the other rows is determined. A second ratio between the first difference and the second sum is then determined. A second product of the second ratio and the first difference is calculated, and a third sum of the second product and the initial quantization parameter of the cell is determined as the target quantization parameter of the cell.
[0127] In this embodiment, for each other row, without changing the total available space of each cell in that other row, the available space of each cell is re-divided according to the smoothing value corresponding to that other row, so that the quantization result of each cell in that other row tends to be smooth, thus avoiding the generation of block artifacts.
[0128] For example, in this embodiment, the smoothing value corresponding to the other rows is 3.5. These other rows are divided into four units, whose positions in the other rows are, respectively, unit A, unit B, unit C, and unit D. The initial quantization parameter of unit A is 3, the initial quantization parameter of unit B is 4, the initial quantization parameter of unit C is 3, and the initial quantization parameter of unit D is 4. Therefore, the difference between the initial quantization parameter of unit A and the smoothing value is 0.5, the difference between the initial quantization parameter of unit B and the smoothing value is -0.5, the difference between the initial quantization parameter of unit C and the smoothing value is 0.5, and the difference between the initial quantization parameter of unit D and the smoothing value is -0.5. The second sum of the absolute values of the differences corresponding to these four units is 2. Based on the difference, the second sum, and the smoothing value corresponding to each unit, the target quantization parameter for unit A is determined to be 0.5 / 2*0.5+3, which is 3.125; the target quantization parameter for unit B is determined to be -0.5 / 2*0.5+4, which is 3.875; the target quantization parameter for unit C is determined to be 0.5 / 2*0.5+3, which is 3.125; and the target quantization parameter for unit D is determined to be -0.5 / 2*0.5+4, which is 3.875.
[0129] To reduce the difference in quantization parameters between two adjacent units, reduce image distortion, and improve image compression quality, based on the above embodiments, in this embodiment, determining the target quantization parameter of the unit based on the difference between the smoothing value and the initial quantization parameter corresponding to the unit, the second sum value, and the initial quantization parameter corresponding to the unit includes:
[0130] Determine the first difference corresponding to the unit, and determine the second ratio between the first difference and the second sum;
[0131] Determine the third product of the second ratio and the first difference, and determine the fourth product of the third product and the second weight corresponding to the pre-saved unit. Then, determine the fifth sum of the fourth product and the second initial quantization parameter corresponding to the unit as the target quantization parameter of the unit.
[0132] In this embodiment, for each cell in other rows, considering the influence of the cell's position in its partition on the target quantization parameter, a first difference between the smoothed value corresponding to the other row and the cell's initial quantization parameter is determined, along with a second sum of the absolute values of each difference between the initial quantization parameter and the smoothed value for each cell in the other rows. A second ratio between the first difference and the second sum is then determined. A third product of the second ratio and the first difference is calculated, and a fourth product of the third product and the pre-stored second weight corresponding to the cell is calculated. The third sum of the fourth product and the cell's initial quantization parameter is then determined as the target quantization parameter for the cell.
[0133] The second weight is preset by the technician based on the unit's position within the partition. The magnitude of the second weight corresponding to each unit can be the same as or different from the magnitude of the first weight corresponding to that unit; no restriction is imposed here.
[0134] For example, in this embodiment, the smoothing value corresponding to the other rows is 3.5. These other rows are divided into four units, whose positions in the other rows are, respectively, unit A, unit B, unit C, and unit D. The initial quantization parameter of unit A is 3, the initial quantization parameter of unit B is 4, the initial quantization parameter of unit C is 3, and the initial quantization parameter of unit D is 4. Therefore, the difference between the initial quantization parameter of unit A and the smoothing value is 0.5, the difference between the initial quantization parameter of unit B and the smoothing value is -0.5, the difference between the initial quantization parameter of unit C and the smoothing value is 0.5, and the difference between the initial quantization parameter of unit D and the smoothing value is -0.5. The second sum of the absolute values of the differences corresponding to these four units is 2.
[0135] In this model, the second weight corresponding to unit A is 1, the second weight corresponding to unit B is 2, the second weight corresponding to unit C is 2, and the second weight corresponding to unit D is 1. Based on the difference corresponding to each unit, the second weight corresponding to each unit, the second sum value, and the smoothing value, the target quantization parameter corresponding to unit A is determined to be 0.5 / 2*0.5*1+3, that is, the target quantization parameter of unit A is 3.125; the target quantization parameter corresponding to unit B is determined to be -0.5 / 2*0.5*2+4, that is, the target quantization parameter of unit B is 3.75; the target quantization parameter corresponding to unit C is determined to be 0.5 / 2*0.5*2+3, that is, the target quantization parameter of unit C is 3.25; and the target quantization parameter corresponding to unit D is determined to be -0.5 / 2*0.5*1+4, that is, the target quantization parameter of unit D is 3.875.
[0136] To avoid wasting display device resources, based on the above embodiments, in this application embodiment, the method further includes:
[0137] If it is determined that the other line is the last line in the line sequence, then the determination of the quantization parameters in the encoding ends.
[0138] In this embodiment, when determining the quantization parameters of each unit in an image, the display device determines the quantization parameters of each unit in each row sequentially according to the row order. Therefore, to avoid wasting display device resources, in this embodiment, if the currently being processed row is the last row in the row order, the display device ends the determination of the quantization parameters for that image after determining the quantization parameters of each unit in that other row.
[0139] To achieve the image quantization process, based on the above embodiments, the method in this application embodiment further includes:
[0140] Save the target quantization parameters of each cell in the other rows to Double Rate Synchronous Dynamic Random Memory (DDR).
[0141] In order to enable the display device to encode the image based on the quantization parameters, in this embodiment of the application, after determining the target quantization parameters of each cell in each row, the display device saves the target quantization parameters of each cell in the row to Double Data Rate Synchronous Dynamic Random Access Memory (DDR).
[0142] Figure 11 This is a schematic diagram illustrating the process of determining quantization parameters provided in an embodiment of this application. Figure 11 The process shown includes:
[0143] S1101: Based on the pre-saved correspondence between quantization parameters and available space, and the preset target available space for each unit, determine the initial quantization parameters corresponding to each unit of each row of the image to be compressed.
[0144] For example, for the currently processed line, each pre-saved unit has 35 bits of available space, the two optional quantization parameters q1=1 have 30 bits of available space, and q2=3 have 40 bits of available space. The currently processed line is divided into a first block, a second block, and a third open block, and each block is divided into two units. The first unit of the first block has 35 bits of available space, and the quantization parameter for the first unit of the first block is determined to be 1. The first unit has 5 bits of available space remaining. Therefore, the second unit of the second block has 35 bits + 5 bits of available space, and the quantization parameter for the second unit is determined to be 3. Similarly, the quantization parameter for the third unit of the second block is determined to be 1, and the quantization parameter for the fourth unit of the second block is determined to be 3.
[0145] S1102: Determine whether the currently processed line is the first line in the line sequence. If yes, execute S1109; otherwise, execute S1103.
[0146] S1109 and S1103 are two separate and independent processes.
[0147] S1103: Determine the target quantization parameters for each cell in the previous row.
[0148] S1104: Determine the smoothing value corresponding to the current processed row based on the first weight corresponding to each pre-set cell and the target quantization parameter corresponding to each cell in the previous row.
[0149] Using the example above, the previous row is divided into six units. According to the position order of each unit in the previous row, the target quantization parameters of the six units are determined to be 1, 3, 1 and 3 respectively. The first weights corresponding to each unit are 0.7, 0.9, 1 and 0.7 respectively. Then the smoothing value corresponding to the current processed row is determined to be (0.7*1+0.9*3+1*1+0.7*3) / 4, that is, the smoothing value is 0.53.
[0150] S1105: Determine the first difference corresponding to the unit, determine the second sum of the absolute values of each first difference, and determine the second ratio of the first difference to the second sum.
[0151] Continuing with the example above, the position order of each cell in the currently processed row is cell A, cell B, cell C, and cell D, and the initial quantization parameters of these four cells are 1, 3, 1, and 3, respectively. The first difference between the initial quantization parameter and the smoothed value of each cell is 0.47, 2.47, 0.47, and 2.47, respectively, and the second sum is 3.88. For cell A, the second ratio of the first difference to the second sum is 0.12.
[0152] S1106: Determine the second product of the second ratio and the first difference, and determine the third sum of the second product and the initial quantization parameter corresponding to the cell as the target quantization parameter of the cell.
[0153] Using the example above, for unit A, the second product of the first difference and the second ratio of unit A is determined to be 0.36. The third sum of the second product and the initial quantization parameter of unit A is 1.36, that is, the target quantization parameter of unit A is determined to be 1.36.
[0154] S1107: Save the target quantization parameters of each cell in the currently processed row to DDR.
[0155] S1108: Determine whether the currently processed line is the last line in the line sequence. If not, then take the next line of the currently processed line as the line to be processed and continue to execute S1102 above; if yes, then end the processing.
[0156] S1109: Determine the initial quantization parameter corresponding to each cell of the row to be processed as the target quantization parameter corresponding to each cell of the row to be processed.
[0157] Figure 12 This application provides a schematic diagram of a quantization parameter determination device, which includes:
[0158] The processing module 1201 is used to determine the initial quantization parameters corresponding to each cell of each row of the image to be compressed based on the pre-saved correspondence between quantization parameters and available space and the preset target available space of each cell.
[0159] The determining module 1202 is used to determine the initial quantization parameter corresponding to each unit of the first row as the target quantization parameter corresponding to each unit of the first row according to the row order;
[0160] The determining module 1202 is further configured to sequentially determine the smoothing value corresponding to each other row except the first row according to the row order, based on the first weight corresponding to each unit in the pre-set row and the target quantization parameter corresponding to each unit in the previous row; and to smooth the initial quantization parameter of each unit in the other row according to the smoothing value, thereby determining the target quantization parameter of each unit in the other row.
[0161] In one possible implementation, the determining module 1202 is specifically configured to, for each cell in the previous row, determine the first product of the target quantization parameter corresponding to the cell and the first weight corresponding to the cell; determine the first sum of the first products of each cell in the previous row; and determine the first ratio of the first sum to the number of cells in the other row as the smoothing value corresponding to the other row.
[0162] In one possible implementation, the determining module 1202 is specifically configured to determine the difference between the smoothed value corresponding to the other row and the initial quantization parameter corresponding to each unit of the other row, and determine a second sum of the absolute values of the difference; for each unit of the other row, the target quantization parameter of the unit is determined based on the difference between the smoothed value and the initial quantization parameter corresponding to the unit, the second sum, and the initial quantization parameter corresponding to the unit.
[0163] In one possible implementation, the determining module 1202 is specifically used to determine the first difference corresponding to the unit, and to determine the second ratio of the first difference to the second sum.
[0164] Determine the second product of the second ratio and the first difference, and then determine the third sum of the second product and the initial quantization parameter corresponding to the unit as the target quantization parameter of the unit.
[0165] In one possible implementation, the determining module 1202 is specifically used to determine the first difference corresponding to the unit, and to determine the second ratio of the first difference to the second sum.
[0166] Determine the third product of the second ratio and the first difference, and determine the fourth product of the third product and the second weight corresponding to the pre-saved unit. Then, determine the fifth sum of the fourth product and the second initial quantization parameter corresponding to the unit as the target quantization parameter of the unit.
[0167] In one possible implementation, the processing module 1201 is further configured to terminate the determination of quantization parameters in the encoding if it is determined that the other line is the last line in the line sequence.
[0168] In one possible implementation, the device further includes:
[0169] The storage module 1203 is used to save the target quantization parameters of each cell in the other row to the double-rate synchronous dynamic random access memory (DDR).
[0170] Figure 13This is a schematic diagram of a chip system provided in an embodiment of this application. The chip system includes one or more processors 1301 and a communication interface 1302.
[0171] Optionally, the chip system also includes a memory 1303, which may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM).
[0172] In some implementations, such as Figure 13 As shown, memory 1303 stores the following elements: execution modules or data structures, or subsets thereof, or extended sets thereof.
[0173] like Figure 13 As shown in this embodiment, the corresponding operation is executed by calling the operation instructions stored in the memory 1303 (which can be stored in the operating system).
[0174] like Figure 13 As shown, the processor 1301 controls the processing operations of the head-end device. The processor can also be called a central processing unit (CPU).
[0175] like Figure 13 As shown, memory 1303 may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of memory 1303 may also include NVRAM. For example, in an application, the communication interface and memory are coupled together via bus system 1304, which may include, in addition to a data bus, a power bus, a control bus, and a status signal bus, etc. However, for clarity, in... Figure 13 The general designated all buses as Bus System 1304.
[0176] The methods disclosed in the embodiments of this application can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied as execution by a hardware decoding processor, or as a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0177] It should be noted that, in the embodiments of this application, the chip system described above is installed in a display device and performs the steps of the above method.
[0178] Based on the above embodiments, some embodiments of this application also provide a computer-readable storage medium storing a computer program executable by a processor, which, when run on the processor, causes the processor to execute the steps of the above method.
[0179] Since the principle of the computer-readable storage medium in solving the problem is similar to the method of determining quantization parameters in coding, the implementation of the computer-readable storage medium can be found in the embodiments of the method, and repeated details will not be repeated.
[0180] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0181] This application allows each block of a flowchart and / or block diagram, and combinations of blocks in a flowchart and / or block diagram, to be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0182] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means.
[0183] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce computer-implemented processing.
[0184] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for determining quantization parameters in encoding, characterized in that, The method includes: Based on the pre-saved correspondence between quantization parameters and available space, and the preset target available space for each unit, the initial quantization parameters corresponding to each unit of each row of the image to be compressed are determined. According to the row order, the initial quantization parameter corresponding to each cell in the first row is determined as the target quantization parameter corresponding to each cell in the first row; For each row other than the first row in the row order, the smoothing value corresponding to the other row is determined according to the first weight corresponding to each unit in the pre-set row and the target quantization parameter corresponding to each unit in the previous row; according to the smoothing value, the initial quantization parameter of each unit in the other row is smoothed to determine the target quantization parameter of each unit in the other row. When configuring the first weight for each cell in a row, the cell closer to the boundary between two partitions has a larger first weight value.
2. The method according to claim 1, characterized in that, The step of determining the smoothed value corresponding to the other row based on the pre-set first weight corresponding to each unit and the target quantization parameter corresponding to each unit of the previous row includes: For each cell in the previous row, determine the first product of the target quantization parameter corresponding to that cell and the first weight corresponding to that cell; Determine the first sum of the first product of each cell in the previous row, and determine the first ratio of the first sum to the number of cells in the other row as the smoothing value corresponding to the other row.
3. The method according to claim 1, characterized in that, The step of smoothing the initial quantization parameters of each cell in the other rows based on the smoothing value, and determining the target quantization parameters of each cell in the other rows, includes: Determine the difference between the smoothed value corresponding to each other row and the initial quantization parameter corresponding to each cell of each other row, and determine the second sum of the absolute values of the differences; For each cell in the other rows, the target quantization parameter of the cell is determined based on the difference between the smoothing value and the initial quantization parameter corresponding to the cell, the second sum value, and the initial quantization parameter corresponding to the cell.
4. The method according to claim 3, characterized in that, The step of determining the target quantization parameter of the unit based on the difference between the smoothed value and the initial quantization parameter corresponding to the unit, the second sum value, and the initial quantization parameter corresponding to the unit includes: Determine the first difference corresponding to the unit, and determine the second ratio between the first difference and the second sum; Determine the second product of the second ratio and the first difference, and then determine the third sum of the second product and the initial quantization parameter corresponding to the unit as the target quantization parameter of the unit.
5. The method according to claim 3, characterized in that, The step of determining the target quantization parameter of the unit based on the difference between the smoothed value and the initial quantization parameter corresponding to the unit, the second sum value, and the initial quantization parameter corresponding to the unit includes: Determine the first difference corresponding to the unit, and determine the second ratio between the first difference and the second sum; Determine the third product of the second ratio and the first difference, and determine the fourth product of the third product and the second weight corresponding to the pre-saved unit. Then, determine the fifth sum of the fourth product and the second initial quantization parameter corresponding to the unit as the target quantization parameter of the unit.
6. The method according to claim 1, characterized in that, The method further includes: If it is determined that the other line is the last line in the line sequence, then the determination of the quantization parameters in the encoding ends.
7. The method according to claim 1, characterized in that, The method further includes: Save the target quantization parameters of each cell in the other rows to Double Rate Synchronous Dynamic Random Memory (DDR).
8. A chip system, characterized in that, The chip system includes a memory and a processor, the processor and the memory being coupled; wherein the memory includes program instructions, which, when executed by the processor, cause the chip system to perform the steps of the quantization parameter determination method in any one of claims 1-7.
9. A display device, characterized in that, The display device includes: Display screen; The controller is configured to perform the steps of the method for determining quantization parameters in the encoding as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the method for determining quantization parameters in the encoding as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and device for controlling code rate in video coding
CN101795415A
Methods and apparatuses of reference quantization parameter derivation in video processing system
CN109479139A