CN103888770B - A kind of video code conversion system efficiently and adaptively based on data mining - Google Patents

A kind of video code conversion system efficiently and adaptively based on data mining Download PDF

Info

Publication number
CN103888770B
CN103888770B CN201410098019.4A CN201410098019A CN103888770B CN 103888770 B CN103888770 B CN 103888770B CN 201410098019 A CN201410098019 A CN 201410098019A CN 103888770 B CN103888770 B CN 103888770B
Authority
CN
China
Prior art keywords
video
decision tree
motion vector
macro block
macroblock mode
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.)
Expired - Fee Related
Application number
CN201410098019.4A
Other languages
Chinese (zh)
Other versions
CN103888770A (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 University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201410098019.4A priority Critical patent/CN103888770B/en
Publication of CN103888770A publication Critical patent/CN103888770A/en
Application granted granted Critical
Publication of CN103888770B publication Critical patent/CN103888770B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

This application discloses a kind of system of video code conversion efficiently and adaptively based on data mining and method, this method to comprise the following steps:Step 1, the video to be transcoded for inputting the first compression standard;Step 2, the video to be transcoded is decoded, generate video to be encoded, and extract the decoded information of each macro block of each frame of video;Step 3, the decoded information extracted is input to coded macroblock mode decision tree, determines each macro block of each frame of video of video to be encoded by the coded macroblock mode of use by coded macroblock mode decision tree;Step 4, the motion vector of coded macroblock mode and each macro block determined by, the coding of second compression standard is carried out to each macro block of each frame of video of video to be encoded, so as to be the video after the transcoding of the second compression standard by Video coding to be encoded.

Description

A kind of video code conversion system efficiently and adaptively based on data mining
Technical field
The invention belongs to Video coding, video code conversion field, more particularly to regarding efficiently and adaptively based on data mining Frequency trans-coding system, it can be decoded to the video of different coding form, different code checks, different resolution, and be recompiled, So as to the video of transcoding to the coded format of meet demand, code check and resolution ratio.
Background technology
The technical scheme of prior art one
The video code conversion of the low complex degree of MPEG-2/H.263 under resolution ratio → H.264 such as it is accomplished that in prior art one Technology, it finds MPEG-2/H.263 decoded information and H.264 contacting between coding information using the method for machine learning, So as to set up the mechanism of coding side fast coding, fast transcoding process is realized.Prior art one assumes decoding end MPEG-2/ H.263 the coding mode of the CBP of macro block, coding mode, average and variance and coding side H.264 macro block associates in the presence of certain, profit With these data of Weka J48 classifier trainings and obtain decision tree.Fig. 1,2 show that the video by taking MEPG → H.264 as an example turns Code process.
Macro block mode decision tree is applied in the transcoding process of actual MPEG-2/H.263 → H.264, it is real-time from decoder Residual information, CBP, the coding mode of macro block are obtained, encoder-side is passed it to, the grand of coding is quickly adjudicated by decision tree Block pattern, compiled entirely without complete solution, so as to reduce transcoding complexity.
The shortcomings that prior art one
1. balance between preferable quality and bit rate can be obtained for the video sequence of small in resolution, for big Video and the preferable video of definition, it is larger to obtain the fluctuation of approximate image quality condition bit rate.
2. the single quantization parameter of a utilization(QP=25)Decision-tree model realize transcoding flow, in actual transcoding, each The QP of macro block is different in frame of video, utilizes to be transcoded video of the decision-tree model of QP=25 for QP near 25 Transcoding effect is preferable, but the transcoding effect to deviateing 25 QP videos farther out is bad.Because in application decision tree-model When need the threshold value in the model of training is adjusted, at this moment use quantizing factor.During QP=25, quantizing factor 1;QP is big When 25, often increase by 1 quantizing factor and decline 12.5%;When QP is less than 25, often declines 1 quantizing factor and increase by 12.5% so when actual When video QP to be transcoded is away from 25, the effect of quantizing factor is larger, it is impossible to is matched very well with the decision-tree model of QP=25.Therefore The accommodation of single QP decision trees is not extensive.
The technical scheme of prior art two
Prior art two such as is accomplished that at the Video Transcoding Technology of MPEG-2 under resolution ratio → H.264.Technology two is equally sharp With the residual information, CBP, coding mode of decoding end, decision-making is carried out to coding side macro block mode.It is different from prior art one It is that prior art two is classified using Jrip graders to macro block mode, the structure of decision tree is as shown in Figure 3.
Macro block mode is divided into 2 classes using Jrip sorting techniques in node 1 first, is node 2 and node 3 respectively.Then Node 2 carries out the traversal of macro block mode, and node 3 point is 2 classes using Jrip, and one kind is 8 × 8, and it is grand that one kind is that node 4 is included Block pattern.Finally to node 4 be left the traversal of 3 kinds of macro block modes.
The form that Jrip methods obtain decision tree is a rule rule statements, rather than the form of binary tree, is simplified certainly The code of plan tree, there is preferable transplantability.The Jrip training results of realization are applied in transcoding process, it is possible to achieve quick Transcoding.
The shortcomings that prior art two
1. only node 1 and node 3 have used Jrip graders, node 2 and node 4 are compiled entirely with original complete solution H.264 Technology, so being further improved.
2. the single quantization parameter of a utilization(QP=25)Decision tree realize transcoding flow, treat QP near 25 wait turn The transcoding effect of code video is preferable, but video QP to be transcoded deviates 25 transcoding farther out and poor fitting occurs(Effect is bad), Therefore the accommodation of single QP decision trees is not extensive.
It is miscellaneous in order to avoid being limited to the description of this specification, by passing through below with reference to document for relevant above-mentioned background technology Quote and be herein incorporated in full.
1、Fernández-Escribano,G.,Bialkowski,J.,Gámez,J.A.,Kalva,H.,Cuenca,P., Orozco-Barbosa,L.,Kaup,A.Low-Complexity Heterogeneous Video Transcoding Using Data Mining.IEEE Transaction on Multimedia,2008;
2、Fernández-Escribano,H.Kalva,J.L.Martinez,P.Cuenca,An MPEG-2to H.264video transcoder in the baseline profile.IEEE Transaction on Multimedia, 2010。
The content of the invention
The macro block mode decision tree used in prior art one is single (QP=25 of decision tree), is actually being turned In code application, the adaptability of single decision tree is not strong.Because encoder is in video coding process, when video to be transcoded QP with Single QP(25)The residual information and the residual information uniformity of model obtained when differing more, during actual transcoding is poor, then Single QP models cannot be well adapted to.In the present invention, the macro block mode decision-making of three different Q P (16,25,36) is trained Tree, three decision trees can better adapt to different Q P scopes(Usual range QP=12-40)Interior video code conversion strategy.In reality In transcoding, optimal decision tree discrimination model can be adaptive selected according to each macro block QP of the every frame of input video size, Not only reduce the transcoding time, and effectively reduce the decline of transcoded quality.
The performance of video code translator is relevant with the quality of decision tree.In order to preferably reduce the transcoding time, and ensure to turn Code quality will not decline to a great extent, and the present invention uses joint J48 graders and Jrip graders, realizes the structure to model.J48 points Class device is good for the training performance compared with subclassification data set, but huge to the training result of more categorized data set;Jrip Grader is higher for the classification accuracy of data set, and the training result that training obtains has very strong code writing ability And portability.With reference to the advantage of two kinds of graders, the performance of video code conversion can get a promotion.
In order to further improve the performance of video code translator, the present invention proposes one kind and is based on macro block mode and motion vector The efficient self-adapted Video Transcoding Technology of decision tree, the i.e. coding side in transcoding process are cascaded, it is fast using macro block mode decision tree Speed selection coding macro block mode used, it is fast using the motion vector decision tree trained on the basis of selected macro block mode The motion vector of speed selection present encoding block.Because quick selection macro block mode instead of the traversal of all macro block modes, simultaneously The quick judgement of motion vector instead of the motion search process in a wide range of, therefore, the method for the cascade decision tree newly proposed The performance of existing video code translator is significantly improved, is a kind of new method.
The present invention not only realizes etc. the Video Transcoding Technology under resolution ratio using the method for cascading decision tree, and realizes Video Transcoding Technology under resolution decreasing, disclosure satisfy that the demand of different terminal equipment.Meanwhile the present invention can be according to video The transcoding flow of the different ratios selection different Q P decision trees of code check, not only ensure that the transcoding of video under high code check before and after transcoding Quality, and improve the performance of transcoder under low bit- rate.
In brief, the present invention realizes a kind of video code translator efficiently and adaptively based on data mining, main complete Into be the transcoding technology of the transcoding technology of MPEG-2 → H.264 and H.263 → H.264.For conventional similar technique, this hair The bright method using Multiple trees, in the case where maintaining essentially identical transcoding speed, transcoding backsight can be improved well The subjective quality of frequency.
According to an embodiment of the invention, there is provided a kind of video transcoding method efficiently and adaptively based on data mining, Comprise the following steps:Step 1, the video to be transcoded for inputting the first compression standard;Step 2, the video to be transcoded is entered Row decoding, generates video to be encoded, and extract the decoded information of each macro block of each frame of video;Step 3, by what is extracted Decoded information is input to coded macroblock mode decision tree, and the every of video to be encoded is determined by coded macroblock mode decision tree Each macro block of individual frame of video is by the coded macroblock mode of use;Step 4, the coded macroblock mode and every determined by The motion vector of individual macro block, the coding of the second compression standard is carried out to each macro block of each frame of video of video to be encoded, So as to be the video after the transcoding of the second compression standard by Video coding to be encoded.
Beneficial effects of the present invention essentially consist in the following aspects:1. on the basis of transcoded quality is improved, using base In macro block mode and the cascade decision tree decision method of motion vector, transcoding efficiency is further improved, improves the performance of transcoder; 2. it is not only able to realize the fast transcoding process of MPEG-2/H.263 → H.264 in the case where waiting resolution ratio, moreover it is possible to realize resolution decreasing The transcoding flow of lower video, substantially improve the transcoding performance of video under low resolution low bit- rate;3. can be according to actual requirement Video code conversion before and after the different ratios of code stream carry out adaptive carry out transcoding, expanded the application of Video Transcoding Technology.
Specifically, the present invention is quickly adjudicated H.264 macro block mode using three different Q P decision trees, is ensureing to regard On the premise of frequency quality, the transcoding time of MPEG-2/H.263 → H.264 is greatly reduced, and for low QP's and high QP Input video can obtain preferable transcoding performance.Second, the present invention is true in macro block mode using the model for cascading decision tree On the basis of fixed, for partial mode, horizontal motion vector vertical direction is transported using motion vector decision tree respectively Dynamic vector is quickly adjudicated, and after the motion vector for obtaining current macro, can also be transported in the range of 2 whole pixel precisions Dynamic search, it is possible to achieve the Exact Reconstruction of video image.Searched because the quick selection of motion vector instead of motion on a large scale Rope, therefore, the time of video code conversion are further reduced, and the transcoding technology compiled entirely relative to complete solution, this transcoding time can save 80% Left and right.3rd, under complex environment, this Video Transcoding Technology can be adaptive selected not according to the ratio of code stream before and after transcoding With the transcoding flow of QP decision trees, to obtain optimal transcoding effect.4th, MPEG-2/H.263 → H.264 it is available with etc. The similar transcoding flow of resolution ratio realizes the video code conversion under resolution decreasing, compared with existing resolution decreasing technology, transcoding time All had some improvement with transcoded quality.
Brief description of the drawings
Fig. 1 is the MPEG-2 → H.264 of prior art transcoding decision tree generation block diagram;
Fig. 2 is the schematic diagram for the MPEG-2 macro block mode decision tree structures for showing prior art;
Fig. 3 is the schematic diagram for the decision tree structure for showing prior art;
Fig. 4 is the video code conversion framework sketch according to an embodiment of the invention based on data mining model;
Fig. 5 is the block diagram of data mining model according to an embodiment of the invention;
Fig. 6 shows H.264 macro block and the coding mode of sub-macroblock;
Fig. 7 shows the Multiple trees model of H.264 coded macroblocks;
Fig. 8 shows MPEG-2/H.263 decoded informations and the H.264 data mode of macro block mode;
Fig. 9 shows the signal according to an embodiment of the invention that different decision trees are selected according to code check ratio before and after transcoding Figure;
Figure 10 shows the decision-making of the motion vector of 16 × 16 times QP=25 of macro block mode according to an embodiment of the invention Tree;
Figure 11 shows the schematic diagram of the macro block information mapping under resolution decreasing according to an embodiment of the invention;
Figure 12 shows the functional structure chart of video code conversion platform according to an embodiment of the invention;
Figure 13 shows the example of WEKA arff document format datas;
Figure 14 shows the example of the training result of J48 graders according to an embodiment of the invention;
Figure 15 shows the example of the training result of Jrip graders according to an embodiment of the invention.
Embodiment
Below, it is described in further detail with reference to implementation of the accompanying drawing to technical scheme.
It will be appreciated by those of skill in the art that although the following description is related to relevant video coding and decoding technology and decision-making Many details of tree classification technology(Such as specific video format before and after transcoding, the training method of decision tree, decoded information and point The composition of category information), but be only for the example of the principle for illustrating the present invention and do not mean that any restrictions.Energy of the present invention It is enough to be applied to be different from the occasion outside ins and outs exemplified below, other regarded for example, existing and being likely to occur in the future Frequency compression standard, other decision tree training methods, without departing from the principle and spirit invented.
First, the general principle of the present invention is summarized.
In general, video code translator include decoder and encoder.The video code translator that complete solution is compiled entirely be than relatively time-consuming, The mainstream technology realized now is to carry out fast coding using client information is decoded in coding side, to reduce the transcoding time.Video The target of transcoding is on the premise of actual demand is met, the use time as few as possible is simultaneously kept under the picture quality after transcoding Drop is seldom.Current video transcoding mainly includes the transcoding between code check conversion, conversion of resolution and different code streams.
In order to accelerate the speed of video code conversion and ensure the quality of video code conversion, the present invention proposes a series of method Improve the performance of Video Transcoding Technology.The present invention is accomplished that the efficient self-adapted video code conversion skill based on data digging method Art, what is mainly completed is the fast transcoding and H.263 → fast transcoding H.264 of MPEG-2 → H.264.
Fig. 4 is the video code conversion framework sketch based on data mining model in the present invention.It is as shown in figure 4, high in this technology The framework of effect transcoder includes two large divisions:Decoder and encoder, link together by data mining model between the two. Assuming that the decoded Video stream informations of MPEG-2/H.263(CBP, pattern, average, variance, motion vector)With H.264 coding side Macro block mode or motion vector in the presence of certain associate, collect these data, utilize machine learning method excavate MPEG-2/ H.263 decoded information and H.264 contacting between coding information, establish categorised decision tree.After being trained by mass data, obtain The good decision tree of performance, and decision tree is applied in actual transcoding process, it is possible to achieve MPEG-2 → H.264 and H.263 → H.264 fast transcoding.In technology realization, method such as Fig. 5 using cascade decision tree enters to macro block mode and motion vector The quick judgement of row, so as to avoid the traversal selection of macro block mode and the extensive search of motion vector, it is complicated to reduce coding Degree, realizes the decline of transcoding time.
Before video code conversion is carried out, first have to be trained to obtain two decision-tree models with the mode of machine learning:One is H.264 coding side macro block mode decision tree and motion vector decision tree.Two decision trees are the relations of cascade, i.e., in macro block mode It is the application of motion vector decision tree after decision tree application.The purpose of training pattern is to obtain classification accuracy height and move The good decision tree of plant property.
Macro block mode decision model is the coding mode to coding side H.264(9 kinds)Carry out Fast Classification and apply. H.264 the macro block mode of infra-frame prediction is Intra, and the macro block mode of inter prediction removes Skip(Motion residuals are 0)Outside, also have 16 × 16,16 × 8,8 × 16,8 × 8,8 × 4,4 × 8,4 × 4, as shown in Figure 6.
In an embodiment of the present invention, using 3 kinds of different QP macro block mode decision trees, i.e., QP=16,25,36 are regarded Frequency is trained, and obtains 3 hierarchical decision making tree constructions, as shown in Figure 7.
By taking the hierarchical decision making tree of QP=25 as an example, in node 1, macro block mode is divided into 4 classes using J48 graders, Intra, Skip, 16 × 16 and 8 × 8;In node 2, Skip and 16 × 16 patterns are easily discriminated out, and are not required to the method with machine learning; In node 3,16 × 16 pattern is subdivided into 16 × 16,16 × 8,8 × 16 using J48 graders;In node 4, J48 points are utilized 8 × 8 pattern is subdivided into 8 × 8,8 × 4,4 × 8,4 × 4 by class device.The classification of 9 kinds of coding modes is realized in final layering.
Fig. 8 is to train the performance after required, MPEG-2/H.263 decoded informations and H.264 macro block mode classification merging Form.Wherein decoded information includes average, the variance being calculated by residual information, MPEG-2/H.263 macro block modes and CBP.
The composition of decoded information is specifically described below.
1. residual information
MPE-2 and H.263 standard are all based on 8 × 8 pieces of progress dct transforms, and interframe encode carries out estimation residual error Dct transform carries out the encoding operation of next step again, and intraframe coding directly carries out dct transform to original image pixel data.So What the result of inter-coded macroblocks idct transform represented is residual information.It is " residual to get respective 64 integers of 8 × 8 luminance blocks Difference " information, 8 × 8 each pixel is corresponded to respectively.Each 8 × 8 pieces can be divided into 44 × 4 sub-blocks again.To each 4 × 4 " residual error " in block carries out Information Statistics, asks for average and variance respectively, obtains 16 averages and 16 variances.
2. MPEG-2/H.263 macro block modes
Macro block mode has five kinds in Mpeg-2:skip(0);intra(1);Motion compensation, coded (2); Motion compensation, no coded (4);No mc, coded (8).H.263 macro block mode is divided into three kinds of skip (0), intra(3)With inter patterns(9).It is the code name during hands-on in bracket.
3. CBP, full name is coded block pattern(Coded block pattern), for having identified MPEG-2/H.263 Coded block pattern, the CBP series of features selected is the numerical value for each bits of CBP in the present invention, totally 6.
Illustrate H.264 coded macroblock mode below(Coding information).H.264 coded macroblock mode is divided into three groups, such as Fig. 6 institutes Show:(1)Intra-coded macroblock mode Intra(16 × 16,8 × 8,4 × 4 pattern in frame, but, decision-making of the invention can be divided into Tree need not be segmented to this again);(2)Inter macroblock:The pattern of interframe 16 × 16,16 × 8,8 × 16;(3)Interframe sub-macroblock Pattern:The pattern of interframe 8 × 8,8 × 4,4 × 8,4 × 4;(4)Skip patterns because in JM the confirmation of skip patterns be for time The macro block that the macro block mode result of decision is interframe 16 × 16 is gone through, if the macro block meets without pixel residual error, without motion vector residual error Condition then determines that the coding mode of this macro block is skip.
In the present invention, alternatively, whether macro block mode decision tree, or motion vector decision tree, as 3 different Q P After decision tree is trained, it can realize according to the most suitable decision tree of the adaptive selection of the ratio of code check before and after transcoding. For example, as shown in figure 9, when code check ratio is less than first threshold value, the decision tree of QP=16 is selected, when code check ratio is not less than First threshold value and when being less than second threshold value, selects the decision tree of QP=25, when code check ratio is not less than the 3rd threshold value, Select the decision tree of QP=36.So, adaptive transcoding capabilities of the invention can embody.
Illustrate the principle of the motion vector decision tree of the present invention below.
Motion vector Multiple trees are when macro block is respectively 16 × 16,16 × 8,8 × 16,8 × 8, to current macro Horizontal, movement in vertical direction vector carries out decision tree and quickly adjudicated.The knot of the motion vector decision tree of QP=25 in 16 × 16 macro blocks Structure is as shown in Figure 10, and the motion vector decision tree of other three kinds of macro blocks is similar with shown in Figure 10.(a)Figure is to horizontal motion The classification judgement of vector,(b)Figure is the classification judgement to movement in vertical direction vector.
Motion vector decision tree also takes the mode that multiple QP decision trees are used in combination, it is possible to increase video under a wide range of QP Motion vector judgement the degree of accuracy, finally lift transcoding performance.
In H.264 coding standard, motion vector MV scope is(-16,16).In the present invention, can be by motion vector MV points are { -15, -12, -9, -6, -3,0,3,6,9,12,15 } totally 11 class, are adjudicated using motion vector decision tree and are currently transported After dynamic vector, coding side can be directly delivered to, can also current motion vector be search starting point, in 2 whole pixel precision scopes Interior carry out motion search, so as to be modified to motion vector.
The explanation present invention is applied to the principle of resolution decreasing transcoding below.
Video can be down to low resolution low bit- rate by resolution decreasing video code conversion device from the high code check of high-resolution(The present invention The number of pixels in the wide high direction of middle finger picture is reduced to 1/2 simultaneously), to adapt to the different demands of terminal device.Resolution decreasing Realize with etc. resolution ratio it is similar, be multiplexed using decision tree is cascaded to decoding client information, and to macro block mode and motion vector Quickly adjudicated, so as to save the transcoding time.Unlike, resolution decreasing is that 4 original decoded macro blocks are mapped into 1 volume Decoding macroblock, as shown in figure 11, that is, extract the decoded information of adjacent 4 macro blocks of former sdi video, including CBP, macro block mode, Value, variance and motion vector, these information to be used for the high-speed decision for adjudicating lower 1 coded macroblocks of resolution decreasing.
In summary, the Video Transcoding Technology that the present invention is realized relies on FFMPEG platforms and libx264.Based on data The design cycle of the efficient self-adapted video code conversion system of mining model is as shown in figure 12, including parameter setting module, decoding letter Breath extraction module, etc. resolution ratio/resolution decreasing macro block mode judging module and wait resolution ratio/resolution decreasing motion vector judgement mould Block.
About in the encoding and decoding technique in this specification(Including macro block mode/motion vector etc.), may be referred to hereafter Offer " Cai Anni, Sun Jingao, multimedia communication technology basis, Electronic Industry Press, 2001 ".
About the Weka machine learning methods in this specification, documents below " Li Deyou, Li Lingxia, Guo Rui are referred to Ripple, the machine learning method based on Weka platforms are probed into, computer knowledge and technology, and 2012 ".
It is miscellaneous in order to avoid being limited to the description of this specification, may pair can be above-mentioned in description in this manual The portion of techniques details obtained in bibliography or other prior art data has carried out the processing such as omission, simplification, accommodation, and this is right It will be understood by for those skilled in the art.Here, above-mentioned bibliography is herein incorporated by reference of text.
Below, the embodiment of the fast transcoding method according to an embodiment of the invention using decision tree is illustrated.
(One), H.264 macro block mode decision tree training
1. data set is extracted from training video
The fast transcoding technology of MPEG-2 → H.264 uses flower.m2v(MPEG-2 forms)As training video;H.263 → H.264 fast transcoding technology use football.h263(H.263 form)As training video.
1.1. the decoding of training video
First, it is trained the decoding of video.
MPEG-2/H.263 decoding ends:Flower.m2v is sent to MPEG-2 decoding ends, decoding end solves flower.m2v Code is flower.yuv.Equally, football.h263 is sent to H.263 decoding end, is decoded as football.yuv.
In decoding process, each frame is extracted the residual information and MPEG-2 macro blocks of 256 pixels by 16 × 16 macro blocks Pattern and CBP, and calculate the average and variance of 16 4 × 4 sub-macroblocks in 16 × 16 macro blocks, this 3 category information(MPEG-2 macro block moulds Formula, CBP, average and variance)It is referred to as MPEG-2 decoded informations.MPEG-2 decoded informations are saved in mpeg2.txt.
Equally, each frame is extracted the residual information and H.263 macro block mode and CBP of 256 pixels by 16 × 16 macro blocks, And calculate the average and variance of 16 4 × 4 sub-macroblocks in 16 × 16 macro blocks, this 3 category information(H.263 macro block mode, CBP, Value and variance)It is referred to as H.263 decoded information.H.263 h263.txt will be saved in by decoded information.
1.2. the H.264 coding of decoded training video
H.264 coding side:Flower.yuv and football.yuv are sent to H.264 coding side respectively, in coded time division Not Gu Ding QP=16,25,36 pairs of two yuv videos encode, obtain QP=16, the 3 of 25,36 after last flower.yuv codings Individual h264 files(For example, flower1.h264, flower2.h264, flower3.h264), football.yuv must after encoding To QP=16, the 3 of 25,36 h264 files(For example, football1.h264, football2.h264, QP= football3.h264).
1.3.H264 the decoding of the training video after coding
H.264 decoding end:The flower2.h264 of QP=25 is sent to H264 decoding ends, carries out 3 decodings respectively, every time Decoding is required for writing different code in decoding end to obtain such as the macro block mode of 3 class nodes in Fig. 7.Specific steps are such as Under.
First, when decoding first time, macro block mode H.264 is made to be categorized as Intra, Skip, 16 × 16(Major class)、8 ×8(Major class);When the flower2.h264 of QP=25 is decoded as into flower2.yuv, can obtain about each macro block per frame Macro block mode belong to the information of which of this 4 kinds of macro block modes classification, be saved into class-1.txt(Macro block mode Sort file)In;
When decoding for second, code is write in decoding end, has been divided into Intra, Skip, 16 × 16 in macro block mode(Greatly Class)、8×8(Major class)On the premise of, further by 16 × 16(Major class)It is subdivided into 16 × 16,16 × 8,8 × 16, and Intra, Skip、8×8(Major class)Classify constant, one is obtained 6 kinds of macro block mode classification;When the flower2.h264 of QP=25 is decoded as During flower2.yuv, this 6 macro block mode classification and the corresponding relation of each macro block per frame are obtained, is saved in class- 2.txt。
Third time decode when, write code in decoding end, macro block mode be divided into Intra, Skip, 16 × 16,8 × On the premise of 8, by 8 × 8(Major class)Be subdivided into 8 × 8,8 × 4,4 × 8,4 × 4, other 3 classification are constant, one be obtained 7 kinds it is grand Block pattern classification;When the flower2.h264 of QP=25 is decoded as flower2.yuv, this 7 macro block mode classification are can obtain, It is saved in class-3.txt.
The flower2.h264 decoding process of QP=25 extracts 3 macro block mode classification by 3 class nodes, then, for Other two QP(16、36)Under the h264 file related to MPEG-2(flower1.h264、flower3.h264), in repetition State process.So, QP=16,25,36 flower1.h264, flower2.h264, flower3.h264 will be extracted 9 times altogether Macro block mode is classified, and generates 9 macro block mode sort files.
Equally, QP=16,25,36 football1.h264, football2.h264, football3.h264 will also be carried 9 macro block mode classification are taken, generate 9 macro block mode sort files.
2. generate data set
Such as Fig. 7, in the class node 1 of macro block mode decision tree, the flower2.h264 of QP=25 is by MPEG-2 decoded informations The macro block mode classification class-1.txt that mpeg2.txt and H.264 decoding end obtain for the first time merges, and obtains at class node 1 Data set;By MPEG-2 decoded informations mpeg2.txt and H.264 the macro block mode that decoding end second obtains is classified class- It is 2-in-1 and after, only extract the corresponding data set of 16 × 16,16 × 8,8 × 16 classification(Data row), as at class node 3 Data set;The macro block mode classification class- that MPEG-2 decoded informations mpeg2.txt and H.264 decoding end third time are obtained After 3.txt merges, the corresponding data set of 8 × 8,8 × 4,4 × 8,4 × 4 classification, the as data at class node 4 are only extracted Collection.The form of data set is as shown in Figure 8.
Understand that the flower.h264 of flower.m2v → QP=25 can generate 3 numbers according to Fig. 7 macro block modes decision tree According to collection, then flower.m2v → QP=16,25,36 flower.h264 can generate 9 data sets;Likewise, Football.h263 → QP=16,25,36 football.h264 can generate 9 data sets.Each data set is organized Into arff file formats(18 arff files altogether), as shown in figure 13, and it is sent in Weka Machine learning tools and is instructed Practice..
3. training dataset
Each arff file is sent in Weka Machine learning tools, each arff is excavated using J48 graders In data set MPEG-2/H.263 decoded information and H.264 macro block mode classification between relation.
Specifically, the arff data sets of J48 classifier trainings class node 1 are utilized(Decoded information+decoding of above-mentioned first time Caused macro block mode classification information), obtain J48 training results such as Figure 14, i.e. obtained the y-bend as caused by J48 graders The false code form of tree.Likewise, training class node 3, the arff data sets of class node 4 will also obtain J48 training results, It is similar with Figure 14.
There are 9 arff data sets flower.m2v → QP=16,25,36 flower.h264, then can train to obtain 9 J48 training results(Each QP corresponds to 3 binary trees, altogether 9 binary trees);Football.h263 → QP=16,25,36 Football.h264 has 9 arff data sets, then can train to obtain 9 J48 training results(Each corresponding 3 y-bends of QP Set, altogether 9 binary trees).
3 J48 training results corresponding to each QP(3 binary trees)Constitute the 3 of a coded macroblock mode decision tree Individual node(That is, the node 1,3,4 in Fig. 7), the node 2 of coded macroblock mode decision tree can be using known simple decision method Obtain, without being produced by training.So, 9 J48 training results constitute 3 coded macroblocks altogether corresponding to 3 QP Mode decision tree.
(Two), motion vector decision tree training
The training process of motion vector decision tree is similar with the training process of macro block mode decision tree, the decoding simply extracted Information is different, the structure of decision tree is different, as shown in Figure 10.The extraction of motion vector decision tree data set, generation and trained Journey can be reduced to herein below.
1. extract data set
Because the classification of motion vector is more, so in order to improve the classification degree of accuracy, the present invention uses multiple different motions The video of degree as training video, including flower.m2v, football.m2v, soccer.m2v, foreman.m2v and flower.h263、football.h263、soccer.h263、foreman.h263。
1.1. the decoding of training video
MPEG-2 decoding ends:Flower.m2v, football.m2v, soccer.m2v, foreman.m2v are sent to MPEG-2 decoding ends, are decoded as flower.yuv, football.yuv, soccer.yuv, foreman.yuv, each in decoding Average by 16 × 16 macro blocks, 16 4 × 4 sub-macroblocks of extraction and variance, MPEG-2 macro-block coding patterns, CBP and level side during frame To motion vector, these information are referred to as MPEG-2 decoded informations I.4 m2v videos are sent to MPEG-2 decoding ends again, The average and variance, MPEG-2 macro-block coding patterns, CBP and vertical of 16 4 × 4 sub-macroblocks are extracted during decoding by 16 × 16 macro blocks Direction motion vector, these information are referred to as MPEG-2 decoded informations II.
H.263 decoding end:Flower.h263, football.h263, soccer.h263, foreman.h263 are sent to H.263 decoding end, flower.yuv, football.yuv, soccer.yuv, foreman.yuv are decoded as, are decoding each frame When the average and variance, H.263 macro-block coding pattern, CBP and horizontal direction of 16 4 × 4 sub-macroblocks are extracted by 16 × 16 macro blocks Motion vector, these information are referred to as H.263 decoded information I.4 m2v videos are sent to MPEG-2 decoding ends again, decoded The average of 16 4 × 4 sub-macroblocks is extracted by 16 × 16 macro blocks and variance, H.263 macro-block coding pattern, CBP and hang down during each frame Nogata is referred to as H.263 decoded information II to motion vector, these information.
1.2. the H.264 coding of decoded training video
H.264 coding side:Coding side respectively with QP=16,25,36 by flower.yuv, football.yuv, Soccer.yuv, foreman.yuv are encoded to QP=16,25,36 h264 videos(Flower.h264, football.h264, soccer.h264、foreman.h264), finally obtain 12 h264 videos.
1.3.H.264 the decoding of the training video after coding
H.264 decoding end:12 h264 videos caused by coding side are sent to decoding end, are decoded as 12 yuv videos, and The motion vector classification information horizontally and vertically of each macro block in each frame is extracted in decoding process.Will be identical The horizontal motion vector that QP h264 videos decoding obtains is merged, and identical QP h264 videos are decoded into what is obtained Movement in vertical direction vector merges.Finally, 1 horizontal motion vector classification of MPEG-2 → H.264 have and 1 are hung down Nogata is to motion vector classification;H.263 → H.264 there are 1 horizontal motion vector classification and 1 movement in vertical direction vector Classification.
2. the generation of data set
The horizontal direction that the MPEG-2 decoded informations I of m2v videos and QP=16,25,36 h264 videos decode to obtain is transported Dynamic vector classification merges, and obtains 3 data sets;The MPEG-2 decoded informations II of m2v videos and QP=16,25,36 h264 are regarded Frequently decode obtained movement in vertical direction vector classification to merge, obtain 3 data sets.Likewise, the H.263 solution by h263 videos Code information I merges with the horizontal motion vector classification that QP=16,25,36 h264 videos decode to obtain, and obtains 3 data Collection, the movement in vertical direction that the H.263 decoded information II of h263 videos and QP=16,25,36 h264 videos decode to obtain is sweared Amount classification merges, and obtains 3 data sets.So MPEG-2 → H.264 training process symbiosis is into 6 data sets, H.263 → H.264 training process symbiosis is into 6 data sets.This 12 data sets are organized into arff forms, are sent to Weka machine learning works Handled in tool.
3. train arff data sets
The arff form data sets that previous step is extracted are sent in Weka Machine learning tools.Due to J48 classifier trainings Obtained J48 training results, when code is realized, size of code is huger, so being not easy to transplant and changing.Another grader Jrip can realize simple classification.Data mining is carried out to arff forms data set with Jrip graders, can be obtained such as Figure 15 Jrip training results.12 arff forms data sets can train to obtain 12 Jrip training results(MPEG-2:It is each QP pairs Answer 2(Horizontal MV and vertical MV), H.263:Each QP is corresponding 2(Horizontal MV and vertical MV)).
(Three), H.264 the cascade of macro block mode decision tree and motion vector decision tree realize
Fig. 7 macro block mode decision tree is realized, is that the J48 training results code of each class node in decision tree is real It is existing.Figure 10 motion vector decision tree is realized, is to use the Jrip training results of class node in horizontal, vertical direction decision tree Code is realized.
The cascade decision-tree model of the QP of MPEG-2 → H.264=25 is by the macro block mode decision tree of QP=25 and QP=25 Motion vector decision tree cascades up.It can be obtained and a pair of 3 class nodes one in Fig. 7 macro block mode decision trees by step 3 The 3 J48 training results answered, it can be obtained and the one-to-one Jrip of Figure 10 motion vector decision tree classification nodes by step 4 Classification results.
The J48 training results of the 1st class node are write first, obtain the classification of Intra, Skip, 16 × 16,8 × 8;So Afterwards on 16 × 16 basis of classification, with the J48 training results of the 3rd class node of written in code;Equally in 8 × 8 basis of classification On, with the J48 training results of the 4th class node of written in code.By the cascade of class node 1 and class node 3, Yi Jifen The cascade of class node 1 and class node 4, finally 9 kinds of macro-block coding patterns classification H.264 finish.So far, macro block mode decision-making Tree code terminates.After 9 kinds of macro block modes H.264 determine, for 16 × 16,16 × 8,8 × 16,8 × 8 macro block modes point Class quickly adjudicates motion vector, it is necessary to level motion vector decision tree.Such as Figure 10, with written in code horizontal motion vector decision-making The Jrip training results of class node in tree;Meanwhile with the Jrip of class node in written in code vertical motion vector decision tree Training result.So far, the macro block mode decision tree of QP=25 and motion vector decision tree all codes.
In MPEG-2 → H.264, code is realized 3 J48 training results and 2 Jrip by each QP cascades decision tree Training result, then 3 different Q P cascades decision trees then will realize 9 J48 training results and 6 Jrip training by code altogether As a result.Likewise, H.263 → H.264 in, code is realized 9 J48 training results and 6 by 3 different Q P cascade decision trees Jrip training results.
The part is that obtained classification results will be trained to be realized with code, and can apply to actual transcoding.
(Four), cascade decision tree application process
During actual transcoding, input video first passes through MPEG-2 or H.263 decoding end, subsequently into H.264 coding side.One section Video by many group of picture into.First two field picture enters coding side after having decoded and completes transcoding process, then carries out next frame Decoding and cataloged procedure.The like.
One two field picture of video(For example size is 704 × 576)The macro block of many nonoverlapping 16 × 16 is divided into, it is grand The position of block is identified by horizontal coordinate and vertical coordinate.Each 16 × 16 macro block decodes respectively in decoding end a, two field picture Into yuv videos, when a macro block decoding finishes, the decoding of next macro block is entered according to macroblock coordinate information and extracted every The residual information of 256 pixels in individual 16 × 16 macro block, and average and variance are calculated according to 4 × 4 sub-macroblocks, share 16 Value and 16 variances, coding mode, CBP and the horizontal motion vector of each 16 × 16 macro blocks of also MPEG-2/H.263 With movement in vertical direction vector.These information will all be delivered to H.264 coding side.
When in a frame all macro blocks all decode finish when, into H.264 coding side.In H.264 coding side, according to each grand The QP sizes of block, select suitable macro block mode decision tree and motion vector decision tree;The decoded information passed over will then be used In the judgement of each macro block mode decision tree and motion vector decision tree.When the macro block mode decision tree of first macro block has been applied Cheng Hou, the macro block mode for adjudicating to obtain will be saved to coding side.If 16 × 16,16 × 8,8 obtained by macro block mode judgement One in × 16 and 8 × 8 macro block modes, then also need to enter motion vector decision tree flow, motion vector is adjudicated into gained To motion vector be saved in coding side.Alternatively, it is also possible to which motion vector is adjudicated into resulting motion vector as small range The starting point of motion search, the motion search in 2 whole pixel coverages is carried out, is finely adjusted to quickly adjudicating obtained motion vector Coding side is saved in afterwards;If macro block mode adjudicates to obtain 8 × 4,4 × 8,4 × 4, one in Intra, Skip macro block mode It is individual, then utilize traditional estimation and motion search mode(In precoding process)Motion vector is obtained, finally also by it It is saved in coding side.For current macro, the next code stage will be entered after obtaining macro block mode and motion vector information, until This macro block is encoded finishing.After first macroblock coding, second macro block will repeat above procedure, until a frame In all macro blocks all encode and finish.
Above is the decoding of a two field picture, coding flow, the transcoding process of next frame are same.When the institute of one section of video After having a frame all transcoding terminating, trans-coding system can just export the video file of H.264 coding standard.
(Five), macro block mode decision tree and motion vector decision tree under resolution decreasing
Forward part be accomplished that etc. under resolution ratio macro block mode decision tree with it is horizontal, vertical motion vector decision tree specific Training process and way of realization.This partial content is accomplished that macro block mode decision tree and horizontal, vertical movement under resolution decreasing The training and realization of vector decision tree, due to process with etc. process under resolution ratio it is similar, therefore briefly explain.
H.263 the resolution decreasing technology that the present invention realizes can apply in MPEG-2 → H.264 and → H.264 transcoding technology In.The transcoder of resolution decreasing is to carry out 2 times down-sampled respectively in the horizontal and vertical directions, that is, the frame of video for dropping resolution is big Small is the 1/4 of former video frame size.As shown in figure 11, during MPEG-2/H.263 resolution decreasings, 4 skies in former frame of video Between adjacent macroblocks correspond under resolution decreasing 1 macro block in frame of video.
To etc. resolution ratio transcoder flow it is similar, using cascade decision tree data mining model to input video carry out Transcoding, unlike, macro block mode decision tree utilizes residual information, CBP and the macro block mode of former 4 macro blocks of video, and decision-making goes out The pattern of 1 macro block of resolution decreasing video;Horizontal motion vector decision tree utilizes residual information, CBP, the macro block of 4 macro blocks Pattern and horizontal motion Vector Message, decision-making go out the horizontal motion vector of 1 macro block of resolution decreasing video, vertically Motion vector decision tree is gone out using the residual information of 4 macro blocks, CBP, macro block mode and movement in vertical direction Vector Message, decision-making The movement in vertical direction vector of 1 macro block of resolution decreasing video.
H.264 macro block mode decision tree and horizontal, the training process and reality of vertical motion vector decision tree under resolution decreasing Existing mode is similar.The training video of use is the same, and the MEPG-2/H.263 decoded informations simply extracted are 4 spaces Adjacent macro block information, H.264 macro block mode/motion vector information of extraction are the letters of corresponding 1 macro block under resolution decreasing Breath.By MPEG-2/H.263 decoded informations and H.264 macro block mode/motion vector information is incorporated as data set one by one.Drop point The data set number obtained under resolution with etc. data set number under resolution ratio it is identical.
After data set is ready, the form for being organized into arff files is sent to Weka instruments progress classification based training, finally The macro block mode decision tree and motion vector decision tree good to performance, finally by its code.
In the trans-coding system of resolution decreasing the application of macro block mode decision tree and motion vector decision tree with etc. under resolution ratio Similar, flow is the same, is simply original size in the video frame size of decoding end, for example 704 × 576, extraction is each grand The decoded information of block;Into after H.264 coding side, the size of frame of video is changed into original a quarter, i.e., 352 × 288.At this moment The QP of each macro block in a frame is read, according to QP size trade-off decision trees, after obtaining macro block mode and motion vector, into follow-up Coding stage.Decoded, encoded one by one, until all videos all transcodings finish.
(Six), efficient self-adapted video code conversion system
Below, efficient self-adapted video code conversion system framework under FFMPEG platforms according to an embodiment of the invention is illustrated.
This part, which is accomplished that, to be trained and the macro block mode plan tree of code and motion vector decision tree are applied to reality In the transcoding technology of border, adaptive fast transcoding is realized, technology is compiled entirely instead of original complete solution.
The realization of efficient self-adapted video code conversion relies on the Open Source Code FFMPEG and libx264 of mature joint Exploitation.FFMPEG is a video increased income and audio stream handling implement, and it provides recording, conversion and fluidisation audio frequency and video Total solution, it further comprises FA audio/video encoding and decoding storehouse libavcodec.FFMPEG frameworks are very complete It is whole, there is powerful decapsulation form to support, center of gravity can be concentrated on to video code conversion portion using FFMPEG as system-based Divide without regard to decapsulation.
As shown in Figure 4, several main modulars of efficient self-adapted video code conversion system are:Parameter setting module, standard solution Code/coding module, input video information extraction modules, etc. the macro block high-speed decision module of resolution ratio/resolution decreasing, etc. differentiate The motion vector high-speed decision module of rate/resolution decreasing.Standard decoding/encoding module is realized according to FFMPEG's and libx264 Source code is realized.The macro block mode high-speed decision mould of the resolution ratio/resolution decreasing such as calling when enabling fast transcoding pattern Block directly determines macro block mode, and follow-up motion estimation operation is carried out on the basis of selected macroblock, is started on each macro block Etc. resolution ratio/resolution decreasing motion vector module quick decision motion vector.Such as rate distortion of other steps of cataloged procedure operates Deng keeping, primary standard decoding/encoding Module implementations are constant.Specifically design and realization are as follows for other modules.
1. parameter setting module
The module is used to receive order progress parameter setting.In the application of reality, system detectio network condition or terminal Disposal ability return information, the bit-rates values of these parameter setting final output code streams can be carried out according to the information, whether are carried out The operations such as resolution decreasing processing.Due to present document relates to be 2 times of resolution decreasing transcodings, so will be according to the resolution ratio of target code stream Size is come whether judge the video before and after transcoding be 2 times of resolution decreasings.
Module inputs:Requirement to transcoding output video, including coded format and resolution decreasing requirement;Module exports: Corresponding parameter is set.
2. information extraction modules
If quick mode is in opening, needs to carry out the first step of fast transcoding, the correlation of input video is believed Breath extraction.Need to be extracted be list entries residual error sub-block 16 averages and 16 variances, macro block mode, 6 compiled Decoding macroblock pattern information, motion vector information.For macro block mode decision tree, corresponding 39 features of each macro block;For motion Vector decision tree, corresponding 48 features of each macro block.H.263, the realization of the module corresponding MPEG-2 or decodes in FFMPEG Carried out in device.
Module inputs:Original video frame information;Module exports:39 or 48 features corresponding to each macro block.
3. the quick judging module of macro block mode
If fast transcoding pattern is opened, the information that information extraction modules obtain can be delivered to layering by the module in coding Decision-tree model in directly obtain current macro mode decision result, skip over traversal select optimal macro block mode the step of. In addition, different decision-tree models can be selected according to whether transcoding carries out 2 times of resolution decreasing operations.It is defeated Deng definition case module Enter:39 information characteristics of macro block;Module exports:Pattern used by the macro block.
Resolution decreasing situation module inputs:39 × 4 information characteristics of corresponding 4 macro blocks;Module exports:The drop is differentiated Rate macro block uses pattern.
4. the quick judging module of motion vector
If fast transcoding pattern is opened, the module can be corresponded in coded macroblock mode in coding.For a kind of grand Block pattern, it is current grand that the information that information extraction modules obtain is sent in horizontal motion vector decision-tree model directly acquisition The motion vector of the horizontal direction of block;The information of extraction is sent in movement in vertical direction vector decision-tree model simultaneously and directly obtained Take the motion vector of the vertical direction of current macro.After motion vector after being adjudicated, coding side is saved in;Can also be 2 Motion search is carried out in individual whole pixel coverage, finally obtains more accurate motion vector.Then encoder utilizes both direction Motion vector carries out next step coding.
In this module, quickly sentencing for motion vector only is carried out to 16 × 16,16 × 8,8 × 16,8 × 8 macro block mode Certainly, other macro block modes take the method for the motion search in a wide range of to obtain current motion vector.
Deng module resolution input-horizontal direction:40 information characteristics of macro block;Module exports:The level side of the macro block To motion vector.
Deng module resolution input-vertical direction:40 information characteristics of macro block;Module exports:The Vertical Square of the macro block To motion vector.
Resolution decreasing module input-horizontal direction:40 × 4 information characteristics of corresponding 4 macro blocks;Module exports:Should The motion vector of the horizontal direction of resolution decreasing macro block.
Resolution decreasing module input-vertical direction:40 × 4 information characteristics of corresponding 4 macro blocks;Module exports:Should The motion vector of the vertical direction of resolution decreasing macro block.
In summary, it will be appreciated by those of skill in the art that various repair can be made to the above embodiment of the present invention Change, modification and replace, it is each fallen within such as protection scope of the present invention defined in the appended claims.

Claims (16)

1. a kind of video transcoding method efficiently and adaptively based on data mining, comprises the following steps:
Step 1, the video to be transcoded for inputting the first compression standard;
Step 2, the video to be transcoded is decoded, generate video to be encoded, and extract each of each frame of video The decoded information of macro block;
Step 3, the decoded information extracted is input to coded macroblock mode decision tree, by coded macroblock mode decision tree come Determine each macro block of each frame of video of video to be encoded by the coded macroblock mode of use;
Step 4, the motion vector of coded macroblock mode and each macro block determined by, to the every of video to be encoded Each macro block of individual frame of video carries out the coding of the second compression standard, so as to be the second compression standard by Video coding to be encoded Transcoding after video,
Wherein, the coded macroblock mode includes following pattern:Intra、16×16、16×8、8×16、8×8、8×4、4× 8th, 4 × 4, skip, wherein 16 × 16,16 × 8,8 × 16 form the first major classes, 8 × 8,8 × 4,4 × 8,4 × 4 form it is second largest Class,
Wherein, it is further comprising the steps of after the step 3:
If the coded macroblock mode of use is belonged to 16 × 16,16 × 8,8 × 16 and 8 by some step 3-1, identified macro block One in × 8, then the decoded information extracted and motion vector information are input to the motion vector decision tree, passed through The motion vector decision tree determines the motion vector of each macro block of each frame of video of video to be encoded;
If the coded macroblock mode of use is not belonging to 16 × 16,16 × 8,8 × 16 by some step 3-2, identified macro block With one in 8 × 8, then determined by estimation and motion search mode video to be encoded each frame of video it is each The motion vector of macro block.
2. video transcoding method as claimed in claim 1, wherein, first compression standard is MPEG-2 or H.263 compressed Standard, second compression standard are H.264 compression standards, and the video to be encoded is the video of yuv format, the decoding Information includes the residual information and coded block pattern information of each macro block of each frame of video.
3. video transcoding method as claimed in claim 2, wherein, in the step 2, it is also necessary to extract each frame of video The motion vector information of each macro block.
4. video transcoding method as claimed in claim 3, wherein, the motion vector information includes horizontal motion vector information With vertical motion vector information.
5. video transcoding method as claimed in claim 1, wherein, in the step 2, also extract each of each frame of video The quantization parameter of macro block,
Also, in the step 3, if the value of the quantization parameter extracted is 12~21, the coded macroblock mode is determined Plan tree is the first coded macroblock mode decision tree, if the value of the quantization parameter extracted is 22~30, the coded macroblocks Mode decision tree is the second coded macroblock mode decision tree, if the value of the quantization parameter extracted is 31~40, the volume Decoding macroblock mode decision tree is the 3rd coded macroblock mode decision tree,
Also, wherein, the described first to the 3rd coded macroblock mode decision tree corresponds respectively to different quantization parameters 16,25,36.
6. the video transcoding method as described in claim 1 or 5, in the step 3, if the value of the quantization parameter extracted For 12~21, then the motion vector decision tree is first level motion vector decision tree and the first vertical motion vector decision-making Tree, if the value of the quantization parameter extracted is 22~30, the motion vector decision tree is that the second horizontal motion vector is determined Plan tree and the second vertical motion vector decision tree, if the value of the quantization parameter extracted is 31~40, the motion vector Decision tree is the 3rd horizontal motion vector decision tree and the 3rd vertical motion vector decision tree,
Also, wherein, the described first to the 3rd horizontal motion vector decision tree corresponds respectively to different quantization parameters 16,25,36, Described first to the 3rd vertical motion vector decision tree corresponds respectively to different quantization parameters 16,25,36.
7. video transcoding method as claimed in claim 1, wherein, determined when the code check of video to be transcoded and by precoding The ratio of code check of transcoding rear video when being less than first threshold, the coded macroblock mode decision tree is the first coded macroblocks mould Formula decision tree, when the ratio is not less than first threshold value and is less than second threshold value, the coded macroblock mode decision tree It is the second coded macroblock mode decision tree, when the ratio is not less than the 3rd threshold value, the coded macroblock mode decision tree It is the 3rd coded macroblock mode decision tree,
Also, wherein, the described first to the 3rd coded macroblock mode decision tree corresponds respectively to different quantization parameters 16,25,36.
8. the video transcoding method as described in claim 1 or 5, wherein, in the step 3, when the code of video to be transcoded When the ratio of the code check of rate and the transcoding rear video determined by precoding is less than first threshold, the motion vector decision tree is First level motion vector decision tree and the first vertical motion vector decision tree, when the ratio is not less than first threshold value and small When second threshold value, the motion vector decision tree is that the second horizontal motion vector decision tree and the second vertical motion vector are determined Plan tree, when the ratio is not less than the 3rd threshold value, the motion vector decision tree is the 3rd horizontal motion vector decision tree With the 3rd vertical motion vector decision tree,
Also, wherein, the described first to the 3rd horizontal motion vector decision tree corresponds respectively to different quantization parameters 16,25,36, Described first to the 3rd vertical motion vector decision tree corresponds respectively to different quantization parameters 16,25,36.
9. video transcoding method as claimed in claim 5, wherein, for each different quantization parameter, respectively by following The coded macroblock mode decision tree corresponding to step generation:
Step 11, the training video to the first compression standard decode, and generate training video to be encoded, and extract and each regard The decoded information of each macro block of frequency frame;
Step 12, fixed quantisation parameter, training video to be encoded is encoded to the training video of the second compression standard;
Step 13, the training video of the second compression standard is decoded as to training video to be encoded, obtains the every of each frame of video The coded macroblock mode of individual macro block;
Step 14, the decoded information of each macro block of each frame of video and coded macroblock mode be input to Weka machine learning J48 graders in instrument, produce the coded macroblock mode decision tree corresponding with fixed quantization parameter.
10. video transcoding method as claimed in claim 9, wherein, the step 13 includes:
Step 13-1, first time decoding is carried out to the training video of the second compression standard, obtains each macro block of each frame of video Coded macroblock mode belong to the information of which of Intra, Skip, the first major class, the second major class;
Step 13-2, second of decoding is carried out to the training video of the second compression standard, obtains each macro block of each frame of video Coded macroblock mode belong to the information of which of the major class of Intra, Skip, 16 × 16,16 × 8,8 × 16, second;
Step 13-3, third time decoding is carried out to the training video of the second compression standard, obtains each macro block of each frame of video Coded macroblock mode belong to Intra, Skip, the first major class, 8 × 8,8 × 4,4 × 8, which of 4 × 4 information.
11. video transcoding method as claimed in claim 10, wherein, the step 14 includes:
Step 14-1, according to the information obtained in the step 11 and the step 13-1, the coded macroblock mode is generated The first node of decision tree, its be used for judge each frame of video each macro block coded macroblock mode belong to Intra, Skip, Which of first major class, second major class;
Step 14-2, according to the information obtained in the step 11 and the step 13-2, the coded macroblock mode is generated The section point of decision tree, it is used for judging that the coded macroblock mode of some macro block belongs to the situation of the first major class in first node Under, judge that the coded macroblock mode of the macro block belongs to 16 × 16,16 × 8, which of 8 × 16;
Step 14-3, according to the information obtained in the step 11 and the step 13-3, the coded macroblock mode is generated The 3rd node of decision tree, it is used for judging that the coded macroblock mode of some macro block belongs to the situation of the second major class in first node Under, judge that the coded macroblock mode of the macro block belongs to 8 × 8,8 × 4,4 × 8, which of 4 × 4.
12. video transcoding method as claimed in claim 9, wherein, for three different quantization parameters 16,25 and 36, divide The step 12 is not carried out to 14, generates the described first to the 3rd coded macroblock mode decision tree respectively.
13. video transcoding method as claimed in claim 6, wherein, the motion vector decision tree through the following steps that and Generation:
Step 21, the training video to the first compression standard decode, and generate training video to be encoded, and extract and each regard The decoded information and horizontal and vertical movement Vector Message of each macro block of frequency frame;
Step 22, fixed quantisation parameter, training video to be encoded is encoded to the training video of the second compression standard;
Step 23, the training video of the second compression standard is decoded as to training video to be encoded, obtains the every of each frame of video The horizontal and vertical movement Vector Message of individual macro block;
Step 24, the decoded information of each macro block of each frame of video and horizontal and vertical movement Vector Message be input to Jrip graders in Weka Machine learning tools, produce the horizontal and vertical movement vector decision tree.
14. video transcoding method as claimed in claim 13, wherein, for three different quantization parameters 16,25 and 36, divide The step 22 is not carried out to 24, generates the described first to the 3rd horizontal and vertical movement vector decision tree respectively.
15. video transcoding method as claimed in claim 1, wherein, the width of the video to be transcoded of first compression standard Degree and the number of pixels of short transverse are respectively twice of the video of second compression standard.
16. a kind of video code conversion system for being used to carry out video transcoding method according to claim 1, including with bottom Point:
Parameter setting module, for carrying out the step 1, and set according to the attribute of the video after video and transcoding to be transcoded Put parameter;
Information extraction modules, for carrying out the step 2,
The quick judging module of macro block mode, for carrying out the step 3,
The quick judging module of motion vector, for carrying out step 3-1,3-2;
Standard encoding module, for carrying out the step 4.
CN201410098019.4A 2014-03-17 2014-03-17 A kind of video code conversion system efficiently and adaptively based on data mining Expired - Fee Related CN103888770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410098019.4A CN103888770B (en) 2014-03-17 2014-03-17 A kind of video code conversion system efficiently and adaptively based on data mining

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410098019.4A CN103888770B (en) 2014-03-17 2014-03-17 A kind of video code conversion system efficiently and adaptively based on data mining

Publications (2)

Publication Number Publication Date
CN103888770A CN103888770A (en) 2014-06-25
CN103888770B true CN103888770B (en) 2018-03-09

Family

ID=50957460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410098019.4A Expired - Fee Related CN103888770B (en) 2014-03-17 2014-03-17 A kind of video code conversion system efficiently and adaptively based on data mining

Country Status (1)

Country Link
CN (1) CN103888770B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105992027A (en) * 2015-01-30 2016-10-05 中兴通讯股份有限公司 Video signal processing method and device
CN105007483B (en) * 2015-07-09 2017-11-14 武汉大学 A kind of screen content coding-decoding method compatible with H264 standards
CN108174204B (en) * 2018-03-06 2020-01-03 中南大学 Decision tree-based inter-frame rapid mode selection method
CN108769616A (en) * 2018-06-21 2018-11-06 泰华智慧产业集团股份有限公司 A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system
CN113347415A (en) * 2020-03-02 2021-09-03 阿里巴巴集团控股有限公司 Coding mode determining method and device
CN112565770B (en) * 2020-12-08 2022-08-12 深圳万兴软件有限公司 Video coding method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101068355A (en) * 2007-06-05 2007-11-07 南京大学 MPEG2-H.264 code fast converting method
CN101924943A (en) * 2010-08-27 2010-12-22 郭敏 Real-time low-bit rate video transcoding method based on H.264
CN102281444A (en) * 2011-09-01 2011-12-14 北京汉邦高科数字技术有限公司 Automatic volume control (AVC)-standard-based video conversion device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080212682A1 (en) * 2007-01-25 2008-09-04 Hari Kalva Reduced resolution video transcoding with greatly reduced complexity

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101068355A (en) * 2007-06-05 2007-11-07 南京大学 MPEG2-H.264 code fast converting method
CN101924943A (en) * 2010-08-27 2010-12-22 郭敏 Real-time low-bit rate video transcoding method based on H.264
CN102281444A (en) * 2011-09-01 2011-12-14 北京汉邦高科数字技术有限公司 Automatic volume control (AVC)-standard-based video conversion device

Also Published As

Publication number Publication date
CN103888770A (en) 2014-06-25

Similar Documents

Publication Publication Date Title
CN103888770B (en) A kind of video code conversion system efficiently and adaptively based on data mining
CN107147911B (en) Quick interframe coding mode selection method and device based on local luminance compensation LIC
CN104822065B (en) Image prediction/decoding device, method and coder/decoder system and method
CN105359531B (en) Method and system for determining for the coder side of screen content coding
CN105306947B (en) video transcoding method based on machine learning
CN100496127C (en) MPEG2-H.264 code fast converting method
CN102025995B (en) Spatial enhancement layer rapid mode selection method of scalable video coding
CN106131554B (en) The point self-adapted compensation method of HEVC quick sample product based on major side direction
CN101583036B (en) Method for determining the relation between movement characteristics and high efficient coding mode in pixel-domain video transcoding
CN106131546B (en) A method of determining that HEVC merges and skip coding mode in advance
CN110087087A (en) VVC interframe encode unit prediction mode shifts to an earlier date decision and block divides and shifts to an earlier date terminating method
CN101924943B (en) Real-time low-bit rate video transcoding method based on H.264
CN102665077A (en) Rapid and efficient encoding-transcoding method based on macro block classification
CN105917650A (en) Block vector prediction in video and image coding/decoding
CN102006475A (en) Video coding and decoding device and method
CN105898332B (en) For the fast deep figure frame mode decision method of 3D-HEVC coding standards
CN105120290B (en) A kind of deep video fast encoding method
CN110049338B (en) HEVC (high efficiency video coding) rapid inter-frame coding method based on multi-level classification
CN104079937B (en) It is a kind of based on motion vector analysis by H.264 to the quick interframe code-transferring method and transcoding device of HEVC
CN104539970B (en) A kind of 3D HEVC interframe encodes merging patterns high-speed decision method
CN108174204A (en) A kind of interframe fast schema selection method based on decision tree
CN108769696A (en) A kind of DVC-HEVC video transcoding methods based on Fisher discriminates
CN101969561A (en) Intra-frame mode selection method and device and encoder
CN107404648A (en) A kind of multi-channel video code-transferring method based on HEVC
CN105681803B (en) A kind of HEVC video information hiding methods of large capacity

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180309

CF01 Termination of patent right due to non-payment of annual fee