Manuscript Offprint

arXiv:2609.01535

Can LLMs Design Video Coding Tools? A Case Study on Planar Mode

Yingwen Zhang, Meng Wang, Liqiang He, Shiqi Wang

Yingwen Zhang 1^{1}, Meng Wang 2^{2}, Liqiang He 1^{1}, Shiqi Wang 1^{1}

1^{1}Department of Computer Science, City University of Hong Kong

2^{2}School of Data Science, Lingnan University

Abstract—This paper explores whether large language models (LLMs) can design video coding tools, a highly challenging task due to the intricate algorithmic coupling of tool modifications. In particular, we present an empirical case study on the Planar mode, a long-standing intra prediction tool in video coding standards. Our experiments operate within a generation-and-evaluation loop, with the LLM generating new Planar predictors, encoder trials evaluating their coding performance, and the LLM re-generating refined implementations based on the evaluation feedback. We first examine directly replacing the default Planar mode in the Fraunhofer Versatile Video Encoder (VVenC) under its faster preset. Experimental results demonstrate that the LLM-generated mode can outperform the conventional Planar mode on this lightweight toolset, achieving 0.18% bitrate savings with 0.4% complexity overhead on the standard benchmark. We further extend our evaluation to the Enhanced Compression Model (ECM). Leveraging newly introduced directional Planar modes, we investigate two integration strategies: directly replacing them, and introducing the LLM-generated predictor as an additional prediction mode with new syntax elements. The empirical results suggest that both strategies can yield coding gains under a constrained low-resolution setting. Overall, this study offers preliminary evidence and practical insights, highlighting both the potential and open challenges of LLM-based coding tool design.

Index Terms—video coding, intra prediction, large language models, automatic algorithm design

I. INTRODUCTION

Large language models (LLMs) have recently expanded from general question-answering tasks to more structured applications in automatic algorithm design [1]-[3]. In video coding, this paradigm has shown promising results in quantization parameter (QP) allocation [4]. Typically, an evolutionary generation-and-evaluation loop is constructed, where the LLM acts as a designer to iteratively propose QP decision rules, actual encoder executions evaluate these rules to compute BD-rate [5] performance, and the resulting feedback guides the subsequent refinement of the algorithm. This line of research demonstrates that LLMs, when guided by proper encoding feedback, can produce effective code-level solutions for well-defined encoder optimization tasks. A critical next question is whether this approach can be extended to designing video coding tools themselves.

From Advanced Video Coding (AVC) [6] to Versatile Video Coding (VVC) [7] and toward the emerging next-generation standard [8], coding gains have largely resulted from the iterative proposal, validation, and refinement of coding tools. Meanwhile, the coding tool development remains heavily expert-driven: domain experts conceive an idea, integrate it into reference software, evaluate its coding efficiency and complexity, and iteratively improve it before standardization discussion. While effective, the explored design space is inevitably limited by human domain knowledge. LLMs provide a new opportunity to expand this search space. However, unlike a QP allocation rule [4] applied at the pre-encoding stage, a coding tool is deeply embedded in the core codec pipeline. Consequently, its modifications introduce an intricate algorithmic coupling with surrounding modules. For example, modifications to a prediction tool may propagate a cascading impact to downstream stages such as transform, quantization, and rate-distortion optimization (RDO). Furthermore, any logic adjustment must carefully account for syntax signaling overhead and strict encoder-decoder matching. These stringent requirements make coding tool design significantly more challenging for LLMs.

In this paper, we conduct a case study on the Planar mode [9], a foundational intra prediction tool across multiple video coding standards. Its basic form is a linear interpolation from reconstructed boundary samples, making it a simple and interpretable starting point for investigating LLM-based tool design. We ask a narrow question: under existing codec syntax and interface constraints, can an LLM generate a Planar function that outperforms the hand-crafted baseline in certain configurations? To answer this, we explore the direct mode replacement in the Fraunhofer Versatile Video Encoder (VVenC) [10] faster preset, and then further evaluate both direct replacement and new-mode insertion in the Enhanced Compression Model (ECM) [11] based on the directional Planar mode [12] implementation. This work represents a first step toward examining where LLM-based coding tool design shows promise and what remains open.

References (16)