[FFmpeg-cvslog] r23322 - trunk/libavcodec/aaccoder.c

Måns Rullgård mans
Wed May 26 01:33:03 CEST 2010


Alex Converse <alex.converse at gmail.com> writes:

> On Tue, May 25, 2010 at 7:12 PM, Aurelien Jacobs <aurel at gnuage.org> wrote:
>> On Tue, May 25, 2010 at 08:35:02PM +0200, alexc wrote:
>>> Author: alexc
>>> Date: Tue May 25 20:35:01 2010
>>> New Revision: 23322
>>>
>>> Log:
>>> aacenc: Split find_max_val() from find_min_book() to eliminate duplicate searches.
>>>
>>> [...]
>>>
>>> @@ -567,9 +572,10 @@ static void search_for_quantizers_anmr(A
>>> ? ? ? ? ? ? ? ? ?maxscale = av_clip_uint8(log2(qmax)*4 + ?6 + SCALE_ONE_POS - SCALE_DIV_512);
>>> ? ? ? ? ? ? ? ? ?minscale = av_clip(minscale - q0, 0, TRELLIS_STATES - 1);
>>> ? ? ? ? ? ? ? ? ?maxscale = av_clip(maxscale - q0, 0, TRELLIS_STATES);
>>> + ? ? ? ? ? ? ? ?float maxval = find_max_val(sce->ics.group_len[w], sce->ics.swb_sizes[g], s->scoefs+start);
>>
>> Mixed declaration and code...
>>
>
> Fixed.
>
> Why is this considered bad?

I personally consider it bad style.  Practically, there are a number
of compiler that choke on it but otherwise work decently.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list