Diego Biurrun <[email protected]> writes:

> On Mon, Feb 27, 2012 at 09:13:56PM +0000, Måns Rullgård wrote:
>> Felipe Contreras <[email protected]> writes:
>> 
>> > +    for (i = 0; i < avctx->height; i++)
>> > +        memcpy(f->data[0] + i * f->linesize[0], p1 + i * avctx->width,
>> > +                avctx->width);
>> > +    for (i = 0; i < avctx->height / 2; i++)
>> > +        memcpy(f->data[1] + i * f->linesize[1], p2 + i * avctx->width / 2,
>> > +                avctx->width / 2);
>> > +    for (i = 0; i < avctx->height / 2; i++)
>> > +        memcpy(f->data[2] + i * f->linesize[2], p3 + i * avctx->width / 2,
>> > +                avctx->width / 2);
>> 
>> This is really not acceptable.
>
> Please enlighten us about the alternative.

The alternative to copying is to not copy, obviously.

On the devices this is intended for, such a memcpy() will annihilate any
performance advantage obtained by using the DSP, and you'd be better off
decoding on the ARM core (assuming this allows proper buffer management).

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to