5 years ago

EECE 541 Multimedia Systems Project Proposal: Logo ... - Courses

EECE 541 Multimedia Systems Project Proposal: Logo ... - Courses

B. MPEG2 Video Coding

B. MPEG2 Video Coding Since we are relatively familiar with MPEG2 coding process, we only present a point that is easily overlooked. In MPEG2, the frame to be compressed is divided into 16×16 pixel macroblocks. Then, for each of these macroblocks in P and B frames, the reconstructed reference frame is searched to find a macroblock that best matches the macroblock to be compressed. The offset is encoded as a motion vector. The match between the two macroblocks will often not be perfect. To correct this, the encoder computes the residual of the original pixel values and the predicted pixel values. The residual for each macroblock is appended to the motion vector, and the spatial redundancy is further reduced by the DCT transform. Sometimes, no suitable match is found. Then, the macroblock is treated like an I-frame macroblock. Therefore, both inter and intra modes can be used to compress macroblocks in MPEG2 P and B frames. C. H.264 Video Coding In this project, we aim to add logos into H.264 coded video streams. The H.264 standard is the latest video coding standard. A brief description of the H.264 standard is described below. C.1. Intra Prediction If a block or macroblock is encoded in the intra mode, a prediction block is formed based on previously encoded and reconstructed (but un-filtered) blocks from the same slice. This prediction block is subtracted from the current block prior to encoding. For the luminance (luma) samples, a prediction block may be formed for each 4×4 subblock or for a 16×16 macroblock. There are a total of nine optional prediction modes for each 4×4 luma block; four optional modes for a 16×16 luma block; and four optional modes for each 8×8 chroma block. Note that the same mode is always applied to both chroma blocks. C.2. Inter Prediction Inter prediction creates a prediction model from one or more previously encoded video frames. The model is formed by shifting samples in the reference frame(s) (i.e., motion compensated prediction). The H.264 codec uses block-based motion compensation. The H.264 standard supports motion compensation block sizes ranging from 16×16 to 4×4 luminance samples with many options in between. The luminance component of each macroblock (16×16 samples) may be split up in four ways: 16×16, 16×8, 8×16 or 8×8. Each of the sub-divided regions is a macroblock partition. If the 8×8 mode is chosen, each of the four 8×8 macroblock partitions within the macroblock may be split into a further four ways: 8×8, 8×4, 4×8 or 4×4 (known as macroblock sub-partitions). These partitions and sub-partitions give rise to a large number of possible combinations within each macroblock. A separate motion vector is required for each partition or sub-partition. Each motion vector must be coded and transmitted. In addition, the choice of partition(s) must be encoded and stored in the compressed bit stream. Choosing a large partition size (e.g. 16×16, 16×8, 8×16) means that a small number of bits are required to signal the choice of motion vector(s) and the type of partition; however, the motion compensated residual 6

may contain a significant amount of energy in frame areas with high detail. Choosing a small partition size (e.g. 8×4, 4×4, etc.) may give a lower-energy residual after motion compensation, but requires a larger number of bits to signal the motion vectors and choice of partition(s). The choice of partition size, therefore, has a significant impact on compression performance. In general, a large partition size is appropriate for homogeneous areas of the frame and a small partition size may be beneficial for detailed areas. IV. EXISTING METHODS FOR MPEG2 COMPRESSED VIDEO LOGO INSERTION Most methods for logo insertion are developed for MPEG2 compressed video. In what follows, we will introduce such methods presented in several difficult papers, which handle logo insertion from different perspectives. We will also analyze whether the methods are appropriate to be adopted in logo insertion for H.264 compressed video. A. Logo Insertion Position For logo insertion, the first step is that the position of the logo needs to be determined. Liu’s paper has placed the logo on the top left hand corner. Another major issue is that the best logo position needs to be searched so that the effect on the coded macroblocks can be minimized. In Liu’s paper [3], the logo is aligned to the macroblocks to minimize the amount of macroblocks affected. If the logo is not aligned, then nine macroblocks are affected whereas if it is aligned to the macroblocks, then only four macroblocks are affected as shown in Figure 4. Figure 4. Diagram of logo aligned to macroblocks. B. Logo Insertion in Spatial Domain As explained in [3], one of the approaches for logo insertion is to insert the logo in the spatial domain. Figure 5 gives the block diagram for spatial domain logo insertion structure. 7

Dr. Panos Nasiopoulos EECE 541 - Courses
EECE 513: Fault-‐tolerant digital systems - Courses
EECE 412 Term Project Report - Group 3 - Courses - University of ...
EECE 359: Signals and Systems Problem Set #2 - Courses
EECE 353: Digital Systems Design Lecture 10: Datapath ... - Courses