[FFmpeg-devel] [PATCH] h264 parallelized

Andreas Öman andreas
Tue Sep 4 21:31:36 CEST 2007


Hello

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.
>>
>> --- libavcodec/h264.c	(revision 10288)
>> +++ libavcodec/h264.c	(working copy)
>> @@ -2907,6 +2911,46 @@
>>  
>> +/**
>> + * mimic alloc_tables(), but for every context thread
> 
> nit: Capitalize, add period.

Fixed

> 
>> +/**
>> + * init context
>> + * allocate buffers which are not shared amongst multiple threads
> 
> ditto and many more below

Fixed those

> 
>> +    // edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264)
>> +    CHECKED_ALLOCZ(s->allocated_edge_emu_buffer, (s->width+64)*2*21*2); //(width + edge + align)*interlaced*MBsize*tolerance
> 
> Please try to keep lines below 80 characters, same in other places.

I've trimmed the worst offenders

>> @@ -4215,17 +4261,46 @@
>>  /**
>> + * Replicates H264 "master" context to thread contexts, called for every thread context each every frame
>> + */
> 
> "each every frame" ???

Fixed (or actually cut it, it's apparent when it's called)

> 
>> --- libavcodec/h264.h	(revision 10288)
>> +++ libavcodec/h264.h	(working copy)
>> @@ -382,6 +382,25 @@
>> +    /**
>> +     * @defgroup multithreading Members for slice based multithreading
> 
> members

I kept this in uppercase, i think it's the right way.

> 
>> +    /**
>> +     * Max # of threads / contexts.
> 
> number of

Fixed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264-mt4.patch
Type: text/x-patch
Size: 20762 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070904/0fa838f4/attachment.bin>



More information about the ffmpeg-devel mailing list