public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Toth <stoth@linuxtv.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org
Subject: Re: V4L2 Advanced Codec questions
Date: Sat, 28 Mar 2009 13:03:47 -0400	[thread overview]
Message-ID: <49CE5873.8000603@linuxtv.org> (raw)
In-Reply-To: <200903281622.44690.hverkuil@xs4all.nl>

Hans Verkuil wrote:
> On Thursday 26 March 2009 16:59:11 Steven Toth wrote:
>> Hello!
>>
>> I want to open a couple of HVR22xx items up for discussion.
>>
>> The HVR-22xx analog encoder is capable of encoded to all kinds of video
>> and audio codecs in various containers formats.
>>
>>  From memory, wm9, mpeg4, mpeg2, divx, AAC, AC3, Windows audio codecs in
>> asf, ts, ps, avi containers, depending on various firmware license
>> enablements and configuration options. Maybe more, maybe, I'll draw up a
>> complete list when I begin to focus on analog.
>>
>> Any single encoder on the HVR22xx can produce (if licensed) any of the
>> formats above. However, due to a lack of CPU horsepower in the RISC
>> engine, the board is not completely symmetrical when the encoders are
>> running concurrently. This is the main reason why Hauppauge have disabled
>> these features in the windows driver.
>>
>> It's possible for example to get two concurrent MPEG2 PS streams but only
>> if the bitrate is limited to 6Mbps, which we also do in the windows
>> driver.
>>
>> Apart from the fact that we (the LinuxTV community) will need to
>> determine what's possible concurrently, and what isn't, it does raise
>> interesting issues for the V4L2 API.
>>
>> So, how do we expose this advanced codec and hardware encoder limitation
>> information through v4l2 to the applications?
>>
>> Do we, don't we?
> 
> Hi Steve,
> 
> If I understand it correctly, then a single analog source can be encoded to 
> multiple formats at the same time, right?

No.

> 
> Or is it that multiple analog sources can each be encoded to some format? Or 
> a combination of both?

Multiple analog sources can produce multiple formats, CPU power permitting.

> 
> Is there a limit to the number of concurrent encoders (except for CPU 
> horsepower)?

Not that I'm aware of, yet.

> 
> Basically, since you can have multiple encoders, you also need multiple 
> videoX nodes, once for each encoder. And I would expect that an application 
> can just setup each encoder. Whenever you start an encoder the driver might 
> either accept it or return -ENOSPC if there aren't enough resources.

This is fine, and expected.

> 
> You have to document the restrictions in a document, but otherwise I don't 
> see any reason why implementing this would cause any problems.
> 
> Adding new containers and codecs is easy: just add the missing ones to enum 
> v4l2_mpeg_stream_type, v4l2_mpeg_audio_encoding and 
> v4l2_mpeg_video_encoding and add any additional controls that are needed to 
> implement each codec/container.

Ahh, this is the magic information I was looking for.

> 
> In theory you can reduce the number of possible containers/codecs/bitrates 
> in the controls according to the remaining resources. But I think that will 
> be too complicated to do for too little gain, not only in the driver but 
> also in the application.

I think this is going to be the major issue and it will start to reflect itself 
through the API into the application. We'll see, maybe not.

Thanks,

Steve

  reply	other threads:[~2009-03-28 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 15:59 V4L2 Advanced Codec questions Steven Toth
2009-03-26 16:46 ` Janne Grunau
2009-03-28 15:22 ` Hans Verkuil
2009-03-28 17:03   ` Steven Toth [this message]
2009-03-28 18:03     ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49CE5873.8000603@linuxtv.org \
    --to=stoth@linuxtv.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox