Misr University for Science and Technology
Information Technology College
Department: Computer Science
Course Title:Computer Interface and Multimedia
Course Code: CS483
Academic Semester: Spring /2021
Instructor: Dr. Maged khafagy
Collected Questions for Quiz 1
1) What is meant by multimedia? When it was started? And why?
A combination of text, Graphics, sound, animation, and video that is
delivered interactively to the user by electronic or digitally
manipulated means.
It started in the late 70’s or the early 80’s.
As the development of hardware and software took place and the
appearance of faster desktops, Local and Wide area networks that
connected the world.
2) What is an analog signal? How can a computer deal with it?
It is a continuous signal waveform.
To deal with it the computer have to convert it into digital form
3) What does Nyquist’s Sampling Theorem state?
In order to effectively sample a waveform the sampling frequency must be
at least twice that of the highest frequency present in the signal
4) What are the implications of Nyquist’s Sampling Theorem on both
quality and size of multimedia data?
- Increasing the samples increase the quality
- Increasing the size of the sample representation increase the quality
- On the other hand increasing both the samples and the size of the
samples will increase the storage space required and increase the
time required to transfer the data through the networks.
5) Calculate the storage space required to store an audio file 3 minutes long,
knowing that the minimum frequency is 20Hz and its maximum
frequency is 20 KHz and 16 bits per sample in stereo mode.
Storage = 3*60*20000*2*16*2 = 230,400,000 bit
Look Q 3 Nyquist’s
6) Calculate the uncompressed digital output if a video signal is sampled
using the following values: 25 frames per second 160 x 120 pixels and
True (Full) color depth:
Uncompressed digital output = 25*160*120*3*8 = 11520000 bits Full Color(RGB)= 3 * 8 bit
7) For a 3-minute song audio signal CD quality of 44100 samples per
seconds with 16 bits per sample, stereo sound, what will be the amount of
the played data in Mb?
amount of data per second = 44100*16*2 * 10-6 = 1.411 Mbps(Mega bit per
second) 3-minute song: 1.411 * 180 = 254 Mbit
8) For a 3 minutes of Video signal of 320*240 images and 15 frames/sec with
24-bit colors, what will be the amount of the played data in Mb?
πŸ‘πŸπŸŽ × πŸπŸ’πŸŽ × πŸπŸ’
Data per image =
= 230 Kbyte/image
πŸ–
For 15 frames/sec: Data =15*230KB = 3.45 Mbyte/s
3 minutes of video= 3.45*180 = 622Mbyte
9) State the advantages and disadvantages that the digital audio has over
the analog.
Advantages:
- Digital recordings do not degrade with re-recording.
- The recording performance is independent of the recording medium.
- Digital audio is easy to process, because the signal processing can be
performed by mathematical algorithms.
Disadvantages:
- It requires two conversion stages: one to convert the analogue signals into
a digital format and a second to convert the digital signals to analogue.
- These conversion processes can introduce their own types of distortion
and defects.
- The digital data requires a far higher density storage than its analogue
equivalent.
- Whilst effects are simple to achieve using algorithms, a very fast
processor is required, which can be expensive compared with an analogue
equivalent with far less performance and flexibility.
10) Define the following terms:
Quantization error – Echo generation in analog signal
Quantization error:
it happens when converting from analog to digital this may result due to
inability to convert the analog value to the exact corresponding digital value
we can overcome this by increasing the number of bits per sample.
Echo generation in analog signal:
Analogue echo and reverb units usually rely on an electro-mechanical method
of delaying an audio signal to create reverberation or echo. The WEM
Copycat used a tape loop and a set of tape heads to record the signal onto tape
and then read it from the three or more tape heads to provide three delayed
copies of the signal.
11) What are the application of multimedia, explain
1● Creative industries
- Creative industries use multimedia for a variety of purposes ranging from
fine arts, to entertainment, to commercial art, to journalism, to media and
software services.
2● Commercial
- Much of the electronic old and new media utilized by commercial artists is
multimedia.
- Exciting presentations are used to grab and keep attention in advertising.
3● Entertainment and Fine Arts
- Multimedia is heavily used in the entertainment industry, especially to
develop special effects in movies and animations.
- Interactive Multimedia: is an applications that allow users to actively
participate instead of just sitting by as passive recipients of information.
4● Engineering
- Software engineers may use multimedia in Computer Simulations for
anything from entertainment to training such as military or industrial
training.
5● Mathematical and Scientific Research
- In Mathematical and Scientific Research, multimedia is mainly used for
modeling and simulation.
6● Medicine
- In Medicine, doctors can be trained by looking at a virtual surgery or they
can simulate how the human body is affected by diseases spread by viruses
and bacteria and then develop techniques to prevent it.
7● Multimedia in Public Places
- In hotels, railway stations, shopping malls, museums, and grocery stores,
multimedia will become available at stand-alone terminals or kiosks to
provide information and help.
8● Education
- In Education, multimedia is used to produce computer-based training
courses (popularly called CBTs) and reference books like encyclopedia and
almanacs.
- Edutainment is an informal term used to describe combining education
with entertainment, especially multimedia entertainment.
12) What are the multimedia requirements?
1- Demand from the consumer.
2- Compression techniques: to make transmission viable or re-duce the amount of
bandwidth needed.
3- Processing power: to handle the compression / decompression.
4- Standards: It guides both the producer and consumer to be in the same track..
5- Back channels to provide an interactive loop
6- Bandwidth
7- Internal distribution
13) We want to digitize the human voice. What is the bit rate, assuming 8
bits per sample?
The human voice normally contains frequencies from 0 to 4000 Hz. So the
sampling rate and bit rate are calculated as follows:
Sampling rate= 4000 X 2 = 8000 samples/s
Bit rate = 8000X 8 = 64000 bps = 64 kbps
14) What is the distinction between Lossless and Lossy compression?
Lossless compression techniques: involve no loss of information. If data
have been losslessly compressed, the original data can be recovered exactly
from the compressed data
Lossy compression techniques: involve some loss of information, and data
that cannot be recovered or reconstructed exactly.
15) Define the following terms:
a-law and  low:
The a-law codec in the UK and the μ-law codec in the US.
Allocating more digital bits improve the resolution. However, the less
important areas are given less bits; the quality reduction is not noticeable
because of the small part they contribute to the signal
Byte sized sampling:
Save on processing the data to align it on byte boundaries. Most processors
are byte orientated in that they can handle 8 and 16 bit words quite easily and
are most efficient at moving data when using data that aligns with byte
boundaries.
16) What broad types of multimedia data are each most suited to?
Graphics and graphical → images
Text → (txt)
Audio → MP3
Photographic images → (JPEG)
Video → (MP4)
17) What are different types of Lossless compressions?
-
RLE compression
Delta compression
Huffman compression
Dictionary compression
18) What is Run Length Encoding (RLE) Compression.
- Data files frequently contain the same character repeated many times in a
row.
19) What is Delta Compression.
- The term delta encoding refers to several techniques that store data as the
difference between successive values, rather than directly storing the
values themselves.
- The first value in the delta-encoded file is the same as the first value in the
original data. All the following values in the encoded file are equal to the
difference (delta) between the corresponding value in the input file, and
the previous value in the input file.
20) What is Huffman compression? Showing its compression ratio?
- It is found that more than 96% of data files consist of only 31 characters:
the lower case letters, the space, the comma, the period, and the carriage
return.
- A five bit binary code is assigned for each of these 31 common characters.
- This allows 96% of the file to be reduced in size by 5/8.
- The last of the five bit codes, 11111, will be a flag indicating that the
character being transmitted is not one of the 31 common characters.
The compression ratio =
𝑠𝑖𝑧𝑒 π‘œπ‘“ π‘‘π‘Žπ‘‘π‘Ž π‘Žπ‘“π‘‘π‘’π‘Ÿ π‘π‘œπ‘šπ‘π‘Ÿπ‘’π‘ π‘ π‘–π‘œπ‘›
𝑠𝑖𝑧𝑒 π‘œπ‘“ π‘‘π‘Žπ‘‘π‘Ž π‘π‘’π‘“π‘œπ‘Ÿπ‘’ π‘π‘œπ‘šπ‘π‘Ÿπ‘’π‘ π‘ π‘–π‘œπ‘›
21) Write a brief note on Dictionary Compression.
It is a compression where we Detect frequent sub strings of a source string and
translating such groups of characters into a corresponding symbol. This achieves
faster compression. The dictionary can be:
1- A static dictionary where it is created before encoding or decoding begins and
must remain fixed.
2- Semi-adaptive dictionary compression uses a different dictionary for each text
encoded.
3- Adaptive (also called dynamic) dictionaries where better compression is
achieved by that allow additions, deletions, and changes to the collection of
referenced strings during compression. As examples the LZ77 code, LZ78,
LZSS, LZW, LZFG, LZW, etc.
22) Show how you would encode the following token stream using RLE
run length encoding: ABC000AAB00000000DEFAB00000
ABC03A2B08DEFAB05
23) (i) Apply Delta compression to compress the following stream of 8-bit
Integer number: 4 6 9 11 13 12 13 14 12 11
(ii) Can the result be encoded in 3 bits?
Answer:
Sheet 4
Q1
(a) Propose a color palette making the user able to customize his
display to 128 colors out of 32768 choices in an RGB system.
3 Marks
Answer:
(b)
Explain how to simulate echo in case of analog and digital signals
3 Marks
Answer:
1- For analog:
2- For Digital:
(c) Write a brief note on the following:
Byte sized sampling - A law and µ law - Dictionary compression
4 Marks
Answer:
Dictionary Compression: Detecting frequent sub strings of a source
string and translating such groups of characters into a corresponding
symbol achieves faster compression, this is known as dictionary
compression
Q2
(a) Draw the block diagram for the PC graphics adaptor that uses video
ram and explain the function of each block.
4 Marks
Answer
(b) What is the bandwidth for a 50 fps where each frame has 1289 X 980
pixel?
3 Marks
Answer:
BW=1289 X 980 X50 MHz
( c) Assume that we have a 20 second video clip that displays at 30 frames a
second. The video's dimensions are 640x480 and the video is created in
"true" color (3 bytes per pixel). What is the file size of the video?
3
Answer:
Size =640x480 X 3 X30X20
bytes
Marks
Sheet 5
Multiple Choice
1) Television displays at...
a. 2 frames per second
b. 10 frames per second
c. 30 frames per second
d. 100 frames per second
2) We've talked about video and animation. Are they the same? Explain.
Answer:
They are not the same. Video is motion created by capturing using cameras/film/etc,
whereas Animation is a constructed (drawn) motion.
3) Assume the following: We have a 20 second video clip that displays at 30 frames a second. The
video's dimensions are 640x480 and the video is created in "true" color (3 bytes per pixel). What is the
file size of the video? (assume the video has not gone through compression) Show me your math.
Answer:
20 * 30 * 640 *480 * 3 = 552,960,000 bytes
4) Suppose we have 24 bits per pixel available for a colour image. We also
note that humans are more sensitive the red and green than to blue, by a factor
of approximately 1.5 times. How may we design a simple colour
representation to make use of the bits available?
Answer:
Quite a simple scheme:
ο€ Since Blue is less perceptually important use less bits to represent blue colour.
ο€ Use proportionately more bits for red and green rather than blue Therefore
Red and Green use 9 bits each and Blue 6 bits
5) Briefly explain why we need to have less than 24-bit colour representations
(typically down to 8-bit) and why this is a sometimes a problem. Give one
example where 8-bit colour representation have an advantage in terms of
image/video processing?
Answer:
Reasons:
Need more video memory
24 bit colour is overkill for even most photorealistic images 1 million colour at max can be more
than enough. 24-bit allows for 16-17 Million colours!!
There is a waste of video memory and bandwidth
Better to use 8-bit:
(Simple Answer) 8-bits is bandwidth friendly.
Sheet 6
1- Draw the block diagram for the PC graphics adaptor that uses video ram
and explain the function of each block. (Chapter 3)
2- Draw the block diagram for the PC graphics adaptor that use D-Ram ram
and explain the function of each block. (Chapter 3)
3- What is the difference between D-Ram and V-Ram techniques of the PC
graphics adaptor? (Chapter 3)
1- V-Ram have 2 memory interfaces while D-Ram have one
memory interface
2- V-Ram have faster memory chips
3- V-Ram is more expensive
4-V-Ram technique is faster
4- Assume the following: We have a 20 second video clip that displays at 30
frames a second. The video's dimensions are 640x480 and the video is
created in "true" color (3 bytes per pixel). What is the file size of the video?
(assume the video has not gone through compression) (Chapter 4)
Size =640x480 X 3 X30X20=????? bytes
5- What is the bandwidth for a 50 fps where each frame has 1289 X 980 pixel?
(Chapter 3)
BW=1289 X 980 X50 =?????? MHz
6- Explain the concept of bit planes (Chapter 3)
-The memory is organized as a set of bit planes, where similar data is collated together.
-The pixels are organized into a two dimensional map or plane. A third dimension can be
visualized
behind each pixel that can represent another attribute.
-If this is color depth, it can be split into three components representing the bit allocation to
each primary color.
-There are red, green and blue bit planes within the pixel storage. Also there cursor and video
bit planes.
7- How many bits needed to present the following data?
1- Black and white =>1 bit
2- Gray scale=>8 bit
3- Color=>24 bit
Misr University for Science and Technology
Information Technology College
Department: Computer Science
Course Title: multimedia
Course Code: CS483
Academic Semester: Spring 2023
Instructor: Dr. Maged khafagy
Sheet 7
1. Propose a color palette making the user able to customize his
display to 128 colors out of 32768 choices in an RGB system.
2. Concerning the PC graphics adaptors, what are the differences
between D-Ram and V-Ram techniques?
1- V-Ram have 2 memory interfaces while D-Ram have one
memory interface
2- V-Ram have faster memory chips
3- V-Ram is more expensive
4-V-Ram technique is faster
Page 1 of 4
3. Which of the two techniques is faster? V-ram technique
4. Describe in detail the DCT technique showing the output expected
when applying it to an image.
5. Write a brief notes on lossy and lossless compression. On your
opinion which of them should have better compression ratio? Explain
why?
1- Lossless compression
• Lossless compression techniques, as their name implies, involve no loss
of information. If data have been losslessly compressed, the original
data can be recovered exactly from the compressed data.
• It is suitable for many types of data, for example: executable codes,
word processing files, tabulated numbers, etc.
2- Lossy compression
• Lossy compression techniques involve some loss of information, and
data that cannot be recovered or reconstructed exactly.
• In return for accepting this distortion in the reconstruction, we can
generally obtain much higher compression ratios than is possible with
lossless compression.
• In many applications, this lack of exact reconstruction is not a
problem.
• Lossy compression is often used for applications such as image
compression.
6. Write a brief notes on Huffman compression.
Page 2 of 4
This method is named after D.A. Huffman, who developed the
procedure in the 1950s. It is found that more than 96% of data files
consist of only 31 characters: the lower case letters, the space, the
comma, the period, and the carriage return. This observation can be
used to make an appropriate compression scheme for this file. A five
bit binary code is assigned for each of these 31 common characters :
00000 = "a", 00001 = "b", 00010 = "c", etc. This allows 96% of the
file to be reduced in size by 5/8. The last of the five bit codes, 11111,
will be a flag indicating that the character being transmitted is not one
of the 31 common characters. The next eight bits in the file indicate
what the character is, according to the standard ASCII assignment.
This results in 4% of the characters in the input file requiring 5+8=13
bits. The idea is to assign frequently used characters fewer bits, and
seldom-used characters more bits. The average number of bits
required per original character is: 0.96 x 5 + 0.04 x 13 = 5.32. In other
words, an overall compression ratio of: 5.32/8 bits, or about 1:1.5 [2].
7.What is “Interlacing”
8.What are the Luminance and chrominance components of the color
image?
Luminance contains the grayscale information and
Page 3 of 4
can be used to display a black and white version of
the picture (Y).
• The color information is encoded in the
chrominance signal (UV).
9.Propose a color palette making the user able to customize his
display to 128 colors out of 32768 choices in an RGB system. β€«Ω…ΩˆΨ¬ΩˆΨ― ΩΩŠβ€¬
4 β€«Ψ΄ΩŠΨͺ‬
10. Suppose we have 24 bits per pixel available for a color image. We
also note that humans are more sensitive the red and green than to
blue, by a factor of approximately 1.5 times. How may we design a
simple color representation to make use of the bits available?
Quite a simple scheme:
Since Blue is less perceptually important use less bits to represent
blue colour.
Use proportionately more bits for red and green rather than blue
Therefore
Red and Green use 9 bits each and Blue 6 bits
Page 4 of 4
1- Describe in detail the three main ideas that govern digital video compression.
Ans:
Sending the differences:
- There is often very little difference between adjacent picture ’ s content.
- The differences typically take the form of new objects appearing or disappearing in the field of view
or small changes to existing parts of the image.
- The new frame can be created by sending the changes to the preceding frame.
Motion estimation:
-
Motion estimation analyses the video frames and calculates where objects are moved to.
Instead of transmitting all the data needed to represent the new frame, only the information (i.e.
the vector or new position) needed to move the object is transmitted.
Near fit vector comparison:
-
This technique divide the picture into arbitrary blocks and compare the block with its neighbors. The
resulting differences can be encoded to allow the decoder to build up the picture.
2- What is key difference between I-Frames, P-Frames and B-Frames?
Ans:
The I or intra frame:
- This is the starting point for the whole process. An intra or I frame is one which is treated as a still
process and has simply been DCT processed but does not use or require any prior knowledge of past
or future frames to decode it.
- It provides a known starting point and is usually the first frame to be sent.
- Often used as internal references for trick modes, such as the ability to fast forward through a
picture.
The P or predicted frame:
-
Uses the preceding I frame as its reference and the motion estimation processing.
The B or bi-directional frame:
-
It is similar to the P frame except that its reference frames are the nearest preceding I or P frame
and the next future I or P frame.
3- What is the advantage of using the I frames?
Ans:
it provides a known starting point and is usually the first frame to be sent. and it is often used as internal
references for trick modes, such as the ability to fast forward through a picture.
4- What are the objections to B frames and the advantage?
Ans:
Objections:
-
It increases computational load during the encode process.
Increased frame buffers to store frames to allow the encode and decode processes to proceed.
It does not provide a direct reference in the same way that an I or P frame does.
Advantage:
-
Improved signal to noise ratios.
5- Explain the concept of slices and macro blocks in MPEG1.
Ans:
-
The motion estimation process within MPEG1 is based on the concept of macroblocks.
Each frame is divided into a set of slices, each slice containing eleven macroblocks.
6- Compare between the micro blocks in luminance and chrominance.
Ans:
-
for the luminance (Y) values, the macroblock is 16 by 16 pixels. For the two chrominance
components, the macroblock is 8 by 8 pixels.
Only the luminance component is used for the motion estimation calculations.
-
7- Mention two techniques used to compress digital pictures and explain one of them.
Ans:
JPEG and Motion JPEG
JPEG:
The encoding process consists of several stages along with options that determine the efficiency of the
compression and the amount of data that is lost. and these stages are:
-
Converting to a deferent color space
Down Sampling the Image
DCT Transformation
Quantization
Encoding
File Format
(Optional Info) JPEG decoding is the inverse of encoding process
-
-
The bit stream is decoded and the coefficients extracted along with the quantization
information that was used to create them.
An inverse quantization is then performed to reconstruct the results of the DCT.
An inverse DCT is then performed to create the macroblocks and thus create the picture output.
8- If the display order of two groups of frames are:
Group (A) = IBBPBBPPBBI
Group (B) = IBBIBBIPBBI
Which of the two groups you expect to have better compression? Which of the two groups
you expect to have better Quality?
Ans:
1- Group (A) has better compression Ratio due to the use of multiple P frames instead of getting I
frame each time
2- Group (B) has better quality as we get more I frame each two B frames which has better quality