CN106454341B - A kind of HEVC prediction mode fast selecting method based on scene switching - Google Patents

A kind of HEVC prediction mode fast selecting method based on scene switching Download PDF

Info

Publication number
CN106454341B
CN106454341B CN201610880508.4A CN201610880508A CN106454341B CN 106454341 B CN106454341 B CN 106454341B CN 201610880508 A CN201610880508 A CN 201610880508A CN 106454341 B CN106454341 B CN 106454341B
Authority
CN
China
Prior art keywords
frame
value
scene switching
prediction mode
average
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610880508.4A
Other languages
Chinese (zh)
Other versions
CN106454341A (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.)
Nanjing Post and Telecommunication University
Original Assignee
Nanjing Post and Telecommunication University
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 Nanjing Post and Telecommunication University filed Critical Nanjing Post and Telecommunication University
Priority to CN201610880508.4A priority Critical patent/CN106454341B/en
Publication of CN106454341A publication Critical patent/CN106454341A/en
Application granted granted Critical
Publication of CN106454341B publication Critical patent/CN106454341B/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/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/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/142Detection of scene cut or scene change

Abstract

The invention discloses a kind of, and the HEVC prediction mode fast selecting method based on scene switching records the luminance component composition gray level image of each frame image first when reading input YUV file;Each frame gray level image is all compressed into the index map of M × M format using interpolation method;Calculate the average value V of M × M gray valueaverage, by each sum of the grayscale values VaverageIt is compared, obtains the binary fingerprints sequence of M × M bit length of every frame image;For front and back two field pictures, its fingerprint sequence is compared, the different number dNum of statistics corresponding position binary value generates Hash index;It is greater than the current frame image of threshold value T for Hash index, is determined as scene switching frame, is set to I frame when frame type is arranged, carries out predictive coding by I frame, otherwise do not do any operation.The present invention can quickly detect the scene switching frame in video, and will not influence other correlation optimization accelerating algorithms, will not change coding quality.It can be used in conjunction with existing HEVC quick predict algorithm.

Description

A kind of HEVC prediction mode fast selecting method based on scene switching
Technical field
The invention belongs to field of video encoding, are related to one kind in HEVC standard Video coding, by detecting scene switching The method of frame realization quick predict model selection.
Background technique
Newest video encoding and decoding standard HEVC (High Efficiency Video Coding) is many due to using New technology, obtain it is twice before H.264 and the compression efficiency of the coding standards such as MPEG-4.But these new technologies exist While obtaining more preferable coding quality in high-resolution video coding, but also the encoder complexity of HEVC greatly promotes.In order to It can reduce encoding overhead, reduce the scramble time, adapt to the demand of coding application, the various fast coding algorithm quilts about HEVC Constantly propose.
HEVC salient feature the most is to use quad-tree structure, different from 16 × 16 relatively simple before fixed rulers Very little macroblock coding unit, HEVC use four layers of coding structure.Luma unit layer respectively corresponds coded scale from the 0th layer to the 3rd Very little 64 × 64,32 × 32,16 × 16 and 8 × 8.Meanwhile HEVC has also introduced the concept that CU, PU and TU are combined, in different layers Various possible encoding overheads are fully considered on secondary, basic process is: a frame image is divided into different CU units first, Several PU units are divided into according to its specific features again to each CU when carrying out predictive coding, again when carrying out transition coding Each CU block is divided into several TU units according to the concrete property of CU block, finally therefrom chooses forced coding mode and ginseng Number.
About prediction mode selected section therein, that is, the division of PU is related generally to, with the canonical reference software of HEVC For HM16.0, for non-intra prediction frame, it will traverse and compare in SKIP mode, 8 kinds of inter-frame forecast modes and 2 kinds of frames Prediction mode.This comparison is using rate distortion costs function as measure.In order to obtain rate distortion costs function, for every A kind of candidate pattern requires to carry out a series of calculation process.And these processing, especially the estimation mould of inter-frame mode Block is especially time-consuming.If the certain characteristics that can be showed according to CU block, are reduced as far as PU candidate pattern, then The processing that can carry out some modules less, to save the predictive coding time.
It is many currently based on the fast mode decision algorithm of such consideration, than what is detected if any many image similarities Algorithm has based on image histogram comparison, has PSNR analysis and Feature Points Matching.Although such algorithm comparison is accurate, for each Kind transformation is with strong applicability, such as rotational invariance and grey scale change.But generally than relatively time-consuming, and will not in general video There are these complicated situations.Video coding application scenarios higher for requirement of real-time, the detection method being simple and efficient is more Add and gears to actual circumstances.
Summary of the invention
The technical problem to be solved by the present invention is to complicated for algorithm existing for above-mentioned fast mode decision algorithm, time-consuming Defect, in encoded video when there are certain scene switching, by the realization for quickly detecting scene switch frame (discontinuous frame) To the fast mode decision of switch frame coding, to improve the treatment effeciency of coding.
For this purpose, the present invention proposes a kind of HEVC prediction mode fast selecting method based on scene switching, technical solution packet Include following steps:
Step A: when reading input YUV file, the luminance component for recording each frame image constitutes gray level image;
Step B: each frame gray level image is all compressed into the index map of M × M format using interpolation method;
Step C: for the index map of each frame image, following operation is all taken:
(1) the average value V of this M × M gray value is calculatedaverage
(2) by each sum of the grayscale values VaverageIt is compared, the label greater than average value is 1 ", is less than or equal to average value Label be 0 ", so can get the binary fingerprints sequence of M × M bit length of every frame image;
Step D: for front and back two field pictures, their fingerprint sequence is compared, statistics corresponding position binary value is different Number is denoted as the dNum of this two field pictures;
Step E: the difference of the two neighboring dNum in front and back is calculated, rear value subtracts preceding value, as Hash index;
Step F: being greater than Hash index the current frame image of threshold value T, be determined as scene switching frame, in setting frame It is set to I frame when type, directly predictive coding can be carried out by I frame during predictive coding later, otherwise not appoint What is operated, and all modes are still traversed in predictive coding.
Preferably, the interpolation method in step B is bilinear interpolation.
Preferably, the value of M is 8 in step B, this index map size is adjustable, and effect is roughly the same, but increases Calculation amount.
The value range of threshold value T is 9~13 in step F.It is best for 10 effect that experimental results demonstrate values, can be upper and lower Floating 1~3.
Compared with prior art, the beneficial effects of the present invention are:
1, the scene switching frame in video can be detected quickly.Implantation volume is carried out in standard code software The time of outer occupancy can almost be ignored.Experiment display, even in the less video of scene switching, as long as average every 15s Primary switching occurs, total encoding time not will increase.And this condition be all for videos most of in practical application can be with Reach.It is of course also possible to be arranged one in the cfg configuration file of HEVC standard reference software HM as other accelerating algorithms A switch is opened in related application occasion and is used.
2, the scene switching frame in video can be detected effectively.The video sequence experiment of a large amount of different parameters It all shows, which can obtain 95% or more Detection accuracy.After Hash Index, for different motion characteristic Video have good applicability, probability all very littles of erroneous detection and missing inspection.Meanwhile for the field of science fiction movies trailer etc Scape switches especially frequent video sequence, and acceleration effect is quite obvious.
3, which will not influence other correlation optimization accelerating algorithms, only provides a shortcut for scene switching frame and shifts to an earlier date Correctly coding is completed, coding quality will not be changed.It is not be overlapped with existing HEVC quick predict algorithm, it can be used in conjunction with, There is no limit conditions.
Detailed description of the invention
Fig. 1 is flow chart of the invention.
Specific embodiment
Now in conjunction with attached drawing, specific embodiments of the present invention are further described in detail.
The present invention is based on rules such a in predictive encoding of video, i.e., can basis for non-intra prediction encoding unit The correlation degree of current coded unit and coding unit before selects predictive coding mode;But if current coded unit with Coding unit is all not in contact with before, then finally being bound to select frame mode as forced coding mode by traversal.Cause And for such coding unit, it may be considered that skip most of ergodic processes, forced coding is directly selected in frame mode Mode.To reduce a large amount of selection calculation processing, code efficiency is improved.Typical scene switching frame is exactly so a kind of volume The set of code unit.Scene switching frame occurs in the junction (i.e. the discontinuous movement of shooting picture) of two scenes, and front and back is single Relevance is substantially not present in the coding of member, i.e., without referential.If it is possible to accurately detect scene switching in video Frame, then can greatly simplify for the predictive coding of these frames, the predictive coding time of these frames can also be greatly shortened. How rapidly and accurately core of the invention thought is that detect scene switching frame, and then is integrated to the choosing of quick predict mode Among selecting.
Present invention is generally directed to mean value Hash (aHash) algorithms to be improved, and enable scene in adaptive video and cut Change the application environment of detection.Image similarity detection based on mean value hash algorithm has had been applied in many occasions, such as The picture searching of Google.But the detection of scene switching in video is different.For different motion severe degree Continuous videos segment, the otherness between frame are different.Experiment shows the adjacent company in the video clip of some motion intenses The diversity factor of continuous frame has been over the diversity factor under some scene switching situations.Thus, in video scene change detection, need Similar the concept that violent diversity factor compares is moved forward and backward to distinguish whether occurrence scene switches, that is, needs similar second difference The concept divided.
Experimental data proves that the size of this index map M × M is adjustable, and effect is roughly the same, but increases calculation amount. When taking 8*8 size, the video sequence of 1080P format (1920*1080) range is arrived for the QCIF format (176*144) having verified that Column can obtain good effect, can better adapt to the demand of real-time coding.
Wherein the acquisition of threshold value T value 10 is obtained by lot of experimental data.What is provided such as table 1 is in a large amount of standards The common successive frame and the percentage in the Hash Index difference section of switch frame come out in the experimental result that sequence obtains.
Different Hash Index value percentages in 1 successive frame of table and switch frame
As can be seen from the table, take threshold value that can obtain very high accuracy in detection for 10.To demonstrate this method Reliability.
The promotion that former reference software obtains in practical applications is encoded compared to HEVC about the present invention, passes through experimental data It is substantially obtained with theoretical calculation as follows.
Lot of experimental data shows the scramble time (T of the switch frame encoded in a manner of I framesf) typically as the non-frame side I The common successive frame scramble time (T of formula codingnf) 6~14 times, which is denoted as M, i.e.,
Tsf=TnfM (1)
Experiment display, the method for the present invention can will be reduced to the total time of switch frame original N times (usually 47%~ 58%).
Defining switching rate (SR) is to switch number of frames (Num in videosf) and video totalframes (Numtf) ratio, it may be assumed that
SR=Numsf/Numtf (2)
So, for same video sequence, the coding total time (T of this method is not usedref) can calculate as follows
Tref=TnfNumnf+TsfNumsf (3)
Wherein NumnfIndicate the frame number of common successive frame, and
Numnf=Numtf-Numsf (4)
Using the coding total time (T after this methodpro) be
Tpro=TnfNumnf+TsfNumsfN (5)
Scramble time (the T of reductiondecrease) be
Tdecrease=Tref-Tpro=(1-N) NumsfTsf (6)
Time saving rate (TS) is
(1)~(6) formula substitution (7) can be calculated:
Take switching rate SR=3%, M=10, N=50%, the theoretical speed-raising rate TS=11.81% of entire video sequence.
Abundant experimental results show, practical speed-raising rate and theoretical value very close to, it is contemplated that this method detects the time of itself Consumption, actual value all can be smaller than theoretical value.Test and can obtain to approach the video sequence of above-mentioned SR characteristic, TS is usually 7% or so.
The present invention is improved due to only having carried out speed-raising to scene switching frame, does not carry out the fast mode decision of normal frames Processing, thus can be used simultaneously with most of fast schema selection methods, it obtains and higher speed-raising is used alone than the two Rate.Present invention employs three acceleration switches adopted in newer several HM versions to carry out further experiment.These three accelerate Switch is respectively as follows: CFM, ECU and ESD.Experimental data is shown, under normal circumstances, opens these three acceleration switches, when can be by encoding Between be reduced to original 30%~60%.Due to encoding the total time (T in (7) formularef) be greatly decreased, thus use this method Speed-raising rate (TS) afterwards is higher.
On the basis of opening these three acceleration switches, whether comparison uses two kinds of situations of the method for the present invention, actually obtains The further speed-raising rate obtained is 9% or so.
Thus, the method for the present invention is superimposed on other most of fast mode decision algorithms, bigger speed-raising can be obtained Rate.
It should be noted that data described above are only obtained by a specific embodiment of the invention, not to limit The present invention, all within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in this Within the protection scope of invention.

Claims (4)

1. a kind of HEVC prediction mode fast selecting method based on scene switching, it is characterised in that the following steps are included:
Step A: when reading input YUV file, the luminance component for recording each frame image constitutes gray level image;
Step B: each frame gray level image is all compressed into the index map of M × M format using interpolation method;
Step C: for the index map of each frame image, following operation is all taken:
(1) the average value V of this M × M gray value is calculatedaverage
(2) by each sum of the grayscale values VaverageIt is compared, the label greater than average value is 1 ", less than or equal to the label of average value For " 0 ", the binary fingerprints sequence of M × M bit length of every frame image so can get;
Step D: for front and back two field pictures, comparing their fingerprint sequence, counts the different number of corresponding position binary value, It is denoted as the dNum of this two field pictures;
Step E: the difference of the two neighboring dNum in front and back is calculated, rear value subtracts preceding value, as Hash index;
Step F: being greater than Hash index the current frame image of threshold value T, be determined as scene switching frame, in setting frame type When be set to I frame, during predictive coding later can directly by I frame carry out predictive coding, otherwise not be any behaviour Make, all modes are still traversed in predictive coding.
2. a kind of HEVC prediction mode fast selecting method based on scene switching as described in claim 1, it is characterised in that Interpolation method in step B is bilinear interpolation.
3. a kind of HEVC prediction mode fast selecting method based on scene switching as described in claim 1, it is characterised in that The value of M is 8 in step B.
4. a kind of HEVC prediction mode fast selecting method based on scene switching as claimed in claim 3, it is characterised in that The value range of threshold value T is 9~13 in step F.
CN201610880508.4A 2016-10-09 2016-10-09 A kind of HEVC prediction mode fast selecting method based on scene switching Active CN106454341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610880508.4A CN106454341B (en) 2016-10-09 2016-10-09 A kind of HEVC prediction mode fast selecting method based on scene switching

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610880508.4A CN106454341B (en) 2016-10-09 2016-10-09 A kind of HEVC prediction mode fast selecting method based on scene switching

Publications (2)

Publication Number Publication Date
CN106454341A CN106454341A (en) 2017-02-22
CN106454341B true CN106454341B (en) 2019-06-04

Family

ID=58172763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610880508.4A Active CN106454341B (en) 2016-10-09 2016-10-09 A kind of HEVC prediction mode fast selecting method based on scene switching

Country Status (1)

Country Link
CN (1) CN106454341B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344676B (en) * 2018-11-22 2021-09-24 福州图腾易讯信息技术有限公司 Automatic induction triggering method and system based on Hash algorithm

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677398A (en) * 2008-09-19 2010-03-24 三星电子株式会社 Scene switching code rate control method
CN102630013A (en) * 2012-04-01 2012-08-08 北京捷成世纪科技股份有限公司 Bit rate control video compression method and device on basis of scene switching
CN104410863A (en) * 2014-12-11 2015-03-11 上海兆芯集成电路有限公司 Image processor and image processing method
CN104883572A (en) * 2015-05-21 2015-09-02 浙江宇视科技有限公司 H.264 or H.265-based foreground and background separation coding equipment and method
CN105191316A (en) * 2013-03-15 2015-12-23 罗伯特·博世有限公司 Switching apparatus for switching compressed video streams, conference system with the switching apparatus and process for switching compressed video streams

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9888240B2 (en) * 2013-04-29 2018-02-06 Apple Inc. Video processors for preserving detail in low-light scenes

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101677398A (en) * 2008-09-19 2010-03-24 三星电子株式会社 Scene switching code rate control method
CN102630013A (en) * 2012-04-01 2012-08-08 北京捷成世纪科技股份有限公司 Bit rate control video compression method and device on basis of scene switching
CN105191316A (en) * 2013-03-15 2015-12-23 罗伯特·博世有限公司 Switching apparatus for switching compressed video streams, conference system with the switching apparatus and process for switching compressed video streams
CN104410863A (en) * 2014-12-11 2015-03-11 上海兆芯集成电路有限公司 Image processor and image processing method
CN104883572A (en) * 2015-05-21 2015-09-02 浙江宇视科技有限公司 H.264 or H.265-based foreground and background separation coding equipment and method

Also Published As

Publication number Publication date
CN106454341A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
RU2377737C2 (en) Method and apparatus for encoder assisted frame rate up conversion (ea-fruc) for video compression
CN105917648B (en) Intra block with asymmetric subregion replicates prediction and coder side search pattern, search range and for the method for subregion
JP2013085287A (en) Content classification for multimedia processing
WO2007055158A1 (en) Dynamic image encoding method, dynamic image decoding method, and device
KR20080068716A (en) Method and apparatus for shot detection in video streaming
CN112188196A (en) Method for rapid intra-frame prediction of general video coding based on texture
CN100428801C (en) Switching detection method of video scene
CN114222145A (en) Low-complexity rapid VVC intra-frame coding method
US8379985B2 (en) Dominant gradient method for finding focused objects
CN107820095B (en) Long-term reference image selection method and device
CN105872556B (en) Video encoding method and apparatus
EP1940175A1 (en) Image encoding apparatus and memory access method
TW202205852A (en) Encoding and decoding method, apparatus and device thereof
CN102196253B (en) Video coding method and device based on frame type self-adaption selection
CN113382249B (en) Image/video encoding method, apparatus, system, and computer-readable storage medium
CN106454341B (en) A kind of HEVC prediction mode fast selecting method based on scene switching
CN1457196A (en) Video encoding method based on prediction time and space domain conerent movement vectors
WO2023155445A1 (en) Rate distortion optimization method and apparatus based on motion detection
CN103905818A (en) Method for rapidly determining inter-frame prediction mode in HEVC standard based on Hough conversion
CN104410863B (en) Image processor and image processing method
CN109274970B (en) Rapid scene switching detection method and system
Jie et al. A novel scene change detection algorithm for H. 264/AVC bitstreams
Tan et al. A new error resilience scheme based on FMO and error concealment in H. 264/AVC
CN114339431B (en) Time-lapse coding compression method
CN103856780A (en) Video encoding method, decoding method, encoding device and decoding device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant