CN109951706A - A kind of method for video coding, device and encoder - Google Patents

A kind of method for video coding, device and encoder Download PDF

Info

Publication number
CN109951706A
CN109951706A CN201910325030.2A CN201910325030A CN109951706A CN 109951706 A CN109951706 A CN 109951706A CN 201910325030 A CN201910325030 A CN 201910325030A CN 109951706 A CN109951706 A CN 109951706A
Authority
CN
China
Prior art keywords
quantization parameter
present frame
frame
foreground zone
encoded
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.)
Granted
Application number
CN201910325030.2A
Other languages
Chinese (zh)
Other versions
CN109951706B (en
Inventor
杨子盼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Goke Microelectronics Co Ltd
Original Assignee
Hunan Goke Microelectronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Goke Microelectronics Co Ltd filed Critical Hunan Goke Microelectronics Co Ltd
Priority to CN201910325030.2A priority Critical patent/CN109951706B/en
Publication of CN109951706A publication Critical patent/CN109951706A/en
Application granted granted Critical
Publication of CN109951706B publication Critical patent/CN109951706B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the present invention proposes a kind of method for video coding, is related to field of video encoding.Method for video coding includes: to obtain background frames and present frame respectively;The sport rank of present frame is obtained according to background frames and present frame;Sport rank according to present frame obtains foreground zone quantization parameter and background area quantization parameter;The quantization parameter of each macro block is obtained according to the first quantization parameter table and the second quantization parameter table;Second quantization parameter characterizes the complexity and code rate size of frame to be encoded;Quantization parameter according to each macro block is treated coded frame and is encoded.Since image to be encoded is divided into background area and foreground zone by the present invention, accounting value according to foreground zone divides the sport rank of image to be encoded, suitable quantization parameter is selected according to the difference of sport rank for different macro blocks, to achieve the purpose that compression bit rate on the basis of not reducing picture quality.

Description

A kind of method for video coding, device and encoder
Technical field
The present invention relates to field of video encoding, in particular to a kind of method for video coding, device and encoder.
Background technique
The code rate control of existing encoder has been accomplished ultimate attainment, is born till now from first encoder, has already passed through The iteration upgrading of many products, is gradually improved, it is desirable to which further optimization has become very difficult.Judge a coding The superiority and inferiority of device, code rate control are undoubtedly vital link, and good encoder can obtain better under identical code rate Subjective effect, conversely, the code rate of good encoder is lower under identical subjective effect.
Although rate control algorithm itself is not belonging to the scope of video encoding standard, encoded based on it in actual video Important function in system, various video encoding standards all give the proposed algorithm of corresponding code rate control.Such as MPEG-2 TM5, TMN8 H.263 etc..
It is also more next for the estimation difficulty of the complexity of image but as the compression ratio of new coding standard is higher and higher It is bigger, select quantization parameter appropriate also just to become very difficult, even if having chosen proper quantization parameter, but due to Image detail in one frame is complex, and using current quantization parameter, will lead to can not be to image data in cataloged procedure It is effectively compressed, and causes the unnecessary loss of image detail in decoding process.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of method for video coding, to reach in the base for not reducing picture quality The purpose of compression bit rate on plinth.
To achieve the goals above, technical solution used in the embodiment of the present invention is as follows:
In a first aspect, the embodiment of the present invention proposes a kind of method for video coding, background frames and present frame are obtained respectively;It is described Background frames are the background model frame of video to be encoded;The present frame is current frame to be encoded;
The sport rank of the present frame is obtained according to the background frames and the present frame;The movement etc. of the present frame Grade is characterized by the accounting of the foreground zone in the present frame;It is presetting bright that the foreground zone is that luminance difference is greater than Spend the region of threshold value;Non- foreground zone in the present frame is background area;
Sport rank adjusting quantization parameter according to the present frame;The frame to be encoded is compiled according to quantization parameter Code.
Second aspect, the embodiment of the present invention also propose a kind of video coding apparatus, comprising: obtain module, processing module with And judgment module.Wherein, module is obtained for obtaining background frames and present frame, and is also used to according to background frames and described Present frame obtains the sport rank of the present frame, and is also used to join according to the sport rank adjustment quantization of the present frame Number;Processing module is used to encode the frame to be encoded according to the quantization parameter of each macro block;Judgment module is used for institute Luminance difference is stated to be compared with presetting luminance threshold.
The third aspect, the embodiment of the present invention also propose a kind of encoder, and the encoder includes processor, memory and total Line, the memory are stored with the executable machine readable instructions of the processor, when encoder operation, the processor with By bus communication between the memory, the processor executes the machine readable instructions, executes when executing above-mentioned The step of method for video coding.
Method for video coding provided by the embodiment of the present invention, comprising: obtain background frames and present frame respectively;Background frames are The background model frame of video to be encoded;Present frame is current frame to be encoded;Present frame contains at least two macro block;According to background frames The sport rank of present frame is obtained with present frame;The sport rank of present frame is the accounting of the foreground zone in present frame;Foreground zone It is greater than the region of presetting luminance threshold for luminance difference;Non- foreground zone in present frame is background area;According to present frame Sport rank obtains foreground zone quantization parameter and background area quantization parameter;Foreground zone quantization parameter and background area quantization parameter Form the first quantization parameter table;The quantization ginseng of each macro block is obtained according to the first quantization parameter table and the second quantization parameter table Number;Second quantization parameter table is generated by encoder;Second quantization parameter characterizes the complexity and code rate size of frame to be encoded;According to Coded frame is treated according to the quantization parameter of each macro block to be encoded.Due to the present invention by image to be encoded be divided into background area and Foreground zone, the accounting value according to foreground zone divide the sport rank of image to be encoded, for different macro blocks according to sport rank Difference select suitable quantization parameter, to achieve the purpose that compression bit rate on the basis of not reducing picture quality.
Other features and advantages of the present invention will be illustrated in subsequent specification, also, partly be become from specification It is clear that by implementing understanding of the embodiment of the present invention.The objectives and other advantages of the invention can be by written theory Specifically noted structure is achieved and obtained in bright book, claims and attached drawing.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows a kind of flow chart of method for video coding provided by the embodiment of the present invention.
Fig. 2 shows a kind of method schematic diagrams for obtaining background frames provided by the embodiment of the present invention.
Fig. 3 shows a kind of method schematic diagram for the sport rank for obtaining present frame provided by the embodiment of the present invention.
Fig. 4 shows the flow chart of the sub-step of step 202 provided by the embodiment of the present invention.
Fig. 5 shows the flow chart of the sub-step of step 202-2 provided by the embodiment of the present invention.
Fig. 6 shows a kind of MAP expression intention provided by the embodiment of the present invention.
Fig. 7 shows the MAP after a kind of morphology completion provided by the embodiment of the present invention and indicates to be intended to.
Fig. 8 shows another kind MAP provided by the embodiment of the present invention and indicates to be intended to.
Fig. 9 shows the schematic diagram of the first quantization parameter table provided by the embodiment of the present invention.
Figure 10 shows the schematic diagram of the second quantization parameter table provided by the embodiment of the present invention.
Figure 11 shows the schematic diagram of quantization parameter table final provided by the embodiment of the present invention.
Figure 12 shows a kind of the functional block diagram of video coding apparatus provided by the embodiment of the present invention.
Figure 13 shows the schematic diagram of encoder provided by the embodiment of the present invention.
Icon: the image after 100- down-sampling;110- background frames;130- present frame;10- luminance difference table;12-MAP table; 13- background area;14- foreground zone;15- sport rank;151- obtains module;153- judgment module;155- processing module;200- is compiled Code device;210- processor;220- memory;230- bus.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete Ground description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can be arranged and be designed with a variety of different configurations herein.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.
Fig. 1 is please referred to, is a kind of flow chart of method for video coding provided by the embodiment of the present invention.
Step 201, background frames and present frame are obtained respectively.
Obtain background frames and present frame respectively, background frames are the background model frame of video to be encoded, present frame be currently to Coded frame, present frame contain at least two macro block.
It should be noted that there are two types of the modes of acquisition background frames, one is background frames are obtained according to video to be encoded, separately One is using the previous frame of present frame as background frames.
It referring to figure 2., is a kind of method schematic diagram for obtaining background frames provided by the embodiment of the present invention.As shown in Fig. 2, Treat brightness data, chroma data (Luminance, Chrominance of each frame in encoded video;YUV it) carries out down Sampling, in a kind of possible embodiment, the ratio of the down-sampling can be but not limited to 1/256, the figure after obtaining down-sampling As 100, such as F1, F2, F3 ... FN in Fig. 2.Image 100 after down-sampling is subjected to background modeling algorithm and generates corresponding background Frame 110, which can be but not limited to average background modeling algorithm, single Gaussian Background modeling etc., specific to carry on the back Scape modeling algorithm can be decided in its sole discretion according to factors such as the memory source of encoder and other related resource expenses.
It should be noted that if the memory source of encoder and other related resources are limited, it can be by present frame Image after the down-sampling of previous frame is directly as background frames 110.
Step 202, the sport rank of present frame is obtained according to background frames and present frame.
It referring to figure 3., is a kind of method signal of sport rank 15 for obtaining present frame provided by the embodiment of the present invention Figure.Step 202 includes five sub-steps, is the stream of the sub-step of step 202 provided by the embodiment of the present invention referring to figure 4. Cheng Tu will be explained in detail as follows.
Sub-step 202-1 calculates the luminance difference of background frames and present frame.
Please continue to refer to Fig. 3, calculate the luminance difference of background frames 110 and present frame 120, i.e., by current frame pixel value I (x, Y) the pixel value u (x, y) for subtracting same position in background frames 110, obtains luminance difference d (x, y), and then obtains luminance difference table 10。
Sub-step 202-2 carries out threshold binarization to the luminance difference in the MAP table of present frame.
Please continue to refer to Fig. 3, threshold binarization is carried out to obtained luminance difference table 10, obtains present frame threshold binarization MAP table 12 afterwards.Carrying out threshold binarization to luminance difference table 10 includes three sub-steps, is the embodiment of the present invention referring to figure 5. The flow chart of the sub-step of provided step 202-2, will be explained in detail as follows.
Sub-step 202-2-1, judges whether luminance difference is greater than presetting luminance threshold.
Luminance difference in luminance difference table 10 is compared with presetting luminance threshold, whether judges luminance difference Greater than presetting luminance threshold, if it is, executing sub-step 202-2-2;If it is not, then executing sub-step 202-2-3.
It should be noted that presetting luminance threshold is to be manually set, it is different due to the difference of video to be encoded, herein With no restrictions.
Sub-step 202-2-2, using the position in the corresponding MAP table of luminance difference as foreground zone.
When luminance difference is greater than presetting luminance threshold, using the corresponding position of the luminance difference in MAP table as before The luminance difference of the position is set to 255 in a kind of possible embodiment by scenic spot.
Sub-step 202-2-3, using the position in the corresponding MAP table of luminance difference as background area.
When luminance difference is less than or equal to presetting luminance threshold, the corresponding position of the luminance difference in MAP table is made The luminance difference of the position is set to 0 in a kind of possible embodiment for background area.
The luminance parameter for the background area that foreground zone is surrounded in sub-step 202-3, MAP table carries out completion.
The luminance difference of foreground zone is 255 in MAP table, and the luminance difference of background area is 0.Fig. 6 and Fig. 7 is please referred to, Fig. 6 is A kind of MAP expression intention provided by the embodiment of the present invention, after Fig. 7 is a kind of morphology completion provided by the embodiment of the present invention MAP indicate be intended to.For simple examples, Fig. 6 and Fig. 7 are the picture of 3*3 macro block, with 3*3's in example below Picture is illustrated, and in practical applications, the number of macroblocks of picture runs far deeper than 3*3.
If the MAP table after threshold binarization is shown in Fig. 6, one of background area 13 is surrounded by foreground zone 14, will The background area 13 carries out morphologic completion, i.e., the luminance difference of the background area 13 is set to 255, and the MAP table after completion is such as Shown in Fig. 7.
Sub-step 202-4 calculates foreground zone accounting value according to MAP meter.
Fig. 8 is please referred to, is that another kind MAP provided by the embodiment of the present invention indicates to be intended to.If threshold binarization and MAP table after morphology completion is wherein the accounting of foreground zone 14 is 4/9 there are four foreground zone macro block, that is, to mean shown in Fig. 8 There is 44.4% or so region moving.
Sub-step 202-5 determines the sport rank of present frame according to foreground zone accounting value.
Please continue to refer to Fig. 8, there is 44.4% or so region moving in MAP table, it is assumed that define its movement etc. at this time Grade is 40.
It should be noted that the range of sport rank is 0-100;Foreground zone accounting value is higher, and the value of sport rank is got over It is high;When sport rank is 0 just without foreground zone 14 when sport rank is 100% just without background area 13.
Step 203, foreground zone quantization parameter and background area quantization parameter are obtained according to the sport rank of present frame.
Please continue to refer to Fig. 8, when the sport rank of a certain frame picture is 40, before going configuration further according to this sport rank The quantization parameter of scape and the quantization parameter of background, it is assumed that the quantization parameter for defining prospect at this time is -2, the quantization parameter of background It is 3, obtains the first quantization parameter table as shown in Figure 9.
Fig. 9 is please referred to, is the schematic diagram of the first quantization parameter table provided by the embodiment of the present invention.
It should be noted that the quantization parameter of prospect can reduce, the quantization parameter meeting of background with the increase of sport rank Increase with the increase of sport rank, sport rank is bigger, and moving region is more, and the code rate needed is also bigger, so needing Increase the quantization parameter of background to guarantee code rate.
Step 204, the quantization parameter of each macro block is obtained according to the first quantization parameter table and the second quantization parameter table.
It should be noted that the second quantization parameter table is automatically generated by encoder, encoder is according to the image of frame to be encoded Complexity and code rate size generate corresponding quantization parameter, and the quantization parameter value value range of the second quantization parameter table is 0-51 obtains the second quantization parameter table as shown in Figure 10.
Figure 10 is please referred to, is the schematic diagram of the second quantization parameter table provided by the embodiment of the present invention.
The quantization parameter value of first quantization parameter table and the correspondence macro block of the second quantization parameter table is added, by Fig. 9 institute The the first quantization parameter table shown is corresponding with the second quantization parameter table shown in Fig. 10 to be added, and final use as shown in figure 11 is obtained In the quantization parameter table of image coding.
Figure 11 is please referred to, is the schematic diagram of quantization parameter table final provided by the embodiment of the present invention.
Step 205, the quantization parameter according to each macro block is treated coded frame and is encoded.
Please continue to refer to Figure 11, coded frame is treated according to quantization parameter as shown in figure 11 and is encoded.
To sum up, method for video coding provided by the embodiment of the present invention, comprising: obtain background frames and present frame respectively;Back Scape frame is the background model frame of video to be encoded;Present frame is current frame to be encoded;Present frame contains at least two macro block;According to Background frames and present frame obtain the sport rank of present frame;The sport rank of present frame is the accounting of the foreground zone in present frame; Foreground zone is the region that luminance difference is greater than presetting luminance threshold;Non- foreground zone in present frame is background area;Foundation is worked as The sport rank of previous frame obtains foreground zone quantization parameter and background area quantization parameter;Foreground zone quantization parameter and background area amount Change parameter and forms the first quantization parameter table;The amount of each macro block is obtained according to the first quantization parameter table and the second quantization parameter table Change parameter;Second quantization parameter table is generated by encoder;Second quantization parameter characterize frame to be encoded complexity and code rate it is big It is small;Quantization parameter according to each macro block is treated coded frame and is encoded.Since image to be encoded is divided into background by the present invention Area and foreground zone, the accounting value according to foreground zone divide the sport rank of image to be encoded, for different macro blocks according to fortune The difference of grade is moved to select suitable quantization parameter, to reach compression bit rate on the basis of not reducing picture quality Purpose.
Figure 12 is please referred to, is a kind of the functional block diagram of video coding apparatus provided by the embodiment of the present invention.It needs It is noted that video coding apparatus 150 provided by the embodiment of the present invention, for executing as shown in figs. 1,4 and 5 Method flow diagram.Its basic principle and the technical effect of generation are identical as preceding method embodiment, to briefly describe, the present embodiment In do not refer to part, can refer to the corresponding contents in preceding method embodiment.The video coding apparatus 150 includes obtaining module 151, judgment module 153 and processing module 155.
Wherein, it obtains module 151 to be used to obtain background frames and present frame, and is also used to be obtained according to background frames and present frame The sport rank of present frame is taken, and is also used to obtain foreground zone quantization parameter and background area according to the sport rank of present frame Quantization parameter, and it is also used to obtain the quantization ginseng of each macro block according to the first quantization parameter table and the second quantization parameter table Number, and be also used to obtain background frames according to code stream to be encoded or using the previous frame of present frame as background frames.
It is to be appreciated that in a kind of preferred embodiment, obtain module 151 can be used for executing step 201, step 202, Step 203 and step 204.
Wherein, judgment module 153 is for luminance difference to be compared with presetting luminance threshold.
It is to be appreciated that judgment module 153 can be used for executing step 202-2-1 in a kind of preferred embodiment.
Wherein, processing module 155 is used to treat coded frame according to the quantization parameter of each macro block and be encoded, and also uses It in the luminance difference of calculating background frames and present frame, and is also used to carry out threshold binarization to luminance difference, obtains present frame MAP table, and be also used to according to MAP meter calculate obtain foreground zone accounting value, and be also used to according to foreground zone accounting value it is true The sport rank of settled previous frame, and be also used to using the position in the corresponding MAP table of luminance difference as background area.
It is to be appreciated that in a kind of preferred embodiment, processing module 155 can be used for executing step step 202 and Step 205.
The embodiment of the invention also provides a kind of encoders 200.It should be noted that being compiled provided by the embodiment of the present invention Code device 200, for executing method flow diagram as shown in figs. 1,4 and 5.Its basic principle and the technical effect of generation with Preceding method embodiment is identical, to briefly describe, does not refer to part in the present embodiment, can refer to the phase in preceding method embodiment Answer content.
Figure 13 is please referred to, Figure 13 is the schematic diagram of encoder provided by the embodiment of the present invention, which includes place Manage device 210, memory 220 and bus 230.
The processor 210 and memory 220 can be attached by one or more bus 230;
The processor 210, data or program for storing in read/writable memory device 220 execute correspondingly function.
The memory 220, data or program for storage.
It should be noted that the encoder 200 can also be comprising the device to realize other function, for example, radio frequency electrical Road, power circuit etc., the encoder 200 can be with are as follows: the equipment such as desktop computer, tablet computer, notebook, server, herein not Give restriction.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, apparatus, equipment or computer journey Sequence product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and hardware side The form of the embodiment in face.Moreover, it wherein includes computer available programs that the embodiment of the present invention, which can be used in one or more, Implement in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of code The form of computer program product.
The embodiment of the present invention referring to according to the method for the embodiment of the present invention, device, equipment and computer program product Flowchart and/or the block diagram describes.It should be understood that can be realized by computer program instructions every in flowchart and/or the block diagram The combination of process and/or box in one process and/or box and flowchart and/or the block diagram.It can provide these computers Processor of the program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices To generate a machine, so that generating use by the instruction that computer or the processor of other programmable data processing devices execute In the dress for realizing the function of specifying in one or more flows of the flowchart and/or one or more blocks of the block diagram It sets.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In several embodiments provided by the embodiment of the present invention, it should be understood that disclosed device and method, it can also To realize by another way.Device and method embodiment described above is only schematical, for example, in attached drawing Flow chart and block diagram show that the devices of multiple embodiments according to the present invention, method and computer program product are able to achieve Architecture, function and operation.In this regard, each box in flowchart or block diagram can represent module, a program A part of section or code, a part of the module, section or code include that one or more is patrolled for realizing defined Collect the executable instruction of function.It should also be noted that in some implementations as replacement, function marked in the box It can occur in a different order than that indicated in the drawings.For example, two continuous boxes can actually be held substantially in parallel Row, they can also be executed in the opposite order sometimes, and this depends on the function involved.It is also noted that block diagram and/or The combination of each box in flow chart and the box in block diagram and or flow chart, can the function as defined in executing or dynamic The dedicated hardware based system made is realized, or can be realized using a combination of dedicated hardware and computer instructions.
In addition, each functional module in each embodiment of the present invention can integrate one independent portion of formation together Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.It needs Illustrate, herein, the terms "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, So that the process, method, article or equipment for including a series of elements not only includes those elements, but also including not having The other element being expressly recited, or further include for elements inherent to such a process, method, article, or device.Do not having There is the element limited in the case where more limiting by sentence "including a ...", it is not excluded that in the mistake including the element There is also other identical elements in journey, method, article or equipment.
The foregoing is merely alternative embodiments of the invention, are not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should also be noted that similar label and letter exist Similar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing It is further defined and explained.

Claims (10)

1. a kind of method for video coding characterized by comprising
Background frames and present frame are obtained respectively;The background frames are the background model frame of video to be encoded;The present frame is to work as Preceding frame to be encoded;
The sport rank of the present frame is obtained according to the background frames and the present frame;The sport rank of the present frame by The accounting of foreground zone in the present frame is characterized;Sport rank adjusting quantization parameter according to the present frame;
The frame to be encoded is encoded according to the quantization parameter.
2. method for video coding as described in claim 1, which is characterized in that the sport rank tune according to the present frame The step of integral quantization parameter includes:
Sport rank according to the present frame obtains foreground zone quantization parameter and background area quantization parameter;The foreground zone amount Change parameter and background area quantization parameter forms the first quantization parameter table;
Quantization parameter is obtained according to the first quantization parameter table and the second quantization parameter table;The second quantization parameter table by Encoder generates;Second quantization parameter characterizes the complexity and code rate size of the frame to be encoded.
3. method for video coding as described in claim 1, which is characterized in that the step of the acquisition background frames further include:
The background frames are obtained according to the video to be encoded;
Or using the previous frame of the present frame as background frames.
4. method for video coding as described in claim 1, which is characterized in that described according to the background frames and the present frame The step of obtaining the sport rank of the present frame include:
Calculate the luminance difference of the background frames Yu the present frame;
Threshold binarization is carried out to the luminance difference, obtains the MAP table of the present frame, the MAP table includes the background Area and the foreground zone;
The foreground zone accounting value is calculated according to the MAP meter;The foreground zone accounting value is foreground zone institute in the present frame The ratio accounted for;
The sport rank of the present frame is determined according to the foreground zone accounting value.
5. method for video coding as claimed in claim 4, which is characterized in that described to carry out threshold value two-value to the luminance difference The step of change includes:
The luminance difference is compared with presetting luminance threshold;
When the luminance difference is less than or equal to the presetting luminance threshold, by the corresponding MAP of the luminance difference Position in table is as background area;
It, will be in the corresponding MAP table of the luminance difference when the luminance difference is greater than the presetting luminance threshold Position as foreground zone.
6. method for video coding as claimed in claim 4, which is characterized in that the difference according to after threshold binarization Include: after the step of obtaining the MAP table of the present frame
The luminance parameter for the background area that foreground zone described in the MAP table is surrounded carries out completion.
7. a kind of video coding apparatus characterized by comprising
Module is obtained, for obtaining background frames and present frame,
And it is also used to obtain the sport rank of the present frame according to the background frames and the present frame,
And it is also used to the sport rank adjusting quantization parameter according to the present frame,
Processing module is encoded for treating coded frame according to the quantization parameter.
8. video coding apparatus as claimed in claim 7 characterized by comprising
The acquisition module is also used to obtain the background frames according to code stream to be encoded or makees the previous frame of the present frame For background frames,
And be also used to obtain foreground zone quantization parameter and background area quantization parameter according to the sport rank of the present frame,
And it is also used to obtain the quantization parameter of each macro block according to the first quantization parameter table and the second quantization parameter table;
The processing module is also used to calculate the luminance difference of the background frames Yu the present frame,
And be also used to carry out threshold binarization to the luminance difference, the MAP table of the present frame is obtained,
And be also used to calculate according to the MAP meter and obtain the foreground zone accounting value,
And it is also used to determine the sport rank of the present frame according to the foreground zone accounting value.
9. video coding apparatus as claimed in claim 8, which is characterized in that further include:
Judgment module, for the luminance difference to be compared with presetting luminance threshold;
The processing module, the luminance parameter for the background area for being also used to surround foreground zone described in the MAP table with it is described The luminance parameter of the foreground zone is consistent.
10. a kind of encoder characterized by comprising processor, memory and bus, the memory are stored with the place The executable machine readable instructions of device are managed, when electronic equipment operation, pass through bus between the processor and the memory Communication, the processor execute the machine readable instructions, and the video as described in claim 1 to 6 is any is executed when executing The step of coding method.
CN201910325030.2A 2019-04-22 2019-04-22 Video coding method, device and coder Active CN109951706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910325030.2A CN109951706B (en) 2019-04-22 2019-04-22 Video coding method, device and coder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910325030.2A CN109951706B (en) 2019-04-22 2019-04-22 Video coding method, device and coder

Publications (2)

Publication Number Publication Date
CN109951706A true CN109951706A (en) 2019-06-28
CN109951706B CN109951706B (en) 2021-01-01

Family

ID=67015909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910325030.2A Active CN109951706B (en) 2019-04-22 2019-04-22 Video coding method, device and coder

Country Status (1)

Country Link
CN (1) CN109951706B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769254A (en) * 2019-10-10 2020-02-07 网宿科技股份有限公司 Code rate configuration method, system and equipment for video frame
CN113438468A (en) * 2020-03-23 2021-09-24 浙江宇视科技有限公司 Dynamic control method and device for video quality, storage medium and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128756A1 (en) * 2001-12-28 2003-07-10 Nokia Corporation Method and apparatus for selecting macroblock quantization parameters in a video encoder
CN1713729A (en) * 2004-06-24 2005-12-28 华为技术有限公司 Video frequency compression
US20070183676A1 (en) * 2001-11-27 2007-08-09 Nokia Corporation Video coding and decoding
CN102685491A (en) * 2012-03-02 2012-09-19 中兴通讯股份有限公司 Method and system for realizing video coding
CN104243994A (en) * 2014-09-26 2014-12-24 厦门亿联网络技术股份有限公司 Method for real-time motion sensing of image enhancement
WO2015006176A1 (en) * 2013-07-10 2015-01-15 Microsoft Corporation Region-of-interest aware video coding
US20150281723A1 (en) * 2002-01-05 2015-10-01 Samsung Electronics Co., Ltd. Image coding and decoding method and apparatus considering human visual characteristics
CN109587495A (en) * 2018-11-05 2019-04-05 深圳威尔视觉传媒有限公司 Method for video coding, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070183676A1 (en) * 2001-11-27 2007-08-09 Nokia Corporation Video coding and decoding
US20030128756A1 (en) * 2001-12-28 2003-07-10 Nokia Corporation Method and apparatus for selecting macroblock quantization parameters in a video encoder
US20150281723A1 (en) * 2002-01-05 2015-10-01 Samsung Electronics Co., Ltd. Image coding and decoding method and apparatus considering human visual characteristics
CN1713729A (en) * 2004-06-24 2005-12-28 华为技术有限公司 Video frequency compression
CN102685491A (en) * 2012-03-02 2012-09-19 中兴通讯股份有限公司 Method and system for realizing video coding
WO2015006176A1 (en) * 2013-07-10 2015-01-15 Microsoft Corporation Region-of-interest aware video coding
CN104243994A (en) * 2014-09-26 2014-12-24 厦门亿联网络技术股份有限公司 Method for real-time motion sensing of image enhancement
CN109587495A (en) * 2018-11-05 2019-04-05 深圳威尔视觉传媒有限公司 Method for video coding, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曾国卿: "基于感兴趣区域编码的图像压缩算法", 《空间电子技术》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769254A (en) * 2019-10-10 2020-02-07 网宿科技股份有限公司 Code rate configuration method, system and equipment for video frame
CN110769254B (en) * 2019-10-10 2022-04-22 网宿科技股份有限公司 Code rate configuration method, system and equipment for video frame
CN113438468A (en) * 2020-03-23 2021-09-24 浙江宇视科技有限公司 Dynamic control method and device for video quality, storage medium and electronic equipment
CN113438468B (en) * 2020-03-23 2023-02-28 浙江宇视科技有限公司 Dynamic control method and device for video quality, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109951706B (en) 2021-01-01

Similar Documents

Publication Publication Date Title
CN105163116B (en) The method and apparatus of image prediction
CN102611823B (en) Method and equipment capable of selecting compression algorithm based on picture content
CN105744271B (en) A kind of method for video coding and device
CN109302610A (en) A kind of screen content coding interframe fast algorithm based on rate distortion costs
CN104581159B (en) Block partitioning scheme in coding and decoding video determines method and relevant apparatus
CN103237216A (en) Encoding and decoding method and encoding and decoding device for depth image
CN106170093B (en) Intra-frame prediction performance improving coding method
CN103313047B (en) A kind of method for video coding and device
US9984504B2 (en) System and method for improving video encoding using content information
CN103763559B (en) A kind of video file code-transferring method
CN105933717A (en) Coding unit mode decision method and device
CN109951706A (en) A kind of method for video coding, device and encoder
CN109997360A (en) The method and apparatus that video is coded and decoded based on perception measurement classification
CN106454348B (en) A kind of video coding-decoding method and device
CN110225343A (en) A kind of bit rate control method and device of Video coding
CN106791850A (en) Method for video coding and device
CN111277827B (en) Video data processing method, device, equipment and readable storage medium
Fu et al. Efficient depth intra frame coding in 3D-HEVC by corner points
CN110495178A (en) The device and method of 3D Video coding
Yuan et al. Dynamic computational resource allocation for fast inter frame coding in video conferencing applications
US9020283B2 (en) Electronic device and method for splitting image
CN110536087A (en) Electronic equipment and its motion profile picture synthesis method, device and embedded equipment
CN110213576A (en) Method for video coding, video coding apparatus, electronic equipment and storage medium
CN110557621B (en) Parameter acquisition method, pixel point pair selection method and related equipment
CN105007494B (en) Wedge-shaped Fractionation regimen selection method in a kind of frame of 3D video depths image

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