ELE488 – F 06 MPEG Project
This laboratory assignment is intended to introduce you to the fundamentals of video
coding and processing. Portions of this lab will require MATLAB. The required
laboratory files can be downloaded from the Blackboard course web site under the
Assignments tab. The executable files included and the sample video files are from the
companion web site to Yao Wang’s textbook, Video Processing and Communications.
The sample video files you will be using for this lab are uncompressed .yuv files, in
which each frame (there are 90 for each movie) is represented by three matrices
corresponding to the luminance component, Y, and two chrominance components, U (Cr)
and V (Cb). The components of each frame are then concatenated and the frames are
stored sequentially in one file.
The video file resolution for the luminance component uses the Common Intermediate
Format (CIF), which is 352 x 288 pixels. The chrominance components (U and V) are
subsampled with 4:2:0 (in which each 2 x 2 block of luminance values shares a single
value from the U and V components). Thus, the U and V components are both of size
176 x 144.
QCIF, which stands for Quarter CIF, is another popular video resolution format. Both
the width and height resolutions are half that of CIF, so its overall resolution is a
“quarter” that of CIF.
1. Generating QCIF video sequences
This portion of the lab will require MATLAB. You will use the input video
sequences football_cif.yuv and stefan_cif.yuv.
The first step is to load the input video sequences into MATLAB. You may use
the provided m-file yuv2mat.m which is prototyped as follows:
function [Y,U,V] = yuv2mat(filename, format)
where filename is the (string) name of the video sequence file, and format is a
string representing the resolution format of the sequence. For the input videos,
use ‘cif’ as format.
The function returns the Y, U, and V components of the video as 3-dimensional
matrices, so that Y(:, :, 1) is the luminance component of the first frame.
Write a MATLAB function cif2qcif.m:
function [YQ, UQ, VQ] = cif2qcif(Y, U, V)
which takes the Y, U, and V components of a video sequence in CIF format and
returns the components in QCIF format.
Once you have the QCIF components, save them out to file using the provided m-
file mat2yuvfile.m which is prototyped as follows:
评论0