How openasic-org/xk265 works
This repository implements an HEVC/H.265 hardware encoder for 8-bit YUV 4:2:0 video. Its documented workflow is to accept video and encoding settings, analyze and predict coding units, reconstruct and filter the encoded picture, then produce a CABAC bitstream. The graph uses top-level and subsystem names from the tree and capabilities documented in the README; source excerpts were unavailable, so internal call wiring is not asserted.
Main entry points: enc_core.v Encoder core · rec_top.v Reconstruction · enc_top.v Encoder top · cabac_top.v CABAC coding
Components 17
Encoder control
- Encoder top
rtl/top/enc_top.v - Encoder core
rtl/top/enc_core.v - Rate control
rtl/prei/rate_control.v
Picture analysis
- Frame fetch
rtl/fetch/fetch_top.v - Intra analysis
rtl/prei/prei_top.v - Integer motion
rtl/ime/ime_top.v - Fractional motion
rtl/fme/fme_top.v - Partition decisions
rtl/posi/posi_top.v
Coding and reconstruction
- Reconstruction
rtl/rec/rec_top.v - Transform quantize
rtl/rec/rec_tq/tq_top.v - Intra prediction
rtl/rec/rec_intra/intra_top.v - Motion compensation
rtl/rec/rec_mc/mc_top.v
Bitstream and filtering
- CABAC coding
rtl/cabac/cabac_top.v - Deblock and SAO
rtl/db/dbsao_top.v
Buffers and memory
- On-chip memories
rtl/mem
Other components
- Video and settings
- HEVC bitstream
Connections 16
- Video and settings → Encoder top: supplies frames/settings
- Encoder top → Encoder core: starts encoding
- Encoder core → Frame fetch: fetches picture data
- Encoder core → Intra analysis: analyzes intra modes
- Encoder core → Integer motion: searches motion
- Encoder core → Fractional motion: refines motion
- Encoder core → Partition decisions: selects partitions
- Encoder core → Reconstruction: reconstructs coding units
- Reconstruction → Transform quantize: transforms and quantizes
- Reconstruction → Intra prediction: predicts intra blocks
- Reconstruction → Motion compensation: predicts inter blocks
- Encoder core → CABAC coding: codes syntax
- CABAC coding → HEVC bitstream: emits bitstream
- Encoder core → Deblock and SAO: filters reconstructed picture
- Encoder core → Rate control: controls CTU rate
- Encoder core → On-chip memories: uses buffers