video4linux user land API concern
Any Video4Linux driver should support both native hardware color encoding (for maximum performances) and rgb (for maximum flexibility).
Requiering user land tools to be prepared to match the webcam native color encoding is poor kernel API design for several reasons:
. some software will say 'I will work only if your camera support the encoding
I want' (surf the Internet and you will discover that it's already sadely true)
. small tools that make Unix flexibility get hard to write and test without
relying on glue libraries, and glue libraries are evil
. if new color models appear in new cameras, the current design will require
to map them anyway to some existing encodings not to break existing softwares, so the end result will be even more confusing because the driver supporting a non rgb encoding will not necessary mean that selecting the encoding is better from the performances point of view
Quoted 5 lines · Hubert Tonneau
Any Video4Linux driver should support both native hardware color encoding (for maximum performances) and rgb (for maximum flexibility).
Requiering user land tools to be prepared to match the webcam native color encoding is poor kernel API design for several reasons:
The kernel API was designed on the basis that someone would one day have the sense to write a nice user space library of formats.
Quoted 5 lines
. if new color models appear in new cameras, the current design will require
to map them anyway to some existing encodings not to break existing softwares, so the end result will be even more confusing because the driver supporting a non rgb encoding will not necessary mean that selecting the encoding is better from the performances point of view
Many of the encodings done by hardware are extremely complicated and tricky to unpack in kernel space. If a camera captures jpeg for example you don't want in kernel jpeg decoders, let alone mpeg decoders etc