CN113453001A - Method for improving H264 coding efficiency by using ISP information to adaptively allocate QP - Google Patents
Method for improving H264 coding efficiency by using ISP information to adaptively allocate QP Download PDFInfo
- Publication number
- CN113453001A CN113453001A CN202010214731.1A CN202010214731A CN113453001A CN 113453001 A CN113453001 A CN 113453001A CN 202010214731 A CN202010214731 A CN 202010214731A CN 113453001 A CN113453001 A CN 113453001A
- Authority
- CN
- China
- Prior art keywords
- coding
- interest
- isp
- improving
- region
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
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/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]
-
- 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/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
- H04N19/423—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
Abstract
The invention provides a method for improving H264 coding efficiency by using ISP information to adaptively allocate QP, which comprises the following steps: and in the self-processing process of the ISP, counting the interest values in the coding macro blocks, writing the counting results into a memory, analyzing and processing the counting results by using the CPU, finally identifying the real interest areas, outputting the identification results to an encoder, and automatically distributing code streams by the encoder according to the numerical values of the real interest areas.
Description
Technical Field
The invention relates to the technical field of videos, in particular to a method for improving H264 coding efficiency by utilizing ISP (internet service provider) information to adaptively allocate QP (quantization parameter).
Background
With the continuous development of technology, especially the development of video technology, a video acquisition or monitoring system includes three modules as shown in fig. 1, where an ISP is responsible for processing raw images sent by a CMOS sensor, processing the raw images into an image with normal brightness and color, writing the image into a DDR for temporary storage, and an H264 ENC is an H264 encoder and is responsible for encoding successive images generated by the ISP into corresponding video streams to save video storage space. For most systems, the ISP and H264 ENC are independently controlled and operate independently. For H264 ENC, under a certain code rate, the rate control algorithm will calculate the QP value required for encoding the current frame, and use the QP to encode when encoding the current frame.
The H264 ENC, when encoding, typically divides the image into several non-overlapping blocks, as shown in fig. 2, and encodes the blocks in units of blocks, which are also called encoded macroblocks, which are typically 16 × 16 in H264. Because of lossy compression coding in H264 coding, the image after coding has detail loss certainly compared with the original image, one of the parameters having a larger influence on the detail loss is the quantization parameter QP, the smaller the QP, the better the image quality, and the smaller the detail loss, but the higher the code rate, whereas the larger the QP, the worse the image quality, the greater the detail loss, but the lower the code rate. In the actual use process, the QP is dynamically changed according to the requirement, so as to balance the code rate and the image quality.
In the prior art, the commonly used methods and terms are as follows:
ISP: the image signal processor is a module for carrying out algorithm processing on the raw image input by the CMOS sensor, and generally comprises algorithms such as denoising, interpolation, dead pixel removal, sharpening and the like.
H264: an encoding protocol is mainly used for video compression.
QP: the quantization parameter, i.e., the parameter in the H264 protocol, increases the QP to reduce the code rate, but the coding effect is deteriorated, and decreases the QP to increase the code rate, but the picture effect is improved.
Macro: the coded macroblock, in H264, is typically a 16x16 square.
DDR: i.e., double rate synchronous dynamic random access memory, is one of the memories.
Because the use purposes of video collectors are different, the points of interest may be different, for example, some people need a scene with a rich-detail area and a high subjective quality, a flat area may be poor, and the rich-detail area is an area of interest; still some require that the area of motion in the video requires higher subjective quality, the area of rest can be worse, then the area of motion is the area of interest; still another requirement is that subjective quality of the too bright and too dark regions may be poor, and image quality of the normal brightness region is good, so that the normal brightness region is the region of interest. This requires that the encoder has the capability of distinguishing different characteristic regions (regions of interest), and different QPs are allocated to different regions, which is in fact equivalent to allocating code streams with different sizes to different regions and allocating a larger code stream to a region of interest, so as to make the image quality higher, and allocate a smaller code stream to a region of non-interest, so that the image quality may be worse. However, the encoder typically does not have the ability to distinguish between different blocks of features of interest, which, if added, comes at a cost.
Disclosure of Invention
In order to solve the above problems, the present invention is directed to: and code streams are better distributed to different coding macro blocks, so that the aim of optimizing the image quality of the interested region is fulfilled.
Specifically, the invention provides a method for improving the H264 coding efficiency by adaptively allocating QP by using ISP information, which comprises the following steps: and in the self-processing process of the ISP, counting the interest values in the coding macro blocks, writing the counting results into a memory, analyzing and processing the counting results by using the CPU, finally identifying the real interest areas, outputting the identification results to an encoder, and automatically distributing code streams by the encoder according to the numerical values of the real interest areas.
The method comprises the following steps:
s1, enabling the ISP to take the coding macro block as a unit to count the characteristic value F of the picture I in the process of processing the original image sent by the CMOS sensor, and outputting a counting result to the DDR for storage;
s2, when the CPU performs code rate control analysis, the CPU adjusts the coding parameter of each slowing macro block according to the information about the characteristic value F stored in the DDR, forms a macro block level coding parameter table M and writes the M back to the DDR;
s3, the H264 encoder reads the data of table M and picture I together for encoding during encoding, so as to adjust the QP values of different encoded macroblocks to achieve differential encoding.
Thus, the present application has the advantages that: in order to better distribute code streams to different macro blocks to achieve the purpose of optimizing the image quality of the interested region, the position of the interested region is identified before encoding, in a monitoring system, a provider of an encoder input picture is an ISP module which is used as a front-end processing module of the encoder, the ISP module can carry out statistics on the interested values in encoding blocks in the self-processing process, the results are written into a memory, then a CPU is used for carrying out analysis processing on the statistical results, the real interested region is finally identified, and the results are output to an encoding module, so that the encoder can automatically distribute the code streams according to the interested values. The method is simple, the cost is low, and the modification and maintenance are more convenient.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention.
Fig. 1 is a schematic block diagram of the present invention relating to the prior art.
Fig. 2 is a schematic diagram of a specific example of the present invention relating to the prior art.
Fig. 3 is a schematic block diagram of the method of the present invention.
FIG. 4 is a schematic diagram of a specific example of the method of the present invention.
Fig. 5 is a flow chart of the method of the present invention.
Detailed Description
In order that the technical contents and advantages of the present invention can be more clearly understood, the present invention will now be described in further detail with reference to the accompanying drawings.
As shown in fig. 5, the present invention relates to a method for improving the coding efficiency of H264 by adaptively allocating QPs using ISP information, the method comprising: and in the self-processing process of the ISP, counting the interest values in the coding macro blocks, writing the counting results into a memory, analyzing and processing the counting results by using the CPU, finally identifying the real interest areas, outputting the identification results to an encoder, and automatically distributing code streams by the encoder according to the numerical values of the real interest areas.
The method comprises the following steps:
s1, enabling the ISP to take the coding macro block as a unit to count the characteristic value F of the picture I in the process of processing the original image sent by the CMOS sensor, and outputting a counting result to the DDR for storage;
s2, when the CPU performs code rate control analysis, the CPU adjusts the coding parameter of each slowing macro block according to the information about the characteristic value F stored in the DDR, forms a macro block level coding parameter table M and writes the M back to the DDR;
s3, the H264 encoder reads the data of table M and picture I together for encoding during encoding, so as to adjust the QP values of different encoded macroblocks to achieve differential encoding.
The characteristic value F comprises brightness, detail degree and motion degree.
The adjustment of the encoding parameters of each of the slowed down macroblocks in step S2 is performed according to the principle of improving the encoding effect of the region of interest while maintaining the acceptable encoding effect of the region of non-interest.
In the step S3, the QP value of different coded macroblocks is adjusted to achieve coding differentiation by reducing the QP value of the region of interest to improve the coding effect, and increasing the QP value of the region of no interest to properly reduce the coding effect, and if there is no object of interest in the picture, the QP value can be uniformly increased to reduce the code stream, or frame skipping is performed directly.
The encoding parameter table M is a mapping table of feature values F to QP, which can be implemented by using a threshold algorithm or a neural network method.
The method is to identify the location of the region of interest before encoding.
Specifically, a function is added to the ISP: taking macro blocks as a unit to count the characteristic value F (brightness, detail degree, motion degree and the like) of the picture I, outputting a statistical result to a DDR (shown in figure 3) F, when a CPU performs code rate control analysis, using the information to adjust the coding parameters of each macro block according to the principle of improving the coding effect of the region of interest and keeping the coding effect which can be accepted by the region of non-interest, forming a macro-block-level coding parameter table M, writing back the M to the DDR, and reading the M and the I together by an encoder for coding. For example, the QP value of different macro blocks can be adjusted to achieve the purpose of distinguishing coding, the QP value of an interested region is reduced to improve the coding effect, the QP value of a non-interested region is increased to properly reduce the coding effect, and if no interested object exists in a picture, the QP value can be uniformly increased to reduce the code stream or directly skip frames. As shown in fig. 4, the region of interest (black bold frame) is where there is motion.
The mapping table of feature values to QPs can be obtained using a simple algorithm or a neural network method. A simple algorithm may employ a threshold method such as (F is a feature value):
of course, a more complex algorithm can be used, and the specific method is mainly determined according to the requirements of the user and the accuracy required to be achieved.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes may be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. A method for improving H264 coding efficiency by using ISP information to adaptively allocate QPs, which is characterized by comprising the following steps: and in the self-processing process of the ISP, counting the interest values in the coding macro blocks, writing the counting results into a memory, analyzing and processing the counting results by using the CPU, finally identifying the real interest areas, outputting the identification results to an encoder, and automatically distributing code streams by the encoder according to the numerical values of the real interest areas.
2. The method for improving the coding efficiency of the H264 by adaptively allocating QP according to the ISP information, which is characterized in that the method comprises the following steps:
s1, enabling the ISP to take the coding macro block as a unit to count the characteristic value F of the picture I in the process of processing the original image sent by the CMOS sensor, and outputting a counting result to the DDR for storage;
s2, when the CPU performs code rate control analysis, the CPU adjusts the coding parameter of each coding macro block according to the information about the characteristic value F stored in the DDR, forms a macro block level coding parameter table M, and writes the M back to the DDR;
s3, the H264 encoder reads the data of table M and picture I together for encoding during encoding, so as to adjust the QP values of different encoded macroblocks to achieve differential encoding.
3. The method as claimed in claim 2, wherein the characteristic values F include brightness, detail degree, and motion degree.
4. The method for improving the coding efficiency of H264 by adaptively allocating QP according to the ISP information as claimed in claim 2, wherein the adjusting the coding parameters of each coded macroblock in step S2 is performed according to the principle of improving the coding effect of the region of interest while maintaining the acceptable coding effect of the region of no interest.
5. The method as claimed in claim 2, wherein the adjusting the QP value for different coded macroblocks to achieve the differentiated coding in step S3 is to reduce the QP value for the region of interest to improve the coding effect and increase the QP value for the region of no interest to reduce the coding effect properly.
6. The method as claimed in claim 2, wherein the QP value is uniformly increased to reduce the code stream or directly skip the frame if there is no object of interest in the picture in step S3.
7. The method as claimed in claim 2, wherein the coding parameter table M is a mapping table of feature values F to QP, which can be implemented by using a threshold algorithm or a neural network method.
8. The method for improving the coding efficiency of the H264 by adaptively allocating QP according to the ISP information, wherein the method is characterized in that the position of the interested region is identified before coding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010214731.1A CN113453001A (en) | 2020-03-24 | 2020-03-24 | Method for improving H264 coding efficiency by using ISP information to adaptively allocate QP |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010214731.1A CN113453001A (en) | 2020-03-24 | 2020-03-24 | Method for improving H264 coding efficiency by using ISP information to adaptively allocate QP |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113453001A true CN113453001A (en) | 2021-09-28 |
Family
ID=77806703
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010214731.1A Pending CN113453001A (en) | 2020-03-24 | 2020-03-24 | Method for improving H264 coding efficiency by using ISP information to adaptively allocate QP |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113453001A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1757240A (en) * | 2003-03-03 | 2006-04-05 | 皇家飞利浦电子股份有限公司 | Video encoding |
CN102547301A (en) * | 2010-09-30 | 2012-07-04 | 苹果公司 | System and method for processing image data using an image signal processor |
US20120314764A1 (en) * | 2011-06-10 | 2012-12-13 | Bytemobile, Inc. | Macroblock-Level Adaptive Quantization in Quality-Aware Video Optimization |
CN109076212A (en) * | 2017-12-27 | 2018-12-21 | 深圳市大疆创新科技有限公司 | The method and code device of code rate control |
CN109862356A (en) * | 2019-01-17 | 2019-06-07 | 中国科学院计算技术研究所 | A kind of method for video coding and system based on area-of-interest |
-
2020
- 2020-03-24 CN CN202010214731.1A patent/CN113453001A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1757240A (en) * | 2003-03-03 | 2006-04-05 | 皇家飞利浦电子股份有限公司 | Video encoding |
CN102547301A (en) * | 2010-09-30 | 2012-07-04 | 苹果公司 | System and method for processing image data using an image signal processor |
US20120314764A1 (en) * | 2011-06-10 | 2012-12-13 | Bytemobile, Inc. | Macroblock-Level Adaptive Quantization in Quality-Aware Video Optimization |
CN109076212A (en) * | 2017-12-27 | 2018-12-21 | 深圳市大疆创新科技有限公司 | The method and code device of code rate control |
CN109862356A (en) * | 2019-01-17 | 2019-06-07 | 中国科学院计算技术研究所 | A kind of method for video coding and system based on area-of-interest |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021244341A1 (en) | Picture coding method and apparatus, electronic device and computer readable storage medium | |
CN109905711B (en) | Image processing method and system and terminal equipment | |
JP3258840B2 (en) | Video encoding device and region extraction device | |
US5847766A (en) | Video encoding method and apparatus based on human visual sensitivity | |
CN110662044B (en) | Video coding method, video coding device and computer storage medium | |
TWI743919B (en) | Video processing apparatus and processing method of video stream | |
US20190089971A1 (en) | Picture encoding device and picture encoding method | |
CN106060539B (en) | A kind of method for video coding of low transmission bandwidth | |
US20200267396A1 (en) | Human visual system adaptive video coding | |
CN110365983B (en) | Macroblock-level code rate control method and device based on human eye vision system | |
CN101931800B (en) | Method and system for encoding region of interest by limited variable bit rate control | |
US20060256858A1 (en) | Method and system for rate control in a video encoder | |
US20080170620A1 (en) | Video encoding system | |
CN111385571B (en) | Method and device for controlling code rate of ultra-long image group | |
US10805519B2 (en) | Perception-based image processing apparatus and associated method | |
CN112738516B (en) | Encoding method, encoding device, storage medium and electronic equipment | |
CN113453001A (en) | Method for improving H264 coding efficiency by using ISP information to adaptively allocate QP | |
CN113453007A (en) | Method for improving monitoring scene H264 coding efficiency | |
CN108737826B (en) | Video coding method and device | |
US11825088B2 (en) | Adaptively encoding video frames based on complexity | |
CN102098505A (en) | Monitoring video compression method and equipment | |
CN113489993A (en) | Encoding method, apparatus, encoder, device, and computer-readable storage medium | |
CN112165619A (en) | Method for compressed storage of surveillance video | |
Chen et al. | Improving video coding at scene cuts using attention based adaptive bit allocation | |
CN112788364A (en) | Code stream dynamic adjusting device, method and computer readable storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210928 |