[FFmpeg-devel] [RFC] Public API for RC4 and DES

Måns Rullgård mans
Fri Jan 30 16:53:58 CET 2009


Michael Niedermayer <michaelni at gmx.at> writes:

> On Fri, Jan 30, 2009 at 01:48:27PM +0000, M?ns Rullg?rd wrote:
>> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
>> 
>> > On Fri, Jan 30, 2009 at 12:10:06AM +0100, Michael Niedermayer wrote:
>> >> On Wed, Jan 28, 2009 at 03:17:27PM +0100, Reimar D?ffinger wrote:
>> >> > @@ -150,17 +152,22 @@
>> >> >      }
>> >> >  
>> >> >      memset(rc4buff, 0, sizeof(rc4buff));
>> >> > -    ff_rc4_enc(key, 12, (uint8_t *)rc4buff, sizeof(rc4buff));
>> >> > +    rc4 = av_malloc(av_rc4_size);
>> >> 
>> >> uint8_t rc4v[av_rc4_size];
>> >> struct AVRC4 *rc4= (void*)rc4v;
>> >
>> > I was thinking about that, it just seemed horribly ugly...
>> 
>> It smells of misalignment.
>
> then add DECLARE_ALIGNED()

And document the requirement.

> or use uint64_t

And pray there are no aliasing issues.

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




More information about the ffmpeg-devel mailing list