S3 Digital design with HDL · Practice
Streaming image pipelines
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 8 kinds solid
Check
How much line-buffer memory does a 5 × 5 filter need on a 640-pixel-wide image with 12-bit pixels, in KB (1024 bytes)?
Check
A stream carries 1920 × 720 active pixels at 120 frames per second. How many megapixels per second does a one-pixel-per-clock pipeline process (ignoring blanking)?
Write units the way you normally would: 1.5 MHz, 1500 kHz and 0.0015 GHz are the same answer.
Check
A 5 × 5 separable filter processes 124 million pixels per second.
(a)
How many billion multiplies per second would a direct 2D convolution need?
(b)
And the separable version?
Check
A frame buffer holds 1920 × 1080 images at 4 bytes per pixel, written and read once per frame at 60 frames per second. What bandwidth does it need?
Check
A 5 × 5 window pipeline on a 1920-wide image has a total line time (with blanking) of 4400 pixel clocks. About how many clocks does its output lag the input, counting the rows of delay to the window's center?
Check
Model a streaming 3 × 3 box filter. Generate an image img = numpy.random.default_rng(seed).integers(0, 256, (H, W)) with H = 6, W = 8. Write stream_box(img), which reads pixels in raster order one at a time, keeps two line buffers (Python lists) of the previous rows and a 3-column window, and outputs the integer sum of each fully valid 3 × 3 window (no padding), returning an (H - 2) × (W - 2) array. Set out and ref, the same sums computed directly with slicing, and match = bool((out == ref).all()).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
How many KB of line buffers does a 3 × 3 filter need on 1024-wide 8-bit images?
Check
By what factor does a separable 7 × 7 filter cut the multiplies per pixel?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in S3