Pertemuan 11 Video Coding (Compression) Team Teaching Sistem Multimedia Retno Indah R., S.Pd., M.Pd.
Definisi Kompresi audio/video adalah salah satu bentuk kompresi data yang bertujuan untuk mengecilkan ukuran file audio/video dengan suatu metode
Dimensi Video Video memiliki 3 dimensi: 2 dimensi spasial (horisontal dan vertikal) 1 dimensi waktu Di dalam video, terdapat 2 hal yang dapat dikompresi yaitu frame (still image) dan audionya
MPEG (Moving Pictures Expert Group) Committee of experts that develops video encoding standards Until recently, was the only game in town (still the most popular, by far) Suitable for wide range of videos Low resolution to high resolution Slow movement to fast action Can be implemented either in software or hardware
Evolution of MPEG MPEG-1 Initial audio/video compression standard Used by VCD s MP3 = MPEG-1 audio layer 3 Target of 1.5 Mb/s bitrate at 352x240 resolution Only supports progressive pictures
Evolution of MPEG MPEG-2 Current de facto standard, widely used in DVD and Digital TV Ubiquity in hardware implies that it will be here for a long time Transition to HDTV has taken over 10 years and is not finished yet Different profiles and levels allow for quality control
Evolution of MPEG MPEG-3 Originally developed for HDTV, but abandoned when MPEG-2 was determined to be sufficient MPEG-4 Includes support for AV objects, 3D content, low bitrate encoding, and DRM In practice, provides equal quality to MPEG-2 at a lower bitrate, but often fails to deliver outright better quality MPEG-4 Part 10 is H.264, which is used in HD-DVD and Blu- Ray
MPEG technical specification Part Technical Spec. 1 Systems - describes synchronization and multiplexing of video and audio. 2 Video - compression codec for interlaced and noninterlaced video signals. 3 Audio - compression codec for perceptual coding of audio signals. A multichannel-enabled extension of MPEG-1 audio. 4 Describes procedures for testing compliance. 5 Describes systems for software simulation.
MPEG technical specification Part Technical Spec. 6 Describes extensions for DSM-CC (Digital Storage Media Command and Control.) 7 Advanced Audio Coding (AAC) 8 Deleted 9 Extension for real time interfaces. 10 Conformance extensions for DSM-CC.
MPEG-Video Spatial-Domain Processing Spatial domain handled very similarly to JPEG Convert RGB values to YCbCr colorspace Split frame into 8x8 blocks Group 6 blocks to a macroblock (containing 4 luminance blocks and 2 chrominance blocks) 2-D DCT on each block Quantization of DCT coefficients Run length and entropy coding
MPEG-Video Time-Domain Processing General idea Use motion vectors to specify how a 16x16 macro block translates between reference frames and current frame, then code difference between reference and actual block
Types of frames I frame (independent, intra-coded) Coded without reference to other frames P frame (forward-only predictive-coded) Coded with reference to a previous reference frame (either I or P) Size is usually about 1/3 rd of an I frame B frame (bi-directional predictive-coded) Coded with reference to both previous and future reference frames (either I or P) Size is usually about 1/6 th of an I frame
GOP (Group of Pictures) GOP is a set of consecutive frames that can be decoded without any other reference frames Usually 12 or 15 frames Transmitted sequence is not the same as displayed sequence Random access to middle of stream Start with I frame
Things About Prediction Only use motion vector if a close match can be found Evaluate closeness with MSE or other metric Can t search all possible blocks, so need a smart algorithm If no suitable match found, just code the macroblock as an I-block If a scene change is detected, start fresh Don t want too many P or B frames in a row Predictive error will keep propagating until next I frame Delay in decoding
Apakah MSE? MSE adalah nilai error kuadrat rata-rata antara citra asli dengan citra manipulasi. Biasanya dibandingkan dengan nilai lain
Redundancy pada Video Data video memiliki: redundancy spatial (warna dalam still image) redundancy temporal (perubahan antar frame)
Penghilangan Spatial Redundancy Spatial/intraframe compression Dilakukan dengan mengambil keuntungan dari fakta bahwa mata manusia tidak terlalu dapat membedakan warna dibandingkan dengan brightness, sehingga image dalam video bisa dikompresi (teknik ini sama dengan teknik kompresi lossy color reduction pada image)
Intra-frame Compression When you take a still picture and compress it, you are applying an intraframe codec. There is only one frame, and you are analyzing the data within this frame to compress it.
Penghilangan Temporal Redundancy Temporal/interframe compression dilakukan dengan mengirimkan dan meng-encode frame yang berubah saja sedangkan data yang sama masih disimpan.
Teknik Video Coding
Video Stream Data Hierarchy Picture Macroblock Slice Block Video Sequence primary basic GOP satu Coding atau (Group coding unit coding lebih terkecil unit of macroblock. unit Pictures) pada pada dari video algoritma Urutannya sequence. MPEG. dari 8x8 kiri pixel, ke kanan, diawali dengan sequence header, berisi satu group gambar Merepresentasikan 16x16 sebuah atas-bawah. berupapixel luminance, header segment Penting dan red nilai rangkaian untuk dalam chrominance, luminance error sebuah satu handling. gambar (Y) frame. dan Macroblock Bila atau 2 chrominance terjadi lebih error (Cb atau lebih, diakhiri dengan kode end-of-sequence dan terdiri maka ataucr) blue akan darichrominance 4 di-skip luminance, ke slice 1 berikutnya. Cr, dan 1 Cb.
H.261 dan H.263 Merupakan standar video coding yang dibuat oleh CCITT (Consultative Commitee for International Telephone and Telegraph) pada tahun 1988-1990 Dirancang untuk video conferencing, aplikasi video telepon menggunakan jaringan telepon ISDN
H.261 dan H.263 Kecepatan bitrate antara p x 64 Kbps. Dimana p adalah frame rate (antara 1 sampai 30) Susunan frame H.261 berurutan dimana tiap-tiap 3 buah frame (I) dibatasi dengan 1 buah inter-frame (P) Tipe frame gambar yang didukung adalah CCIR 601 CIF (352 x 288) dan QCIF (176 x 144) dengan chroma sub sampling 4:2:0
H.261 dan H.263 Mempunyai 2 tipe frame yaitu: I-frame digunakan untuk mengakses banyak pixel P-frame digunakan sebagai differences dari frame yang sebelumnya ke frame sesudahnya, dimana antar frame terhubung satu sama lain.
Tahapan Intraframe coding H.261
Tahapan Interframe Coding H.261
Control berfungsi untuk mengatur kecepatan bit rate, jika buffer pengirim penuh, maka bit rate akan dikurangi
Memory digunakan sebagai tempat penyimpanan blok gambar yang telah direkonstruksi untuk pembuatan gambar pada P-frame selanjutnya.
H.263 untuk encoding video pada bitrate rendah
MPEG Audio-Video Komponen penting adalah: Audio Video Sistem pengontrol stream video Permasalahan pada frame makroblok
MPEG dibandingkan H.261 MPEG menambahkan frame dalam makroblok seperti pada H.261/H.263 yang bernama B-frame (bidirectional frame) sehingga strukturnya adalah:
Is There Any Question?