Fundamentals 15 min read

Tencent's Self‑Developed TXAV1 Video Codec: Architecture, Performance, and Optimization Techniques

Tencent's TXAV1 encoder, a self‑developed AV1 video codec, combines advanced compression‑rate improvements, engineering acceleration, and extensive cloud deployment, achieving up to 78‑334% speedup with minimal quality loss, and includes novel pre‑analysis models, adaptive quantization, and multi‑threading strategies for both video and image applications.

Tencent Architect
Tencent Architect
Tencent Architect
Tencent's Self‑Developed TXAV1 Video Codec: Architecture, Performance, and Optimization Techniques

In recent years Tencent Cloud has invested heavily in codec research, moving from open‑source enhancements to fully self‑developed solutions. Since 2017 the company has built its own codecs, including the current AV1 implementation, and at LiveVideoStackCon 2022 the head of the codec R&D team presented the TXAV1 encoder.

The presentation covered three main topics: (1) the capabilities and deployment of the TXAV1 codec, (2) compression‑rate improvement techniques supported by a new pre‑analysis model, and (3) engineering acceleration methods.

TXAV1 builds on the earlier V265 encoder, which was optimized and widely deployed on Tencent Cloud for both domestic and overseas customers. A dedicated V265 hardware encoder was also created, and the new TXAV1 was launched in 2020, supporting 60 fps live streaming and 8K30 fps playback.

Three motivations led to the decision to develop an AV1 encoder in 2020: the rich open‑source ecosystem, the large untapped optimization potential in AV1, and the growing market support (e.g., MTK chips, Android browsers, YouTube). Because the team serves the cloud division, rapid productization was essential.

Performance results show that TXAV1 outperforms SVT‑AV1, AOM‑3.2, and VVenc in both speed and bitrate savings. For example, compared with SVT‑AV1 at its highest compression setting, TXAV1 achieves a 78 % speedup while saving 12‑16 % bandwidth; against AOM‑3.2 it saves 12‑20 % bandwidth with a 10.7× speedup; and it matches VVenc’s compression at an 11× speedup.

Subjective tests confirm that at 1.5 Mbps TXAV1 delivers noticeably better visual quality than H.265, even when bandwidth is reduced by 20 %.

In addition to video, TXAV1 supports AVIF image encoding. The encoder achieves over 30 % bandwidth savings compared with WebP and more than 20 % savings versus the proprietary 265‑based format, with only a 1.4× increase in encoding time.

The compression‑rate improvements are driven by three techniques: (1) better reference‑frame management, (2) full‑dimensional adaptive quantization (frame‑level, GOP‑level, block‑level QP optimization), and (3) rate‑distortion model optimization. A key innovation is the parallelizable pre‑analysis framework that eliminates serial dependencies by using original frames instead of reconstructed ones, yielding up to 10 % speedup in the slowest mode and over 50 % in fast mode, with a modest 2 % loss in compression efficiency.

Engineering acceleration focuses on data‑structure redesign to handle the increased partitioning of coding units (CUs). Four main issues are addressed: frequent CU address calculations, cache‑misses due to large CTU spans, redundant encoding of identical CUs, and excessive buffer copying. Solutions include pre‑computed CTU node tables, local buffers that store neighboring CTU information, identical‑CU detection to skip recomputation, and buffer‑swap techniques to avoid copies.

Parallelism is explored through five wpp (wavefront parallel processing) concepts: no‑wpp, full‑fake‑wpp, half‑fake‑wpp, half‑real‑wpp, and full‑real‑wpp. TXAV1 implements half‑fake‑wpp in its fast mode, achieving a 334 % speedup with only 0.28 % compression loss, outperforming SVT‑AV1 (230 % speedup, 3.2 % loss) and AOM (120 % speedup, 0.6 % loss).

Overall, TXAV1 delivers industry‑leading AV1 video and image coding capabilities, is integrated into Tencent Cloud MPS products, and is available for use worldwide.

TencentcompressionAV1Video CodecCloud Videoencoding optimizationPre‑analysis
Tencent Architect
Written by

Tencent Architect

We share insights on storage, computing, networking and explore leading industry technologies together.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.