[FFmpeg-devel] [PATCH] Fix function parameters for rgb48 to YV12 functions.

Ramiro Polla ramiro.polla
Tue Feb 2 19:10:06 CET 2010

Hello Michael,

On Sun, Jan 24, 2010 at 8:31 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> the gain happens when you change the variables used to calculate the index
> also to it. You could also try to make the index unsigned but make sure it
> cant be negative if you try this

Sorry but I still don't understand how that will be of use here in
libswscale. I've tried forcing int32_t and int64_t for x86_64 in some
of those functions (some xxxTo(Y|UV), hScale and the fast bilinear
ones), in all C, MMX and MMX2. All I can see is the expansion from
32-bit to 64-bit being changed from caller and callee. There is no
difference in the inner loop, nor in how gcc addresses the the src and
dst arrays.

I know you're busy with a bunch of stuff, but could you please
describe what you're thinking of a little better (for example with the
actual functions in libswscale where using the register width in the
function declaration is much better, and if possible the diff from the
asm they generate).

It seems logical that width is int (as it's declared in the context),
and not necessarily long, so I've attached a patch that changes it
from long to int in xxxTo(Y|UV), hScale and fast bilinear.

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_int.diff
Type: application/octet-stream
Size: 18720 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100202/fe4089a5/attachment.obj>

More information about the ffmpeg-devel mailing list