Presentation is loading. Please wait.

Presentation is loading. Please wait.

Video Transcoding in H.264 Prof. Maurizio Bonuccelli Francesca Martelli Francesca Lonetti PISATEL.

Similar presentations


Presentation on theme: "Video Transcoding in H.264 Prof. Maurizio Bonuccelli Francesca Martelli Francesca Lonetti PISATEL."— Presentation transcript:

1 Video Transcoding in H.264 Prof. Maurizio Bonuccelli Francesca Martelli Francesca Lonetti PISATEL

2 2 Outline H.264 coding and transcoding Motion Vector Composition algorithms Overview of our temporal transcoding results (MPEG4, H.263) PISATEL

3 3 H.264 coding H.264 mean features: Variable and small block sizes (4×4) PISATEL Average bit rate reduction! High complexity! Quarter-pixel resolution NAL units New entropic coding algorithms (CABAC) Deblocking filter Moto compensation with multiple reference pictures

4 PISATEL 4 H.264 temporal transcoding PISATEL Transcoder Input bit-rate 64 Kb Output bit-rate 32 Kb 123 13 123 Skipping frames to reduce the output bit-rate Three main issues: –Motion Vector Computation(MVC) –Prediction Error Computation –Frame Skipping Policy

5 PISATEL 5 Motion Vector Composition The motion vectors are computed by –Motion Vector Composition Algorithms (BI, TVC, FDVS, ADVS) –Restricted Motion Estimation (RME) MVC skipped F(n-1) F(n) F(n-2) mv n-1 mv n

6 PISATEL 6 Telescopic Vector Composition F(n-1) (skipped) MB n MB 4 n-1 MB 1 n-1 MB 2 n-1 MV n MB 3 n-1 MV 1 n-1 MV 2 n-1 MV 4 n-1 MV 3 n-1 F(n) MV n =MV n +MV TVC New reference area F(n-2) MB n MV TVC = MV 1 n-1

7 PISATEL 7 Bilinear Interpolation MV BI =(1-α)(1-β)MV 1 n-1 +(α)(1-β)MV 2 n-1 +(1-α)(β)MV 3 n-1 +(α)(β)MV 4 n-1 F(n-2) F(n-1) (skipped) MB n MB 4 n-1 MB 1 n-1 MB 2 n-1 MV n MB 3 n-1 MB n MV 1 n-1 MV 2 n-1 MV 4 n-1 MV 3 n-1 F(n) MV n =MV n +MV BI New reference area MV BI α β

8 PISATEL 8 H.264 features New in H.264: variable macroblock partition (16 motion vectors for each macroblock) Transcoder keeps the same partitions of the remote encoder (most efficient solution) How to apply MVC in H.264? –BI and TVC adaptation –New MVC algorithm ? H.264 ? Previous standards

9 PISATEL 9 MVC in H.264 MB1MB2 MB3MB4 LIV.0 Mv_MVC= f(mv_MB1,mv_B2, mv_B3, mv_B4) MB1 B1B2 MB3 B1B2 B3B4 MB4 B1 B2 LIV.1 MB2 B1 B3B4 B2 Mv_B4 LIV.3 Mv_B2 Mv_B1Mv_B1= f(sb1,sb2) Mv_B2 Mv_MB4= f(mv_B1,mv_B2) Mv_MB3= f(mv_B2,mv_B4) Mv_MB2= f(mv_B1,mv_B2) Mv_MB1= mv_B2 B1 sb1 B2 B4 B2 LIV. 2 B1 sb2

10 PISATEL 10 A new MVC algorithm Basic Idea: looking for a reference area, the most similar to the current macroblock Two steps: –For each motion vector of a macroblock (or block) of the reference area in the skipped frame, compute the difference between the macroblock and an area pointed by the motion vector with the same size of the current macroblock –Choose the motion vector of the reference area that minimizes this difference

11 PISATEL 11 New MVC algorithm: example F(n) A MB N M V f =argmin i Є S MSE(A, A i ) = argmin i Є S (1/NxM |A-A i | 2 ) F(n-2) mv F(n-1) MB4MB3 MB1MB2 b1 b2 b3 b4 b2 b1 (skipped) mv2 A2 A4 mv4 A3 mv3 A6 mv6 mv8 A8 mv7 A7 mv5 A5 mv1 A1 new_mv

12 PISATEL 12 MVC performance (time) PISATEL TVC BINewME

13 PISATEL 13 MVC performance (quality) PSNR(dB) Frames Akiyo Motion Estimation New MVC Algorithm

14 PISATEL 14 MVC performance (quality) Akiyo PSNR(dB) New MVC Algorithm BI AlgorithmTVC Algorithm Frames

15 PISATEL 15 MVC performance (quality) Motion Estimation New MVC Algorithm PSNR(dB) Frames Coastguard

16 PISATEL 16 MVC performance (quality) PSNR(dB) Frames Coastguard New MVC Algorithm BI AlgorithmTVC Algorithm

17 PISATEL 17 Our activities in video transcoding We started in studying video features in MPEG4 With this codec, we developed two temporal transcoders: –One based on an architecture known as FSC (Frame Skipping Control) –One based on an architecture known as DFS (Dynamic Frame Skipping) By simulation, we realized that the second architecture results better in terms of video quality, while the first one results better in terms of processing times

18 PISATEL 18 MPEG4 transcoder architectures After a skipped frame: –In the FSC architecture, motion vectors and prediction errors are computed without executing motion estimation  worse quality, re-encoding errors amassment –In the DFS architecture, motion vectors and prediction errors are computed with a restricted motion estimation  better quality, but worse time performance

19 PISATEL 19 Motion Vector Composition In literature we found 4 MVC algorithms: –Bilinear interpolation –Telescopic Vector Composition –Forward Dominant Vector Selection –Activity Dominant Vector Selection By using the DFS architecture (that performs motion estimation) we realized by simulation that these algorithms are equivalent

20 PISATEL 20 Architectures and MVC algorithms M. A. Bonuccelli, F. Lonetti, F. Martelli. Video Transcoding Architectures for Multimedia Real Time Services, ERCIM News No. 62, pp. 39-40, July 2005.

21 PISATEL 21 Skipping policies We developed 4 skipping policies, all of them based on the transcoder buffer occupancy: –Buffer based –Motion activity –Consecutive skipping –Random M. A. Bonuccelli, F. Lonetti, F. Martelli. Temporal Transcoding for Mobile Video Communication. In Proceedings of 2 nd Annual International Conference on Mobile and Ubiquitous Systems: Networking and Services (Mobiquitous 2005), pp.502-506, July 17-21, 2005, San Diego, CA.

22 PISATEL 22 H.263 Video Transcoder Then, we studied the H.263 video codec, and we developed a temporal transcoder, based on DFS architecture. By observing the test results, we realize that video quality is influenced by the rate control of the front encoder Then, we tested and implemented several rate control algorithms for the front encoder: –TMN5 –TMN8 –  domain –Perceptual rate control –Multiple zone (Activity)

23 PISATEL 23 H.263 Video Transcoder In our transcoder architecture, every frame is first transcoded, and then transmitted or dropped. To avoid the computation of frames that will be discarded, we developed a new frame skipping policy that predicts the frames to be transcoded M. A. Bonuccelli, F. Lonetti, F. Martelli. A Fast Skipping Policy for H.263 Video Transcoder. In Proceedings of 12 th International Workshop on Systems, Signals and Image Processing (IWSSIP'05). September 22-24, 2005, Chalkida, Greece.

24 PISATEL 24 Finally, H.264 This codec is the product of the union between VCEG (H.263) and MPEG, forming the Joint VideoTeam (JVT) It includes all benefits of previous standards in order to achieve good quality performance even at low bit-rate We worked in two directions: –Optimizing the codec, to speed up it –Implementing a transcoder

25 PISATEL 25 Optimizing H.264 encoder We operated some modifications to the reference software in order to obtain acceptable encoding times: –instead of computing all half and quarter pixels in two rounds, we compute them in only one round –fast way for choosing the optimal partitioning: instead of using the SAD (Sum of Absolute Differences) measure as decision parameter, we use other metrics: the number of differences in terms of pixels the maximum difference value the average difference value the most popular difference value compared with proper self-adjusting thresholds.

26 PISATEL 26 H.264 transcoder We first implemented the cascade pixel domain transcoder by simply concatenating a decoder with an encoder, in order to develop the motion vector composition algorithms Then we are implementing the frame skipping to obtain a transcoder that decides the frames to be dropped

27 PISATEL 27 H.264 rate control Finally, we are implementing the TMN8 rate control algorithm to be used in the front encoder We think that, with a rate control algorithm able to skip frame in encoding phase, the transcoding process may be improved both in terms of quality and computation time

28 PISATEL 28 Master Theses Luigi D’Amaro. Algoritmi per la transcodifica video. Gianni Rosa. Transcodifica video per comunicazione mobile: studio di rate control. Luca Leonardi. Transcodifica video temporale: politiche di frame skipping. Marina Paletta. Realizzazione di un transcodificatore video temporale H.264 per video comunicazione mobile. Riccardo Vagli. Implementazione di un transcoder video basato sullo standard H.264/AVC. Alsona Dema. Rate Control in H.264.

29 PISATEL 29 Conclusions We studied the video transcoding problem in real-time communications We developed temporal transcoders with MPEG4, H.263 and H.264 codecs We developed some skipping policies to be used in each transcoder We developed three MVC algorithms to be used in the H.264 transcoder

30 PISATEL 30 Acknowledgements We thank all ERI people who introduced us in this research area, for the helpful discussions and advices We thank PisaTel Lab people We thank all students who worked with us in this project


Download ppt "Video Transcoding in H.264 Prof. Maurizio Bonuccelli Francesca Martelli Francesca Lonetti PISATEL."

Similar presentations


Ads by Google