CN103888770A - Efficient self-adaptive video transcoding system based on data mining - Google Patents

Efficient self-adaptive video transcoding system based on data mining Download PDF

Info

Publication number
CN103888770A
CN103888770A CN201410098019.4A CN201410098019A CN103888770A CN 103888770 A CN103888770 A CN 103888770A CN 201410098019 A CN201410098019 A CN 201410098019A CN 103888770 A CN103888770 A CN 103888770A
Authority
CN
China
Prior art keywords
video
decision tree
motion vector
macro block
coded macroblocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410098019.4A
Other languages
Chinese (zh)
Other versions
CN103888770B (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

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses an efficient self-adaptive video transcoding system and method based on data mining. The method includes the following steps that step1, a video, to be transcoded, of a first compression standard is input; step2, the video to be transcoded is decoded to generate a video to be encoded, and decoding information of all macro blocks of all video frames is extracted; step3, the extracted decoding information is input in an encoding macro block mode decision-making tree, and encoding macro block modes for all the micro blocks of all the video frames of the video to be encoded are determined through the encoding macro block mode decision-making tree; step4, according to the determined encoding macro block modes and motion vectors of all the micro blocks, all the micro blocks of all the video frames of the video to be encoded are encoded according to a second compression standard, so that the video to be encoded is encoded to be a transcoded video of the second compression standard.

Description

A kind of system of video code conversion efficiently and adaptively based on data mining
Technical field
The invention belongs to Video coding, video code conversion field, relate in particular to the system of video code conversion efficiently and adaptively based on data mining, it can be decoded to the video of different coding form, different code check, different resolution, and recompile, thereby transcoding is to the video of the coded format satisfying the demands, code check and resolution.
Background technology
The technical scheme of prior art one
What in prior art one, realize the Video Transcoding Technology of the low complex degree of MPEG-2/H.263 under resolution → H.264 such as is, it utilizes the method for machine learning to find the decoded information of MPEG-2/H.263 and contacting between coded message H.264, thereby set up the mechanism of coding side fast coding, realize fast transcoding process.CBP, coding mode, average and the variance of prior art one hypothesis decoding end MPEG-2/H.263 macro block and the coding side H.264 coding mode of macro block exist certain associated, utilize Weka J48 grader train these data and obtain decision tree.Fig. 1,2 shows the video code conversion process as an example of MEPG → H.264 example.
Macro block mode decision tree is applied in the transcoding process of actual MPEG-2/H.263 → H.264, obtain in real time residual information, CBP, the coding mode of macro block from decoder, be delivered to encoder-side, adjudicate fast the macro block mode of coding by decision tree, and do not need complete solution entirely to compile, thereby reduce transcoding complexity.
The shortcoming of prior art one
1. can obtain the balance between preferable quality and bit rate for the video sequence of small in resolution, for large video and the good video of definition, obtain the fluctuation of approximate image quality condition bit rate larger.
2. utilize the decision-tree model of single quantization parameter (QP=25) to realize transcoding flow process, in actual transcoding, in each frame of video, the QP of macro block is different, the decision-tree model that utilizes QP=25 for QP near the transcoding effect for the treatment of transcoding video 25 better, but bad to departing from the transcoding effect of 25 QP videos far away.This is because need to adjust the threshold value in the model of training in the time of application decision tree-model, at this moment uses quantizing factor.When QP=25, quantizing factor is 1; QP is greater than at 25 o'clock, and every increase by 1 quantizing factor declines 12.5%; QP is less than at 25 o'clock, thus every decline 1 quantizing factor increase by 12.5% when actual until transcoding video QP away from 25 time, the effect of quantizing factor is larger, can not finely mate with the decision-tree model of QP=25.Therefore the accommodation of single QP decision tree is not extensive.
The technical scheme of prior art two
The Video Transcoding Technology of MPEG-2 under the resolution such as what prior art two realized is → H.264.Residual information, CBP, coding mode that technology two is utilized decoding end equally, carry out decision-making to coding side macro block mode.Different from prior art one, prior art two is used Jrip grader to classify to macro block mode, and the structure of decision tree as shown in Figure 3.
First utilizing Jrip sorting technique that macro block mode is divided into 2 classes at node 1, is respectively node 2 and node 3.Then node 2 carries out the traversal of macro block mode, and node 3 utilizes Jrip to be divided into 2 classes, and a class is 8 × 8, and a class is the macro block mode that node 4 comprises.Finally node 4 is left the traversal of 3 kinds of macro block modes.
The form that Jrip method obtains decision tree is a rule rule statements, rather than the form of binary tree, has simplified the code of decision tree, has good transplantability.The Jrip training result of realization is applied in transcoding process, can realizes fast transcoding.
The shortcoming of prior art two
1. only node 1 and node 3 have been used Jrip grader, and node 2 and node 4 are entirely to compile technology with original complete solution H.264, so be further improved.
2. utilize the decision tree of single quantization parameter (QP=25) to realize transcoding flow process, treat near the transcoding effect for the treatment of transcoding video of QP 25 better, but treat that transcoding video QP departs from 25 transcodings far away and there will be and owe matching (effect is bad), therefore the accommodation of single QP decision tree is not extensive.
Be limited to for fear of the description that makes this specification miscellaneous, by being herein incorporated by reference and in full below with reference to document of relevant above-mentioned background technology.
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。
Summary of the invention
The macro block mode decision tree adopting in prior art scheme one is single (QP=25 of decision tree), and in actual transcoding application, the adaptability of single decision tree is not strong.Because encoder is in video coding process, as QP and single QP(25 until transcoding video) while differing more, the residual information consistency of the residual information obtaining when actual transcoding and model is poor, so just can not well adapt to single QP model.In the present invention, train the macro block mode decision tree of three different Q P (16,25,36), three decision trees can adapt to the interior video code conversion strategy of different Q P scope (usual range QP=12-40) better.In actual transcoding, can be according to the size of the each macro block QP of the every frame of input video, select adaptively best decision tree judgement model, not only reduce the transcoding time, and effectively reduced the decline of transcoding quality.
The performance of video code translator is relevant with the quality of decision tree.In order to reduce better the transcoding time, and guarantee that transcoding quality can not decline to a great extent, the present invention adopts associating J48 grader and Jrip grader, realizes the structure to model.J48 grader is for good compared with the training performance of subclassification data set, still 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 book write capability and portability.In conjunction with the advantage of two kinds of graders, the performance of video code conversion can get a promotion.
In order further to improve the performance of video code translator, the present invention proposes a kind of efficient self-adapted Video Transcoding Technology based on macro block mode and motion vector cascade decision tree, at the coding side of transcoding process, utilize macro block mode decision tree to select fast the macro block mode used of encoding, on selected macro block mode basis, utilize the motion vector decision tree training to select fast the motion vector of present encoding piece.Owing to selecting fast macro block mode to replace the traversal of all macro block modes, the motion search process of the simultaneously quick judgement of motion vector in having replaced on a large scale, therefore, the method for the new cascade decision tree proposing has been improved the performance of existing video code translator widely, is a kind of new method.
The present invention utilizes the method for cascade decision tree the Video Transcoding Technology under resolution such as not only to realize, and has realized the Video Transcoding Technology under resolution decreasing, can meet the demand of different terminal equipment.Meanwhile, the present invention can select according to the different ratios of code check before and after video code conversion the transcoding flow process of different Q P decision tree, has not only guaranteed the transcoding quality of video under high code check, and has improved the performance of transcoder under low code check.
In brief, the present invention has realized a kind of video code translator efficiently and adaptively based on data mining, and what mainly complete is MPEG-2 → H.264 transcoding technology and H.263 → H.264 transcoding technology.With respect to similar technology in the past, the present invention adopts the method for Multiple trees, in the situation that maintaining essentially identical transcoding speed, can improve well the subjective quality of transcoding rear video.
According to embodiments of the invention, a kind of video transcoding method efficiently and adaptively based on data mining is provided, comprise the following steps: the video for the treatment of transcoding of step 1, input the first compression standard; Step 2, the described video for the treatment of transcoding is decoded, generate video to be encoded, and extract the decoded information of each macro block of each frame of video; Step 3, extracted decoded information is input to coded macroblocks mode decision tree, sets each macro block of each frame of video of determining video to be encoded by coded macroblocks mode decision by the coded macroblocks pattern of employing; Step 4, according to the motion vector of determined coded macroblocks pattern and each macro block, each macro block of the each frame of video to video to be encoded carries out the coding of the second compression standard, thereby by Video coding to be encoded is the video after the transcoding of the second compression standard.
Beneficial effect of the present invention is mainly the following aspects: 1. improving on the basis of transcoding quality, adopting the cascade decision tree decision method based on macro block mode and motion vector, further improving transcoding efficiency, improving the performance of transcoder; 2. not only can realize MPEG-2/H.263 → H.264 in the fast transcoding process waiting under resolution, can also realize the transcoding flow process of video under resolution decreasing, greatly improve the transcoding performance of video under the low code check of low resolution; 3. can carry out the adaptive transcoding that carries out according to the different ratios of code stream before and after the video code conversion of actual requirement, expand the range of application of Video Transcoding Technology.
Particularly, the present invention utilizes three different Q P decision trees to adjudicate fast macro block mode H.264, guaranteeing under the prerequisite of video quality, reducing widely the transcoding time of MPEG-2/H.263 → H.264, and can obtain good transcoding performance for the input video of low QP and high QP.Second, the present invention adopts the model of cascade decision tree, on the fixed basis of macro block mode, for partial mode, use respectively motion vector decision tree to adjudicate fast horizontal motion vector movement in vertical direction vector, obtain after the motion vector of current macro, can also within the scope of 2 whole pixel precisions, carry out motion search, can realize the Exact Reconstruction of video image.Because the quick selection of motion vector has replaced large-scale motion search, therefore, the time of video code conversion further reduces, and with respect to the full transcoding technology of compiling of complete solution, this transcoding time can be saved 80% left and right.The 3rd, under complex environment, this Video Transcoding Technology can be selected adaptively according to the ratio of code stream before and after transcoding the transcoding flow process of different Q P decision tree, to obtain best transcoding effect.The 4th, MPEG-2/H.263 → H.264 can utilize to etc. the similar transcoding flow process of resolution realize the video code conversion under resolution decreasing, compared with existing resolution decreasing technology, transcoding time and transcoding quality all have some improvement.
Accompanying drawing explanation
Fig. 1 is that the transcoding decision tree of the MPEG-2 → H.264 of prior art generates block diagram;
Fig. 2 is the schematic diagram that the MPEG-2 macro block mode decision tree structure of prior art is shown;
Fig. 3 is the schematic diagram that the decision tree structure of prior art is shown;
Fig. 4 is the video code conversion framework sketch based on data mining model according to an embodiment of the invention;
Fig. 5 is the block diagram of data mining model according to an embodiment of the invention;
Fig. 6 shows the H.264 coding mode of macro block and sub-macro block;
Fig. 7 shows the H.264 Multiple trees model of coded macroblocks;
Fig. 8 shows MPEG-2/H.263 decoded information and the data mode of macro block mode H.264;
Fig. 9 shows the schematic diagram of selecting according to an embodiment of the invention different decision trees according to code check ratio before and after transcoding;
Figure 10 shows the decision tree of the motion vector of 16 × 16 times QP=25 of macro block mode according to an embodiment of the invention;
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 data;
Figure 14 shows the example of the training result of J48 grader according to an embodiment of the invention;
Figure 15 shows the example of the training result of Jrip grader according to an embodiment of the invention.
Embodiment
Below, by reference to the accompanying drawings the enforcement of technical scheme is described in further detail.
Those skilled in the art can understand, for example, although the following description relates to a lot of details (formation of training method, decoded information and the classified information of the concrete video format before and after transcoding, decision tree) about video coding and decoding technology and Decision Tree Technologies, this only illustrates that for being used for the example of principle of the present invention does not mean that any restriction.The present invention can be applicable to be different from the occasion outside the following ins and outs that exemplify, and for example, existing other video compression standard, other decision tree training method with occurring in the future, as long as they do not deviate from principle and the spirit of being invented.
First, summarize basic principle of the present invention.
General, video code translator comprises decoder and encoder.The full video code translator of compiling of complete solution is more consuming time, and the mainstream technology now having realized is to utilize decoding end information to carry out fast coding at coding side, reduces the transcoding time.The target of video code conversion is under the prerequisite of practical requirement, uses the least possible time and keeps the image quality decrease after transcoding little.Current video transcoding mainly comprises the transcoding between code check conversion, conversion of resolution and different code streams.
In order to accelerate the speed of video code conversion and guarantee the quality of video code conversion, the present invention proposes a series of method to improve the performance of Video Transcoding Technology.What the present invention realized is the efficient self-adapted Video Transcoding Technology based on data digging method, and what mainly complete is the fast transcoding of the fast transcoding of MPEG-2 → H.264 and H.263 → H.264.
Fig. 4 is the video code conversion framework sketch based on data mining model in the present invention.As shown in Figure 4, in this technology, the framework of high-efficiency transcoder comprises two large divisions: decoder and encoder, rely on data mining model to link together between the two.Suppose the decoded Video stream information of MPEG-2/H.263 (CBP, pattern, average, variance, motion vector) and H.264 macro block mode or the motion vector of coding side exist certain associated, collect these data, utilize the method for machine learning to excavate MPEG-2/H.263 decoded information and contacting between coded message H.264, set up categorised decision and set.After training by mass data, obtain the decision tree that performance is good, and decision tree is applied in actual transcoding process, can realize the fast transcoding of MPEG-2 → H.264 and H.263 → H.264.In technology realizes, the method that adopts cascade decision tree is adjudicated macro block mode and motion vector fast as Fig. 5, thereby the traversal of having avoided macro block mode is selected and the extensive search of motion vector, has reduced encoder complexity, has realized the decline of transcoding time.
Carrying out before video code conversion, first train and obtain two decision-tree models by 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 relations of cascade, after the application of macro block mode decision tree, are the application of motion vector decision tree.The object of training pattern is in order to obtain classification accuracy height and the good decision tree of transplantability.
Macro block mode decision model is that coding side coding mode (9 kinds) is H.264 carried out to Fast Classification application.H.264 the macro block mode of infra-frame prediction is Intra, the macro block mode of inter prediction except Skip(motion residuals be 0), 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, adopt 3 kinds of different QP macro block mode decision trees, QP=16,25,36 video are trained, obtain 3 hierarchical decision making tree structures, as shown in Figure 7.
Hierarchical decision making take QP=25 is set as example, at node 1, utilizes J48 grader that macro block mode is divided into 4 classes, Intra, Skip, 16 × 16 and 8 × 8; At node 2, Skip and 16 × 16 patterns are easy to distinguish, and do not need the method with machine learning; At node 3, utilize J48 grader that 16 × 16 pattern is subdivided into 16 × 16,16 × 8,8 × 16; At node 4, utilize J48 grader that 8 × 8 pattern is subdivided into 8 × 8,8 × 4,4 × 8,4 × 4.Final layering realizes the classification of 9 kinds of coding modes.
Fig. 8 is needed, the MPEG-2/H.263 decoded information of training and the form of expression of macro block mode classification after merging H.264.Wherein decoded information comprises the average, the variance that are calculated by residual information, MPEG-2/H.263 macro block mode and CBP.
Illustrate the composition of decoded information below.
1. residual information
MPE-2 and H.263 standard are all to carry out dct transform based on 8 × 8, and interframe encode is carried out estimation residual error dct transform and carry out next step encoding operation, and intraframe coding is directly carried out dct transform to original image pixel data.So the representative of the result of inter-coded macroblocks idct transform is residual information.Get 8 × 8 luminance block, 64 integers " residual error " information separately, respectively each pixel of corresponding 8 × 8.Each 8 × 8 can be divided into again 44 × 4 sub-blocks." residual error " in each 4 × 4 carried out to Information Statistics, ask for respectively average and variance, obtain 16 averages and 16 variances.
2. MPEG-2/H.263 macro block mode
In Mpeg-2, macro block mode has five kinds: 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) and inter pattern (9).It in bracket, is the code name in hands-on process.
3. CBP, full name is coded block pattern(coded block pattern), be used for identifying the coded block pattern of MPEG-2/H.263, the CBP selecting in the present invention series feature is the numerical value for each bit of CBP, totally 6.
The following describes H.264 coded macroblocks pattern (coded message).H.264 coded macroblocks pattern is divided into three groups, and as shown in Figure 6: (1) inter-coded macroblocks pattern Intra(can be divided into 16 × 16,8 × 8,4 × 4 patterns in frame, but, decision tree of the present invention does not need again to this segmentation); (2) inter macroblock: interframe 16 × 16,16 × 8,8 × 16 patterns; (3) the sub-macro block mode of interframe: interframe 8 × 8,8 × 4,4 × 8,4 × 4 patterns; (4) skip pattern because in JM skip pattern to be confirmed to be for the traversal macro block mode result of decision be the macro block of interframe 16 × 16, if this macro block meets without pixel residual error, determines that without the condition of motion vector residual error the coding mode of this macro block is skip.
In the present invention, alternatively, no matter be macro block mode decision tree, or motion vector decision tree, after 3 different Q P decision tree training, can realize according to the optimal decision tree of the adaptive selection of ratio of code check before and after transcoding.For example, as shown in Figure 9, in the time that code check ratio is less than first threshold value, select the decision tree of QP=16, in the time that code check ratio is not less than first threshold value and is less than second threshold value, select the decision tree of QP=25, in the time that code check ratio is not less than the 3rd threshold value, select the decision tree of QP=36.Like this, self adaptation transcoding ability of the present invention can embody.
The following describes the principle of motion vector decision tree of the present invention.
Motion vector Multiple trees is to be respectively 16 × 16,16 × 8,8 × 16,8 × 8 o'clock at macro block, and the level to current macro, movement in vertical direction vector carry out decision tree and adjudicate fast.In 16 × 16 macro blocks, the structure of the motion vector decision tree of QP=25 is as shown in figure 10, similar shown in the motion vector decision tree of other three kinds of macro blocks and Figure 10.(a) figure is the classification judgement to horizontal motion vector, and (b) figure is the classification judgement to movement in vertical direction vector.
Motion vector decision tree also takes multiple QP decision trees to combine the mode of use, can improve the accuracy of the motion vector judgement of video under QP on a large scale, finally promotes transcoding performance.
In coding standard H.264, the scope of motion vector MV is (16,16).In the present invention, motion vector MV can be divided into { 15 ,-12,-9 ,-6 ,-3,0,3,6,9,12,15} is totally 11 classes, utilizing the judgement of motion vector decision tree to obtain after current motion vector, can be directly delivered to coding side, can current motion vector be also search starting point, within the scope of 2 whole pixel precisions, carry out motion search, thereby motion vector is revised.
The following describes the principle that the present invention is applied to resolution decreasing transcoding.
Resolution decreasing video code conversion device can be down to the low code check of low resolution (number of pixels of the wide high direction of middle finger picture of the present invention is reduced to 1/2 simultaneously) from the high code check of high-resolution by video, to adapt to the different demands of terminal equipment.The realization of resolution decreasing to etc. resolution similar, utilize cascade decision tree to carry out decoding end information multiplexing, and macro block mode and motion vector adjudicated fast, thus save the transcoding time.Different is, resolution decreasing is by 4 original decoded macroblock map to 1 coded macroblockss, as shown in figure 11, extract the decoded information of adjacent 4 macro blocks of former sdi video, comprise CBP, macro block mode, average, variance and motion vector, these information are used for adjudicating to the high-speed decision of lower 1 coded macroblocks of resolution decreasing.
In sum, the Video Transcoding Technology that the present invention realizes relies on FFMPEG platform and libx264.The design cycle of the efficient self-adapted video code conversion system based on data mining model as shown in figure 12, comprise parameter arrange module, decoded information extraction module, etc. resolution/resolution decreasing macro block mode judging module and etc. resolution/resolution decreasing motion vector judging module.
About (comprising macro block mode/motion vector etc.) in the encoding and decoding technique in this specification, can be with reference to Publication about Document " Cai Anni, Sun Jingao, multimedia communication technology basis, Electronic Industry Press, 2001 ".
About the Weka machine learning method in this specification, can be with reference to Publication about Document " Guo Ruibo, the machine learning method based on Weka platform be probed into, computer knowledge and technology, 2012 for Li Deyou, Li Lingxia ".
Be limited to miscellaneous for fear of the description that makes this specification, in description in this manual, may carry out the processing such as omission, simplification, accommodation to the part ins and outs that can obtain in above-mentioned list of references or other prior art data, this is understandable for a person skilled in the art.At this, above-mentioned list of references is herein incorporated by reference of text.
Illustrate the execution mode of the fast transcoding method that adopts according to an embodiment of the invention decision tree below.
(1), the H.264 training of macro block mode decision tree
1. from training video, extract data set
MPEG-2 → H.264 fast transcoding technology adopts flower.m2v(MPEG-2 form) as training video; H.263 → H.264 fast transcoding technology adopts football.h263(H.263 form) as training video.
1.1. the decoding of training video
First, carry out the decoding of training video.
MPEG-2/H.263 decoding end: flower.m2v is delivered to MPEG-2 decoding end, and flower.m2v is decoded as flower.yuv by decoding end.Equally, football.h263 is delivered to H.263 decoding end, be decoded as football.yuv.
In decode procedure, each frame extracts residual information and MPEG-2 macro block mode and the CBP of 256 pixels by 16 × 16 macro blocks, and calculating average and the variance of 16 4 × 4 sub-macro blocks in 16 × 16 macro blocks, this 3 category information (MPEG-2 macro block mode, CBP, average and variance) is referred to as MPEG-2 decoded information.MPEG-2 decoded information is saved in to mpeg2.txt.
Equally, each frame extracts residual information and H.263 macro block mode and the CBP of 256 pixels by 16 × 16 macro blocks, and average and the variance of calculating 16 4 × 4 sub-macro blocks in 16 × 16 macro blocks, this 3 category information (H.263 macro block mode, CBP, average and variance) is referred to as H.263 decoded information.H.263 decoded information is saved in h263.txt.
1.2. the H.264 coding of decoded training video
H.264 coding side: flower.yuv and football.yuv are delivered to respectively to H.264 coding side, time fix respectively QP=16 at coding, 25,36 pairs of two yuv videos are encoded, (for example after last flower.yuv coding, obtain QP=16,25,3 h264 files of 36, flower1.h264, flower2.h264, flower3.h264), after football.yuv coding, obtain QP=16,25,3 h264 files (for example, football1.h264, football2.h264, QP=football3.h264) of 36.
1.3.H264 the decoding of the training video after coding
H.264 decoding end: the flower2.h264 of QP=25 is delivered to H264 decoding end, carries out respectively 3 decodings, each decoding all need to decoding end write different code obtain as Fig. 7 in the macro block mode of 3 class node.Concrete steps are as follows.
First,, in the time decoding for the first time, make macro block mode H.264 be categorized as Intra, Skip, the large class of 16 × 16(), the large class of 8 × 8(); In the time that the flower2.h264 of QP=25 is decoded as to flower2.yuv, can obtain and belong to which the information in these 4 kinds of macro block modes classification about the macro block mode of each macro block of every frame, be saved in class-1.txt(macro block mode sort file) in;
In the time decoding for the second time, write code in decoding end, be divided into Intra, Skip, the large class of 16 × 16(at macro block mode), the large class of 8 × 8() prerequisite under, further by large 16 × 16(class) be subdivided into 16 × 16,16 × 8,8 × 16, and Intra, Skip, the large class of 8 × 8() classify constantly, obtain altogether 6 kinds of macro block modes classification; In the time that the flower2.h264 of QP=25 is decoded as flower2.yuv, obtain the corresponding relation of each macro block of these 6 macro block mode classification and every frame, be saved in class-2.txt.
In the time decoding for the third time, write code in decoding end, be divided under Intra, Skip, 16 × 16,8 × 8 prerequisite, by large 8 × 8(class at macro block mode) be subdivided into 8 × 8,8 × 4,4 × 8,4 × 4, other 3 classification are constant, obtain altogether 7 kinds of macro block mode classification; In the time that the flower2.h264 of QP=25 is decoded as flower2.yuv, can obtain this 7 macro block mode classification, be saved in class-3.txt.
The flower2.h264 decode procedure of QP=25 extracts 3 macro block mode classification by 3 class node, so, for other two QP(16,36) under the h264 file relevant to MPEG-2 (flower1.h264, flower3.h264), repeat said process.Like this, QP=16,25,36 flower1.h264, flower2.h264, flower3.h264 will extract altogether 9 macro block modes classification, generate 9 macro block mode sort files.
Equally, QP=16,25,36 football1.h264, football2.h264, football3.h264 also will extract 9 macro block modes classification, generate 9 macro block mode sort files.
2. generation data set
As Fig. 7, in the class node 1 of macro block mode decision tree, the flower2.h264 of QP=25 by MPEG-2 decoded information mpeg2.txt and the macro block mode that H.264 decoding end obtains for the first time classification class-1.txt merge, obtain the data set at class node 1 place; By MPEG-2 decoded information mpeg2.txt with after the macro block mode that H.264 decoding end obtains for the second time classification class-2 merging, only extract 16 × 16,16 × 8,8 × 16 corresponding data sets of classification (data line), be the data set at class node 3 places; By MPEG-2 decoded information mpeg2.txt with after the macro block mode that H.264 decoding end obtains for the third time classification class-3.txt merging, only extract the corresponding data set of 8 × 8,8 × 4,4 × 8,4 × 4 classification, be the data set at class node 4 places.The form of data set as shown in Figure 8.
Known according to Fig. 7 macro block mode decision tree, the flower.h264 of flower.m2v → QP=25 can generate 3 data sets, and flower.m2v → QP=16,25,36 flower.h264 can generate 9 data sets so; Same, football.h263 → QP=16,25,36 football.h264 can generate 9 data sets.Each data set is organized into arff file format (18 arff files altogether), as shown in figure 13, and delivers in Weka machine learning instrument and trains..
3. training dataset
Each arff file is delivered in Weka machine learning instrument, adopted J48 grader to excavate the relation between the decoded information of each arff data centralization MPEG-2/H.263 and the classification of macro block mode H.264.
Particularly, utilize the arff data set (decoded information+above-mentioned macro block mode classified information that decoding produces for the first time) of J48 grader training class node 1, obtain J48 training result as Figure 14, that is, obtained the false code form of the binary tree being produced by J48 grader.Same, the arff data set of training class node 3, class node 4 also will obtain J48 training result, similar with Figure 14.
Flower.m2v → QP=16,25,36 flower.h264 have 9 arff data sets, can train and obtain 9 J48 training results (corresponding 3 binary trees of each QP, 9 binary trees altogether); Football.h263 → QP=16,25,36 football.h264 have 9 arff data sets, can train and obtain 9 J48 training results (corresponding 3 binary trees of each QP, 9 binary trees altogether).
3 nodes that 3 J48 training results (3 binary trees) that each QP is corresponding have formed a coded macroblocks mode decision tree (, node 1,3,4 in Fig. 7), the node 2 of coded macroblocks mode decision tree can adopt known simple decision method to obtain, and does not need to produce by training.Like this, 39 J48 training results corresponding to QP have formed altogether 3 coded macroblocks mode decision trees.
(2), the training of motion vector decision tree
The training process of the training process of motion vector decision tree and macro block mode decision tree is similar, the decoded information difference of just extracting, the structure difference of decision tree, as shown in figure 10.Extraction, generation and the training process of motion vector decision tree data set can be reduced to following content.
1. extract data set
Because the classification of motion vector is more, so in order to improve classify accuracy, the present invention adopts the video of multiple different motion degree as training video, comprises 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 end: flower.m2v, football.m2v, soccer.m2v, foreman.m2v are delivered to MPEG-2 decoding end, be decoded as flower.yuv, football.yuv, soccer.yuv, foreman.yuv, the average and variance, MPEG-2 macro-block coding pattern, CBP and the horizontal motion vector that in the time of the each frame of decoding, extract 16 4 × 4 sub-macro blocks by 16 × 16 macro blocks, these information are referred to as MPEG-2 decoded information I.Again 4 m2v videos are delivered to MPEG-2 decoding end, extract average and variance, MPEG-2 macro-block coding pattern, CBP and the movement in vertical direction vector of 16 4 × 4 sub-macro blocks in the time of decoding by 16 × 16 macro blocks, these information are referred to as MPEG-2 decoded information II.
H.263 decoding end: flower.h263, football.h263, soccer.h263, foreman.h263 are delivered to H.263 decoding end, be decoded as flower.yuv, football.yuv, soccer.yuv, foreman.yuv, extract the average of 16 4 × 4 sub-macro blocks and variance, H.263 macro-block coding pattern, CBP and horizontal motion vector by 16 × 16 macro blocks in decoding when each frame, these information are referred to as H.263 decoded information I.Again 4 m2v videos are delivered to MPEG-2 decoding end, extract the average of 16 4 × 4 sub-macro blocks and variance, H.263 macro-block coding pattern, CBP and movement in vertical direction vector by 16 × 16 macro blocks in decoding when each frame, these information are referred to as H.263 decoded information II.
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 video (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 that coding side is produced are delivered to decoding end, be decoded as 12 yuv videos, and extract the horizontal direction of each macro block in each frame and the motion vector classification information of vertical direction in decode procedure.The horizontal motion vector that the h264 video decode of identical QP is obtained combines, and the movement in vertical direction vector that the h264 video decode of identical QP is obtained combines.Finally, MPEG-2 → H.264 have 1 horizontal motion vector classification and 1 movement in vertical direction vector to classify; H.263 → H.264 there are 1 horizontal motion vector classification and 1 movement in vertical direction vector to classify.
2. the generation of data set
The horizontal motion vector classification that the MPEG-2 decoded information I of m2v video and QP=16,25,36 h264 video decode are obtained merges, and obtains 3 data sets; The movement in vertical direction vector classification that the MPEG-2 decoded information II of m2v video and QP=16,25,36 h264 video decode are obtained merges, and obtains 3 data sets.Same, H.263 the horizontal motion vector classification that the decoded information I of h263 video and QP=16,25,36 h264 video decode are obtained merges, obtain 3 data sets, H.263 the movement in vertical direction vector classification that the decoded information II of h263 video and QP=16,25,36 h264 video decode are obtained merges, and obtains 3 data sets.So MPEG-2 → H.264 training process symbiosis becomes 6 data sets, H.263 → H.264 training process symbiosis becomes 6 data sets.These 12 data sets are organized into arff form, deliver in Weka machine learning instrument and process.
3. training arff data set
The arff form data set that previous step is extracted is delivered in Weka machine learning instrument.Because J48 grader is trained the J48 training result obtaining, in the time that code is realized, size of code is huger, so be difficult for transplanting and revising.Another kind of grader Jrip can realize simple classification.Arff form data set is carried out to data mining with Jrip grader, can obtain the Jrip training result as Figure 15.12 arff form data sets can be trained and be obtained 12 Jrip training results (MPEG-2: corresponding 2 (the horizontal MV and vertical MV) of each QP, H.263: each QP correspondence 2 (horizontal MV and vertical MV)).
(3), H.264 the cascade of macro block mode decision tree and motion vector decision tree realizes
Realizing the macro block mode decision tree of Fig. 7, is that the J48 training result code of each class node in decision tree is realized.Realizing the motion vector decision tree of Figure 10, is that the Jrip training result code of class node in level, vertical direction decision tree is realized.
The QP=25 cascade decision-tree model of MPEG-2 → is H.264 that the motion vector decision tree of the macro block mode decision tree of QP=25 and QP=25 is cascaded up.By step 3 can obtain with Fig. 7 macro block mode decision tree in 3 class node, 3 J48 training results one to one, can be obtained and Figure 10 motion vector decision tree classification node Jrip classification results one to one by step 4.
First write the J48 training result of the 1st class node, obtain Intra, Skip, 16 × 16,8 × 8 classification; Then on 16 × 16 basis of classification, write the J48 training result of the 3rd class node with code; On 8 × 8 basis of classification, write the J48 training result of the 4th class node with code equally.Through the cascade of class node 1 and class node 3, and the cascade of class node 1 and class node 4, final 9 kinds of macro-block coding pattern classification are H.264 complete.So far, the encode of macro block mode decision tree finishes.After 9 kinds of macro block modes are H.264 determined, for 16 × 16,16 × 8,8 × 16,8 × 8 macro block mode classification, need cascade motion vector decision tree, adjudicate fast motion vector.As Figure 10, write the Jrip training result of class node in horizontal motion vector decision tree with code; Meanwhile, write the Jrip training result of class node in vertical motion vector decision tree with code.So far, all encodes of the macro block mode decision tree of QP=25 and motion vector decision tree.
In MPEG-2 → H.264, encode is realized 3 J48 training results and 2 Jrip training results by each QP cascade decision tree, so 3 different Q P cascade decision trees altogether encode realize 9 J48 training results and 6 Jrip training results.Same, H.263 → H.264 in, encode is realized 9 J48 training results and 6 Jrip training results by 3 different Q P cascade decision trees.
This part is that the classification results code that training is obtained is realized, and can be applied to actual transcoding.
(4), the application process of cascade decision tree
When actual transcoding, input video first passes through MPEG-2 or decoding end H.263, then enters H.264 coding side.One section of video is made up of a lot of two field pictures.The first two field picture enters coding side after having decoded and completes transcoding process, then carries out decoding and the cataloged procedure of next frame.The like.
One two field picture (such as size is 704 × 576) of video is divided into the macro block of a lot of nonoverlapping 16 × 16, and the position of macro block is identified by horizontal coordinate and vertical coordinate.In decoding end, in one two field picture, each 16 × 16 macro blocks are decoded into respectively yuv video, when a macro block is decoded when complete, enter the decoding of next macro block and extract the residual information of 256 pixels in each 16 × 16 macro blocks according to macro block coordinate information, and according to 4 × 4 sub-macro block computation of mean values and variances, have 16 averages and 16 variances, also have coding mode, CBP and the horizontal motion vector movement in vertical direction vector of each 16 × 16 macro blocks of MPEG-2/H.263.These information all will be delivered to H.264 coding side.
All decode when complete when all macro blocks in a frame, enter H.264 coding side.At coding side H.264, according to the QP size of each macro block, select applicable macro block mode decision tree and motion vector decision tree; The decoded information passing over is by the judgement for each macro block mode decision tree and motion vector decision tree.After the macro block mode decision tree of first macro block has been applied, the macro block mode that judgement obtains will be saved to coding side.If macro block mode judgement one in 16 × 16,16 × 8,8 × 16 and 8 × 8 macro block modes that obtains, also needs to enter motion vector decision tree flow process, motion vector is adjudicated to the motion vector obtaining and be saved in coding side.In addition, also motion vector can be adjudicated to the motion vector that obtains as the starting point of motion search among a small circle, carry out 2 motion search in whole pixel coverage, the motion vector that quick judgement is obtained is saved in coding side after finely tuning; If macro block mode judgement obtains 8 × 4,4 × 8,4 × 4, in Intra, Skip macro block mode one, utilize traditional estimation and motion search mode (in precoding process) to obtain motion vector, be finally also saved in coding side.For current macro, will enter the next code stage after obtaining macro block mode and motion vector information, until that this macro block is encoded is complete.After first macroblock coding, second macro block will repeat above process, until all macro blocks are all encoded complete in a frame.
Be more than decoding, the coding flow process of a two field picture, the transcoding process of next frame is identical with it.When all frames of one section of video are after all transcoding finishes, trans-coding system just can be exported the H.264 video file of coding standard.
(5), macro block mode decision tree and motion vector decision tree under resolution decreasing
Concrete training process and the way of realization of what forward part realized is etc. under resolution macro block mode decision tree and level, vertical motion vector decision tree.Training and the realization of what this part content realized is under resolution decreasing macro block mode decision tree and level, vertical motion vector decision tree, due to process with etc. the process under resolution similar, therefore brief description.
The resolution decreasing technology that the present invention realizes can be applied in the transcoding technology of MPEG-2 → H.264 and H.263 → H.264.The transcoder of resolution decreasing is to carry out respectively in the horizontal and vertical directions 2 times down-sampled, and the video frame size of falling resolution is 1/4 of former video frame size.As shown in figure 11, in MPEG-2/H.263 resolution decreasing process, 1 macro block in frame of video under 4 corresponding resolution decreasings of space adjacent macroblocks in former frame of video.
To etc. the flow process of resolution transcoder similar, adopt the data mining model of cascade decision tree to carry out transcoding to input video, different, macro block mode decision tree utilizes residual information, CBP and the macro block mode of 4 macro blocks of former 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, macro block mode and the horizontal motion Vector Message of 4 macro blocks, decision-making goes out the horizontal motion vector of 1 macro block of resolution decreasing video, vertical motion vector decision tree utilizes residual information, CBP, macro block mode and the movement in vertical direction Vector Message of 4 macro blocks, and decision-making goes out the movement in vertical direction vector of 1 macro block of resolution decreasing video.
Under resolution decreasing, H.264 training process and the implementation of macro block mode decision tree and level, vertical motion vector decision tree are similar.The training video adopting is the same, and the MEPG-2/H.263 decoded information just extracting is 4 macro block informations that space is adjacent, and the H.264 macro block mode/motion vector information of extraction is the information of corresponding 1 macro block under resolution decreasing.Using MPEG-2/H.263 decoded information and H.264 macro block mode/motion vector information merge one by one as data set.The data set number obtaining under resolution decreasing with etc. the data set number under resolution identical.
After data set is ready, the form that is organized into arff file is delivered to Weka instrument and is carried out classification based training, finally obtains macro block mode decision tree and motion vector decision tree that performance is good, finally by its encode.
In the trans-coding system of resolution decreasing the application of macro block mode decision tree and motion vector decision tree to etc. similar under resolution, flow process is the same, is just original size in the video frame size of decoding end, for example 704 × 576, extract the decoded information of each macro block; Enter H.264 after coding side, it is original 1/4th that the size of frame of video becomes, and 352 × 288.At this moment read the QP of each macro block in a frame, according to QP size trade-off decision tree, obtain after macro block mode and motion vector, enter the next code stage.Decode one by one, encode, until all videos all transcoding is complete.
(6), efficient self-adapted video code conversion system
Efficient self-adapted video code conversion system framework under FFMPEG platform is described according to an embodiment of the invention below.
This part realization be to train and macro block mode plan tree and the motion vector decision tree of encode are applied in actual transcoding technology, realize adaptive fast transcoding, replace original complete solution entirely to compile technology.
The realization of efficient self-adapted video code conversion relies on full-fledged Open Source Code FFMPEG and the joint development of libx264.FFMPEG is an Audio and Video stream handling implement of increasing income, and it provides and has recorded, the total solution of conversion and fluidisation audio frequency and video, has also comprised FA audio/video encoding and decoding storehouse libavcodec.FFMPEG framework is very complete, has powerful decapsulation form support, use FFMPEG center of gravity can be concentrated on to video code conversion part as system-based and without consider decapsulation.
As shown in Figure 4, several main modular of efficient self-adapted video code conversion system are: parameter arrange module, standard decoding/coding module, enter video information extraction module, etc. resolution/resolution decreasing macro block high-speed decision module, etc. the motion vector high-speed decision module of resolution/resolution decreasing.Standard decoding/coding module is realized and being realized according to the source code of FFMPEG and libx264.The macro block mode high-speed decision module of the resolution/resolution decreasing such as calling while enabling fast transcoding pattern directly determines macro block mode, follow-up motion estimation operation is carried out on the basis of selected macroblock, resolution/resolution decreasing motion vector module quick decision motion vector such as on each macro block, starts.Other steps of cataloged procedure are as constant in maintenance primary standard decoding/encoding module implementations such as rate distortion operations.The concrete Design and implementation of other modules is as follows.
1. parameter arranges module
This module is used for receiving order and carries out setting parameter.In actual application, system Sampling network situation or terminal processing capacity return information, can according to this information carry out the final output code flow of these setting parameters bit-rates values, whether carry out the operations such as resolution decreasing processing.2 times of resolution decreasing transcodings due to what relate to herein, so will judge whether the video before and after transcoding is 2 times of resolution decreasings according to the resolution sizes of target code stream.
Module input: to the requirement of transcoding output video, comprise coded format and resolution decreasing requirement; Module output: corresponding parameter is set.
2. information extraction modules
If quick mode, in opening, needs to carry out the first step of fast transcoding, the relevant information of input video is extracted.What need to extract is 16 averages of list entries residual error sub-block and 16 variances, macro block mode, 6 coded macroblocks pattern information, motion vector informations.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.The realization of this module corresponding MPEG-2 or H.263 carry out in decoder in FFMPEG.
Module input: original video frame information; Module output: 39 or 48 features that each macro block is corresponding.
3. the quick judging module of macro block mode
If fast transcoding pattern is opened, the information that this module can be obtained information extraction modules in when coding is delivered to the mode decision result of directly obtaining current macro in the decision-tree model of layering, skips over traversal and select the step of best macro block mode.In addition, whether carry out 2 times of resolution decreasing operations according to transcoding and can select different decision-tree models.Input etc. resolution situation module: 39 information characteristics of macro block; Module output: the pattern that this macro block adopts.
Resolution decreasing situation module input: 39 × 4 information characteristics of 4 corresponding macro blocks; Module output: this resolution decreasing macro block institute employing pattern.
4. the quick judging module of motion vector
If fast transcoding pattern is opened, this module can correspond in coded macroblocks pattern in the time of coding.For a kind of macro block mode, the information that information extraction modules is obtained is delivered to the motion vector that directly obtains the horizontal direction of current macro in horizontal motion vector decision-tree model; The information of extraction is delivered to the motion vector that directly obtains the vertical direction of current macro in movement in vertical direction vector decision-tree model simultaneously.After motion vector after being adjudicated, be saved in coding side; Also can in 2 whole pixel coverages, carry out motion search, finally obtain more accurate motion vector.Then encoder utilizes the motion vector of both direction to carry out next step coding.
In this module, only 16 × 16,16 × 8,8 × 16,8 × 8 macro block mode is carried out the quick judgement of motion vector, other macro block modes take the method for interior motion search to obtain current motion vector on a large scale.
Etc. resolution module input-horizontal direction: 40 information characteristics of macro block; Module output: the motion vector of the horizontal direction of this macro block.
Etc. resolution module input-vertical direction: 40 information characteristics of macro block; Module output: the motion vector of the vertical direction of this macro block.
Resolution decreasing module input-horizontal direction: 40 × 4 information characteristics of 4 corresponding macro blocks; Module output: the motion vector of the horizontal direction of this resolution decreasing macro block.
Resolution decreasing module input-vertical direction: 40 × 4 information characteristics of 4 corresponding macro blocks; Module output: the motion vector of the vertical direction of this resolution decreasing macro block.
In sum, those skilled in the art will appreciate that the above embodiment of the present invention can be made various modifications, modification and be replaced, it all falls into the protection scope of the present invention limiting as claims.

Claims (18)

1. the video transcoding method efficiently and adaptively based on data mining, comprises the following steps:
The video for the treatment of transcoding of step 1, input the first compression standard;
Step 2, the described video for the treatment of transcoding is decoded, generate video to be encoded, and extract the decoded information of each macro block of each frame of video;
Step 3, extracted decoded information is input to coded macroblocks mode decision tree, sets each macro block of each frame of video of determining video to be encoded by coded macroblocks mode decision by the coded macroblocks pattern of employing;
Step 4, according to the motion vector of determined coded macroblocks pattern and each macro block, each macro block of the each frame of video to video to be encoded carries out the coding of the second compression standard, thereby by Video coding to be encoded is the video after the transcoding of the second compression standard.
2. video transcoding method as claimed in claim 1, wherein, described the first compression standard is MPEG-2 or compression standard H.263, described the second compression standard is compression standard H.264, described video to be encoded is the video of yuv format, and described decoded information comprises residual information and the coded block pattern information of each macro block of each frame of video.
3. video transcoding method as claimed in claim 2, wherein, in described step 2, also needs the motion vector information of the each macro block that extracts each frame of video.
4. video transcoding method as claimed in claim 3, wherein, described motion vector information comprises horizontal motion vector information and vertical motion vector information.
5. video transcoding method as claimed in claim 4, wherein, described coded macroblocks pattern comprises following pattern: Intra, 16 × 16,16 × 8,8 × 16,8 × 8,8 × 4,4 × 8,4 × 4, skip, wherein 16 × 16,16 × 8,8 × 16 form first class, and 8 × 8,8 × 4,4 × 8,4 × 4 form second largest class.
6. video transcoding method as claimed in claim 5, wherein, after described step 3, further comprising the steps of:
If the coded macroblocks pattern of employing is belonged in 16 × 16,16 × 8,8 × 16 and 8 × 8 by determined certain macro block of step 3-1, extracted decoded information and motion vector information are input to described motion vector decision tree, determine the motion vector of each macro block of each frame of video of video to be encoded by described motion vector decision tree;
If the coded macroblocks pattern of employing is not belonged in 16 × 16,16 × 8,8 × 16 and 8 × 8 by determined certain macro block of step 3-2, determine the motion vector of each macro block of each frame of video of video to be encoded by estimation and motion search mode.
7. video transcoding method as claimed in claim 6, wherein, in described step 2, also extracts the quantization parameter of each macro block of each frame of video,
And, in described step 3, if the value of the quantization parameter extracting is 12~21, described coded macroblocks mode decision tree is the first coded macroblocks mode decision tree, if the value of the quantization parameter extracting is 22~30, described coded macroblocks mode decision tree is the second coded macroblocks mode decision tree, if the value of the quantization parameter extracting is 31~40, described coded macroblocks mode decision tree is the 3rd coded macroblocks mode decision tree
And wherein, the described first to the 3rd coded macroblocks mode decision tree corresponds respectively to different quantization parameters 16,25,36.
8. the video transcoding method as described in claim 6 or 7, in described step 3, if the value of the quantization parameter extracting is 12~21, described motion vector decision tree is the first horizontal motion vector decision tree and the first vertical motion vector decision tree, if the value of the quantization parameter extracting is 22~30, described motion vector decision tree is the second horizontal motion vector decision tree and the second vertical motion vector decision tree, if the value of the quantization parameter extracting is 31~40, described motion vector decision tree is the 3rd horizontal motion vector decision tree and the 3rd vertical motion vector decision tree,
And wherein, the described first to the 3rd horizontal motion vector decision tree corresponds respectively to different quantization parameter the 16,25,36, described first to the 3rd vertical motion vector decision trees and corresponds respectively to different quantization parameters 16,25,36.
9. video transcoding method as claimed in claim 6, wherein, when in the time that the ratio of the code check of the video of transcoding and the code check by the definite transcoding rear video of precoding is less than first threshold, described coded macroblocks mode decision tree is the first coded macroblocks mode decision tree, in the time that described ratio is not less than first threshold value and is less than second threshold value, described coded macroblocks mode decision tree is the second coded macroblocks mode decision tree, in the time that described ratio is not less than the 3rd threshold value, described coded macroblocks mode decision tree is the 3rd coded macroblocks mode decision tree
And wherein, the described first to the 3rd coded macroblocks mode decision tree corresponds respectively to different quantization parameters 16,25,36.
10. the video transcoding method as described in claim 6 or 7, wherein, in described step 3, when in the time that the ratio of the code check of the video of transcoding and the code check by the definite transcoding rear video of precoding is less than first threshold, described motion vector decision tree is the first horizontal motion vector decision tree and the first vertical motion vector decision tree, in the time that described ratio is not less than first threshold value and is less than second threshold value, described motion vector decision tree is the second horizontal motion vector decision tree and the second vertical motion vector decision tree, in the time that described ratio is not less than the 3rd threshold value, described motion vector decision tree is the 3rd horizontal motion vector decision tree and the 3rd vertical motion vector decision tree,
And wherein, the described first to the 3rd horizontal motion vector decision tree corresponds respectively to different quantization parameter the 16,25,36, described first to the 3rd vertical motion vector decision trees and corresponds respectively to different quantization parameters 16,25,36.
11. video transcoding methods as claimed in claim 7, wherein, for each different quantization parameter, generate corresponding described coded macroblocks mode decision tree by following steps respectively:
Step 11, the training video of the first compression standard is decoded, generate training video to be encoded, and extract the decoded information of each macro block of each frame of video;
Step 12, fixed quantisation parameter, be encoded to training video to be encoded 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 coded macroblocks pattern of each macro block of each frame of video;
Step 14, the decoded information of each macro block of each frame of video and coded macroblocks pattern are input to the J48 grader in Weka machine learning instrument, produce the described coded macroblocks mode decision corresponding with fixing quantization parameter and set.
12. video transcoding methods as claimed in claim 11, wherein, described step 13 comprises:
Step 13-1, the training video of the second compression standard is decoded for the first time, the coded macroblocks pattern that obtains each macro block of each frame of video belongs to which the information in Intra, Skip, first class, second largest class;
Step 13-2, the training video of the second compression standard is decoded for the second time, the coded macroblocks pattern that obtains each macro block of each frame of video belongs to which the information in Intra, Skip, 16 × 16,16 × 8,8 × 16, second largest class;
Step 13-3, the training video of the second compression standard is decoded for the third time, the coded macroblocks pattern that obtains each macro block of each frame of video belongs to which the information in Intra, Skip, first class, 8 × 8,8 × 4,4 × 8,4 × 4.
13. video transcoding methods as claimed in claim 12, wherein, described step 14 comprises:
The information that step 14-1, basis obtain in described step 11 and described step 13-1, generate the first node of described coded macroblocks mode decision tree, which in Intra, Skip, first class, second largest class be the coded macroblocks pattern of its each macro block that is used for judging each frame of video belong to;
The information that step 14-2, basis obtain in described step 11 and described step 13-2, generate the Section Point of described coded macroblocks mode decision tree, it is used for judging that at first node the coded macroblocks pattern of certain macro block belongs to first class, and which in 16 × 16,16 × 8,8 × 16 be the coded macroblocks pattern of judging this macro block belong to;
The information that step 14-3, basis obtain in described step 11 and described step 13-3, generate the 3rd node of described coded macroblocks mode decision tree, it is used for judging that at first node the coded macroblocks pattern of certain macro block belongs to second largest class, and which in 8 × 8,8 × 4,4 × 8,4 × 4 be the coded macroblocks pattern of judging this macro block belong to.
14. video transcoding methods as claimed in claim 11, wherein, for three different quantization parameters 16,25 and 36, carry out respectively described step 12 to 14, generate respectively the described first to the 3rd coded macroblocks mode decision tree.
15. video transcoding methods as claimed in claim 8, wherein, described motion vector decision tree generates by following steps:
Step 21, the training video of the first compression standard is decoded, generate training video to be encoded, and extract decoded information and the horizontal and vertical motion vector information of each macro block of each frame of video;
Step 22, fixed quantisation parameter, be encoded to training video to be encoded 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 horizontal and vertical motion vector information of each macro block of each frame of video;
Step 24, the decoded information of each macro block of each frame of video and horizontal and vertical motion vector information are input to the Jrip grader in Weka machine learning instrument, produce described horizontal and vertical motion vector decision tree.
16. video transcoding methods as claimed in claim 15, wherein, for three different quantization parameters 16,25 and 36, carry out respectively described step 22 to 24, generate respectively the described first to the 3rd horizontal and vertical motion vector decision tree.
17. video transcoding methods as claimed in claim 1, wherein, the width of the video for the treatment of transcoding of described the first compression standard and the number of pixels of short transverse are respectively the twice of the video of described the second compression standard.
18. 1 kinds for carrying out the video code conversion system according to the video transcoding method one of claim 1 to 17 Suo Shu, comprises following part:
Parameter arranges module, is used for carrying out described step 1, and carrys out parameters according to the attribute of the video after video and the transcoding of transcoding;
Information extraction modules, is used for carrying out described step 2,
The quick judging module of macro block mode, is used for carrying out described step 3,
The quick judging module of motion vector, is used for carrying out described step 3-1,3-2;
Standard code module, is used for carrying out described 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 true CN103888770A (en) 2014-06-25
CN103888770B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105007483A (en) * 2015-07-09 2015-10-28 武汉大学 Screen content encoding and decoding method compatible with H264 standard
WO2016119386A1 (en) * 2015-01-30 2016-08-04 中兴通讯股份有限公司 Video signal processing method, device and computer storage media
CN108174204A (en) * 2018-03-06 2018-06-15 中南大学 A kind of interframe fast schema selection method based on decision tree
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
CN112565770A (en) * 2020-12-08 2021-03-26 深圳万兴软件有限公司 Video coding method and device, computer equipment and storage medium
CN113347415A (en) * 2020-03-02 2021-09-03 阿里巴巴集团控股有限公司 Coding mode determining method and device

Citations (4)

* 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
WO2008091687A2 (en) * 2007-01-25 2008-07-31 Florida Atlantic University Reduced resolution video transcoding with greatly reduced complexity
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008091687A2 (en) * 2007-01-25 2008-07-31 Florida Atlantic University Reduced resolution video transcoding with greatly reduced complexity
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

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016119386A1 (en) * 2015-01-30 2016-08-04 中兴通讯股份有限公司 Video signal processing method, device and computer storage media
CN105007483A (en) * 2015-07-09 2015-10-28 武汉大学 Screen content encoding and decoding method compatible with H264 standard
CN105007483B (en) * 2015-07-09 2017-11-14 武汉大学 A kind of screen content coding-decoding method compatible with H264 standards
CN108174204A (en) * 2018-03-06 2018-06-15 中南大学 A kind of interframe fast schema selection method based on decision tree
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
CN112565770A (en) * 2020-12-08 2021-03-26 深圳万兴软件有限公司 Video coding method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN103888770B (en) 2018-03-09

Similar Documents

Publication Publication Date Title
CN103888770A (en) Efficient self-adaptive video transcoding system based on data mining
CN105359531B (en) Method and system for determining for the coder side of screen content coding
CN105684409B (en) Each piece is indicated using hashed value in video and image coding and decoding
CN105874795B (en) When wavefront parallel processing is activated to the rule of intra-picture prediction mode
CN102006475B (en) Video coding and decoding device and method
CN103402099B (en) The method and system that the picture-level rate of Video coding controls
KR101941955B1 (en) Recursive block partitioning
CN105917650A (en) Block vector prediction in video and image coding/decoding
CN105900420A (en) Selection of motion vector precision
CN104837019B (en) AVS to HEVC optimization video transcoding methods based on SVMs
CN106031177A (en) Host encoder for hardware-accelerated video encoding
CN108028919A (en) Method and device for the context modeling of syntactic element in image and coding and decoding video
CN105706450A (en) Encoder decisions based on results of hash-based block matching
CN101888546B (en) A kind of method of estimation and device
CN101068366A (en) H.264 based multichannel video transcoding multiplexing method and multiplexer
CN104041035A (en) Lossless Coding and Associated Signaling Methods for Compound Video
CN102137263A (en) Distributed video coding and decoding methods based on classification of key frames of correlation noise model (CNM)
CN105659606A (en) Features of base color index map mode for video and image coding and decoding
CN101924943B (en) Real-time low-bit rate video transcoding method based on H.264
CN105847795A (en) Method and apparatus for intra block copy mode in video coding system with pipeline architecture
US20230291909A1 (en) Coding video frame key points to enable reconstruction of video frame
CN102227911A (en) Device, method and program for image prediction encoding, device, method and program for image prediction decoding, and encoding/decoding system and method
CN101068355A (en) MPEG2-H.264 code fast converting method
CN107404648B (en) A kind of multi-channel video code-transferring method based on HEVC
CN109922336A (en) The inter-frame prediction method and device of video data

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