How openasic-org/xk264 works
This repository is an H.264/AVC encoder IP core. Its documented capabilities cover YUV 4:2:0 input, inter- and intra-prediction, quarter-pixel interpolation, transform/quantization, CAVLC, and deblocking, with I/P GOP support. The graph sketches those domain stages around the top-level RTL and encoded-bitstream output. No source excerpts were provided, and the README lists features rather than wiring, so the stage-to-stage links are dashed and unverified; paths identify existing RTL modules from the tree.
Main entry points: top.v Encoder top · bs_buf.v Bitstream buffer · top_ctrl.v Top control · fetch.v Macroblock fetch
Components 13
Encoder control
- Encoder top
rtl/top/top.v - Top control
rtl/top/top_ctrl.v - Macroblock fetch
rtl/fetch/fetch.v
Prediction
- Integer motion search
rtl/ime/ime_top.v - Fractional motion search
rtl/fme/fme_top.v - Motion compensation
rtl/mc/mc_top.v - Intra prediction
rtl/intra/intra_top.v
Transform coding
- Transform and quantize
rtl/tq/tq_top.v - CAVLC coding
rtl/cavlc/cavlc_top.v
Filtering and output
- Deblocking filter
rtl/db/db_top.v - Bitstream buffer
rtl/top/bs_buf.v
Other components
- YUV input
- Encoded bitstream
Connections 12
- YUV input → Encoder top: supplies frames
- Encoder top → Top control: coordinates
- Encoder top → Macroblock fetch: fetches data
- Encoder top → Integer motion search: searches motion
- Encoder top → Fractional motion search: refines motion
- Encoder top → Motion compensation: predicts inter
- Encoder top → Intra prediction: predicts intra
- Encoder top → Transform and quantize: transforms residual
- Encoder top → CAVLC coding: codes coefficients
- Encoder top → Deblocking filter: filters pictures
- Encoder top → Bitstream buffer: packs output
- Bitstream buffer → Encoded bitstream: emits stream