[FFmpeg-devel] [PATCH] extract bit rate calculation into separate function

Michael Niedermayer michaelni
Fri Nov 20 20:42:51 CET 2009


On Sat, Nov 14, 2009 at 01:01:33PM +0100, Robert Kr?ger wrote:
>
>
> On 14.11.2009, at 03:45, Michael Niedermayer wrote:
>
>> On Fri, Nov 13, 2009 at 11:42:30PM +0100, Robert Kr?ger wrote:
>>>
>>> On 13.11.2009, at 19:02, Michael Niedermayer wrote:
>>>
>>>> On Fri, Nov 13, 2009 at 08:59:16AM +0100, Robert Kr?ger wrote:
>>>>>
>>>>> On 12.11.2009, at 19:29, Michael Niedermayer wrote:
>>>>>
>>>>>> On Thu, Nov 12, 2009 at 09:13:58AM +0100, Robert Kr?ger wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> On 12.11.2009, at 01:42, Stefano Sabatini wrote:
>>>>>>>
>>>>>>>> On date Wednesday 2009-11-11 12:41:33 +0100, Robert Kr?ger encoded:
>>>>>> [...]
>>>>>>>>> +
>>>>>>>
>>
>> patch 1:
>> Move the existing code in a new function (this IIRC is pretty much your 
>> first
>> patch with minor changes like tabs/line breaks so it should be littel 
>> work)
>> (This should not change behaviour, any change of behaviour would be a bug)
>>
>
> I attached a patch that does just that (I hope). The only thing that is 
> already in there in terms of simplification is the elimination of duplicate 
> code by calling av_get_bits_per_sample. I hope that's not too much for one 
> patch to review as it is only the rather obvious replacement of one 
> switch/case statement. I'll send it in two patches if you don't accept this 
> (which I hope you do as I'm just trying to find the best ways to make this 
> splitting up of patches not as tedious as it is now).
>
>> patch 2:
>> simplify our quite crappy code (you also have done that already pretty 
>> much
>> in your latest patch)
>> (In this patch we can see exactly what code is changed and the reviewer 
>> (me)
>> can easily see if the new code does what the old did in all relevant cases
>> and if more things can be improved ...)
>>
> If you accept this first patch, I'll send a second one compacting the 
> remaining code with an assumption regarding the treatment of the 
> CODEC_TYPE_UNKNOWN case and you say if that's OK or not.
>
> Thanks for the instructions,
>
> Robert
>

patch acceptable

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091120/40083981/attachment.pgp>



More information about the ffmpeg-devel mailing list