📝 Video compression techniques (16 MCQs)
Reducing the Data Rate of Digital Video
Digital video consists of timed frames, and storing every frame independently can require substantial bandwidth and storage. Video compression reduces this data by exploiting similarities within each frame and between successive frames. Encoders organize visual information into coded pictures and prediction data, while decoders reconstruct a playable sequence with the required timing and presentation order. The bitstream is designed to reduce repeated information without losing the intended sequence.
Spatial and Temporal Redundancy Between Video Frames
Spatial redundancy occurs when nearby regions within a frame contain related information. Temporal redundancy occurs when successive frames show largely unchanged scenes. Video codecs can code a frame independently or predict it from reference frames. Transform coding and quantization reduce the amount of detail represented, while entropy coding efficiently stores the remaining symbols and motion information.
Intra Frames, Prediction and Motion Compensation
An intra-coded frame is decoded without relying on another frame. Predictive frames use previously decoded reference pictures, and bidirectionally predicted pictures may use earlier and later references where the codec allows them. Motion estimation finds corresponding blocks; motion compensation uses vectors and residual data to describe changes rather than transmitting every pixel again.
Comparing Independent Frames with Interframe Coding
Imagine a fixed camera recording a person speaking against an unchanged wall. An independently coded frame repeatedly describes much of the wall, while interframe coding can reuse reference information and encode mainly the moving person and residual differences. This reduces data, although a decoder must retain the reference frames needed for reconstruction.
Codec Efficiency and Streaming Bit Rate
Video compression makes high-resolution streaming practical by lowering the bit rate required for a chosen frame size and frame rate. The application may offer multiple encoded representations and switch according to measured throughput. Codec complexity, keyframe spacing, resolution, frame rate and quantization all influence bandwidth use, playback smoothness and picture quality.
Video Compression Does Not Mean Lower Frame Rate Only
'Every video frame is stored independently' ignores interframe prediction, where frames may depend on references. 'A higher frame rate always means a higher bit rate' is not guaranteed because codec settings and scene complexity also matter. 'Motion vectors contain complete images' is wrong; they describe estimated movement between regions. Random packet loss is a separate network impairment.
Reading GOP, Bit Rate and Compression Questions
Interpret I, P and B picture roles according to the codec context, and distinguish a frame rate from a bit rate. Explain how motion vectors and prediction reduce redundancy. In calculation questions, estimate data from frame dimensions and colour depth only when the problem explicitly assumes uncompressed frames. Interpret dependency diagrams carefully.
Video Coding and Prediction Terms
- Intra frame - Decodes without other reference frames.
- Predictive frame - Uses reference pictures to reduce repetition.
- Motion vector - Describes estimated movement between picture regions.
- Residual - Difference between prediction and source data.
- GOP - Group of pictures organized around references.
- Frame rate - Frames displayed each second.
📝 All Video compression techniques MCQs
Q1. What does the run‑length coding method replace in a repeated sequence?
📖 Explanation: The method substitutes each run of identical symbols with two items: the number of repetitions (the count) and the symbol itself. This dual representation captures the length of the run and the value that repeats, enabling compression by reducing repetitive information.
Q2. In the example 'AAABBBBCDDDDDDEEE → 3A4B1C6D3E', what is the count associated with the symbol D?
📖 Explanation: The compressed form shows '6D', indicating that six consecutive D symbols were present in the original string. Recognizing the count directly from the encoded pair confirms that the correct answer is the number six.
Q3. A binary pattern has length 20 bits. After run‑length coding using 4‑bit counts, the compressed representation uses 12 bits. What is the compression ratio (original/compressed)?
📖 Explanation: Compression ratio is calculated as original size divided by compressed size. Here, 20 bits ÷ 12 bits ≈ 1.667, which matches the second option. This ratio indicates the original data is about 1.67 times larger than the compressed version.
Q4. Pattern X = 111000111000 (12 bits) and Pattern Y = 101010101010 (12 bits). Using 4‑bit counts for zeros between ones, which pattern achieves a greater compression ratio?
📖 Explanation: Pattern X yields two zero‑run counts (3 and 3), requiring 2 × 4 = 8 bits for counts, giving a ratio of 12/8 = 1.5. Pattern Y produces five counts, needing 5 × 4 = 20 bits, which exceeds the original length, so its ratio is below 1. Therefore, Pattern X provides the higher ratio.
Q5. If a binary pattern contains a run of 20 consecutive zeros between two ones, and the encoder uses 4‑bit fixed‑length counts, what problem arises?
📖 Explanation: A 4‑bit field can represent values only up to 2⁴‑1 = 15. A run of 20 zeros exceeds this limit, causing the count to overflow. The decoder would read an incorrect value, leading to a corrupted reconstruction of the original pattern.
Q6. Given a compressed binary string '1100001100001000' that uses 4‑bit counts for zeros between ones, how many zeros are represented between the first and second ones?
📖 Explanation: The string begins with a '1' followed by the 4‑bit count '1000'. Interpreting '1000' as a binary number yields 8 in decimal, meaning eight zeros separate the first and second ones.
Q7. When a data stream consists of long runs of the same symbol, how does run‑length coding compare to a method that encodes each symbol individually?
📖 Explanation: Run‑length coding replaces each long run with a count and the symbol, dramatically reducing the number of stored items. Encoding each symbol separately would store every individual occurrence, so RLC achieves a substantial size reduction for such data.
Q8. If the fixed‑length count field is increased from 4 bits to 8 bits, what is the expected effect on the compression ratio for the same binary pattern?
📖 Explanation: An 8‑bit field can describe runs up to 255 symbols, allowing longer sequences to be captured without splitting them into multiple counts. This reduces the number of count fields needed, which typically improves the compression ratio despite the larger field size.
Q9. How does the modified run‑length coding for binary patterns differ from standard run‑length coding applied to general alphabets?
📖 Explanation: For binary data where one symbol dominates, the method stores only the count of the dominant symbol (e.g., zeros) occurring between occurrences of the other symbol (e.g., ones). Standard RLC records counts for every symbol, making the binary variant more compact for such skewed data.
Q10. Consider a binary pattern of length 64 bits with an average run length of 2 zeros between ones. Using a 4‑bit count field, which statement best describes the storage requirement compared to the original?
📖 Explanation: Each run consumes 4 bits for its count, while the original representation uses roughly 3 bits per run (2 zeros + 1 one). Because 4 > 3, the compressed representation requires more bits overall, so the compressed size exceeds the original.
Q11. Given the original string '000111000111' and its run‑length encoded form '3 0 3 1 3 0 3 1', how many total bits are saved if each count and symbol is stored using 4 bits?
📖 Explanation: The original string occupies 12 bits. The encoded form contains four pairs; each pair uses 4 bits for the count and 4 bits for the symbol, totaling 32 bits. Since 32 > 12, the encoding actually increases storage, resulting in no savings.
Q12. Apply run‑length coding to the string 'CCCCCCDDDDDAA' and give the encoded result.
📖 Explanation: Counting consecutive identical symbols yields six C's, five D's, and two A's. Concatenating each count with its symbol gives the encoded string '6C5D2A', which matches the first option.
Q13. Why does the binary‑only version of run‑length coding store only the count of zeros between ones when zeros are more frequent than ones?
📖 Explanation: When zeros dominate, recording the number of zeros between the rarer ones avoids repeatedly storing the abundant symbol. This approach reduces the amount of data needed to describe the pattern, leading to better compression efficiency.
Q14. If a binary pattern alternates between 0 and 1 (e.g., 010101...), what is the expected impact on compression ratio using the 4‑bit count method?
📖 Explanation: Alternating bits produce runs of length 1, requiring a 4‑bit count for each run. The overhead of a 4‑bit field for every single zero outweighs any savings, so the compressed data is roughly the same size or slightly larger than the original.
Q15. Design an algorithm step that decodes a compressed binary pattern where each 4‑bit count represents zeros between successive ones. Which step correctly reconstructs the original sequence?
📖 Explanation: Decoding must mirror the encoding: for each 4‑bit count, generate the specified number of zeros, then write a one to mark the end of the run. Repeating this process reconstructs the original binary pattern accurately.
Q16. How would you adapt run‑length coding to handle data with three symbols (e.g., 0,1,2) while keeping the compression efficient?
📖 Explanation: A practical extension records counts for the dominant symbol (the one appearing most often) between occurrences of the other two symbols, while the less frequent symbols are stored directly. This balances compression benefit with manageable metadata.