CN106454343B - The H.265 fast transcoding method of mapping is divided based on code stream bit number and block - Google Patents
The H.265 fast transcoding method of mapping is divided based on code stream bit number and block Download PDFInfo
- Publication number
- CN106454343B CN106454343B CN201610771223.7A CN201610771223A CN106454343B CN 106454343 B CN106454343 B CN 106454343B CN 201610771223 A CN201610771223 A CN 201610771223A CN 106454343 B CN106454343 B CN 106454343B
- Authority
- CN
- China
- Prior art keywords
- code stream
- frame
- bit number
- coding
- cus
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000013507 mapping Methods 0.000 title claims abstract description 13
- 230000000903 blocking effect Effects 0.000 claims description 13
- 101150047304 TMOD1 gene Proteins 0.000 claims description 2
- 230000000737 periodic effect Effects 0.000 claims description 2
- 238000013139 quantization Methods 0.000 claims description 2
- 238000005192 partition Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 7
- 230000000007 visual effect Effects 0.000 abstract description 3
- 238000012360 testing method Methods 0.000 description 10
- 238000010606 normalization Methods 0.000 description 9
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000010276 construction Methods 0.000 description 3
- 230000009191 jumping Effects 0.000 description 3
- 238000007781 pre-processing Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- NUHSROFQTUXZQQ-UHFFFAOYSA-N isopentenyl diphosphate Chemical compound CC(=C)CCO[P@](O)(=O)OP(O)(O)=O NUHSROFQTUXZQQ-UHFFFAOYSA-N 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/12—Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
- H04N19/122—Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/184—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/40—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Discrete Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention provides a kind of H.265 fast transcoding method that mapping is divided based on code stream bit number and block, the information in the code stream of input is made full use of to instruct H.265 to encode, reduce the operand of block division and model selection, largely to shorten the transcoding time, while also guaranteeing the subjective and objective visual quality of transcoding rear video.H.264/AVC or H.263++ code stream format of the present invention is not limited to H.265 isomorphism transcoding, and technology will support that, MPGE even earlier is respectively for the isomery transcoding of standard.
Description
Technical Field
The invention relates to a video image coding technology, in particular to an H.265 rapid video transcoding technology.
Background
The transcoding application oriented to the new generation video coding and decoding standard H.265 firstly decodes the code stream into YUV, Y4M and other formats as the information source input, and then encodes the code stream by using an H.265 encoder, which is called as a full-decoding and full-encoding mode.
H.265 video transcoding is classified into two types: the first is isomorphic video stream transcoding, and the second is heterogeneous video stream transcoding. Isomorphic video transcoding is the inter-stream conversion compressed according to the same video coding standard, and heterogeneous transcoding is the inter-stream conversion compressed according to different video coding standards.
H.265 adopts a block coding mode. Unlike previous generations of encoders, the h.265 coding standard employs a more flexible adaptive quadtree structure based coding Tree unit ctu (coding Tree unit). The CTU can be decomposed into square coding units CU (coding unit) according to a quadtree structure, and four CUs at the same layer must have the same size. The CU size may be 8 × 8, 16 × 16, 32 × 32,64 × 64. If the CTU is not decomposed, the CTU contains only one CU. Thus a CTU has a maximum of 4 layers, at least 1 layer. H.265 specifies that the topmost CU size in the CTU is 64 × 64, this topmost CU is also called largest Coding unit lcu (large Coding unit). Without loss of generality, the partitioning of square blocks is described by a quadtree.
CTU has three properties:
(1) any one node in the CTU has 4 or 0 child nodes;
(2) any node has only one father node, and the father node can be found according to the child nodes (except the root node of the 0 th layer);
(3) four sibling nodes of the same parent node are known to be one which can push out the rest sibling nodes.
The full solution and full coding mode is most easy to realize and can keep good performance in the aspects of rate distortion, bit rate, subjective quality and the like. However, the implementation process of the full-solution full-encoding mode is very time-consuming, and especially in the transcoding process, due to unknown block division, various situations need to be traversed or a large number of block situations need to be selected, which is often not preferable in practical production application. Therefore, the video fast transcoding method has very strong real urgency.
In addition, when different devices collect and compress videos in different periods, the adopted video coding formats are different, so that the code stream formats input by the information source are various.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method for guiding H.265 coding by fully utilizing information in an input code stream so as to achieve rapid H.265 transcoding.
The technical scheme adopted by the invention for solving the technical problems is that the H.265 quick transcoding method based on the bit number of the code stream and the block division mapping comprises the following steps:
firstly, selecting a decoder to decode a source code stream according to input information of the source code stream, correspondingly generating a YUV sequence according to the decoded information, and counting the Bit number Bit, quantization parameter QP and coding type of each coding unit CU in the source code stream;
secondly, judging whether the coding type of the source code stream is H.265, if so, directly entering a third step, and if not, after realizing Bit number mapping to H.265 according to Bit and QP, entering a third step;
R265|QP=a1·Rother 2|QP+a2·Rother|QP+a3
wherein R is265|QPRepresents the bit number R of one CU in the H.265 code stream under the current QPother|QPDenotes the number of bits corresponding to CU in a code stream coded using a coding standard other than H.265 at a given QP, a1,a2,a3Are three empirical parameters;
thirdly, encoding the 0 th frame of the YUV sequence generated by decoding by using an H.265 encoder in an I mode, encoding the 1 st frame by using an H.265 encoder in a P mode, predicting and blocking the rest frames, and then encoding the rest frames by using H.265;
the method for predicting the block comprises the following steps:
1) acquiring the bit number and the normalized bit number of each 8 × 8CU and the maximum value and the minimum value of the bit numbers of the 8 × 8 CUs from each frame in a source code stream; acquiring the total bit number used by each frame from the source code stream;
2) acquiring the normalized bit number of each 8 × 8CU, the maximum value and the minimum value of the bit numbers of the 8 × 8 CUs and the minimum value of the normalized bit numbers of the 8 × 8 CUs from each frame in the target code stream; acquiring the total bit number used by each frame from a target code stream;
solving a proportionality coefficient k:
wherein,representing the total bit number of the t frame of the target code stream,representing the total bit number of the tth frame of the source code stream,represents the maximum bit number of 8 × 8 CUs in the tth frame of the target code stream,represents the minimum bit number of 8 × 8CU in the t frame of the target code stream,represents the maximum bit number of 8 × 8 CUs in the tth frame of the source code stream,representing the minimum bit number of 8 multiplied by 8CU in the tth frame of the source code stream;
3) and calculating the distribution condition of each 8 × 8CU, wherein the 8 × 8CU meeting the following conditions must appear in the target code stream:
whereinRepresenting the minimum value of the normalized bit number of 8 multiplied by 8CU in the pth CTU of the tth frame in the target code stream;expressing the normalized bit number of 8 multiplied by 8CU in the pth CTU of the tth frame in the source code stream;
4) predicting 8 × 8 CUs which must appear in target code streams except the 0 th frame and the 1 st frame according to the distribution condition of each 8 × 8 CU;
5) and predicting the target code stream CTU in blocks. Sequentially deducing all 8 × 8 CUs, 16 × 16 CUs, 32 × 32 CUs and 64 × 64 CUs according to the 8 × 8 CUs which are determined to appear in the target code stream, thereby constructing a complete CTU;
6) the current frame is h.265 encoded according to the known CTU blocking case.
The method has the advantages that the information in the input code stream is fully utilized to guide H.265 coding, the calculation amount of block division and mode selection is reduced, the transcoding time is greatly shortened, and the subjective and objective visual quality of the transcoded video is ensured. The code stream format of the invention is not limited to H.265 isomorphic transcoding, and the technology can support H.264/AVC or H.263+ +, even the isomeric transcoding of the earlier MPEG generations.
Drawings
FIG. 1 is a block diagram of an H.265 video transcoding architecture of the present invention;
FIG. 2 illustrates a CTU chunking strategy according to the present invention;
FIG. 3 is a CTU construction process of the present invention;
fig. 4 shows the distribution rule of the encoding modes of each frame in the period of the embodiment.
The specific implementation mode is as follows:
the video transcoding of the present invention is mainly divided into five main steps:
the first step is decoding and transcoding pretreatment process. And decoding the input code stream to generate a YUV sequence and counting the bit number used by each CU of each frame. Analyzing the head information of the input source code stream to determine the coding standard adopted by the code stream. If the standard is H.265, directly entering the second step. If it is another standard, such as H.264/AVC, H.263+ +, MPEG-x, etc., or even the future coding standard based on block-wise management, it is necessary to complete the bit number mapping of the standard to H.265. The bit number mapping relationship of the CU is described by equation (1).
R265|QP=a1·Rother 2|QP+a2·Rother|QP+a3 (1)
Wherein R is265|QPRepresents the bit number R of one CU in the H.265 code stream under the current QPother|QPDenotes the number of bits corresponding to CU in a code stream coded using a coding standard other than H.265 at a given QP, a1,a2,a3Are three empirical parameters. In short, the bit number mapping of the heterogeneous case can be completed by the formula (1). Namely, the bit number conversion from other coding standards to the h.265 standard CU is realized.
And secondly, collecting and processing bit number information. Normalization of target code stream bit number and frame total bit number statistics. The first two frames of the YUV sequence are encoded with an h.265 encoder. Frame 0 is encoded using I-mode and frame 1 is encoded using P-mode. And counting the number of bits used by each CU in the tth frame and the frame, and then performing normalization processing on 8 × 8 CUs in the tth frame. And counting the total bit number used by the frame. Normalization processing of the bit number of the source code stream and frame total bit number statistics. Namely, 8 × 8 CUs in each frame in the first step are normalized by using the number of bits. The normalization process is shown in formula (2).
And (4) counting the total bit number used by each frame in the code stream, as shown in formula (3).
w represents the number of N × N CUs in each rowW represents the width of the video, H represents the height of the video, and N represents the size of each LCU; h represents the number of N × N CUs in each column Is the upper rounding operation; in the formula (2), p represents the number of CTUs in the video frame, and p is more than or equal to 0 and less than or equal to w multiplied by h < -1 >; 4. i denotes the number in the CTU, i is 0,1,2, …, (N/8)2-1; b (t, p,4 · i) represents the number of bits of the 4 · i th block No. 8 × 8CU block of the tth frame pth block; b ismax(t) represents the maximum value of the number of bits of 8 × 8CU blocks in the frame t, Bmin(t) represents the minimum value of the CU (8 × 8) block bit number in the tth frame; in the formula (3), B × (t, p,4 · i) represents the number of bits of all the sizes CU of the pth block No. 4 · i of the pth frame, and all the CU blocks include 16x16, 32x32,64x64, and BF(t) represents the total number of bits of the tth frame.
The third step: 8 × 8CU prediction. And predicting whether the CU (8 multiplied by 8) block exists in the target code stream according to the normalized bit number of the CU (8 multiplied by 8) block obtained by the second step of processing. In the case of isomorphic transcoding, there is a linear relationship in terms of bits for the code streams at different QPs. That is, the normalized number of bits of the CU of 8 × 8 in the input code stream and the normalized number of bits of the CU of 8 × 8 in the target code stream of the block have a direct proportional relationship, as shown in equation (4).
The formula (4) is modified to the formula (5).
WhereinIndicating the normalized bit number of 8 × 8 CUs numbered 4 · i in the p-th CTU in the t-th frame in the source code stream,indicates the normalized bit number of 8 multiplied by 8CU with the number of 4. i in the p th CTU in the t th frame in the target code stream, and k indicates the normalized bit numberAndthe ratio relationship between them. Thus is provided with
WhereinAnd representing the minimum non-zero value after bit number normalization processing of the CU blocks in the t frame in the target code stream. Therefore, when the normalized bit number of each 8 × 8CU in the source code stream is greater than or equal to 1/k times the normalized bit number of the smallest nonzero 8 × 8CU in the target code stream, the 8 × 8CU must be present in the target code stream. Derived from the formulae (2) and (4)
The resulting scaling factor k is determined by equation (8).
Wherein,the number of CU bits of p block 4. i number 8 x 8 of the t frame of the source code stream,the number of bits of No. 4 & i 8X 8CU of the t frame p block of the target code stream is shown,representing the total bit number of the t frame of the target code stream,representing the total bit number of the tth frame of the source code stream,represents the maximum bit number of 8 × 8 CUs in the tth frame of the target code stream,represents the minimum bit number of 8 × 8CU in the t frame of the target code stream,represents the maximum bit number of 8 × 8 CUs in the tth frame of the source code stream,represents the minimum bit number of the CU of the t frame 8 × 8 of the source code stream,the normalized bit ratio value of each block in the t frame of the source code stream and the target code stream is the average value.
From equation (2), equations (6) and (8) can predict the 8 × 8 CUs that must appear in the target code stream except for the 0 th frame and the 1 st frame. And the bit information of the target code stream in the third step is the bit information of the coded 1 st frame of the YUV sequence in the second step. That is, k is obtained according to the code stream of the 1 st frame in the YUV sequence, and then the k is used for 8 × 8CU prediction of all the following frames.
And fourthly, predicting the target code stream CTU in a blocking mode. Determining partial 8 × 8 CUs in the third step, and deducing all 8 × 8CU blocks according to the property (3) of the CTU; deducing the partial 16 × 16 CU according to the property (2) of the CTU; then deducing the CU of 32 × 32 according to the properties (3) and (2) of the CTU; finally, 64 × 64 CUs are deduced according to the CTU properties (3) and (2). A complete CTU can be constructed from the slice information of the 8 × 8 CU. A CTU only contains one large CU of 64x64 if there is no 8 x 8 CU. Thus, a complete CTU can be predicted, thereby enabling prediction of the blocking situation of the entire frame. And finally, the prediction of the blocking condition of all the following frames is finished.
Furthermore, the encoder of H.265 encodes the block according to the predicted blocking situation, so that the exploration of the blocking situation by the encoder is reduced, and the encoding time is saved. But the correlation of the YUV sequence in the time domain is gradually weakened along with the increase of the time domain. In order to obtain good transcoding quality, the invention provides a periodic transcoding scheme:
the decoded sequence may be encoded directly by inserting P frames periodically in order to update the scaling factor k. Let the coding period be ω, i.e., there are ω frames in each period. The frame 0 in the period is coded by using an I mode, the frame 1 is coded by using a P mode, and the frames from the frame 2 to the frame omega-1 are firstly predicted, partitioned and then coded.
Of course, in order to further obtain good transcoding quality, part of the frames from the 2 nd frame to the omega-1 th frame in the period can be selected directly by using the H.265 encoder to encode and update the ratio coefficient k and the minimum normalized bitThe adopted strategy is as follows: when the frame number tmod ω is 4nThe frames are encoded directly using an h.265 encoder, and the other frames are encoded after prediction blocking, where mod represents the residue, is a lower rounding operation.
Examples
As illustrated in fig. 1, fast transcoding includes:
101: and inputting an information code stream.
102: and selecting an MPEG-x series decoder according to the information of the input code stream to decode the input code stream, generating a corresponding YUV file and inputting the YUV file into a YUV buffer area. Meanwhile, counting information such as Bit, QP, CTU, coding type EncodeType and the like of each coding unit;
103: and selecting an H.264 decoder to decode the input code stream according to the information of the input code stream, generating a corresponding YUV file and inputting the YUV file into a YUV buffer area. Simultaneously counting Bit, QP, CTU, coding type EncodeType and the like of each coding unit;
104: and selecting an H.265 decoder to decode the input code stream according to the information of the input code stream, generating a corresponding YUV file and inputting the YUV file into a YUV buffer area. Simultaneously counting Bit, QP, CTU, coding type EncodeType and the like of each coding unit;
105: receiving and recording the Bit, QP, CTU, EncodeType coding type and the like of each coding unit output by a decoder;
106: receiving and storing a YUV sequence generated by a decoder;
107: judging according to the EncodeType in the step 105, if the EncodeType is H.265, directly jumping to the step 108, and if not, carrying out data preprocessing by carrying in (1) Bit and QP information to realize Bit mapping;
108: according to the result of the data preprocessing in the step 107, utilizing three properties of the CTU to realize the CTU blocking;
109: and (4) guiding an encoder to rapidly encode the YUV through CTU block information to obtain a final target code stream.
The flowchart of predicting the CTU blocking information of h.265 according to the statistical information of Bit, QP, and CTU in step 108 is shown in fig. 2, and the specific steps are as follows:
201: and inputting the source code stream.
202: acquiring the bit number of each 8 multiplied by 8CU from the source code stream, and calculating the normalization bit number and the most value of the normalization bit in each frame;
203: acquiring the total bit number used by each frame from the source code stream;
204: and inputting the target code stream.
205: acquiring the bit number of each 8 multiplied by 8CU from the target code stream, and calculating the normalization bit number and the most value of the normalization bit in each frame;
206: acquiring the total bit number used by each frame from a target code stream;
207: the data of steps 203, 206, 202 and 205 are taken into formula (8) to obtain the related proportionality coefficient k;
208: the distribution of each 8 × 8CU can be obtained by taking the normalized bit values and the most values in steps 202 and 205 and the coefficient k in step 207 into formula (6);
209: and constructing a complete CTU block tree according to the distribution condition of 8 multiplied by 8 CU.
The construction of a CTU tree from 8 × 8 CUs is depicted in fig. 2 as step 209, which is detailed in fig. 3.
Fig. 3 illustrates a CTU construction process. The method comprises the following specific steps:
301: if no 8 x 8CU exists, go directly to step 304, otherwise check if all other sibling nodes of the CU in the quadtree exist. If there is no brother node, the step jumps to step 302;
302: creating 16 × 16 CU nodes, checking and filling up their sibling nodes, and jumping to step 303;
303: creating 32 × 32 CU nodes, checking and filling up their sibling nodes, and jumping to step 304;
304: creating 64x64 CU nodes;
in the basic transcoding flow illustrated in fig. 1, step 104 is to encode the decoded sequence using an h.265 encoder. To ensure the transcoding quality, it needs to be encoded periodically and the 0 th frame in each period must be directly encoded by h.265 encoder. In order to obtain the correlation coefficient k and the minimum normalized bit number used in the fast transcoding process, the encoder needs to directly encode the 1 st frame. As time goes backwards, the relevance of the video fades. A new frame needs to be inserted at the appropriate position for the h.265 encoder to encode to update the correlation coefficient k and the minimum number of normalized bits.
Fig. 4 illustrates the strategy presented in this embodiment. The shaded portion is the frame number of h.265 direct coding, and the unshaded frame is the fast coding portion. Given an encoding period T of 32, the video is played at a frame rate of 30fps, i.e. about 1 second for one period.
Tables 1 and 2 show the transcoding test performance of the method of the invention under both isomorphic and heterogeneous conditions. And (3) adopting x265v1.4 as a software platform for testing, locking the QP value to be 22, and carrying out IPP. The test sequence selects 9 sequences with different resolutions defined by the HEVC standard group.
The following table shows the test results of the heterogeneous transcoding (h.264 to h.265).
The original YUV sequence is firstly encoded by x264 to generate a code stream of H.264, and then a decoded YUV sequence is reconstructed by an H.264 standard decoder. The direct coding test is to perform direct transcoding on the reconstructed YUV sequence by using x265v1.4, and the technical transcoding is to perform rapid transcoding by combining the reconstructed YUV sequence with decoding information of the reconstructed YUV sequence. From the test results, the performance of the fast transcoding technique of the present invention compared to the direct transcoding technique in terms of time saving is on average 42.31%, preferably even 51.95%. Meanwhile, the fast transcoding technology is basically equivalent to the direct transcoding technology in terms of encoding quality, and only 0.15% loss is obtained and can be ignored.
The following table shows the test results of isomorphic transcoding (h.265 code stream to h.265 code stream).
The original YUV sequence is encoded by x265 to generate H.265 code stream, and then the decoded YUV sequence is reconstructed by H.265 standard decoder. The direct coding test is to perform direct transcoding on the reconstructed YUV sequence by using x265v1.4, and the technical transcoding is to perform rapid transcoding by combining the reconstructed YUV sequence with decoding information of the reconstructed YUV sequence. Similar to the test results of the heterogeneous transcoding shown in table 1, the performance of the test results of the homogeneous transcoding given in table 2 is maintained. The performance in the aspect of saving the coding time reaches 44.75 percent on average, the loss of 0.89 percent in the aspect of coding quality is only realized, and the strict control is within 1 percent.
In conclusion, the technology of the invention improves the coding efficiency by more than 40% while maintaining the visual quality of the isomorphic and heterogeneous transcoding.
Claims (3)
1. An H.265 quick transcoding method based on code stream bit number and block division mapping is characterized by comprising the following steps:
the method comprises the steps that firstly, a decoder is selected according to input source code stream information to decode a source code stream to obtain a decoding sequence, and the number of bits, quantization parameters QP and coding types of CU (coding Unit) in the source code stream are counted;
secondly, judging whether the coding type of the source code stream is H.265, if so, directly entering a third step, and if not, mapping the Bit number of the source code stream to the H.265 according to the Bit number Bit and QP and the following formula, and then entering a third step;
R265|QP=a1·Rother 2|QP+a2·Rother|QP+a3
wherein R is265|QPRepresents the bit number R of one CU in the H.265 code stream under the current QPother|QPDenotes the number of bits corresponding to CU in a code stream coded using a coding standard other than H.265 at a given QP, a1,a2,a3Are three empirical parameters;
thirdly, encoding the 0 th frame of the decoding sequence by using an H.265 encoder I mode, encoding the 1 st frame by using an H.265 encoder P mode, predicting, blocking and then carrying out H.265 encoding on the rest frames;
the method for predicting the block comprises the following steps:
1) acquiring the bit number and the normalized bit number of each 8 × 8CU and the maximum value and the minimum value of the bit numbers of the 8 × 8 CUs from each frame in a source code stream; acquiring the total bit number used by each frame from the source code stream;
2) acquiring the normalized bit number of each 8 × 8CU, the maximum value and the minimum value of the bit numbers of the 8 × 8 CUs and the minimum value of the normalized bit numbers of the 8 × 8 CUs from each frame in the target code stream; acquiring the total bit number used by each frame from a target code stream;
solving a proportionality coefficient k:
wherein,representing the total bit number of the t frame of the target code stream,representing the total bit number of the tth frame of the source code stream,represents the 8 x 8CU in the t frame of the target code streamThe number of the large bits is large,represents the minimum bit number of 8 × 8CU in the t frame of the target code stream,represents the maximum bit number of 8 × 8 CUs in the tth frame of the source code stream,representing the minimum bit number of 8 multiplied by 8CU in the tth frame of the source code stream;
3) and calculating the distribution condition of each 8 × 8CU, wherein the 8 × 8CU meeting the following conditions must appear in the target code stream:
whereinExpressing the minimum value of the normalized bit number of No. 4 & i 8 multiplied by 8CU in the p-th coding tree unit CTU of the t-th frame in the target code stream;indicates the normalized bit number of the 4 & i 8 × 8CU in the p-th CTU of the t-th frame in the source code stream, 4 & i indicates the number in the CTU, i is 0,1,2,., (N/8)2-1, N denotes the size of each largest coding unit LCU;
4) predicting 8 × 8 CUs which must appear in target code streams except the 0 th frame and the 1 st frame according to the distribution condition of each 8 × 8 CU;
5) predicting target code stream CTU blocks: sequentially deducing all 8 × 8 CUs, 16 × 16 CUs, 32 × 32 CUs and 64 × 64 CUs according to the 8 × 8 CUs determined to appear in the target code stream, thereby constructing a complete CTU;
6) the current frame is h.265 encoded according to the known CTU blocking case.
2. The h.265 fast transcoding method based on bit number of code stream and block partition mapping as claimed in claim 1, wherein in the third step, the periodic transcoding is performed, in one coding period, the 0 th frame in the coding period in the decoded sequence is coded by h.265 coder I mode, the 1 st frame is coded by h.265 coder P mode, the h.265 coding is performed after the 2 nd frame to the ω -1 th frame are predicted and blocked, and ω is the total number of frames in the coding period.
3. The H.265 fast transcoding method based on bit number of code stream and block division mapping as claimed in claim 1, wherein in a coding period, a part of frames selected from the 2 nd frame to the ω -1 th frame is directly coded by using an H.265 coder, and the specific method is that when the frame number of the t-th frame satisfies tmod ω 4nIn this case, the coding is performed directly using an H.265 coder, and other frames are coded after prediction blocking, where mod represents the remainder, for the rounding-down operation, ω is the total number of frames in the coding period.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610771223.7A CN106454343B (en) | 2016-08-30 | 2016-08-30 | The H.265 fast transcoding method of mapping is divided based on code stream bit number and block |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610771223.7A CN106454343B (en) | 2016-08-30 | 2016-08-30 | The H.265 fast transcoding method of mapping is divided based on code stream bit number and block |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106454343A CN106454343A (en) | 2017-02-22 |
CN106454343B true CN106454343B (en) | 2019-05-14 |
Family
ID=58090744
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610771223.7A Expired - Fee Related CN106454343B (en) | 2016-08-30 | 2016-08-30 | The H.265 fast transcoding method of mapping is divided based on code stream bit number and block |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106454343B (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103248893B (en) * | 2013-05-10 | 2015-12-23 | 四川大学 | From H.264/AVC standard to code-transferring method and transcoder thereof the fast frame of HEVC standard |
CN103475880B (en) * | 2013-09-11 | 2016-08-24 | 浙江大学 | A kind of based on statistical analysis by H.264 to HEVC low complex degree video transcoding method |
CN103491334B (en) * | 2013-09-11 | 2017-05-10 | 浙江大学 | Video transcode method from H264 to HEVC based on region feature analysis |
CN103796023B (en) * | 2014-03-05 | 2017-02-01 | 武汉拓宝科技股份有限公司 | H.265/HEVC transcoding method and transcoder based on H.264/AVC macro block structure and texture |
-
2016
- 2016-08-30 CN CN201610771223.7A patent/CN106454343B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN106454343A (en) | 2017-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6665225B2 (en) | Video decoding method and apparatus, video encoding method and apparatus | |
JP6408098B2 (en) | Video decoding method and video decoding apparatus | |
US20230037689A1 (en) | Methods and apparatuses for coding transform blocks | |
JP6073977B2 (en) | Video decoding method and apparatus | |
CN104883574B (en) | The method and apparatus coded and decoded to video | |
CN103220528B (en) | Method and apparatus by using large-scale converter unit coding and decoding image | |
JP6443869B2 (en) | System and method for processing digital images | |
CN102792695B (en) | By the method and apparatus using big converter unit image to be encoded and decodes | |
CN110402580A (en) | Image processing method and its device | |
CN108432248A (en) | For carrying out entropy coding and decoded method and apparatus to vision signal | |
CN106454362A (en) | Image coding apparatus, and image coding method, and image decoding apparatus, and image decoding method | |
KR20180028468A (en) | Method and apparatus for performing conversion using singleton coefficient update | |
CN105721866A (en) | Method and device for dividing coding unit | |
CN107637077A (en) | For the block determined by using the mode via adaptive order come the method and apparatus that are encoded or decoded to image | |
CN110677644B (en) | Video coding and decoding method and video coding intra-frame predictor | |
CN110225339A (en) | A kind of HEVC video sequence coding/decoding accelerated method | |
CN106454343B (en) | The H.265 fast transcoding method of mapping is divided based on code stream bit number and block |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190514 Termination date: 20210830 |