<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 7, 2013 at 1:01 AM, <span dir="ltr"><<a href="mailto:praveen@multicorewareinc.com" target="_blank">praveen@multicorewareinc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Praveen Tiwari<br>
# Date 1383807695 -19800<br>
# Node ID 34ba8955747b66dcf3471fa216d15b97a3b07e0c<br>
# Parent 93cccbe49a93dd4c054ef06aca76974948793613<br>
added pixelsub_ps C primitive and function pointer creation<br>
<br>
diff -r 93cccbe49a93 -r 34ba8955747b source/common/pixel.cpp<br>
--- a/source/common/pixel.cpp Wed Nov 06 19:49:38 2013 -0600<br>
+++ b/source/common/pixel.cpp Thu Nov 07 12:31:35 2013 +0530<br>
@@ -790,6 +790,22 @@<br>
b += strideb;<br>
}<br>
}<br>
+<br>
+template<int bx, int by><br>
+void pixelsub_ps_c(int16_t *a, intptr_t dstride, pixel *b0, pixel *b1, intptr_t sstride0, intptr_t sstride1)<br>
+{<br>
+ for (int y = 0; y < by; y++)<br>
+ {<br>
+ for (int x = 0; x < bx; x++)<br>
+ {<br>
+ a[x] = (int16_t)(b0[x] - b1[x]);<br>
+ }<br>
+<br>
+ b0 += sstride0;<br>
+ b1 += sstride1;<br>
+ a += dstride;<br>
+ }<br>
+}<br>
} // end anonymous namespace<br>
<br>
namespace x265 {<br>
@@ -832,10 +848,12 @@<br>
<br>
#define CHROMA(W, H) \<br>
p.chroma_copy_pp[CHROMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \<br>
- p.chroma_copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>;<br>
+ p.chroma_copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>;\<br>
+ p.chroma_pixelsub_ps[CHROMA_ ## W ## x ## H] = pixelsub_ps_c<W, H>;<br>
#define LUMA(W, H) \<br>
p.luma_copy_pp[LUMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \<br>
- p.luma_copy_sp[LUMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>;<br>
+ p.luma_copy_sp[LUMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>;\<br>
+ p.luma_pixelsub_ps[LUMA_ ## W ## x ## H] = pixelsub_ps_c<W, H>;<br>
<br>
LUMA(4, 4);<br>
LUMA(8, 8);<br>
diff -r 93cccbe49a93 -r 34ba8955747b source/common/primitives.h<br>
--- a/source/common/primitives.h Wed Nov 06 19:49:38 2013 -0600<br>
+++ b/source/common/primitives.h Thu Nov 07 12:31:35 2013 +0530<br>
@@ -216,6 +216,8 @@<br>
typedef void (*copy_pp_t)(pixel *dst, intptr_t dstride, pixel *src, intptr_t sstride); // dst is aligned<br>
typedef void (*copy_sp_t)(pixel *dst, intptr_t dstStride, int16_t *src, intptr_t srcStride);<br>
<br>
+typedef void (*pixelsub_ps_t)(int16_t *dst, intptr_t dstStride, pixel *src0, pixel *src1, intptr_t srcStride0, intptr_t srcStride1);<br></blockquote><div><br></div><div>there's already a function typedef with the same name, that one needs to be removed or this one needs to be renamed</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
/* Define a structure containing function pointers to optimized encoder<br>
* primitives. Each pointer can reference either an assembly routine,<br>
* a vectorized primitive, or a C function. */<br>
@@ -283,6 +285,9 @@<br>
pixeladd_pp_t pixeladd_pp;<br>
pixelavg_pp_t pixelavg_pp[NUM_LUMA_PARTITIONS];<br>
<br>
+ pixelsub_ps_t chroma_pixelsub_ps[NUM_CHROMA_PARTITIONS];<br>
+ pixelsub_ps_t luma_pixelsub_ps[NUM_LUMA_PARTITIONS];<br>
+<br>
scale_t scale1D_128to64;<br>
scale_t scale2D_64to32;<br>
downscale_t frame_init_lowres_core;<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>