CN109246431B - Video coding method and device based on quantization parameter configuration and electronic equipment - Google Patents
Video coding method and device based on quantization parameter configuration and electronic equipment Download PDFInfo
- Publication number
- CN109246431B CN109246431B CN201710557180.7A CN201710557180A CN109246431B CN 109246431 B CN109246431 B CN 109246431B CN 201710557180 A CN201710557180 A CN 201710557180A CN 109246431 B CN109246431 B CN 109246431B
- Authority
- CN
- China
- Prior art keywords
- value
- bit
- compression table
- reset
- video image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/167—Position within a video image, e.g. region of interest [ROI]
Abstract
The invention provides a video coding method based on quantization parameter configuration, which comprises the following steps: acquiring a target video image, and dividing the target video image into macro blocks; reading a pre-generated QP compression table, wherein the QP compression table indicates the QP value of each macro block in the target image; and encoding the current macro block in the target image according to the QP value indicated in the QP compression table. According to the video coding method and device provided by the embodiment of the invention, the target image is subjected to partition marking processing by utilizing the QP compression table, and the QP compression table can be configured at will, so that the method is not limited by the number of ROI (region of interest), the QP adjustment is more flexible, and the image processing compression process is more detailed and is easy to control.
Description
Technical Field
The invention relates to the technical field of video coding, in particular to a video coding method based on quantization parameter configuration.
Background
In recent years, applications based on intelligent video processing have been widely used in various electronic devices, and most applications require compressed video to be transmitted to a back-end server or other communication terminal for further processing. High-resolution video (also referred to as ultra-high definition video) is becoming increasingly popular. This type of content ranges from 1920x1080 pixel per frame high definition video to higher resolution video obtained either directly using advanced optics or from stitched views of multiple cameras. Due to bandwidth limitations, it is often not possible to directly deliver this type of content in its entirety to the end user.
Therefore, a Region-of-Interest (ROI) concept is proposed in video processing technology, so that an application only focuses on important regions or objects of Interest to a user in a video frame, while for other regions (i.e., non-Region-of-Interest) in a video frame or picture, these regions can be roughly processed or even ignored. The ROI concept applied in video compression generally means that more bits are allocated to a region of a video frame that a user is more interested in, and less bits are allocated to other regions (e.g., background, irrelevant objects, etc.) in encoding, thereby achieving a reduction in the encoded video stream. For example, in movie video playback, a region of a person, face, limb, etc. may typically be a ROI region and will be encoded with more bits to keep the necessary details clearly visible, while other non-ROI regions will be encoded with fewer bits to provide only some basic information.
Currently, the ROI implementation is to design several configurable rectangular frames, and individually set Quantization-Parameter (QP) of the macroblocks falling within these rectangular frames, so as to achieve the purpose of the corresponding interested coding. However, this has the disadvantage that it needs to be implemented by configuring certain registers, but the number of registers is limited, usually 16 or 32, which cannot be flexibly increased; and only a rectangular area can be formed, so that the interception space is limited, and the QP setting in the rectangular area is not flexible enough.
Disclosure of Invention
Therefore, the invention provides a video coding method, a device and electronic equipment based on quantization parameter configuration, wherein the QP compression table is used for carrying out partition marking processing on a target image, and the QP compression table can be configured at will, so that the QP compression table is not limited by the number of ROI areas, the QP adjustment is more flexible, and the image processing compression process is more detailed and easy to control.
In order to achieve the above purpose, the invention provides the following technical scheme:
according to an aspect of the embodiments of the present invention, there is provided a video encoding method based on quantization parameter configuration, including:
acquiring a target video image, and dividing the target video image into macro blocks;
reading a pre-generated QP compression table, wherein the QP compression table indicates the QP value of each macro block in the target image;
and encoding the current macro block in the target image according to the QP value indicated in the QP compression table.
The QP compression table includes an indication bit for indicating whether to reset the QP value, and a data bit for indicating the QP value after reset if the indication bit indicates to reset the QP value, and for indicating the number of macroblocks to which the current QP value is to be applied if the indication bit indicates not to reset the QP value.
The QP compression table is an 8-bit data table structure, the bit number of the indication bit is 1, and the bit number of the data bit is 7. The QP compression table is a RAM structure. The derived length of the QP value ranges from 1 to 128.
According to an aspect of the embodiments of the present invention, there is provided a video encoding apparatus configured based on a quantization parameter, including:
the acquisition module is used for acquiring a target video image;
a partitioning module for partitioning the target video image into macroblocks;
a reading module, configured to read a pre-generated QP compression table, where a QP value of each macroblock in the target image is indicated in the QP compression table;
and the coding processing module is used for coding the current macro block in the target image according to the QP value indicated in the QP compression table.
The QP compression table includes an indication bit for indicating whether to reset the QP value, and a data bit for indicating the QP value after reset if the indication bit indicates to reset the QP value, and for indicating the number of macroblocks to which the current QP value is to be applied if the indication bit indicates not to reset the QP value.
The QP compression table is an 8-bit data table structure, the bit number of the indication bit is 1, and the bit number of the data bit is 7.
The QP compression table is a RAM structure. The derived length of the QP value ranges from 1 to 128.
According to another aspect of the embodiments of the present invention, there is provided an electronic device including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of video encoding based on quantization parameter configuration.
According to the video coding method and device based on quantization parameter configuration and the electronic device, the target image is subjected to partition marking processing by using the QP compression table, and the QP compression table can be configured at will and is not limited by the number of ROI areas, so that QP adjustment is more flexible, and the image processing compression process is more detailed and is easy to control.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary of the invention, and that other embodiments can be derived from the drawings provided by those skilled in the art without inventive effort.
FIG. 1 is a diagram illustrating the structure of QP compression table for a video coding method based on quantization parameter configuration according to the present invention;
FIG. 2 is a schematic diagram of an embodiment of a video encoding method based on quantization parameter configuration according to the present invention;
FIG. 3 is a QP compression table configuration diagram corresponding to the embodiment of FIG. 2 of the video encoding method based on quantization parameter configuration according to the present invention;
FIG. 4 is a flowchart illustrating an embodiment of a video encoding method based on quantization parameter configuration according to the present invention;
fig. 5 is a schematic structural diagram of a video encoding apparatus configured based on quantization parameters according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Referring to fig. 1, a schematic structural diagram of a QP compression table of a video encoding method based on quantization parameter configuration according to an embodiment of the present invention is shown, where fig. 1 shows that the QP compression table has a data table structure of 8 bits, the number of bits of the indication bit is 1, and the number of bits of the data bit is 7. Where the F bit is used to identify the meaning of bit6: 0; when F is 1, bit6reserved, bit5:0 is identified as the native QP; when F is 0, bit6:0 indicates the derived length RUN of the current native QP (0-127 corresponds to 1-128).
By using the QP compression table to perform the partition marking processing on the target image, the QP compression table can be configured at will and is not limited by the number of ROI areas, so that the QP adjustment is more flexible, and the image processing compression process is more detailed and is easy to control.
Please refer to fig. 2-3, which are schematic diagrams of an embodiment of a video encoding method based on quantization parameter configuration according to the present invention and corresponding QP compression table configuration diagrams; as can be seen from the figure, in the present embodiment, it is assumed that there is a 160x64 image (10x4 macroblocks), two ROI regions exist in the image, the QP of ROI1 needs to be configured to be 18, the QP of ROI2 needs to be configured to be 19, and the rest is 20. The coding order is from left to right and from top to bottom in macroblock raster scan order. The QP compression table configuration map shown in figure 3 may be derived.
By using the QP compression table to perform the partition marking processing on the target image, the QP compression table can be configured at will and is not limited by the number of ROI areas, so that the QP adjustment is more flexible, and the image processing compression process is more detailed and is easy to control.
Referring to fig. 4, a flowchart of an embodiment of a video encoding method based on quantization parameter configuration according to the present invention is shown, and a video encoding method based on quantization parameter configuration is provided, which includes the steps of:
301, acquiring a target video image, and dividing the target video image into macro blocks;
302 reading a pre-generated Quantization-Parameter (QP) compression table, wherein a QP value for each macroblock in the target image is indicated in the QP compression table;
303, encoding the current macro block in the target image according to the QP value indicated in the QP compression table.
The QP compression table comprises an indication bit and a data bit, wherein the indication bit is used for indicating whether the QP value is reset or not, if the indication bit indicates that the QP value is reset, the data bit is used for indicating the QP value after resetting, and if the indication bit indicates that the QP value is not reset, the data bit is used for indicating the number of the macro blocks which use the current QP value.
The QP compression table is an 8-bit data table structure, the bit number of the indication bit is 1, and the bit number of the data bit is 7. The QP compression table is a RAM structure. The derived length of the QP value ranges from 1 to 128.
By using the QP compression table to perform the partition marking processing on the target image, the QP compression table can be configured at will and is not limited by the number of ROI areas, so that the QP adjustment is more flexible, and the image processing compression process is more detailed and is easy to control.
Referring to fig. 5, a schematic structural diagram of a video encoding device based on quantization parameter configuration according to the present invention is provided, which includes:
an obtaining module 401, configured to obtain a target video image;
a partitioning module 402 for dividing the target video image into macroblocks;
a reading module 403, configured to read a pre-generated QP compression table, where a QP value of each macroblock in the target image is indicated in the QP compression table;
and an encoding processing module 404, configured to perform encoding processing on the current macroblock in the target image according to the QP value indicated in the QP compression table.
The QP compression table includes an indication bit for indicating whether to reset the QP value, and a data bit for indicating the QP value after reset if the indication bit indicates to reset the QP value, and for indicating the number of macroblocks to which the current QP value is to be applied if the indication bit indicates not to reset the QP value.
The QP compression table is an 8-bit data table structure, the bit number of the indication bit is 1, and the bit number of the data bit is 7. The QP compression table is a RAM structure. The derived length of the QP value ranges from 1 to 128.
By using the QP compression table to perform the partition marking processing on the target image, the QP compression table can be configured at will and is not limited by the number of ROI areas, so that the QP adjustment is more flexible, and the image processing compression process is more detailed and is easy to control.
An embodiment of the present invention further provides an electronic device, including: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of video encoding based on quantization parameter configuration.
The division of the modules in the above embodiments of the present invention is schematic, and only one logical function division is provided, and there may be another division manner in actual implementation, and in addition, each functional module in each embodiment of the present application may be integrated in one processor, may also exist alone physically, or may also be integrated in one module by two or more modules. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (9)
1. A video coding method based on quantization parameter configuration, comprising:
acquiring a target video image, and dividing the target video image into macro blocks;
reading a pre-generated quantization parameter QP compression table, wherein the QP compression table indicates the QP value of each macro block in the target video image, the structure of the QP compression table is an 8-bit data table structure, the bit number of the indication bit is 1, the bit number of the data bit is 7, and the F bit is used for identifying the significance of bit6: 0; when F is 1, bit6reserved, bit5:0 is identified as the native QP; when F is 0, bit6:0 represents the derived length RUN of the current native QP;
and encoding the current macro block in the target video image according to the QP value indicated in the QP compression table.
2. The method of claim 1, wherein the QP compression table comprises an indication bit for indicating whether to reset the QP value, and a data bit for indicating the QP value after reset if the indication bit indicates that the QP value is reset, and for indicating the number of macroblocks that are to be delayed with the current QP value if the indication bit indicates that the QP value is not reset.
3. The method of claim 1, wherein the QP compression table is a RAM structure.
4. The method of claim 1, wherein the derived length of the QP value ranges between 1 and 128.
5. An apparatus for video coding based on quantization parameter configuration, comprising:
the acquisition module is used for acquiring a target video image;
a partitioning module for partitioning the target video image into macroblocks;
the reading module is used for reading a pre-generated QP compression table, wherein the QP compression table indicates the QP value of each macro block in the target video image, the structure of the QP compression table is an 8-bit data table structure, the bit number of the indicating bit is 1, the bit number of the data bit is 7, and the F bit is used for identifying the significance of bit6: 0; when F is 1, bit6reserved, bit5:0 is identified as the native QP; when F is 0, bit6:0 represents the derived length RUN of the current native QP;
and the coding processing module is used for coding the current macro block in the target video image according to the QP value indicated in the QP compression table.
6. The apparatus of claim 5, wherein the QP compression table comprises an indication bit and a data bit, the indication bit is used for indicating whether the QP value is reset, if the indication bit indicates that the QP value is reset, the data bit is used for indicating the QP value after reset, and if the indication bit indicates that the QP value is not reset, the data bit is used for indicating the number of macroblocks for which the current QP value is to be postponed.
7. The apparatus of claim 5, wherein the QP compression table is a RAM structure.
8. The apparatus of claim 6, wherein the derived length of the QP value ranges from 1 to 128.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of video encoding based on quantization parameter configuration of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710557180.7A CN109246431B (en) | 2017-07-10 | 2017-07-10 | Video coding method and device based on quantization parameter configuration and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710557180.7A CN109246431B (en) | 2017-07-10 | 2017-07-10 | Video coding method and device based on quantization parameter configuration and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109246431A CN109246431A (en) | 2019-01-18 |
CN109246431B true CN109246431B (en) | 2021-06-04 |
Family
ID=65083492
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710557180.7A Active CN109246431B (en) | 2017-07-10 | 2017-07-10 | Video coding method and device based on quantization parameter configuration and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109246431B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112153317A (en) * | 2020-09-25 | 2020-12-29 | 杭州涂鸦信息技术有限公司 | Image quality control method, system and equipment thereof |
CN117499665B (en) * | 2023-12-29 | 2024-03-19 | 南京博润类脑智能技术有限公司 | Image data embedding and extracting method and device based on gray value quantization |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1685369A (en) * | 2002-09-26 | 2005-10-19 | 美国多科摩通讯研究所股份有限公司 | Low complexity and unified transforms for video coding |
CN101395923A (en) * | 2006-03-02 | 2009-03-25 | 汤姆森许可贸易公司 | Method and apparatus for determining in picture signal encoding the bit allocation for groups of pixel blocks in a picture |
WO2013069245A1 (en) * | 2011-11-07 | 2013-05-16 | Canon Kabushiki Kaisha | Image coding apparatus, image coding method, image decoding apparatus, image decoding method, and program |
CN105049949A (en) * | 2015-06-19 | 2015-11-11 | 美国掌赢信息科技有限公司 | Coding method of instant video and electronic equipment |
CN105407352A (en) * | 2015-11-23 | 2016-03-16 | 小米科技有限责任公司 | Image compression method and device, and server |
US9621900B1 (en) * | 2012-04-18 | 2017-04-11 | Matrox Graphics Inc. | Motion-based adaptive quantization |
-
2017
- 2017-07-10 CN CN201710557180.7A patent/CN109246431B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1685369A (en) * | 2002-09-26 | 2005-10-19 | 美国多科摩通讯研究所股份有限公司 | Low complexity and unified transforms for video coding |
CN101395923A (en) * | 2006-03-02 | 2009-03-25 | 汤姆森许可贸易公司 | Method and apparatus for determining in picture signal encoding the bit allocation for groups of pixel blocks in a picture |
WO2013069245A1 (en) * | 2011-11-07 | 2013-05-16 | Canon Kabushiki Kaisha | Image coding apparatus, image coding method, image decoding apparatus, image decoding method, and program |
US9621900B1 (en) * | 2012-04-18 | 2017-04-11 | Matrox Graphics Inc. | Motion-based adaptive quantization |
CN105049949A (en) * | 2015-06-19 | 2015-11-11 | 美国掌赢信息科技有限公司 | Coding method of instant video and electronic equipment |
CN105407352A (en) * | 2015-11-23 | 2016-03-16 | 小米科技有限责任公司 | Image compression method and device, and server |
Also Published As
Publication number | Publication date |
---|---|
CN109246431A (en) | 2019-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10771813B2 (en) | Reference frame encoding method and apparatus, and reference frame decoding method and apparatus | |
KR101223983B1 (en) | Bitrate reduction techniques for image transcoding | |
US11647196B2 (en) | Method and apparatus for encoding image, method and apparatus for decoding image, electronic device, and system | |
US20210398352A1 (en) | 3d data generation apparatus, 3d data reconstruction apparatus, control program, and recording medium | |
US7561736B2 (en) | Image processing apparatus and method of the same | |
CN105472205B (en) | Real-time video noise reduction method and device in encoding process | |
US10805606B2 (en) | Encoding method and device and decoding method and device | |
CN110636294B (en) | Video decoding method and device, and video encoding method and device | |
US11838507B2 (en) | Video encoding method and apparatus, electronic device, and computer-readable storage medium | |
JP4895400B2 (en) | Improved compression in the representation of non-frame edge blocks of image frames | |
EP3089453A1 (en) | Image coding and decoding methods and devices | |
JP2018505571A (en) | Image compression method / apparatus and server | |
US20190238848A1 (en) | Method and apparatus for calculating quantization parameters to encode and decode an immersive video | |
CN111787398A (en) | Video compression method, device, equipment and storage device | |
CN108600783B (en) | Frame rate adjusting method and device and terminal equipment | |
US10887591B2 (en) | Method and device for transmitting block division information in image codec for security camera | |
CN109246431B (en) | Video coding method and device based on quantization parameter configuration and electronic equipment | |
CN112040240B (en) | Data processing method, device and storage medium | |
CN111510643A (en) | System and method for splicing panoramic image and close-up image | |
US20220030237A1 (en) | Picture partitioning-based coding method and device | |
EP4264946A1 (en) | Compression of temporal data by using geometry-based point cloud compression | |
EP3503548B1 (en) | Video encoding method and system | |
US9591332B2 (en) | Image processing apparatus performing preprocessing to prevent boundary positions of divided rectangular regions of image data from being separated into dense and sparse portions | |
US20230080747A1 (en) | Modifying a set of angle prediction modes for coding an equirectangular projection format image | |
US20170099500A1 (en) | Low complexity perceptual visual quality evaluation for jpeg2000 compressed streams |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |