mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* H264 headers generation for driver
@ 2015-09-29 18:59 Andrey Utkin
  2015-09-30  9:55 ` Krzysztof Hałasa
  2015-10-12  9:47 ` Hans Verkuil
  0 siblings, 2 replies; 3+ messages in thread
From: Andrey Utkin @ 2015-09-29 18:59 UTC (permalink / raw)
  To: kernel-mentors, Linux Media, linux-kernel, Hans Verkuil,
	m.chehab, khalasa

This is a new chapter of tw5864 video grabber & encoder driver
development drama.
Last state of code is here (tw5864 branch, drivers/staging/media/tw5864):
https://github.com/bluecherrydvr/linux/tree/tw5864/drivers/staging/media/tw5864

Currently I use a third-side LGPL library for H.264 headers generation
- SPS, PPS and slice headers (because device doesn't generate them).
It is included as a git submodule "h264bitstream". It is used from
tw5864-h264.c .
Of course we want our driver to get to upstream repository when it
matures enough, that's why we want to ask for advice regarding this.
I see that there is no similar case in upstream kernel repo - no
submodules and no libraries for H264 bitstreams.
Device datasheet
(http://lizard.bluecherry.net/~autkin/tw5864/tw5864b1-ds.pdf , page
47) shows that there's almost no variety of modes, so minimally an
implementation of bitstream writing functions ue() and se() will
suffice.
I guess that one acceptable way is to pre-generate all headers for all
needed cases and ship them inlined; for correctness checking purpose,
it is possible to ship also a script or additional source code file
which is able to generate same headers.
Please advise.

Thanks in advance for any kind reply.

-- 
Bluecherry developer.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: H264 headers generation for driver
  2015-09-29 18:59 H264 headers generation for driver Andrey Utkin
@ 2015-09-30  9:55 ` Krzysztof Hałasa
  2015-10-12  9:47 ` Hans Verkuil
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Hałasa @ 2015-09-30  9:55 UTC (permalink / raw)
  To: Andrey Utkin
  Cc: kernel-mentors, Linux Media, linux-kernel, Hans Verkuil, m.chehab

Andrey Utkin <andrey.utkin@corp.bluecherry.net> writes:

[H.264 headers]
> I guess that one acceptable way is to pre-generate all headers for all
> needed cases and ship them inlined; for correctness checking purpose,
> it is possible to ship also a script or additional source code file
> which is able to generate same headers.

I think these are good ideas.
BTW the SOLO6110 at the moment also has pregenerated SPS/PPS headers
(whole NALs actually).
-- 
Krzysztof Halasa

Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: H264 headers generation for driver
  2015-09-29 18:59 H264 headers generation for driver Andrey Utkin
  2015-09-30  9:55 ` Krzysztof Hałasa
@ 2015-10-12  9:47 ` Hans Verkuil
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2015-10-12  9:47 UTC (permalink / raw)
  To: Andrey Utkin, kernel-mentors, Linux Media, linux-kernel,
	m.chehab, khalasa

On 09/29/2015 08:59 PM, Andrey Utkin wrote:
> This is a new chapter of tw5864 video grabber & encoder driver
> development drama.
> Last state of code is here (tw5864 branch, drivers/staging/media/tw5864):
> https://github.com/bluecherrydvr/linux/tree/tw5864/drivers/staging/media/tw5864
> 
> Currently I use a third-side LGPL library for H.264 headers generation
> - SPS, PPS and slice headers (because device doesn't generate them).
> It is included as a git submodule "h264bitstream". It is used from
> tw5864-h264.c .
> Of course we want our driver to get to upstream repository when it
> matures enough, that's why we want to ask for advice regarding this.
> I see that there is no similar case in upstream kernel repo - no
> submodules and no libraries for H264 bitstreams.
> Device datasheet
> (http://lizard.bluecherry.net/~autkin/tw5864/tw5864b1-ds.pdf , page
> 47) shows that there's almost no variety of modes, so minimally an
> implementation of bitstream writing functions ue() and se() will
> suffice.
> I guess that one acceptable way is to pre-generate all headers for all
> needed cases and ship them inlined; for correctness checking purpose,
> it is possible to ship also a script or additional source code file
> which is able to generate same headers.
> Please advise.
> 
> Thanks in advance for any kind reply.
> 

You can do something like this:

drivers/media/platform/vivid/vivid-tpg-colors.c

Both the generated tables and the code that generates them are in one
file.

An alternative is to add a source to v4l2-core that generates the tables,
but I don't know if that is feasible (i.e., if it can be made sufficiently
generic).

Regards,

	Hans

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-12  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29 18:59 H264 headers generation for driver Andrey Utkin
2015-09-30  9:55 ` Krzysztof Hałasa
2015-10-12  9:47 ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome