CN109379594A - Video coding compression method, device, equipment and medium - Google Patents

Video coding compression method, device, equipment and medium Download PDF

Info

Publication number
CN109379594A
CN109379594A CN201811284900.8A CN201811284900A CN109379594A CN 109379594 A CN109379594 A CN 109379594A CN 201811284900 A CN201811284900 A CN 201811284900A CN 109379594 A CN109379594 A CN 109379594A
Authority
CN
China
Prior art keywords
target code
code unit
frame image
current frame
inter
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
CN201811284900.8A
Other languages
Chinese (zh)
Other versions
CN109379594B (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.)
Beijing Jiaxun Feihong Electrical Co Ltd
Original Assignee
Beijing Jiaxun Feihong Electrical 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 Beijing Jiaxun Feihong Electrical Co Ltd filed Critical Beijing Jiaxun Feihong Electrical Co Ltd
Priority to CN201811284900.8A priority Critical patent/CN109379594B/en
Publication of CN109379594A publication Critical patent/CN109379594A/en
Application granted granted Critical
Publication of CN109379594B publication Critical patent/CN109379594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/17Methods 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/172Methods 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 picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a kind of Video coding compression method, device, equipment and media.This method comprises: determining two-value difference image of the current frame image relative to previous frame image according to the previous frame image of current frame image and current frame image;Determine current frame image with the presence or absence of area-of-interest according to two-value difference image;Wherein, area-of-interest is current frame image and the different region of previous frame image;If it is determined that there are area-of-interests for current frame image, then determine all target code units of current frame image, the inter-frame forecast mode of each target code unit is determined according to the positional relationship of target code unit and area-of-interest for each target code unit;Data according to the inter-frame forecast mode of each target code unit, the corresponding quantization parameter of each target code unit and current frame image, after determining the corresponding coding of current frame image.Method provided by the invention reduces computation complexity, reduces the scramble time.

Description

Video coding compression method, device, equipment and medium
Technical field
The present embodiments relate to technical field of data compression more particularly to a kind of Video coding compression method, device, set Standby and medium.
Background technique
Standard branch office of international telecommunication union telecommunication (ITU-T for ITU Telecommunication Standardization Sector) Video Coding Experts Group (Video Coding Experts Group, VCEG) and state The dynamic image of border standardization body (International Organization for Standardization, ISO) is special Family's group (Moving Picture Experts Group, MPEG) has set up Video coding cooperation group (Joint Collaborative Team on Video Coding, JCT-VC), formulate high-performance video coding standard of new generation (High Efficiency Video Coding,HEVC).As newest video encoding standard, compiled with the video of mainstream before Code standard is compared, it possesses more flexible coding structure.Picture frame is divided into coding tree unit by HEVC, and coding tree unit can be with It is decomposed into several rectangular coding units (Coding Unit, CU) according to quad-tree structure, coding depth is coding unit in four forks Recursive depth in tree construction, coding size are the size dimensions of the image block of coding unit, the CU under every kind of coding depth, all There is its corresponding prediction mode (PU, Prediction Unit), PU is the basic unit for carrying out intra prediction, and PU is according to division Form can be divided into including skip mode (SKIP/merge), square segmentation (Square motion partition) mould Formula, symmetry division (Symmetric motion partition, SMP) mode, asymmetric segmentation (Asymmetric motion Partition, AMP) mode and intra prediction (intra modes) mode.
Currently, HEVC encoder be directed to different depth each CU, all can top-downly to SKIP/merge, The inter-frame forecast modes such as Square, SMP, AMP and intra modes carry out function call, until minimum coding unit, coding Depth reaches 3, calculates rate distortion costs (Rate Distortion Cost, RD- one by one to wherein every kind of inter-frame forecast mode Cost), the smallest predicting unit of rate distortion costs is eventually found, the best PU prediction mode as current CU.But it is above-mentioned The process that the traversal of HEVC coding calculates makes computation complexity when calculating PU very high, and video compress needs to consume a large amount of compile The code time.
Summary of the invention
The present invention provides a kind of Video coding compression method, device, equipment and medium, to realize efficient Video coding pressure Contracting.
In a first aspect, the embodiment of the invention provides a kind of Video coding compression methods, which comprises
According to the previous frame image of current frame image and the current frame image, determine the current frame image relative to institute State the two-value difference image of previous frame image;
Determine the current frame image with the presence or absence of area-of-interest according to the two-value difference image;Wherein, the sense Interest region is the current frame image and the different region of previous frame image;
If it is determined that there are the area-of-interests for the current frame image, it is determined that all targets of the current frame image Coding unit, for each target code unit, according to the position of the target code unit and the area-of-interest Relationship determines the inter-frame forecast mode of each target code unit;
According to the inter-frame forecast mode of each target code unit, the corresponding quantization parameter of each target code unit and The current frame image, the data after determining the corresponding coding of the current frame image.
Second aspect, the embodiment of the invention also provides a kind of Video coding compression set, described device includes:
Two-value difference image determining module, for the previous frame image according to current frame image and the current frame image, Determine two-value difference image of the current frame image relative to the previous frame image;
Area-of-interest determining module, for determining that the current frame image whether there is according to the two-value difference image Area-of-interest;Wherein, the area-of-interest is the current frame image and the different region of previous frame image;
First inter-frame forecast mode determining module, for if it is determined that the current frame image there are the area-of-interest, All target code units for then determining the current frame image, for each target code unit, according to the target The positional relationship of coding unit and the area-of-interest determines the inter-frame forecast mode of each target code unit;
Coding module, for corresponding according to inter-frame forecast mode, each target code unit of each target code unit Quantization parameter and the current frame image, the data after determining the corresponding coding of the current frame image.
The third aspect, the embodiment of the invention also provides a kind of equipment, the equipment includes:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the Video coding compression method as described in any in the embodiment of the present invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes any Video coding compression method in embodiment when the program is executed by processor.
The present invention by the previous frame image according to current frame image and current frame image, determine current frame image relative to The two-value difference image of the previous frame image;Determine current frame image with the presence or absence of region of interest according to two-value difference image Domain;Wherein, area-of-interest is current frame image and the different region of previous frame image;If it is determined that there is sense in current frame image Interest region, it is determined that all target code units of current frame image, for each target code unit, according to target code The positional relationship of unit and area-of-interest determines the inter-frame forecast mode of each target code unit;It is compiled according to each target Inter-frame forecast mode, the corresponding quantization parameter of each target code unit and the current frame image of code unit, determine present frame Data after the corresponding coding of image.It solves each coding unit recurrence in conventional video compression cataloged procedure and carries out whole frame Between prediction mode and the problem that causes time complexity high, reduce the scramble time of compression video.
Detailed description of the invention
Fig. 1 is the flow chart for the Video coding compression method that the embodiment of the present invention one provides;
Fig. 2 is inter-frame forecast mode schematic diagram;
Fig. 3 is the flow chart of Video coding compression method provided by Embodiment 2 of the present invention;
Fig. 4 is the flow chart for the Video coding compression method that the embodiment of the present invention three provides;
The Video coding compression set schematic diagram that Fig. 5 embodiment of the present invention four provides;
Fig. 6 is a kind of structural schematic diagram for equipment that the embodiment of the present invention five provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow chart for the Video coding compression method that the embodiment of the present invention one provides, video provided in this embodiment Code compression method is the improved method for HEVC standard.The present embodiment is applicable to the case where Video coding compression, the party Method can be executed by Video coding compression set, be specifically comprised the following steps:
Step 101, according to the previous frame image of current frame image and the current frame image, determine the current frame image Two-value difference image relative to the previous frame image.
Wherein, current frame image can be the picture frame that coding compression is carried out in video, the previous frame figure of current frame image As can be the key frame as prediction basis;Pixel value can be the corresponding pixel RGB three of current frame image pixel Three components of primary colors are specifically worth, and can also be the luminance information of pixel, can be gray value, model of the pixel value 0~255 Between enclosing, 0 to represent brightness most dark, and 255 to represent brightness most bright.The mode that two-value difference image generates, which can be, passes through two images The pixel value of corresponding position is compared, if identical, the gray value of corresponding position pixel is set as 0, if it is different, Then make corresponding pixel points gray value be set as 255 mode and constitutes image.
Specifically, the pixel value of each position in current frame image and present frame previous frame image is obtained respectively, it is successively right The pixel value of pixel more identical than position in two field pictures, if the pixel value of corresponding position is identical, by two-value difference The gray value of the pixel of corresponding position is set as 0 in image, if the pixel value of corresponding position is different, then by two-value difference The gray value of the pixel of corresponding position is set as 255 in image, after all pixels point in two field pictures compares, then obtains Get the two-value difference image being made of the pixel that gray value is 255 or 0.
A kind of preferred embodiment obtains current frame image and present frame previous frame image, current frame image picture respectively Element value f (x, y, i) and present frame former frame pixel value f (x, y, i-1), then two-value difference image pixel value DF (x, y, i, i- 1), wherein x, y can be the transverse and longitudinal coordinate in the coordinate position of current frame image and present frame previous frame image respectively, and i is represented Frame number of the current frame image in video, pixel value DF (x, y, i, i-1)=f (x, y, i)-f (x, y, i- of two-value difference image 1), if the DF value after calculating is greater than a given threshold, 255 will be set as to the corresponding gray value of DF value, if the DF value after calculating Less than or equal to a given threshold, then the corresponding gray value of DF value is set as 0, wherein given threshold is preferably 15 (being changed to " 15 "); After the gray value of each pixel in two-value difference image is set, then current frame image and present frame former frame are obtained The two-value of image divides difference image.
Step 102 determines the current frame image with the presence or absence of area-of-interest according to the two-value difference image;Its In, the area-of-interest is the current frame image and the different region of previous frame image.
Wherein, area-of-interest can be the human eye region strong to image perception degree, including moving region, texture complex area Regions such as domain, face etc..Two-value difference image can show changed region in two images, pass through two-value difference image It can help to obtain area-of-interest.
In the concrete realization, judged in two-value difference image according to the two-value difference image of generation with the presence or absence of pixel Gray value is not 0 pixel, is not 0 pixel if there is gray value, then illustrate in current frame image exist with it is current The area-of-interest of the different region of frame previous frame image, the different region i.e. current frame image.In other words, When, there are when the pixel that gray value is 255, determining current frame image, there are area-of-interests in two-value difference image.
Step 103, if it is determined that the current frame image there are the area-of-interests, it is determined that the current frame image All target code units, for each target code unit, according to the target code unit and the region of interest The positional relationship in domain determines the inter-frame forecast mode of each target code unit.
Wherein, target code unit can be in current frame image, divide according to pre-arranged code depth and coding size Square image blocks.The relationship of target code unit and area-of-interest may include be located at it is non-it is interested, be located at it is interested Edges of regions and be located at area-of-interest inside etc..Inter-frame forecast mode can be the form of target code dividing elements.
Fig. 2 is inter-frame forecast mode schematic diagram.Illustratively, the size of divided CU is 2N*2N in Fig. 2.Wherein, N For the number of pixel.Square, SMP, AMP as shown in Figure 2 have its corresponding partitioning scheme respectively.
As shown in Fig. 2, Square can be the mode for dividing CU square, PU is formed after CU is divided.Wherein, exist In Square mode, after CU is divided the PU that is formed can image block PART_2N*2N with a size for 2N*2N, alternatively, being Four sizes are the image block PART_N*N of N*N.
As shown in Fig. 2, SMP can be the mode for dividing CU symmetric figure.Wherein, the PU formed after segmentation can be two Size is the image block PART_2N*N of 2N*N, alternatively, being the image block PART_N*2N that two sizes are N*2N.
As shown in Fig. 2, AMP can be the mode for dividing CU unsymmetrical.Wherein, the PU formed after segmentation can be greatly Small is respectively the image block of 2N*N/2 and 2N*3N/2.According to the difference in segmentation direction, the form of PU can be the image in Fig. 2 The form shown in form, image block PART_nR*2N, the form shown in image block PART_2N*nU shown in block PART_nL*2N, Alternatively, the form shown in image block PART_2N*nD.
In addition, SKIP/merge and intra modes is not shown in FIG. 2, it is pre- that SKIP/merge does not carry out interframe to CU It surveys;Intra modes is the CU that CU is divided into more lower Item size, carries out inter-prediction again.
Specifically, in the present embodiment, first current frame image is divided according to current HEVC standard, forms different rulers Very little and different coding depth coding unit.Wherein, coding depth can be 0,1,2 and 3, coding size can be 64*64, 32*32,16*16 and 8*8.More specifically, current frame image is divided into multiple coding units having a size of 64*64;For compiling Coding unit of the code having a size of 64*64, is divided into 4 coding units having a size of 32*32;For encoding having a size of 32* 32 coding unit is divided into 4 coding units having a size of 16*16;For encoding the coding list having a size of 16*16 Member is divided into 4 coding units having a size of 8*8.All coding units having a size of 64*64, corresponding coding are deep Degree is 0;All coding units having a size of 32*32, corresponding coding depth are 1;All coding lists having a size of 16*16 Member, corresponding coding depth are 2;All coding units having a size of 8*8, corresponding coding depth are 3.Wherein, size 64*64 refers in the coding unit that horizontal and vertical includes 64 pixels.
If the region that the pixel for being 0 there are gray value in the corresponding two-value difference image of current frame image is constituted, one In kind implementation, by the coding unit of current frame image, all coding units having a size of 16*16 and 8*8 are determined as The target code unit of the current frame image.For each target code unit, each coding unit and two-value difference diagram are determined Pixel value is not the positional relationship in the region of 0 pixel composition as in, judges the target code unit pair according to positional relationship The inter-frame forecast mode answered.It is specific how according to the positional relationship of target code unit and area-of-interest, determine each target The inter-frame forecast mode of coding unit will be described in detail in the third embodiment.
Step 104, the inter-frame forecast mode according to each target code unit, the corresponding quantization of each target code unit Parameter and the current frame image, the data after determining the corresponding coding of the current frame image.
Wherein, quantization parameter can be the parameter of reaction picture quality, and quantization parameter is smaller, the corresponding target of quantization parameter The picture quality of coding unit is more clear.
Specifically, can according to the prediction mode of each coding unit in target code frame, the quantization parameter of setting and Current frame image performs the encoding operation current frame image, wherein quantization parameter can be preset value, preferred embodiment In, quantization parameter is set as 28;Encoding operation may include raw using target code unit inter-frame forecast mode corresponding with its At data frame, data frame and reference frame are subjected to subtraction and obtain residual matrix, wherein reference frame, which can be, rule of thumb to be selected The video image frame taken or the video image frame chosen by threshold time, carry out discrete cosine transform for residual matrix (Discrete Cosine Transform, DCT) obtains transform coefficient matrix;Reuse change of the quantization parameter to being calculated It changes coefficient matrix and carries out quantization generation quantization matrix, the compressed encoding that entropy coding finally obtains video finally is carried out to quantization matrix Data.
The technical solution of the present embodiment, by the previous frame image according to current frame image and current frame image, determination is worked as Two-value difference image of the prior image frame relative to previous frame image;Determine that current frame image whether there is according to two-value difference image Area-of-interest;Wherein, area-of-interest is current frame image and the different region of previous frame image;If it is determined that present frame figure As there are area-of-interests, it is determined that all target code units of current frame image, for each target code unit, according to The positional relationship of target code unit and area-of-interest determines the inter-frame forecast mode of each target code unit;According to every The inter-frame forecast mode of a target code unit, the corresponding quantization parameter of each target code unit and current frame image, really Data after the corresponding coding of settled prior image frame, realize when determining the inter-frame forecast mode of target code unit, according to The positional relationship of target code unit and area-of-interest determines the inter-frame forecast mode of target code unit, compared to current The mode that the inter-frame forecast mode of coding unit is determined using the mode of enumerating, reduces computation complexity.Solves conventional video Since each coding unit requires the problem of recurrence carries out whole inter-frame forecast modes in coding compression process, video is reduced The computation complexity for encoding compression reduces the scramble time of compression video.
Embodiment two
Fig. 3 is the flow chart of Video coding compression method provided by Embodiment 2 of the present invention.The present embodiment is in above-mentioned reality A kind of optinal plan on the basis of example is applied, referring to Fig. 3, Video coding compression method provided in an embodiment of the present invention includes:
Step 201, when the current frame image the first pixel and previous frame image corresponding position pixel When the pixel value of point is identical, determine that the gray value of the first pixel described in the two-value difference image is 0;When the present frame When the pixel value of the pixel of the corresponding position of second pixel of image and the previous frame image is not identical, described two are determined The gray value of second pixel described in value difference partial image is 255.
Wherein, pixel can be the smallest colour developing unit in current frame image.Specifically, current frame image and upper is obtained The pixel value of one each pixel of frame image, if the pixel value of corresponding position pixel is identical in two field pictures, by two value differences The gray value of the first pixel corresponding with two field pictures position is set as 0 in partial image;If corresponding position picture in two field pictures The pixel value of vegetarian refreshments is not identical, then sets the gray value of the second pixel corresponding with two field pictures position in two-value difference image It is 255.Wherein, coordinate value is that corresponding position pixel of the pixel of (2,8) in previous frame image refers in current frame image , coordinate value is the pixel of (2,8) in previous frame image.
Step 202, when in the two-value difference image there are gray value be 255 pixel when, determine the present frame There are the area-of-interests for image;Wherein, the area-of-interest be the current frame image and the previous frame image not Identical region.
Step 203, if it is determined that the current frame image there are area-of-interests, then by the coding list of the current frame image In member, all coding units having a size of 16*16 and 8*8 are determined as the target code unit of the current frame image.
Wherein, size can be the number of target code unit transverse and the pixel for longitudinally including.
Specifically, if in the corresponding two-value difference image of current frame image there are gray value be 255 region, when There are area-of-interest in prior image frame, area-of-interest can be the pixel structure that gray value is 255 in two-value difference image At region.To the area-of-interest in current frame image, divided using coding size 16*16 and 8*8;Rather than region of interest Domain is divided using coding size 64*64 and 32*32, the final corresponding all target code units for determining current frame image.
Step 204 is directed to each target code unit, according to the target code unit and the area-of-interest Positional relationship, determine the inter-frame forecast mode of each target code unit.
Step 205, the inter-frame forecast mode according to each target code unit, the corresponding quantization of each target code unit Parameter and the current frame image, the data after determining the corresponding coding of the current frame image.
The technical solution of the embodiment of the present invention passes through the first pixel of current frame image and the corresponding position of previous frame image When the pixel value for the pixel set is identical, determine that the gray value of the first pixel in two-value difference image is 0;Current frame image When the pixel value of the pixel of the corresponding position of second pixel and previous frame image is not identical, institute in two-value difference image is determined The gray value for stating the second pixel is 255;When, there are when the pixel that gray value is 255, determination is current in two-value difference image There are area-of-interests for frame image;Wherein, area-of-interest is current frame image and the different region of previous frame image;If really There are area-of-interests for settled prior image frame, then by the coding unit of current frame image, the institute having a size of 16*16 and 8*8 There is coding unit, is determined as the target code unit of the current frame image;For each target code unit, compiled according to target The positional relationship of code unit and area-of-interest, determines the inter-frame forecast mode of each target code unit;According to each target The inter-frame forecast mode of coding unit, the corresponding quantization parameter of each target code unit and current frame image determine current Data after the corresponding coding of frame image.By the way that the pixel value of two-value difference diagram is become 0 and 255, so that image is interested Region is more obvious, only uses the lesser coding unit of size as target code in current frame image convenient for data processing Unit further reduced the computation complexity of coding compression, improve video encoding quality.
On the basis of the above embodiments, it is being directed to each target code unit, according to the target code unit With the positional relationship of the area-of-interest, before the inter-frame forecast mode for determining each target code unit, the video Code compression method further include:
In the two-value difference image, the number for the pixel that gray value is 255 and the picture of the two-value difference image When the ratio of the total number of vegetarian refreshments is greater than preset threshold, determine that the motor pattern of the current frame image is that background and prospect are transported It is dynamic.
Wherein, prospect can be as the people of main body, animal or object etc. in current frame image, and background can be for drying The scenery of main body is held in the palm, it may include that foreground and background is equal that motor pattern, which can be the motion mode of background and prospect in image slices, It moves, foreground and background is static and foreground moving and stationary background etc..
Specifically, the pixel that gray value is 255 in the corresponding two-value difference image of available current frame image accounts for two Ratio and preset threshold, are then compared by the ratio of all pixels point in value difference partial image, if ratio is greater than default threshold Value, then be determined as background for the motor pattern of current frame image and prospect be in motion state.Wherein, preset threshold is preferably 30%.
In the two-value difference image, the number for the pixel that gray value is 255 and the picture of the two-value difference image When the ratio of the total number of vegetarian refreshments is less than or equal to the preset threshold, determine that the motor pattern of the current frame image is background Static and foreground moving.
Specifically, the pixel number that gray value is 255 in the corresponding two-value difference image of available current frame image accounts for Ratio and preset threshold, are then compared, if ratio is less than or equal to by the ratio of total pixel in two-value difference image Preset threshold, then the motor pattern of current frame image is determined as background and remains static to be kept in motion with prospect.Wherein, Preset threshold is preferably 30%.
Correspondingly, the positional relationship according to the target code unit and the area-of-interest determines described every The inter-frame forecast mode of a target code unit, comprising:
According to the motor pattern of the current frame image, and, the target code unit and the area-of-interest Positional relationship determines that the inter-frame forecast mode of each target code unit and each target code unit are corresponding Quantization parameter adjusted.
Wherein, the positional relationship of target code unit and the area-of-interest may include interior in area-of-interest Portion position, the marginal position in area-of-interest and in regions of non-interest etc.;Inter-frame forecast mode may include SKIP/ Merge, Square, SMP, AMP and intra modes etc..
It specifically, can be according to the motion mode of foreground and background in current frame image, target code unit and interested The positional relationship in region determines the inter-frame forecast mode of the target code unit and the mode of adjusting quantization parameter, exemplary , if target code unit is located at the interior location of area-of-interest, and motor pattern is foreground moving and stationary background, then The inter-frame forecast mode of target code unit can be Square and SMP, and reduce 3 on the basis of quantization parameter, so that The corresponding image of target code unit is more clear.
Embodiment three
Fig. 4 is the flow chart for the Video coding compression method that the embodiment of the present invention three provides.The present embodiment is in above-mentioned reality The alternative dispensing means on the basis of example are applied, referring to fig. 4, Video coding compression method provided in an embodiment of the present invention includes:
Step 301, when the current frame image the first pixel and previous frame image corresponding position pixel When the pixel value of point is identical, determine that the gray value of the first pixel described in the two-value difference image is 0;When the present frame When the pixel value of the pixel of the corresponding position of second pixel of image and the previous frame image is not identical, described two are determined The gray value of second pixel described in value difference partial image is 255.
Step 302, when in the two-value difference image there are gray value be 255 pixel when, determine the present frame There are the area-of-interests for image;Wherein, the area-of-interest be the current frame image and the previous frame image not Identical region.
Step 303, if it is determined that the current frame image there are area-of-interests, then by the coding list of the current frame image In member, all coding units having a size of 16*16 and 8*8 are determined as the target code unit of the current frame image, for Each target code unit, according to the positional relationship of the target code unit and the area-of-interest, determine described in The inter-frame forecast mode of each target code unit.
Step 304, if it is determined that the current frame image be not present the area-of-interest, then by the current frame image In coding unit, all coding units having a size of 64*64 and 32*32 are determined as the target code of the current frame image Unit;The inter-frame forecast mode for determining the target code unit is the 6th candidate inter-frame forecast mode (being changed to " prediction mode ") There is the inter-frame forecast mode of minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit in set Add two for the corresponding quantization parameter of the target code unit;Wherein, the described 6th candidate inter-frame forecast mode set includes: SKIP/merge and Square.
Specifically, if the region that gray value is 255 is not present in the corresponding two-value difference image of current frame image, Area-of-interest is not present in current frame image.Divide current frame image using coding size 64*64 and 32*32, generates coding The target code unit of size 64*64 and 32*32, the final all target code units for obtaining current frame image;Make corresponding Target code unit is chosen using SKIP/merge and Square calculating rate distortion costs in candidate inter-frame forecast mode set The smallest candidate inter-frame forecast mode of rate distortion costs calculated result as inter-frame forecast mode, meanwhile, in target code unit Increase by 2 on the basis of initial quantization parameter, as target code unit quantization parameter adjusted, so that corresponding target code The code rate of unit is smaller, wherein the set of SKIP/merge and Square composition can be the 6th candidate inter-frame forecast mode collection It closes.
A kind of optional embodiment, the inter-frame forecast mode of each target code unit of determination in step 304 it Before, it can also determine the motor pattern of current frame image.Then according to the position of target code unit and area-of-interest in step 304 Relationship is set, determines that the inter-frame forecast mode of each target code unit specifically may is that the movement according to the current frame image Mode, and, the positional relationship of the target code unit and the area-of-interest determines each target code unit Inter-frame forecast mode and the corresponding quantization parameter adjusted of each target code unit.In this implementation, The motor pattern according to the current frame image in step 304, and, the target code unit and the area-of-interest Positional relationship, determine that the inter-frame forecast mode of each target code unit and each target code unit are corresponding Quantization parameter adjusted specifically comprise the following steps:
If the motor pattern of step 3041, the current frame image is that background and prospect move:
When include in the target code unit with gray value in the two-value difference image be 255 pixel position phase With pixel when, determine that the inter-frame forecast mode of the target code unit is to have in the first candidate inter-frame forecast mode set There is an inter-frame forecast mode of minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit is the mesh The corresponding quantization parameter of mark coding unit subtracts one;Wherein, the described first candidate inter-frame forecast mode set include: SMP, AMP and intra modes;
When do not include in the target code unit with gray value in the two-value difference image be 255 pixel position When identical pixel, determine that the inter-frame forecast mode of the target code unit is in the second candidate inter-frame forecast mode set Inter-frame forecast mode with minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit is described The corresponding quantization parameter of target code unit adds one;Wherein, the described second candidate inter-frame forecast mode set includes: SKIP/ Merge, Square and SMP.
Wherein, candidate inter-frame forecast mode set can be the corresponding all inter-frame forecast mode combinations of target code unit Set, may include any group of the inter-frame forecast modes such as SKIP/merge, Square, SMP, AMP and intra modes It closes, such as SKIP/merge, Square set, SKIP/merge, SMP set, SKIP/merge, intra modes set, SKIP/merge, Square, SMP set, SKIP/merge, Square, SMP, AMP set and SKIP/merge, Square, SMP, AMP, intra modes set etc..
Specifically, if it is determined that foreground and background is in motion state, there is following two scene.
The first scene obtains the position of pixel all in each target code unit, if some target code In unit, exist in the corresponding two-value difference image of current frame image area-of-interest (i.e. gray value be 255 pixel Point constitute region) pixel the identical pixel in position, then be directed to the target code unit, use symmetry division mode SMP, asymmetric Fractionation regimen AMP and intra prediction mode intra modes are distorted generation to target code unit calculation rate respectively Valence, calculation formula can be J=DFD (Motion)+kMotionRMV(Motion), wherein DFD (Motion) indicates to use different fortune Motion compensated prediction error under dynamic model formula, RMV(Motion) number of coded bits of inter-frame forecast mode relevant information, phase are indicated Close motion vector, image index and the reference queue index etc. that information may include inter-frame forecast mode, kMotionFor Lagrange The factor;Choose inter-prediction of the smallest candidate inter-frame forecast mode of rate distortion costs calculated result as the target code unit Mode, and the quantization parameter of corresponding target code unit is subtracted one on the basis of its initial quantization parameter, as the target Coding unit quantization parameter adjusted.
Second of scene obtains the position of pixel all in each target code unit, if some target code In unit, there is no the pixel position of area-of-interest in two-value difference image corresponding with current frame image is in is identical Pixel then uses SKIP/merge, Square and SMP in candidate inter-frame forecast mode set for the target code unit Rate distortion costs are calculated, choose the smallest candidate inter-frame forecast mode of rate distortion costs calculated result as inter-frame forecast mode, And by the quantization parameter of corresponding target code unit on the basis of its initial quantization parameter plus one, as the target code list Member quantization parameter adjusted.
Wherein, the quantization parameter before all target code unit adjustment, i.e., initial quantization parameter can rule of thumb be set It is set to certain value, preferred definite value is 28.
If the motor pattern of step 3042, the current frame image be stationary background and foreground moving:
When include in the target code unit with gray value in the two-value difference image be 255 pixel position phase Same pixel, also, do not include and the two-value difference image gray scale in the coding unit around the target code unit Value for 255 the identical pixel in pixel position when, determine that the inter-frame forecast mode of the target code unit is that third is waited Select the inter-frame forecast mode in inter-frame forecast mode set with minimum rate distortion costs, the corresponding tune of the target code unit Quantization parameter after whole is that the corresponding quantization parameter of the target code unit subtracts one;Wherein, the third candidate inter-prediction Set of modes includes: AMP and intra modes;
When include in the target code unit with gray value in the two-value difference image be 255 pixel position phase With pixel, also, in the coding unit around the target code unit also include and in the two-value difference image it is grey When the identical pixel in pixel position that angle value is 255, determine that the inter-frame forecast mode of the target code unit is the 4th There is the inter-frame forecast mode of minimum rate distortion costs, the target code unit is corresponding in candidate inter-frame forecast mode set Quantization parameter adjusted is that the corresponding quantization parameter of the target code unit subtracts three;Wherein, the described 4th candidate interframe is pre- Surveying set of modes includes: Square and SMP;
When do not include in the target code unit with gray value in the two-value difference image be 255 pixel position When identical pixel, determine that the inter-frame forecast mode of the target code unit is in the 5th candidate inter-frame forecast mode set Inter-frame forecast mode with minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit is described The corresponding quantization parameter of target code unit adds two;Wherein, the described 5th candidate inter-frame forecast mode set includes: skip mode SKIP/merge and square Fractionation regimen Square.
In the specific implementation, having following three kinds of fields if it is determined that prospect, which is kept in motion, is in stationary state with background Scape.
The first scene: obtaining the position of pixel all in each target code unit, if some target code In unit, the position that there is the pixel of area-of-interest in two-value difference image corresponding with current frame image is in is identical Pixel, and there is no the pixels with area-of-interest in two-value difference image in the coding unit around target code unit The identical pixel in position of point then uses asymmetric Fractionation regimen AMP and intra prediction mode for the target code unit Intra modes calculates rate distortion costs, the set of AMP and intra modes is exactly third candidate's inter-frame forecast mode set, The smallest candidate inter-frame forecast mode of rate distortion costs calculated result is chosen as inter-frame forecast mode, and will corresponding target code The quantization parameter of unit subtracts one on the basis of its initial quantization parameter, as target code unit quantization ginseng adjusted Number, wherein the coding unit around target code unit can be target code unit left, upper left side, top, upper right side, The coding unit of right, lower right, lower section and lower left;
Second of scene: obtaining the position of pixel all in each target code unit, if some target code There is gray value in the two-value difference image region of coding unit corresponding position around unit and the target code unit is 255 pixel, target code unit can calculate rate distortion costs, choosing using Square and SMP inter-frame forecast mode respectively Select wherein the smallest inter-frame forecast mode of rate distortion costs value as inter-frame forecast mode, and will corresponding target code unit amount Change parameter and subtract three on the basis of its initial quantization parameter, as the target code unit quantization parameter adjusted. The set that Square and SMP is constituted can be the 4th candidate inter-frame forecast mode set, wherein the volume around target code unit Code unit can be the volume on target code unit left, upper left side, top, upper right side, right, lower right, lower section and lower left Code unit;
The third scene: obtaining the position of pixel all in each target code unit, if compiled in some target There is no the pixels that gray value is 255 in the corresponding two-value difference image in position of all pixels of code unit, then can To use SKIP/merge and Square to calculate rate distortion costs, it can choose the smallest inter-frame forecast mode of rate distortion costs and make For inter-frame forecast mode, and by the corresponding quantization parameter of target code unit on its baseline values plus two, wherein target code The baseline values of unit rule of thumb can be preferably 28.The set that SKIP/merge and Square is constituted can be the 5th candidate Inter-frame forecast mode set.
It should be noted that in the present embodiment, the position of all pixels in target code unit refers to that target is compiled Position of all pixels point of code unit in current frame image.The initial quantization parameter of target code unit, and, quantization The baseline values of parameter refer to the quantization parameter for the target code unit determined according to current HEVC standard.
Step 305, the inter-frame forecast mode according to each target code unit, the corresponding quantization of each target code unit Parameter and the current frame image, the data after determining the corresponding coding of the current frame image.
The technical solution of the embodiment of the present invention, it is corresponding with previous frame image by the first pixel of current frame image When the pixel value of the pixel of position is identical, determine that the gray value of the first pixel in two-value difference image is 0;Current frame image The second pixel and previous frame image corresponding position pixel pixel value it is not identical when, determine in two-value difference image The gray value of second pixel is 255;When in two-value difference image there are gray value be 255 pixel when, determine present frame There are the area-of-interests for image;Wherein, the area-of-interest is that current frame image and the previous frame image be not identical Region;If it is determined that there are area-of-interests for current frame image, then by the coding unit of the current frame image, having a size of All coding units of 16*16 and 8*8 are determined as the target code unit of the current frame image;It is compiled for each target Code unit determines the inter-prediction of each target code unit according to the positional relationship of target code unit and area-of-interest Mode;If it is determined that area-of-interest is not present in current frame image, then by all coding units having a size of 64*64 and 32*32, It is determined as the target code unit of current frame image;The inter-frame forecast mode for determining target code unit is that the 6th candidate interframe is pre- The inter-frame forecast mode with minimum rate distortion costs, the corresponding quantization ginseng adjusted of target code unit are surveyed in set of modes Number is that the corresponding quantization parameter of target code unit adds two;Wherein, the 6th candidate inter-frame forecast mode set includes: skip mode SKIP/merge and square Fractionation regimen Square;According to the inter-frame forecast mode of each target code unit, each target The corresponding quantization parameter of coding unit and current frame image, the data after determining the corresponding coding of current frame image;For figure As whether there is area-of-interest, the target code unit of different coding size is taken, the image of not area-of-interest is made With the coding unit of the 64*64 and 32*32 of larger size, coding rate is improved, to there are the images of area-of-interest, is made With the coding unit of the 16*16 and 8*8 of smaller size, meanwhile, by adjusting the quantization parameter of target code unit, it ensure that and work as The clarity of prior image frame enhances user's sight so that ensure that the clarity of image simultaneously in the efficiency for improving Video coding See the experience degree of video.
In order to further increase the picture quality of region of interest area image, the method also includes:
The value range of the corresponding quantization parameter adjusted of target code unit are as follows:
QP=max { 0, min { QP, 51 } }, wherein QP indicates institute The corresponding quantization parameter adjusted of target code unit is stated,Indicate 4 encoded volumes around the target code unit The average value of the corresponding quantization parameter adjusted of code unit.
Wherein, 4 encoded units of surrounding can be target code unit left, upper left side, top and upper right side The coding unit of coding.
Specifically, each target code unit determines that the quantization parameter adjusted after inter-frame forecast mode is different, will lead to certain volume The quantization parameter gap of code unit and surrounding coding unit is excessive, causes to generate the experience that blocking artifact reduction user watches video Degree, therefore, can first by the average value of the quantization parameter of target code unit and the quantization parameter of four coding units of surrounding into Row comparison, if it is greater than or less than surrounding coding unit quantization parameter average value, then by target code unit quantify join Number is adjusted, and is reduced the gap with surrounding coding unit, is increased quantization parameter if quantization parameter is too small, if quantization ginseng The excessive then lower quantization parameter of number, wherein the quantization parameter increment increasedd or decreased is preferably 2, the adjustment of ideal coding unit The range of quantization parameter afterwards need to meet 0~51.
Example IV
The Video coding compression set schematic diagram that Fig. 5 embodiment of the present invention four provides, the executable present invention of the present apparatus are any Video coding compression method provided by embodiment has the corresponding functional module of execution method and beneficial effect.Referring to Fig. 5, Video coding compression set provided in an embodiment of the present invention includes: two-value difference image determining module 401, area-of-interest determination Module 402, the first inter-frame forecast mode determining module 403 and coding module 404.
Wherein, two-value difference image determining module 401, for according to upper the one of current frame image and the current frame image Frame image determines two-value difference image of the current frame image relative to the previous frame image.
Area-of-interest determining module 402, for whether determining the current frame image according to the two-value difference image There are area-of-interests;Wherein, the area-of-interest is the current frame image and the different area of previous frame image Domain.
First inter-frame forecast mode determining module 403, for if it is determined that the current frame image there are the region of interest Domain, it is determined that all target code units of the current frame image, for each target code unit, according to the mesh The positional relationship for marking coding unit and the area-of-interest, determines the inter-frame forecast mode of each target code unit.
Coding module 404, for inter-frame forecast mode, each target code unit pair according to each target code unit The quantization parameter and the current frame image answered, the data after determining the corresponding coding of the current frame image.
The technical solution of the embodiment of the present invention, by the way that two-value difference image determining module is arranged, for according to present frame figure As the previous frame image with current frame image, two-value difference image of the current frame image relative to previous frame image is determined, feel emerging Interesting area determination module, for determining current frame image with the presence or absence of area-of-interest according to two-value difference image;Wherein, feel emerging Interesting region is current frame image and the different region of previous frame image, the first inter-frame forecast mode determining module, if for true There are area-of-interests for settled prior image frame, it is determined that all target code units of current frame image are compiled for each target Code unit determines the inter-prediction of each target code unit according to the positional relationship of target code unit and area-of-interest Mode, coding module, for the inter-frame forecast mode according to each target code unit, the corresponding amount of each target code unit Change parameter and current frame image, the data after determining the corresponding coding of current frame image.Solves conventional video coding compression In the process since each coding unit requires the problem of recurrence carries out whole inter-frame forecast modes, Video coding compression is reduced Computation complexity, reduce compression video scramble time.
Further, the first inter-frame forecast mode determining module, comprising: target code unit determines submodule.
Wherein, target code unit determines submodule, for if it is determined that the current frame image there are area-of-interests, then By in the coding unit of the current frame image, all coding units having a size of 16*16 and 8*8 are determined as described current The target code unit of frame image.
Further, in one implementation, two-value difference image determining module further includes gray value setting submodule. Wherein, gray value sets submodule, corresponding with the previous frame image for the first pixel when the current frame image When the pixel value of the pixel of position is identical, determine that the gray value of the first pixel described in the two-value difference image is 0;When When the pixel value of the pixel of the corresponding position of second pixel of the current frame image and the previous frame image is not identical, The gray value for determining the second pixel described in the two-value difference image is 255.
Based on the implementation, area-of-interest determining module 402 is specifically used for existing in the two-value difference image When the pixel that gray value is 255, determining the current frame image, there are the area-of-interests.
In this implementation, Video coding compression set provided by the above embodiment further includes that motor pattern determines mould Block.Specifically, motor pattern determining module is used for: in the two-value difference image, the number for the pixel that gray value is 255 When being greater than preset threshold with the ratio of the total number of the pixel of the two-value difference image, the fortune of the current frame image is determined Dynamic model formula is that background and prospect move;In the two-value difference image, gray value be 255 pixel number with it is described When the ratio of the total number of the pixel of two-value difference image is less than or equal to the preset threshold, the current frame image is determined Motor pattern be stationary background and foreground moving.
Based on the implementation, the first inter-frame forecast mode determining module 403 is according to the target code unit and institute The positional relationship for stating area-of-interest determines the aspect of the inter-frame forecast mode of each target code unit, specifically includes Inter-frame forecast mode determines submodule.
Optionally, inter-frame forecast mode determines submodule, specifically for the motor pattern according to the current frame image, with And the positional relationship of the target code unit and the area-of-interest, determine the interframe of each target code unit Prediction mode and the corresponding quantization parameter adjusted of each target code unit.
Specifically, inter-frame forecast mode determines that submodule specifically includes: foreground moving background motion submodule and prospect fortune Dynamic stationary background submodule.
Foreground moving background motion submodule, if the motor pattern for the current frame image is that background and prospect are transported It is dynamic, then:
When include in the target code unit with gray value in the two-value difference image be 255 pixel position phase With pixel when, determine that the inter-frame forecast mode of the target code unit is to have in the first candidate inter-frame forecast mode set There is an inter-frame forecast mode of minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit is the mesh The corresponding quantization parameter of mark coding unit subtracts one;Wherein, the described first candidate inter-frame forecast mode set include: SMP, AMP and intra modes;
When do not include in the target code unit with gray value in the two-value difference image be 255 pixel position When identical pixel, determine that the inter-frame forecast mode of the target code unit is in the second candidate inter-frame forecast mode set Inter-frame forecast mode with minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit is described The corresponding quantization parameter of target code unit adds one;Wherein, the described second candidate inter-frame forecast mode set includes: SKIP/ Merge, Square and SMP.
Foreground moving stationary background submodule, if the motor pattern for the current frame image is stationary background and prospect Movement, then:
When include in the target code unit with gray value in the two-value difference image be 255 pixel position phase Same pixel, also, do not include and the two-value difference image gray scale in the coding unit around the target code unit Value for 255 the identical pixel in pixel position when, determine that the inter-frame forecast mode of the target code unit is that third is waited Select the inter-frame forecast mode in inter-frame forecast mode set with minimum rate distortion costs, the corresponding tune of the target code unit Quantization parameter after whole is that the corresponding quantization parameter of the target code unit subtracts one;Wherein, the third candidate inter-prediction Set of modes includes: AMP and intra modes;
When include in the target code unit with gray value in the two-value difference image be 255 pixel position phase With pixel, also, in the coding unit around the target code unit also include and in the two-value difference image it is grey When the identical pixel in pixel position that angle value is 255, determine that the inter-frame forecast mode of the target code unit is the 4th There is the inter-frame forecast mode of minimum rate distortion costs, the target code unit is corresponding in candidate inter-frame forecast mode set Quantization parameter adjusted is that the corresponding quantization parameter of the target code unit subtracts three;Wherein, the described 4th candidate interframe is pre- Surveying set of modes includes: Square and SMP;
When do not include in the target code unit with gray value in the two-value difference image be 255 pixel position When identical pixel, determine that the inter-frame forecast mode of the target code unit is in the 5th candidate inter-frame forecast mode set Inter-frame forecast mode with minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit is described The corresponding quantization parameter of target code unit adds two;Wherein, the described 5th candidate inter-frame forecast mode set includes: SKIP/ Merge and Square.
Further, in this implementation, Video coding compression set provided by the above embodiment further include: the second frame Between prediction mode determining module.
Second inter-frame forecast mode determining module is specifically used for: if it is determined that there is no described interested for the current frame image Region, then by the coding unit of the current frame image, all coding units having a size of 64*64 and 32*32 are determined as The target code unit of the current frame image;The inter-frame forecast mode for determining the target code unit is the 6th candidate interframe There is the inter-frame forecast mode of minimum rate distortion costs, the target code unit is corresponding adjusted in prediction mode set Quantization parameter is that the corresponding quantization parameter of the target code unit adds two.Wherein, the described 6th candidate inter-frame forecast mode collection Conjunction includes: SKIP/merge mode and Square mode.
Further, in this implementation, the value range of the corresponding quantization parameter adjusted of target code unit Are as follows:QP=max { 0, min { QP, 51 } }, wherein QP indicates the mesh The corresponding quantization parameter adjusted of coding unit is marked,Indicate 4 encoded coding lists around the target code unit The average value of the corresponding quantization parameter adjusted of member.
Embodiment five
Fig. 6 is a kind of structural schematic diagram for equipment that the embodiment of the present invention five provides, as shown in fig. 6, the equipment includes place Manage device 70, storage device 71, input unit 72 and output device 73;The quantity of processor 70 can be one or more in equipment It is a, in Fig. 6 by taking a processor 70 as an example;Processor 70, storage device 71, input unit 72 and output device 73 in equipment It can be connected by bus or other modes, in Fig. 6 for being connected by bus.
Storage device 71 is used as a kind of computer readable storage medium, and it is executable to can be used for storing software program, computer Program and module, if the corresponding program module of Video coding compression method in the embodiment of the present invention is (for example, Video coding pressure Two-value difference image determining module 401, area-of-interest determining module 402, the first inter-frame forecast mode in compression apparatus determine Module 403 and coding module 404).The software module that processor 70 is stored in storage device 71 by operation, thereby executing setting Standby various function application and data processing realizes above-mentioned Video coding compression method.
Storage device 71 can mainly include storing program area and storage data area, wherein storing program area can store operation Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal. In addition, storage device 71 may include high random access storage device, it can also include non-volatile memory device, such as extremely A few disk storage device part, flush memory device or other non-volatile solid state memory parts.In some instances, it stores Device 71 can further comprise the storage device remotely located relative to processor 70, these remote storages can pass through net Network is connected to equipment.The example of above-mentioned network include but is not limited to internet, intranet, local area network, mobile radio communication and A combination thereof.
Input unit 72 can be used for receiving the number or character information of input, and generate with the user setting of equipment and The related key signals input of function control.Output device 73 may include that display screen etc. shows equipment.
Embodiment six
The embodiment of the present invention six also provides a kind of storage medium comprising computer executable instructions, and the computer can be held Row instruction is used to execute a kind of Video coding compression method when being executed by computer processor, this method comprises:
According to the previous frame image of current frame image and the current frame image, determine the current frame image relative to institute State the two-value difference image of previous frame image;
Determine the current frame image with the presence or absence of area-of-interest according to the two-value difference image;Wherein, the sense Interest region is the current frame image and the different region of previous frame image;
If it is determined that there are the area-of-interests for the current frame image, it is determined that all targets of the current frame image Coding unit, for each target code unit, according to the position of the target code unit and the area-of-interest Relationship determines the inter-frame forecast mode of each target code unit;
According to the inter-frame forecast mode of each target code unit, the corresponding quantization parameter of each target code unit and The current frame image, the data after determining the corresponding coding of the current frame image.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention The method operation that executable instruction is not limited to the described above, can also be performed video compress provided by any embodiment of the invention Relevant operation in method
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory device (Read-Only Memory, ROM), random access storage device (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, included each unit and module are only pressed in the embodiment of above-mentioned video-frequency compression method It is divided, but is not limited to the above division according to function logic, as long as corresponding functions can be realized;In addition, The specific name of each functional module is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of Video coding compression method characterized by comprising
According to the previous frame image of current frame image and the current frame image, determine the current frame image relative on described The two-value difference image of one frame image;
Determine the current frame image with the presence or absence of area-of-interest according to the two-value difference image;Wherein, described interested Region is the current frame image and the different region of previous frame image;
If it is determined that there are the area-of-interests for the current frame image, it is determined that all target codes of the current frame image Unit, for each target code unit, according to the positional relationship of the target code unit and the area-of-interest, Determine the inter-frame forecast mode of each target code unit;
According to the inter-frame forecast mode of each target code unit, the corresponding quantization parameter of each target code unit and described Current frame image, the data after determining the corresponding coding of the current frame image.
2. the method according to claim 1, wherein it is described if it is determined that the current frame image there are region of interest Domain, it is determined that all target code units of the current frame image, comprising:
If it is determined that there are area-of-interests for the current frame image, then by the coding unit of the current frame image, having a size of All coding units of 16*16 and 8*8 are determined as the target code unit of the current frame image.
3. method according to claim 1 or 2, which is characterized in that described according to current frame image and the present frame figure The previous frame image of picture determines two-value difference image of the current frame image relative to the previous frame image, comprising:
When the pixel value phase of the first pixel and the pixel of the corresponding position of the previous frame image of the current frame image Meanwhile determining that the gray value of the first pixel described in the two-value difference image is 0;
When the corresponding position of the second pixel and previous frame image of the current frame image pixel pixel value not When identical, determine that the gray value of the second pixel described in the two-value difference image is 255;
Correspondingly, determine the current frame image with the presence or absence of area-of-interest according to the two-value difference image, comprising:
When there are described in when the pixel that gray value is 255, determining that the current frame image exists in the two-value difference image Area-of-interest.
4. according to the method described in claim 3, it is characterized in that, it is described be directed to each target code unit, according to The positional relationship of the target code unit and the area-of-interest determines the inter-prediction of each target code unit Before mode, the method also includes:
In the two-value difference image, the number for the pixel that gray value is 255 and the pixel of the two-value difference image The ratio of total number when being greater than preset threshold, determine that the motor pattern of the current frame image is that background and prospect move;
In the two-value difference image, the number for the pixel that gray value is 255 and the pixel of the two-value difference image Total number ratio be less than or equal to the preset threshold when, determine the current frame image motor pattern be stationary background And foreground moving;
Correspondingly, the positional relationship according to the target code unit and the area-of-interest, determines each mesh Mark the inter-frame forecast mode of coding unit, comprising:
According to the motor pattern of the current frame image, and, the position of the target code unit and the area-of-interest Relationship determines inter-frame forecast mode and the corresponding adjustment of each target code unit of each target code unit Quantization parameter afterwards.
5. according to the method described in claim 4, it is characterized in that, the motor pattern according to the current frame image, with And the positional relationship of the target code unit and the area-of-interest, determine the interframe of each target code unit Prediction mode and the corresponding quantization parameter adjusted of each target code unit, comprising:
If the motor pattern of the current frame image is that background and prospect move:
When the pixel position for including in the target code unit with gray value in the two-value difference image is 255 is identical When pixel, determine that the inter-frame forecast mode of the target code unit is to have most in the first candidate inter-frame forecast mode set The inter-frame forecast mode of small rate distortion costs, the corresponding quantization parameter adjusted of the target code unit are that the target is compiled The corresponding quantization parameter of code unit subtracts one;Wherein, the described first candidate inter-frame forecast mode set includes: symmetry division SMP mould Formula, asymmetric segmentation AMP mode and intra prediction intra modes mode;
When the pixel position for not including in the target code unit with gray value in the two-value difference image is 255 is identical Pixel when, determine that the inter-frame forecast mode of the target code unit is to have in the second candidate inter-frame forecast mode set The inter-frame forecast mode of minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit are the target The corresponding quantization parameter of coding unit adds one;Wherein, the described second candidate inter-frame forecast mode set includes: to skip SKIP/ Merge mode, square segmentation Square mode and SMP mode;
If the motor pattern of the current frame image be stationary background and foreground moving:
When the pixel position for including in the target code unit with gray value in the two-value difference image is 255 is identical Pixel, also, do not include being in the coding unit around the target code unit with the two-value difference image gray value When the identical pixel in 255 pixel position, determine that the inter-frame forecast mode of the target code unit is third candidate frame Between there is in prediction mode set the inter-frame forecast modes of minimum rate distortion costs, after the corresponding adjustment of the target code unit Quantization parameter be the corresponding quantization parameter of the target code unit subtract one;Wherein, the third candidate inter-frame forecast mode Set includes: AMP mode and intra modes mode;
When the pixel position for including in the target code unit with gray value in the two-value difference image is 255 is identical Pixel, also, also include and gray value in the two-value difference image in the coding unit around the target code unit For 255 the identical pixel in pixel position when, determine that the inter-frame forecast mode of the target code unit is the 4th candidate There is the inter-frame forecast mode of minimum rate distortion costs, the corresponding adjustment of the target code unit in inter-frame forecast mode set Quantization parameter afterwards is that the corresponding quantization parameter of the target code unit subtracts three;Wherein, the described 4th candidate inter-prediction mould Formula set includes: Square mode and SMP mode;
When the pixel position for not including in the target code unit with gray value in the two-value difference image is 255 is identical Pixel when, determine that the inter-frame forecast mode of the target code unit is to have in the 5th candidate inter-frame forecast mode set The inter-frame forecast mode of minimum rate distortion costs, the corresponding quantization parameter adjusted of the target code unit are the target The corresponding quantization parameter of coding unit adds two;Wherein, the described 5th candidate inter-frame forecast mode set includes: SKIP/merge mould Formula and Square mode.
6. according to the method described in claim 4, it is characterized in that, described work as according to two-value difference image determination After prior image frame whether there is area-of-interest, the method also includes:
If it is determined that the area-of-interest is not present in the current frame image, then by the coding unit of the current frame image, All coding units having a size of 64*64 and 32*32 are determined as the target code unit of the current frame image;
The inter-frame forecast mode for determining the target code unit is to have minimum rate in the 6th candidate inter-frame forecast mode set The inter-frame forecast mode of distortion cost, the corresponding quantization parameter adjusted of the target code unit are the target code list The corresponding quantization parameter of member adds two;Wherein, the described 6th candidate inter-frame forecast mode set include: SKIP/merge mode and Square mode.
7. method according to claim 5 or 6, which is characterized in that the corresponding amount adjusted of the target code unit Change the value range of parameter are as follows:
Wherein, QP indicates institute The corresponding quantization parameter adjusted of target code unit is stated,Indicate 4 encoded volumes around the target code unit The average value of the corresponding quantization parameter adjusted of code unit.
8. a kind of Video coding compression set characterized by comprising
Two-value difference image determining module is determined for the previous frame image according to current frame image and the current frame image Two-value difference image of the current frame image relative to the previous frame image;
Area-of-interest determining module, for determining that the current frame image is emerging with the presence or absence of sense according to the two-value difference image Interesting region;Wherein, the area-of-interest is the current frame image and the different region of previous frame image;
First inter-frame forecast mode determining module, for if it is determined that the current frame image there are the area-of-interests, then really All target code units of the fixed current frame image, for each target code unit, according to the target code The positional relationship of unit and the area-of-interest determines the inter-frame forecast mode of each target code unit;
Coding module, for the inter-frame forecast mode according to each target code unit, the corresponding amount of each target code unit Change parameter and the current frame image, the data after determining the corresponding coding of the current frame image.
9. a kind of equipment, which is characterized in that the equipment includes:
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now Video coding compression method as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The Video coding compression method as described in any in claim 1-7 is realized when execution.
CN201811284900.8A 2018-10-31 2018-10-31 Video coding compression method, device, equipment and medium Active CN109379594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811284900.8A CN109379594B (en) 2018-10-31 2018-10-31 Video coding compression method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811284900.8A CN109379594B (en) 2018-10-31 2018-10-31 Video coding compression method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN109379594A true CN109379594A (en) 2019-02-22
CN109379594B CN109379594B (en) 2022-07-19

Family

ID=65390500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811284900.8A Active CN109379594B (en) 2018-10-31 2018-10-31 Video coding compression method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN109379594B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110072103A (en) * 2019-03-15 2019-07-30 西安电子科技大学 Video Fast Compression method, HD video system, 4K video system based on ROI
CN110519597A (en) * 2019-09-05 2019-11-29 北京佳讯飞鸿电气股份有限公司 A kind of coding method based on HEVC, calculates equipment and medium at device
CN110610150A (en) * 2019-09-05 2019-12-24 北京佳讯飞鸿电气股份有限公司 Tracking method, device, computing equipment and medium of target moving object
CN110611819A (en) * 2019-08-01 2019-12-24 杭州当虹科技股份有限公司 Coding method for improving quality of B frame in H.264
CN110728700A (en) * 2019-09-25 2020-01-24 北京佳讯飞鸿电气股份有限公司 Moving target tracking method and device, computer equipment and storage medium
CN113301342A (en) * 2021-05-13 2021-08-24 广州方硅信息技术有限公司 Video coding method, network live broadcast method, device and terminal equipment
CN117596394A (en) * 2024-01-18 2024-02-23 之江实验室 Depth map inter-frame compression method with self-adaptive precision
WO2024078106A1 (en) * 2022-10-10 2024-04-18 深圳市Tcl云创科技有限公司 Image frame sequence processing method and apparatus, computer device, and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030142748A1 (en) * 2002-01-25 2003-07-31 Alexandros Tourapis Video coding methods and apparatuses
CN1750658A (en) * 2004-09-14 2006-03-22 华为技术有限公司 Selecting method for predicting mode between frames
CN101090498A (en) * 2007-07-19 2007-12-19 华为技术有限公司 Device and method for motion detection of image
CN101159873A (en) * 2007-11-16 2008-04-09 中国科学院计算技术研究所 Inter-frame mode selecting method
US20090317062A1 (en) * 2008-06-24 2009-12-24 Samsung Electronics Co., Ltd. Image processing method and apparatus
CN103618900A (en) * 2013-11-21 2014-03-05 北京工业大学 Video region-of-interest extraction method based on encoding information
CN103679745A (en) * 2012-09-17 2014-03-26 浙江大华技术股份有限公司 Moving target detection method and device
CN104113754A (en) * 2014-07-17 2014-10-22 四川大学 Method for high-performance video interframe coding based on time domain relevance and transcoder thereof
US20150215498A1 (en) * 2014-01-28 2015-07-30 Realtek Semiconductor Corp. Device and method for using an overdrive function to do motion smoothing
CN107580217A (en) * 2017-08-31 2018-01-12 郑州云海信息技术有限公司 Coding method and its device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030142748A1 (en) * 2002-01-25 2003-07-31 Alexandros Tourapis Video coding methods and apparatuses
CN1750658A (en) * 2004-09-14 2006-03-22 华为技术有限公司 Selecting method for predicting mode between frames
CN101090498A (en) * 2007-07-19 2007-12-19 华为技术有限公司 Device and method for motion detection of image
CN101159873A (en) * 2007-11-16 2008-04-09 中国科学院计算技术研究所 Inter-frame mode selecting method
US20090317062A1 (en) * 2008-06-24 2009-12-24 Samsung Electronics Co., Ltd. Image processing method and apparatus
CN103679745A (en) * 2012-09-17 2014-03-26 浙江大华技术股份有限公司 Moving target detection method and device
CN103618900A (en) * 2013-11-21 2014-03-05 北京工业大学 Video region-of-interest extraction method based on encoding information
US20150215498A1 (en) * 2014-01-28 2015-07-30 Realtek Semiconductor Corp. Device and method for using an overdrive function to do motion smoothing
CN104113754A (en) * 2014-07-17 2014-10-22 四川大学 Method for high-performance video interframe coding based on time domain relevance and transcoder thereof
CN107580217A (en) * 2017-08-31 2018-01-12 郑州云海信息技术有限公司 Coding method and its device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TIANRUO ZHANG: "ROI based complexity reduction algorithm for H.264 encoder", 《2010 INTERNATIONAL SOC DESIGN CONFERENCE》, 23 November 2010 (2010-11-23) *
王明慧: "基于H.264的感兴趣区域视频编码研究", 《中国优秀硕士学位论文全文数据库》, 15 October 2014 (2014-10-15) *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110072103A (en) * 2019-03-15 2019-07-30 西安电子科技大学 Video Fast Compression method, HD video system, 4K video system based on ROI
CN110611819A (en) * 2019-08-01 2019-12-24 杭州当虹科技股份有限公司 Coding method for improving quality of B frame in H.264
CN110519597A (en) * 2019-09-05 2019-11-29 北京佳讯飞鸿电气股份有限公司 A kind of coding method based on HEVC, calculates equipment and medium at device
CN110610150A (en) * 2019-09-05 2019-12-24 北京佳讯飞鸿电气股份有限公司 Tracking method, device, computing equipment and medium of target moving object
CN110519597B (en) * 2019-09-05 2022-05-10 北京佳讯飞鸿电气股份有限公司 HEVC-based encoding method and device, computing equipment and medium
CN110728700A (en) * 2019-09-25 2020-01-24 北京佳讯飞鸿电气股份有限公司 Moving target tracking method and device, computer equipment and storage medium
CN113301342A (en) * 2021-05-13 2021-08-24 广州方硅信息技术有限公司 Video coding method, network live broadcast method, device and terminal equipment
WO2024078106A1 (en) * 2022-10-10 2024-04-18 深圳市Tcl云创科技有限公司 Image frame sequence processing method and apparatus, computer device, and storage medium
CN117596394A (en) * 2024-01-18 2024-02-23 之江实验室 Depth map inter-frame compression method with self-adaptive precision
CN117596394B (en) * 2024-01-18 2024-05-24 之江实验室 Depth map inter-frame compression method with self-adaptive precision

Also Published As

Publication number Publication date
CN109379594B (en) 2022-07-19

Similar Documents

Publication Publication Date Title
CN109379594A (en) Video coding compression method, device, equipment and medium
KR102125956B1 (en) Method for encoding/decoing video using intra prediction and apparatus for the same
CN106416254B (en) Evaluation stage is skipped during media coding
CN105917648B (en) Intra block with asymmetric subregion replicates prediction and coder side search pattern, search range and for the method for subregion
CN102256136B (en) Improved interpolation of video compression frames
CN112087629B (en) Image prediction method, device and computer readable storage medium
CN105659602B (en) Coder side option for the intra block duplication prediction mode that video and image encode
CN102845060B (en) Data compression for video
RU2544799C2 (en) Moving image encoding device, moving image decoding device, moving image encoding method and moving image decoding method
CN101491107B (en) Method for decoding image element group, related encoder and decoder
CN103957415B (en) CU dividing methods and device based on screen content video
CN110248196A (en) Method and apparatus for palette encoding and decoding
CN108605143A (en) The method and apparatus of non local adaptive in-loop filter in Video coding
WO2012008125A1 (en) Video encoding device, video decoding device, video encoding method, and video decoding method
CN105532007A (en) Adaptive deblocking filtering for non-luma components in video coding
CN104247434A (en) Loop filtering around slice boundaries or tile boundaries in video coding
CN110519591B (en) Method for quickly selecting prediction mode based on intra-frame coding in multipurpose coding
WO2016074746A1 (en) Systems and methods for mask based processing of a block of a digital image
CN104702959B (en) A kind of intra-frame prediction method and system of Video coding
EP4268463A1 (en) Switchable dense motion vector field interpolation
Kadaikar et al. Joint disparity and variable size-block optimization algorithm for stereoscopic image compression
Wang et al. UHD video coding: A light-weight learning-based fast super-block approach
CN101179731A (en) Obtaining a motion vector in block-based motion estimation
CN113489976A (en) Predictive coding method and device and electronic equipment
JP2015144324A (en) Image encoder, image decoder, image encoding method and image decoding method

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