[FFmpeg-soc] [soc]: r4785 - amr/amrnbfloatdec.c

Robert Swain robert.swain at gmail.com
Thu Jul 23 16:33:22 CEST 2009


Hey,

2009/7/23 Colin McQuillan <m.niloc at googlemail.com>:
> 2009/7/23 Robert Swain <robert.swain at gmail.com>:
>> 2009/7/23 cmcq <subversion at mplayerhq.hu>:
>>> Author: cmcq
>>> Date: Thu Jul 23 12:18:54 2009
>>> New Revision: 4785
>>>
>>> Log:
>>> Reorder decoding processes to match the encoding process and the ref source
>>
>> Why? I ordered them as they made more logical sense as a number of
>> things seemed misplaced in the reference source simply because of the
>> different ways some elements are coded in the bit streams for the
>> different bit rate modes. I wanted it to be logically ordered, not
>> ordered depending on bit rate modes.
>
> I've managed to keep the order of operations independent of the mode.
> But I had to reorder something. The problem is this: the fixed gain
> calcuation (section 6.1.3) depends on pitch sharpening section (6.1.2)
> which depends on the pitch gain (section 6.1.3).
>
> Originally the fixed gain was calculated before pitch sharpening,
> which was incorrect. In r4776 I moved the call to decode_gains after
> the pitch sharpening. However, this meant pitch sharpening was using
> the wrong pitch gain.
>
> I can make it more logical by performing a separate decoding step that
> just extracts the pitch gain and "fixed gain factor" and then
> calculate the fixed gain later.

I see. The main thing to aim for is that, as long as it's possible,
code with the same or similar functionality be kept together. That's
why I wanted to decode the pitch gain and fixed gain factor and decode
the fixed gain from that as well all in the same place. If this isn't
possible, fine, but if it is, keep them together.

Regards,
Rob


More information about the FFmpeg-soc mailing list