[FFmpeg-devel] [PATCH][RFC] QCP demuxer

Michael Niedermayer michaelni
Fri May 15 20:48:22 CEST 2009

On Fri, May 15, 2009 at 11:21:21AM -0700, Kenan Gillet wrote:
> Hi,
> On May 15, 2009, at 8:53 AM, Michael Niedermayer wrote:
>> On Thu, May 14, 2009 at 09:57:19PM -0700, Kenan Gillet wrote:
>>> hi,
>>> attached is the round 2 of the patch.
>> [...]
>>> +    for (i=0; i<c->nb_rates; i++)
>>> +        if (c->rates_mapping[i].mode == byte_mode)
>>> +            return c->rates_mapping[i].size;
>>> +
>> id use a LUT here, besides nb_rates can be larger than the array
> out of bond read fixed.
> While in practice, the byte_mode should be 0-4 for QCELP and EVRC,
> nothing says that it must be. Would it be acceptable to assume that it does
> and have a 5  entries LUT ? A  255-entry LUT would make it more bullet 
> proof

iam fine with a 5 entry lut but that needs a few more checks to make sure
it doesnt segf.

> if the extra unused memory is not an issue?

5 byte + several checks vs. 256 byte does not seem a big thing, still iam
of course in favor of the smaller if its possible with no disadvantages

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- 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/20090515/5b462993/attachment.pgp>

More information about the ffmpeg-devel mailing list