Reduce the method for video decoding complexity by decoding quality control
Technical field
The present invention relates to video playing terminal, specially refer to the limited video playing terminal of multimedia processing capability.
Background technology
The MPEG video compression standard is present most popular video compression standard.The decode procedure of MPEG video generally comprises following steps:
1), elongated entropy decoding;
2), inverse quantization;
3), inverse discrete cosine transformation (IDCT, Inverse Discrete Cosine Transform);
4), motion compensation.
H.264 waiting in the new standard, after motion compensation, also comprising block elimination filtering link in the ring.The concrete ins and outs that above-mentioned decode procedure is realized can be referring to list of references 1: " ISO/IEC 14496-2 " (video encoding and decoding standard of MPEG4) and list of references 2: " ISO/IEC 14496-10 " (video encoding and decoding standard H.264).
Along with the increase of MPEG video coding complexity, the pressure of video decode is also increasing.In the MPEG audio/video player system; run into such problem through regular meeting: the average decoding complex degree that is input to the video sequence of playback terminal has exceeded the disposal ability of terminal; after the intact several frame video images of decoder decode; the current time of system just lags behind the normal demonstration time of frame of video; decode frame by frame if proceed; then can further aggravate the hysteresis that video image shows, what cause that the user sees is the video of slow play.
The method of handling this problem at present generally is to carry out frame losing: promptly the video sequence of input is decoded as possible, if current system time has lagged behind the input video frame that will decode, then abandon this frame of video, do not decode.Though the demonstration that frame losing can keep decoded video image is demonstration time of requiring of video image around as far as possible,, frame losing means the decline of display frame frequency, causes the discontinuous and sense that pauses when watching easily.So, how under the limited situation of terminal processing capacity, alleviating the pressure of video decode, the demonstration of avoiding frame losing to cause pauses, and just has actual application value.
Summary of the invention
The drawback that the broadcasting pictures that frame losing causes when the objective of the invention is to overcome prior art carrying out video playback on the terminal of multimedia processing capability deficiency is paused, alleviate the video decode pressure of terminal, under the principle that as far as possible keeps video quality, improve the fluency of video playback.
To achieve these goals, the invention provides a kind of method, comprise following steps by decoding quality control reduction video decoding complexity:
1), video terminal receiver, video frame, and calculate the current time in system of video terminal and the difference between the current video frame Presentation Time Stamp;
2), calculate resulting difference according to step 1) the current video decode pressure of video terminal estimated, determine the rank of video decode pressure;
3), utilize step 2) rank of the video decode pressure that obtains, current video frame is carried out decoding quality control, according to colourity priority treatment strategy and edge priority treatment strategy, the shortcut calculation when selecting decoding, determine to simplify the degree of handling, then current video frame is done decode operation.
In the technique scheme, in described step 3), the shortcut calculation in described when decoding comprises that inverse discrete cosine transformation is simplified computing and computing is simplified in motion compensation, adopts wherein a kind of when video decode at least; Described inverse discrete cosine transformation is simplified computing and replace the inverse discrete cosine transformation computing in video decoding process, and described motion compensation is simplified computing and replace the motion compensation computing in video decoding process.
In described step 3), the shortcut calculation during described the decoding also comprises block elimination filtering control in the ring, and in video decoding process, block elimination filtering is controlled block elimination filtering in the ring that replaces in the video decoding process in the described ring.
Described colourity priority treatment strategy be utilize human eye to the sensitivity of colourity far below characteristics to the sensitivity of brightness, when the decoding that reduces complexity, preferentially adopt inverse discrete cosine transformation to simplify block elimination filtering control in computing or motion compensation simplification computing or the ring to chrominance block; Described edge priority treatment strategy is to utilize the people generally higher to the degree of concern of video image middle section, the characteristics lower to the concern of video image fringe region, when the decoding that reduces complexity, preferentially piece or the macro block to the video image edge adopts inverse discrete cosine transformation to simplify block elimination filtering control in computing or motion compensation simplification computing or the ring.
It is that the part discrete cosine transform coefficient high fdrequency component in the decoding block is changed to zero that described inverse discrete cosine transformation is simplified computing, and the sparse matrix that utilizes the discrete cosine transform coefficient low frequency component to constitute carries out inverse discrete cosine transformation.
It is the pixel accuracy that reduces the motion vector in the frame of video decode procedure that computing is simplified in described motion compensation, simplifies the pixel interpolation computing in the motion compensation.
Block elimination filtering control is the operation that the piece of controlling is banned use of block elimination filtering in the ring in the described ring.
In described step 3), the degree that described definite simplification is handled is meant simplifies computing to inverse discrete cosine transformation, determines the ratio of the high fdrequency component of zero setting in the inverse discrete cosine transformation; Computing is simplified in motion compensation, determined the degree of motion vector precise decreasing.
In described step 2) in, the rank of described definite video decode pressure is to set at least one threshold value in the possible span of difference, thereby form different zones, be positioned at the rank that video decode pressure is determined in which zone according to the resulting difference of step 1).
Described threshold value has 6, represents with a, b, c, d, e, f respectively from small to large according to the time; Described rank has 7, represents with S1~S7 respectively, wherein,
S1:D<a;
S2:a<=D<b;
S3:b<=D<c;
S4:c<=D<d;
S5:d<=D<e;
S6:e<=D<f;
S7:D>=f。
In described step 3), to the different video decode algorithm of video decode pressure employing of different stage, wherein,
A, when decoding pressure when being S1, adopt conventional video decode algorithm;
B, when decoding pressure when being S2, when video decode, adopt inverse discrete cosine transformation to simplify computing to the chrominance block in each 1/4 zone about video image and replace the inverse discrete cosine transformation computing;
C, when decoding pressure when being S3, when video decode, adopt inverse discrete cosine transformation to simplify computing to the chrominance block in each 1/4 zone about video image and replace the inverse discrete cosine transformation computing, adopt motion compensation to simplify computing and replace the motion compensation computing;
D, when decoding pressure when being S4, when video decode, adopt inverse discrete cosine transformation to simplify computing to chrominance block, luminance block in each 1/4 zone about video image and replace the inverse discrete cosine transformation computing, adopt motion compensation to simplify computing and replace the motion compensation computing;
E, when decoding pressure when being S5, when video decode, adopt inverse discrete cosine transformation to simplify computing to colourity, luminance block in each 1/4 zone about video image and replace the inverse discrete cosine transformation computing, adopt motion compensation to simplify computing and replace the motion compensation computing, and forbid encircling interior block elimination filtering;
F, when decoding pressure when being S6, when video decode, to each 1/4 regional interior colourity, luminance block adopt inverse discrete cosine transformation simplification computing to replace the inverse discrete cosine transformation computing about video image and up and down, adopt motion compensation to simplify computing and replace the motion compensation computing, and forbid encircling interior block elimination filtering;
G, when decoding pressure when being S7, when video decode, adopt inverse discrete cosine transformation to simplify computing to the colourity in the All Ranges of video image, luminance block and replace the inverse discrete cosine transformation computing, adopt motion compensation to simplify computing and replace the motion compensation computing, and forbid encircling interior block elimination filtering.
The invention has the advantages that:
(1) in the process of video decode, can dynamically reduce video decoding complexity according to current video decode pressure;
(2) sequence of frames of video is not carried out frame losing, kept the continuity of video;
(3) utilize the visual characteristic of human eye and spectators' region-of-interest otherness, when reducing the complexity decoding, can keep visual effect as far as possible.
Description of drawings
Fig. 1 set-top box application scene of the present invention schematic diagram;
The decoding pressure that the current system time of Fig. 2 is corresponding with the difference of present frame Presentation Time Stamp;
Each 1/4 area schematic about Fig. 3 image;
Each 1/4 area schematic up and down of Fig. 4 image;
Fig. 5 is the flow chart that reduces the method for video decoding complexity by decoding quality control of the present invention.
Embodiment
The present invention will be further described below in conjunction with the drawings and specific embodiments.
The method that reduces video decoding complexity by decoding quality control of the present invention can be applicable in as shown in Figure 1 the digital television broadcasting system.Set-top box is sent the Video service request by broadband network to streaming media server, and streaming media server responds this request, and sends video data by network to set-top box, and set-top box is decoded after receiving video data, delivers to television set then and shows.In the present embodiment, the network bandwidth of this system can satisfy the transmission demand of video flowing, the network receiver module of set-top box also has enough abilities to carry out Data Receiving, but the video decoding capability deficiency of set-top box can't satisfy the total data of video flowing is carried out real-time decoding.The method that decoding quality control of the present invention reduces video decoding complexity just is being applicable to the situation of this video terminal (set-top box) decoding capability deficiency.
The method that decoding quality control of the present invention reduces video decoding complexity specifically comprises following steps:
The difference of the current time in system of 1, set-top box receiver, video frame, and computing set-top box and current video frame Presentation Time Stamp.In the present embodiment, represent difference, then D=current time in system-current video frame Presentation Time Stamp with D.
2, calculate resulting difference according to step 1 the video decode pressure of set-top box is estimated, determine the rank of the video decode pressure of current set-top box.In the methods of the invention, according to the span of difference, video decode pressure is divided into different ranks, the numerical value of difference is big more, and then video decode pressure is also big more.In the present embodiment, the video decode pressure of set-top box is divided into 7 ranks, represents with S1~S7.In Fig. 2, represented each other division methods of level, wherein:
S1:D<-10;
S2:-10<=D<0;
S3:0<=D<10;
S4:10<=D<20;
S5:20<=D<30;
S6:30<=D<40;
S7:D>=40。
3, the video decode pressure current according to set-top box judges whether and need carry out decoding quality control to present frame, when the video decode pressure of set-top box is big, according to colourity priority treatment strategy and edge priority treatment strategy, reduces video decoding complexity.When present frame being carried out decoding quality control, according to the different stage of video decode pressure, the shortcut calculation when selecting decoding is determined to simplify the degree of handling, and then frame of video is done decode operation.
Shortcut calculation during decoding comprises that mainly IDCT simplifies computing, block elimination filtering control in computing and the ring is simplified in motion compensation.In the present embodiment, described IDCT simplifies computing and keeps 1/4 low frequency component in the decoding block DCT coefficient, and all the other coefficient components all are changed to zero, then sparse DCT coefficient matrix is carried out IDCT.Described motion compensation is simplified computing the pixel accuracy of motion vector is reduced to whole pixel accuracy from sub-pixel precision, avoiding pixel interpolation, thereby simplifies complexity of decoding.Block elimination filtering control is meant the operation that the Block that controls is banned use of block elimination filtering in the ring in the described ring.
The degree that described simplification is handled is meant simplifies computing to inverse discrete cosine transformation, determines the ratio of the high fdrequency component of zero setting in the inverse discrete cosine transformation; Computing is simplified in motion compensation, determined the degree of motion vector precise decreasing.As in the present embodiment, the high fdrequency component of zero setting accounts for 3/4, and pixel accuracy is reduced to whole pixel accuracy from sub-pixel precision.
When reducing video decoding complexity, mainly follow two strategies, colourity priority treatment strategy and edge priority treatment strategy.Described colourity priority treatment strategy is mainly considered the visual characteristic of human eye, and in general, human eye is to the susceptibility height of brightness, and is low to the susceptibility of colourity, therefore the preferential chrominance information of simplifying when reducing video decoding complexity.Described edge priority treatment strategy considers that mainly human eye is different to visual object in the degree of concern of diverse location, it is the highest to be usually located at the suffered attention rate of the object of picture centre position, and it is relatively low in the suffered attention rate of the object of marginal position, therefore, the preferential information of simplified image marginal portion when reducing video decoding complexity.
According to above-mentioned strategy, in the present embodiment, the video decode pressure of 7 kinds of different stages there is different handling processes, it is implemented as follows:
A, when decoding pressure when being S1, adopt conventional video decode algorithm;
B, when decoding pressure when being S2, when video decode, adopt IDCT to simplify computing to the chrominance block in each 1/4 zone about video image and replace the IDCT computing;
C, when decoding pressure when being S3, when video decode, adopt IDCT to simplify computing to the chrominance block in each 1/4 zone about video image and replace the IDCT computing, adopt motion compensation to simplify computing and replace the motion compensation computing;
D, when decoding pressure when being S4, when video decode, adopt IDCT to simplify computing to chrominance block, luminance block in each 1/4 zone about video image and replace the IDCT computing, adopt motion compensation to simplify computing and replace the motion compensation computing;
E, when decoding pressure when being S5, when video decode, adopt IDCT to simplify computing to colourity, luminance block in each 1/4 zone about video image and replace the IDCT computing, adopt motion compensation to simplify computing and replace the motion compensation computing, and forbid encircling interior block elimination filtering;
F, when decoding pressure when being S6, when video decode, adopting IDCT to simplify computing to colourity, luminance block in each 1/4 zone about video image and up and down replaces the IDCT computing, adopts motion compensation to simplify computing and replace the motion compensation computing, and forbid encircling interior block elimination filtering;
G, when decoding pressure when being S7, when video decode, adopt IDCT to simplify computing to the colourity in the All Ranges of video image, luminance block and replace the IDCT computing, adopt motion compensation to simplify computing and replace the motion compensation computing, and forbid encircling interior block elimination filtering.