📝 Text representation in multimedia (10 MCQs)
Character Data Within Multimedia Documents and Interfaces
Text is a compact but essential multimedia component used for titles, captions, subtitles, menus, labels, descriptions and interactive content. Computers store text as coded character values rather than as pictures of letters. A consistent character encoding allows different systems to interpret those values correctly, while multimedia applications associate text with images, sound and timed video. Correct encoding is essential when content moves between platforms and languages.
Character Sets, Unicode and Text Encodings
A character repertoire defines the characters that can be represented, while an encoding maps each character value to bytes. Unicode assigns code points for characters from many writing systems; UTF-8 represents those code points using one to four bytes. Markup languages can add structure, formatting and links without changing the underlying idea of character encoding.
From Character Codes to Transmitted Text Bytes
A text application converts characters into bytes using a selected encoding, then includes those bytes in a file or protocol message. The receiver identifies or is informed of the encoding, decodes the bytes into characters, and applies any markup or timing instructions. If sender and receiver use incompatible encodings, text may appear as replacement symbols or incorrect characters.
UTF-8 Representation of a Short Caption
The English word Cat is encoded in UTF-8 as three bytes: 43 61 74 in hexadecimal. A subtitle cue can carry the text together with a start time and end time, allowing a player to display it during the matching video interval. Non-ASCII characters may require multiple bytes, depending on their Unicode code point.
Text Tracks, Subtitles and Accessibility Services
Text often accompanies video as subtitles, captions, transcripts and descriptions. Captions can include speech and relevant sounds, improving accessibility, while timed text can be synchronized with a media timeline. Text is also used in menus and metadata that control playback. Its relatively small size makes it practical to deliver separately from high-rate audio-video streams.
Unicode Is Not a Compression Algorithm
'Unicode is a font' confuses character coding with visual rendering; fonts provide glyph shapes. 'UTF-8 assigns character meanings' is inaccurate because Unicode assigns code points and UTF-8 encodes them as bytes. 'Every character uses one byte' is false because UTF-8 uses one to four bytes per code point. This distinction matters when evaluating codec behavior and media delivery.
Interpreting Character Encoding and Text Size
Be able to distinguish a character, code point, byte sequence, encoding and rendered glyph. Calculate simple UTF-8 byte counts only when the character values are specified. For subtitles, interpret timing cues and explain how text can remain synchronized with video while being transported independently from the video frames. Explain how encoding errors affect displayed text.
Character Encoding and Timed-Text Terms
- Unicode - Assigns code points to characters across scripts.
- Code point - Identifies a character in Unicode.
- UTF-8 - Encodes Unicode values with one to four bytes.
- Glyph - Visual shape used to display a character.
- Subtitle cue - Text item linked to a presentation time.
- Timed text - Text synchronized to a media timeline.
📝 All Text representation in multimedia MCQs
Q1. In the LZW decoding pseudocode, what does the variable represent?
📖 Explanation: The variable holds the string that is looked up in the dictionary for the current codeword. When a codeword is read, the algorithm accesses Dictionary[] and assigns that value to , which is then used for output and for building new entries.
Q2. If the current codeword is not found in the dictionary, which clause is executed and what immediate effect does it have on the dictionary?
📖 Explanation: When is absent, the algorithm follows the else‑clause. This clause constructs a new dictionary entry by concatenating the previous string with the first character of the current string, thereby expanding the dictionary for future lookups.
Q3. Assume the dictionary initially contains entries for characters A and B. After reading codeword 2 (which corresponds to string 'BA') and then codeword 1 (string 'A'), what string is output by the algorithm for the second codeword?
📖 Explanation: The first codeword outputs 'BA' as expected. When the second codeword (1) is processed, the algorithm retrieves Dictionary[1], which is the single character 'A', and outputs that string. Thus the output associated with the second codeword is exactly 'A', independent of the previous output.
Q4. Compare the effect of the else‑clause versus the if‑clause on the size of the dictionary during decoding. Which statement is accurate?
📖 Explanation: The else‑clause is the only branch that adds a new entry to the dictionary, formed from . The if‑clause simply uses an existing entry without modification. Consequently, each execution of the else‑clause grows the dictionary, while the if‑clause leaves its size unchanged.
Q5. Considering the number of codewords processed, what is the overall time‑complexity of the LZW decoding algorithm?
📖 Explanation: Each iteration handles a single codeword with constant‑time dictionary lookups and possible entry creation. Because the work per codeword does not depend on previously processed data, the total runtime grows linearly with the number of codewords, giving a complexity of .
Q6. If PreS = 'A' and the next character char = 'B', what new dictionary entry is created by the else‑clause?
📖 Explanation: The else‑clause forms a new entry by concatenating the previous string with the newly read character. With PreS = 'A' and char = 'B', the resulting string is 'AB', which is then stored in the dictionary under the next available code.
Q7. During decoding, if the algorithm encounters a codeword that is not yet present in the dictionary, what does it output?
📖 Explanation: When a missing codeword is read, LZW decoding uses the rule that the output is the previous string followed by the first character of . This constructs a valid string and also supplies the information needed to add a new dictionary entry.
Q8. What is the relationship between and in the LZW decoding process?
📖 Explanation: In each loop, holds the string from the previous iteration, and is the current string retrieved from the dictionary. Because is built from (often as ), the previous string naturally appears as a prefix of the new string.
Q9. During the decoding process, after the else‑clause creates a new entry at code 5, the subsequent if‑clause checks code 6 which is present in the dictionary. What will be the output for code 6?
📖 Explanation: When the if‑clause is taken, the algorithm simply retrieves the existing entry at Dictionary[6] and outputs that string. No new entry is added, and the decoding continues normally, producing the exact string associated with code 6.
Q10. How does LZW encoding differ from LZW decoding as illustrated in the example?
📖 Explanation: Encoding constructs the dictionary by scanning the input and adding new patterns as they appear, while decoding uses the transmitted codewords to rebuild the original data, inserting new entries only when the else‑clause condition is met. This fundamental directionality distinguishes the two procedures.