<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adding-stateless-support-to-vicodec-ct08tbika" -->

---
title: Adding stateless support to vicodec | daily.dev
description: A walkthrough of adding stateless decoder support to the vicodec virtual driver in the Linux kernel media subsystem, written by an Outreachy intern. Explains...
canonical: https://daily.dev/posts/adding-stateless-support-to-vicodec-ct08tbika
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adding stateless support to vicodec | daily.dev
og:description: A walkthrough of adding stateless decoder support to the vicodec virtual driver in the Linux kernel media subsystem, written by an Outreachy intern. Explains...
og:url: https://daily.dev/posts/adding-stateless-support-to-vicodec-ct08tbika
og:image: https://api.daily.dev/og/posts/cT08TbIKA.png
og:image:alt: Adding stateless support to vicodec
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding stateless support to vicodec

**[Collabora Blog](https://daily.dev/sources/collabora)** · 9 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of adding stateless decoder support to the vicodec virtual driver in the Linux kernel media subsystem, written by an Outreachy intern. Explains the difference between stateful and stateless codec APIs, how the Request API addresses dynamic resolution changes, and provides hands-on commands using v4l2-ctl and ffmpeg to encode/decode FWHT-format video files. Also covers merging videos with different dimensions to test the stateless decoder, and how setting video_gop_size=1 eliminates decoding artifacts caused by mismatched reference frames.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/blog/2019/10/09/adding-stateless-support-to-vicodec>

## Questions this post answers

### What is the difference between stateful and stateless codec APIs in the Linux V4L2 media subsystem?

In stateful codecs, stream properties (dimensions, pixel format) are configured before streaming starts, requiring a stop-reconfigure-restart cycle (dynamic resolution change) when frame properties change. Stateless codecs use the Request API, where each frame is bundled with its own properties and reference frame pointers in a 'request', processed independently without stopping the stream. The userspace application must parse frame headers and track reference frames itself.

_Developers working on Linux media drivers track V4L2 API changes and kernel subsystem news on daily.dev._

### What does video_gop_size control in vicodec and how does it affect decoding artifacts?

video_gop_size controls the interval between I-frames (frames that decode independently without referencing other frames). Its default value in vicodec is 10, meaning one I-frame every 10 frames. When decoding merged videos with alternating frame dimensions, mismatched reference frames cause visible artifacts at frame edges. Setting video_gop_size=1 makes every frame an I-frame, eliminating those artifacts entirely.

_Linux media subsystem developers working through similar driver issues find relevant kernel internals discussions on daily.dev._

## Similar posts on daily.dev

- [Apple Video Decode Driver Posted For Upstream Linux Kernel Review](https://daily.dev/posts/apple-video-decode-driver-posted-for-upstream-linux-kernel-review-pfockg6ep) · Phoronix · 0 upvotes · 0 comments
- [The WebCodecs Handbook: Native Video Processing in the Browser](https://daily.dev/posts/the-webcodecs-handbook-native-video-processing-in-the-browser-vuda8hhah) · freeCodeCamp · 8 upvotes · 0 comments
- [NVIDIA Video Codec SDK 13.1: Zero-Copy Transcode, AV1 B-Frames, and Frame-Accurate Seek](https://daily.dev/posts/nvidia-video-codec-sdk-13-1-zero-copy-transcode-av1-b-frames-and-frame-accurate-seek-k2lcpkzvh) · NVIDIA Developer · 1 upvotes · 0 comments
- [FFmpeg 101](https://daily.dev/posts/ffmpeg-101-upuv5ofd2) · Hacker News · 0 upvotes · 0 comments
- [Video Encoding and Decoding with Vulkan Compute Shaders in FFmpeg](https://daily.dev/posts/video-encoding-and-decoding-with-vulkan-compute-shaders-in-ffmpeg-wmurcqryk) · Khronos · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux)

[View this post on daily.dev](https://daily.dev/posts/adding-stateless-support-to-vicodec-ct08tbika)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adding stateless support to vicodec","url":"https://daily.dev/posts/adding-stateless-support-to-vicodec-ct08tbika","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adding-stateless-support-to-vicodec-ct08tbika"},"datePublished":"2026-08-11T08:54:20.052Z","dateModified":"2026-08-11T09:19:09.564Z","description":"A walkthrough of adding stateless decoder support to the vicodec virtual driver in the Linux kernel media subsystem, written by an Outreachy intern. Explains...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4475e459c295e6fc437d7f08e01ce2bc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4475e459c295e6fc437d7f08e01ce2bc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adding-stateless-support-to-vicodec-ct08tbika","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"Adding stateless support to vicodec"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/adding-stateless-support-to-vicodec-ct08tbika#faq","mainEntity":[{"@type":"Question","name":"What is the difference between stateful and stateless codec APIs in the Linux V4L2 media subsystem?","acceptedAnswer":{"@type":"Answer","text":"In stateful codecs, stream properties (dimensions, pixel format) are configured before streaming starts, requiring a stop-reconfigure-restart cycle (dynamic resolution change) when frame properties change. Stateless codecs use the Request API, where each frame is bundled with its own properties and reference frame pointers in a 'request', processed independently without stopping the stream. The userspace application must parse frame headers and track reference frames itself. Developers working on Linux media drivers track V4L2 API changes and kernel subsystem news on daily.dev."}},{"@type":"Question","name":"What does video_gop_size control in vicodec and how does it affect decoding artifacts?","acceptedAnswer":{"@type":"Answer","text":"video_gop_size controls the interval between I-frames (frames that decode independently without referencing other frames). Its default value in vicodec is 10, meaning one I-frame every 10 frames. When decoding merged videos with alternating frame dimensions, mismatched reference frames cause visible artifacts at frame edges. Setting video_gop_size=1 makes every frame an I-frame, eliminating those artifacts entirely. Linux media subsystem developers working through similar driver issues find relevant kernel internals discussions on daily.dev."}}]}
```

