[FFmpeg-devel] [PATCH] h264 parallelized

Andreas Öman andreas
Wed Sep 5 09:34:24 CEST 2007


Guillaume POIRIER wrote:
> Hi,
> 
> On 9/4/07, Andreas ?man <andreas at olebyn.nu> wrote:
>> Diego Biurrun wrote:
>>> On Tue, Sep 04, 2007 at 03:18:13PM +0200, Andreas ?man wrote:
>>>> Correct, I googled around and found some grouping examples in the
>>>> doxygen manual.
>>>>
>>>> Rest of the stuff should be
> 
> [..]
> 
> 
>> Fixed.
> 
> Good. I assume this patch is good to go now.
> This thread has been going on since at least Jun 25, 2007.
> What's a good commit message for it?
> "Add slice-based parallel H.264 decoding"?

I suppose so :-)

> 
> BTW, how do you enable it? Do you just set the "threads' option to a
> value higher than 1?

Yep, remember to ./configure it with --enable-pthreads too :-)
Otherwise the multithreading will just silently be emulated in
one thread.

> Could you give links to some multi-slice H264 samples? Does any Apple
> trailer do the trick?

The apple trailes are mostly encoded with loopfilter == 1 (or zero,
lavc XORs loopfilter with 1 internally). However, usually, the
initial green MPAA rating screen is encoded with loopfilter 0.



Here are some samples with multiple slices & loopfilter 2

http://www.lonelycoder.com/hd/

The 1GB one is 6 minutes from a TV channel I have at home
(and successfully been watching with lavc+my patch on a core2duo for the
last couple of months).

Input #0, mpegts, from '/storage/media/video/SVT_HD_Teaser-ac3.ts':
   Duration: 00:06:11.2, start: 4711.003722, bitrate: 22172 kb/s
   Stream #0.0[0x100]: Video: h264, yuv420p, 1280x720, 50.00 fps(r)
   Stream #0.1[0x101]: Audio: mp2, 48000 Hz, stereo, 256 kb/s
   Stream #0.2[0x102]: Audio: 0x0000, 48000 Hz, 5:1, 640 kb/s

It contains one or two errors due to bad DVB reception while recording.


The second, shorter one, is from Discovery HD (captured somewhere
in .de, got it off-list)

Input #0, mpegts, from '/storage/media/video/test_smp_fox.ts':
   Duration: 00:00:04.0, start: 81503.373822, bitrate: 14678 kb/s
   Stream #0.0[0x3ff]: Video: h264, yuv420p, 1920x1088, 25.00 fps(r)
   Stream #0.1[0x403]: Audio: 0x0000, 48000 Hz, 5:1, 448 kb/s
   Stream #0.2[0x20]: Audio: 0x0000

> Are there more information worth mentioning?

Don't think so, except that perhaps adding adding a multithread decoding
bullet in the FAQ would be a good idea? I'll see if I can come up with
something...







More information about the ffmpeg-devel mailing list