[x265] Fwd: [PATCH] added pixelsub_ps C primitive and function pointer creation
Steve Borho
steve at borho.org
Thu Nov 7 19:12:08 CET 2013
On Thu, Nov 7, 2013 at 2:54 AM, Praveen Tiwari <praveen at multicorewareinc.com
> wrote:
>
>
> ---------- Forwarded message ----------
> From: Steve Borho <steve at borho.org>
> Date: Thu, Nov 7, 2013 at 1:51 PM
> Subject: Re: [x265] [PATCH] added pixelsub_ps C primitive and function
> pointer creation
> To: Development for x265 <x265-devel at videolan.org>
>
>
>
>
>
> On Thu, Nov 7, 2013 at 1:01 AM, <praveen at multicorewareinc.com> wrote:
>
>> # HG changeset patch
>> # User Praveen Tiwari
>> # Date 1383807695 -19800
>> # Node ID 34ba8955747b66dcf3471fa216d15b97a3b07e0c
>> # Parent 93cccbe49a93dd4c054ef06aca76974948793613
>> added pixelsub_ps C primitive and function pointer creation
>>
>> diff -r 93cccbe49a93 -r 34ba8955747b source/common/pixel.cpp
>> --- a/source/common/pixel.cpp Wed Nov 06 19:49:38 2013 -0600
>> +++ b/source/common/pixel.cpp Thu Nov 07 12:31:35 2013 +0530
>> @@ -790,6 +790,22 @@
>> b += strideb;
>> }
>> }
>> +
>> +template<int bx, int by>
>> +void pixelsub_ps_c(int16_t *a, intptr_t dstride, pixel *b0, pixel *b1,
>> intptr_t sstride0, intptr_t sstride1)
>> +{
>> + for (int y = 0; y < by; y++)
>> + {
>> + for (int x = 0; x < bx; x++)
>> + {
>> + a[x] = (int16_t)(b0[x] - b1[x]);
>> + }
>> +
>> + b0 += sstride0;
>> + b1 += sstride1;
>> + a += dstride;
>> + }
>> +}
>> } // end anonymous namespace
>>
>> namespace x265 {
>> @@ -832,10 +848,12 @@
>>
>> #define CHROMA(W, H) \
>> p.chroma_copy_pp[CHROMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
>> - p.chroma_copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>;
>> + p.chroma_copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>;\
>> + p.chroma_pixelsub_ps[CHROMA_ ## W ## x ## H] = pixelsub_ps_c<W, H>;
>> #define LUMA(W, H) \
>> p.luma_copy_pp[LUMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
>> - p.luma_copy_sp[LUMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>;
>> + p.luma_copy_sp[LUMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>;\
>> + p.luma_pixelsub_ps[LUMA_ ## W ## x ## H] = pixelsub_ps_c<W, H>;
>>
>> LUMA(4, 4);
>> LUMA(8, 8);
>> diff -r 93cccbe49a93 -r 34ba8955747b source/common/primitives.h
>> --- a/source/common/primitives.h Wed Nov 06 19:49:38 2013 -0600
>> +++ b/source/common/primitives.h Thu Nov 07 12:31:35 2013 +0530
>> @@ -216,6 +216,8 @@
>> typedef void (*copy_pp_t)(pixel *dst, intptr_t dstride, pixel *src,
>> intptr_t sstride); // dst is aligned
>> typedef void (*copy_sp_t)(pixel *dst, intptr_t dstStride, int16_t *src,
>> intptr_t srcStride);
>>
>> +typedef void (*pixelsub_ps_t)(int16_t *dst, intptr_t dstStride, pixel
>> *src0, pixel *src1, intptr_t srcStride0, intptr_t srcStride1);
>>
>
> >>there's already a function typedef with the same name, that one needs to
> be removed or this one needs to be renamed
>
> I can see only, pixelsub_sp_t from old function typedef and I have
> created typedef void pixelsub_ps_t (pixel to short).
>
>
Min has a patch series which renames the old one. I must have had his
applied while I tried yours.
--
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131107/c34786d7/attachment.html>
More information about the x265-devel
mailing list