PISATEL Video Transcoding in H 264 Prof Maurizio

  • Slides: 30
Download presentation
PISATEL Video Transcoding in H. 264 Prof. Maurizio Bonuccelli Francesca Martelli Francesca Lonetti

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

PISATEL Outline H. 264 coding and transcoding Motion Vector Composition algorithms Overview of our

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

PISATEL H. 264 coding H. 264 mean features: Variable and small block sizes (4×

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

PISATEL H. 264 temporal transcoding Skipping frames to reduce the output bit-rate 3 2

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

PISATEL Motion Vector Composition The motion vectors are computed by – Motion Vector Composition

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

PISATEL Telescopic Vector Composition MVn (skipped) MV 1 n-1 MB 1 n-1 MV 2

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

PISATEL Bilinear Interpolation MVBI=(1 -α)(1 -β)MV 1 n-1+(α)(1 -β)MV 2 n-1+(1 -α)(β)MV 3 n-1+(α)(β)MV

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

PISATEL H. 264 features New in H. 264: variable macroblock partition (16 motion vectors

PISATEL 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) Previous standards ? H. 264 ? How to apply MVC in H. 264? – BI and TVC adaptation – New MVC algorithm 8

PISATEL MVC in H. 264 MB 1 MB 2 Mv_MVC= f(mv_MB 1, mv_B 2,

PISATEL MVC in H. 264 MB 1 MB 2 Mv_MVC= f(mv_MB 1, mv_B 2, mv_B 3, mv_B 4) LIV. 0 MB 3 Mv_MB 1= mv_B 2 MB 1 MB 3 Mv_MB 3= B 2 MB 4 f(mv_B 2, mv_B 4) B 1 B 2 B 3 B 4 B 2 MB 4 Mv_MB 4= f(mv_B 1, mv_B 2) B 1 MB 2 Mv_MB 2= f(mv_B 1, mv_B 2) B 3 B 2 B 4 B 1 B 2 B 1 sb 1 sb 2 B 2 LIV. 1 B 4 B 2 LIV. 3 Mv_B 2 Mv_B 4 Mv_B 1 Mv_B 2 Mv_B 1= f(sb 1, sb 2) Mv_B 2 9

PISATEL A new MVC algorithm Basic Idea: looking for a reference area, the most

PISATEL 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 10

PISATEL New MVC algorithm: example F(n-2) F(n-1) mv 1 mv 2 MB 1 mv

PISATEL New MVC algorithm: example F(n-2) F(n-1) mv 1 mv 2 MB 1 mv 3 A 1 A 2 MB 2 b 1 b 2 b 3 b 4 MB mv 4 mv 5 A 3 A 5 mv b 1 mv 7 b 1 A 8 mv 8 A 4 A 7 mv 6 MB 3 MB 4 (skipped) Vf=argmin N M b 2 A 6 A iЄS MSE(A, Ai) = argmin new_mv iЄS (1/Nx. M |A-Ai|2) 11

PISATEL MVC performance (time) TVC BI New ME 12

PISATEL MVC performance (time) TVC BI New ME 12

PISATEL MVC performance (quality) PSNR(d. B) Akiyo Motion Estimation Frames New MVC Algorithm 13

PISATEL MVC performance (quality) PSNR(d. B) Akiyo Motion Estimation Frames New MVC Algorithm 13

PISATEL MVC performance (quality) PSNR(d. B) Akiyo Frames BI Algorithm TVC Algorithm New MVC

PISATEL MVC performance (quality) PSNR(d. B) Akiyo Frames BI Algorithm TVC Algorithm New MVC Algorithm 14

PISATEL MVC performance (quality) PSNR(d. B) Coastguard Motion Estimation Frames New MVC Algorithm 15

PISATEL MVC performance (quality) PSNR(d. B) Coastguard Motion Estimation Frames New MVC Algorithm 15

PISATEL MVC performance (quality) PSNR(d. B) Coastguard Frames BI Algorithm TVC Algorithm New MVC

PISATEL MVC performance (quality) PSNR(d. B) Coastguard Frames BI Algorithm TVC Algorithm New MVC Algorithm 16

PISATEL Our activities in video transcoding We started in studying video features in MPEG

PISATEL Our activities in video transcoding We started in studying video features in MPEG 4 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 17

PISATEL MPEG 4 transcoder architectures After a skipped frame: – In the FSC architecture,

PISATEL MPEG 4 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 18

PISATEL Motion Vector Composition In literature we found 4 MVC algorithms: – Bilinear interpolation

PISATEL 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 19

PISATEL Architectures and MVC algorithms M. A. Bonuccelli, F. Lonetti, F. Martelli. Video Transcoding

PISATEL 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. 20

PISATEL Skipping policies We developed 4 skipping policies, all of them based on the

PISATEL 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. 21

PISATEL H. 263 Video Transcoder Then, we studied the H. 263 video codec, and

PISATEL 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: – – – TMN 5 TMN 8 domain Perceptual rate control Multiple zone (Activity) 22

PISATEL H. 263 Video Transcoder In our transcoder architecture, every frame is first transcoded,

PISATEL 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. 23

PISATEL Finally, H. 264 This codec is the product of the union between VCEG

PISATEL Finally, H. 264 This codec is the product of the union between VCEG (H. 263) and MPEG, forming the Joint Video. Team (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 24

PISATEL Optimizing H. 264 encoder We operated some modifications to the reference software in

PISATEL 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. 25

PISATEL H. 264 transcoder We first implemented the cascade pixel domain transcoder by simply

PISATEL 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 26

PISATEL H. 264 rate control Finally, we are implementing the TMN 8 rate control

PISATEL H. 264 rate control Finally, we are implementing the TMN 8 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 27

PISATEL Master Theses Luigi D’Amaro. Algoritmi per la transcodifica video. Gianni Rosa. Transcodifica video

PISATEL 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. 28

PISATEL Conclusions We studied the video transcoding problem in real-time communications We developed temporal

PISATEL Conclusions We studied the video transcoding problem in real-time communications We developed temporal transcoders with MPEG 4, 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 29

PISATEL Acknowledgements We thank all ERI people who introduced us in this research area,

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