---
title: "V4L2 Video overlay, Video output, Video output overlay的区别"
author: "koliy"
date: "2013-06-14T12:25:16Z"
tags: []
categories: ["编程语言"]
slug: "v4l2-video-overlay-video-output-video-output-overlay"
draft: false
lastmod: "2013-06-14T12:25:16Z"
id: 1886674
url: "https://koliy.iteye.com/blog/1886674"
---

Video Overlay: 
Video overlay devices have the ability to genlock (TV-)video into the (VGA-)video signal of a graphics card, or to store captured images directly in video memory of a graphics card, typically with clipping

Video overlay可以同步video到显示输出,  或者直接存储捕获的images到framebuffer的内存中。也就是说video overlay可以有两种实现：

第一种是video数据(很可能指解码的video数据)经过硬件设备的处理直接转换为video 信号，不会修改framebuffer内容。比如samsung fimc控制器的TVout overlay
第二种是camera数据不会向上层传递，直接发送到framebuffer。比如FSL mx51的ipu_prp_vf_sdc实现。

Video Output:

Video output devices encode stills or image sequences as analog video signal.

按照V4L2的spec，Video output设备是把静态图片编码为模拟video信号，这就意味着output 设备的输出是模拟video信号

对于output device输出是模拟信号，我们可以从http://v4l2spec.bytesex.org/spec-single/v4l2.html#VIDIOC-ENUMOUTPUT 的output type定义找到侧证。

数据修改：通过设备节点/dev/videox的read/write功能，以及stream的内存映射方式修改

备注：四种analog video信号分别为CVBS, S-Video, YPbPr, RGB


Video Output Overlay:

又称on-screen display，把framebuffer中的内容叠加到输出的video信号中。注意，在V4L2 spce中并没有提到输出的video信号是模拟信号。

Enable overlay：Video output overlay interface用framebuffer的FB_BLANK/FB_UNBLANK ioctl接口 使能和停止overlay

数据修改：是通过修改设备/dev/fbx 的ramebuffer来达到修改叠加内容的