[FFmpeg-devel] [PATCH] Move fast bilinear scaler code to the existing h[yc]scale_fast() functions.
Ramiro Polla
ramiro.polla
Sun Dec 20 18:24:13 CET 2009
On Sun, Dec 20, 2009 at 10:05 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Dec 20, 2009 at 01:44:04AM -0200, Ramiro Polla wrote:
>> .
>
>> ?swscale_internal.h | ? ?4
>> ?swscale_template.c | ?386 ++++++++++++++++++++++++++---------------------------
>> ?2 files changed, 196 insertions(+), 194 deletions(-)
>> 94b7203e5183bc2ceb5131656d9c70208d2b034a ?0003-Move-fast-bilinear-scaler-code-to-the-existing-h-yc.patch
>> From f9a094384bb6f99da7cd2d2b84754e23774c6c35 Mon Sep 17 00:00:00 2001
>> From: Ramiro Polla <ramiro.polla at gmail.com>
>> Date: Sun, 20 Dec 2009 01:32:48 -0200
>> Subject: [PATCH] Move fast bilinear scaler code to the existing h[yc]scale_fast() functions.
>>
>> ---
>> ?swscale_internal.h | ? ?4 +-
>> ?swscale_template.c | ?386 ++++++++++++++++++++++++++--------------------------
>> ?2 files changed, 196 insertions(+), 194 deletions(-)
>>
>> diff --git a/swscale_internal.h b/swscale_internal.h
>> index 0dab9f6..6957e57 100644
>> --- a/swscale_internal.h
>> +++ b/swscale_internal.h
>> @@ -262,10 +262,10 @@ typedef struct SwsContext {
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? const uint8_t *src1, const uint8_t *src2,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? long width, uint32_t *pal);
>
>> ? ? ?void (*hyscale_fast)(struct SwsContext *c,
>> - ? ? ? ? ? ? ? ? ? ? ? ? int16_t *dst, int dstWidth,
>> + ? ? ? ? ? ? ? ? ? ? ? ? int16_t *dst, long dstWidth,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? const uint8_t *src, int srcW, int xInc);
>> ? ? ?void (*hcscale_fast)(struct SwsContext *c,
>> - ? ? ? ? ? ? ? ? ? ? ? ? int16_t *dst, int dstWidth,
>> + ? ? ? ? ? ? ? ? ? ? ? ? int16_t *dst, long dstWidth,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? const uint8_t *src1, const uint8_t *src2,
>> ? ? ? ? ? ? ? ? ? ? ? ? ? int srcW, int xInc);
>>
>
> these need doxy (seperate patch of course)
> and hcscale_internal() seems a poor name (seperate patch of course)
> [...9
ok, I'll look into that.
>> ?#if defined(PIC)
>> - ? ? ? ?DECLARE_ALIGNED(8, uint64_t, ebxsave);
>> + ? ?DECLARE_ALIGNED(8, uint64_t, ebxsave);
>> ?#endif
>> - ? ? ? ?if (canMMX2BeUsed) {
>> - ? ? ? ? ? ?__asm__ volatile(
>> + ? ?if (canMMX2BeUsed) {
>> + ? ? ? ?__asm__ volatile(
>> ?#if defined(PIC)
>> - ? ? ? ? ? ? ? ?"mov ? ? ? ? ? ? ? %%"REG_b", %5 ? ? ? ?\n\t"
>> + ? ? ? ? ? ?"mov ? ? ? ? ?%%"REG_b", %6 ? ? ? ? \n\t"
>
> ehm
yes, that's right. svn diff is screwing up the diff because the code
is so similar. What the patch does is:
- Change int dstWidth to long dstWidth because the mmx2 code uses it this way
- Move all fast bilinear code into the existing fast_bilinear functions
- Indent (I don't think this is worth an extra commit since it's move+indent)
- Remove av_unused from the mmx2 bits because they're now under ifdef.
I've attached a new patch without the indentation, but now it messes
up the C code between luma and chroma.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: move_fast_bilinear.diff
Type: text/x-diff
Size: 9337 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091220/12e18aa9/attachment.diff>
More information about the ffmpeg-devel
mailing list