v4l2
video的帧可区分为隔行和逐行: 逐行顺序的传输一帧所有的行,而隔行则把一帧划分成两个fields,分别保存帧的奇数行和偶数行,被称作奇场和偶场. 阴极射线电视机需要交替的显示两场来组成一个完整的帧,交替的时延需要我们交替的传输奇场和偶
video的帧可区分为隔行和逐行: 逐行顺序的传输一帧所有的行,而隔行则把一帧划分成两个fields,分别保存帧的奇数行和偶数行,被称作奇场和偶场. 阴极射线电视机需要交替的显示两场来组成一个完整的帧,交替的时延需要我们交替的传输奇场和偶场。这个奇怪技术的引入是因为:在刷新率接近电影时,图片会消退的过快。使用奇偶场可以避免使用双倍的buffer以及额外的带宽需求。
首先要明确模拟camera(数字摄像头不在这个讨论之列。)并不是在同一时间曝光一帧,camera通过场来传输这些帧的,这些场是在不同瞬间拍摄的。屏幕上的一个运动对象因此会在两个field之间产生动画效果。这种情况下需要识别哪一帧更老一点,也称作“瞬间序”。
当驱动通过场提供或者接收images,应用应该知道如何通过这些场组合成帧,通过划分为top bottom 场,顶场的第一行是帧的第一行,底场的第一行是帧的第二行。
然而因为field是一个跟着一个拍的,争论帧是由top还是bottom开始的是没意义的,任何两个相邻的top bottom场, 或者 bottom top场都可以组成一个有效的帧。
与直觉相反,top 场不一定排在bottom前面, top和bottom到底谁先谁后,是由video标准决定的。因此要区分瞬间序和空间序,下面的图会给出清晰的解释。
所有的video capture和out devices必须汇报当前的field顺序。 一些驱动可能允许选择不同的序,终端应用可以在调用VIDIOC_S_FMT前初始化struct v4l2_pix_format的 field成员。否则可以使用V4L2_FIELD_ANY
下面列出了可能的field类型
V4L2_FIELD_ANY | 0 |
Application 可以请求使用这个参数,如果V4L2_FIELD_NONE, V4L2_FIELD_TOP, V4L2_FIELD_BOTTOM V4L2_FIELD_INTERLACE 中任何一个格式都支持.驱动选择使用哪一个格式依赖于硬件能力,以及请求的image尺寸,驱动选择一个然后返回这个格式。struct_buffer的field成员不可以为V4L2_FIELD_ANY.
|
V4L2_FIELD_NONE | 1 |
Images是逐行格式,当驱动无法区分V4L2_FIELD_TOP和V4L2_FIELD_BOTTOM,可以使用这种field类型
|
V4L2_FIELD_TOP | 2 |
Images仅仅包含top field
|
V4L2_FIELD_BOTTOM | 3 |
Images仅仅包含bottom field,应用可能希望防止设备捕获interlaced的图片,因为这种图片会在运动物体周围产生毛状特效
|
V4L2_FIELD_INTERLACED | 4 |
Images包含top和bottom field, 隔行交替,场序依赖于当前video的标准。NTSC首先传输bottom field, PAL则先传输top field。
|
V4L2_FIELD_SEQ_TB | 5 |
Images包含top和bottom field, top field的行首先存放在memory中,然后紧跟着bottom field的行。 Fields一直以瞬间序存储,较老的放在内存前面。Images的尺寸和帧相关,而不是field
|
V4L2_FIELD_SEQ_BT | 6 |
Images包含top和bottom field, bottom field的行首先存放在memory中,然后紧跟着top field的行。 Fields一直以瞬间序存储,较老的放在内存前面。Images的尺寸和帧相关,而不是field
|
V4L2_FIELD_ALTERATE | 7 |
一个帧的两个field分别放在不同的buffer, 按照瞬间序,也就是说老的一个是第一个。driver或者应用指明field的奇偶性(奇偶性:当前的field是top 还是bottom field). 任何两个连续的field构成一个frame,是否两个field是连续的,不需要drop掉他们,可以通过v4l2_buffer中的sequence 成员判定。Images的尺寸和frame相关而不是fields相关
|
V4L2_FIELD_INTERLACED_TB | 8 |
Images 包含top和bottom field, 每行交替, top field在前面。top field首先传送
|
V4L2_FIELD_INTERLACED_BT | 9 | Images 包含top和bottom field, 每行交替, bottom field在前面。bottom field首先传送 |
Field Order, Top Field First Transmitted
Field Order, Bottom Field First Transmitted

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Click to enter: ChatGPT Tool Plug-in Navigation Collection Some users complained that their computers frequently crashed with the stop code VIDEO DXGKRNL FATAL ERROR. This particular issue occurs only occasionally and has a bugcheck value of 0x00000113, which indicates a violation in the Microsoft DirectX graphics kernel subsystem, as indicated by the bugcheck value. Usually, the error occurs when a corrupt driver interferes with the normal operation of the graphics card's graphics processor. If you're currently struggling with this specific issue, our article will provide you with a variety of high-quality troubleshooting tips. Below you'll find various methods that other users who encountered the exact same error have used successfully. yes

Over the past few weeks, the most important specifications and the euro prices of the Motorola Razr 50 and the Razr 50 Ultra have been leaked. Now the enormously reliable leaker @MysteryLupin was able to publish the teaser video embedded below, which

The Google Pixel 9 Pro and Pro XL are Google's answers to the likes of the Samsung Galaxy S24 Ultra and the Apple iPhone 15 Pro and Pro Max. Daniel Sin on YouTube(watch below) has compared the Google Pixel 9 Pro XL to the iPhone 15 Pro Max with some

Sinceitslaunchearlierthisyear,thePanasonicLumixS9hasbeenembroiledincontroversy.BetweenthecornersPanasoniccuttoarriveatsuchasmallbodyandthefusscertaincamerareviewerskickeduponYouTube,itseemedliketheLumixS9wasdoom

Detailed explanation of the video tag in HTML The video tag in HTML5 is a tag used to play videos on web pages. It can render videos using different formats, such as MP4, WebM, Ogg, and more. In this article, we will introduce the use of video tag in detail and provide specific code examples. Basic Structure The following is the basic structure of the video tag:

Despite the hype surrounding the Qualcomm Snapdragon X Elite, it has been a rather mediocre launch. In our review, we found that the most impressive part of the new Qualcomm Snapdragon X Elite X1E-78-100-powered Asus Vivobook S 15 was the seamlessnes

In our daily life and work, we often need to use computer devices and mobile devices to transfer video files to each other. However, the video files at the receiving end are prone to blurring. This is caused by the compression of the transmission software during the transmission process. How to avoid this situation and how to transfer files to another device losslessly? You can use the EV screen recording software to transfer the video files recorded on the mobile phone to the computer in a lossless and uncompressed form for playback. Original video, below will bring you relevant tutorials, I hope it can help you. The first step on how to losslessly transfer screen recording files to your mobile phone is to download the EV screen recording software on your mobile phone, then click "Toolkit" on the homepage and find the "WiFi Transfer" function. The second step is to give up

Despite the hype surrounding the Qualcomm Snapdragon X Elite, it has been a rather mediocre launch. In our review, we found that the most impressive part of the new Qualcomm Snapdragon X Elite X1E-78-100-powered Asus Vivobook S 15 was the seamlessnes
