[x265] [PATCH] added C primitive for blockcopy_p_s and function pointer creation for new type
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Mon Nov 4 13:44:50 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1383569078 -19800
# Node ID f430bf4e179d20c389a9b677b393a4505a9eb652
# Parent aca0d5c6b9605e3c56c401711daa20a9630c728b
added C primitive for blockcopy_p_s and function pointer creation for new type
diff -r aca0d5c6b960 -r f430bf4e179d source/common/pixel.cpp
--- a/source/common/pixel.cpp Mon Nov 04 17:30:15 2013 +0530
+++ b/source/common/pixel.cpp Mon Nov 04 18:14:38 2013 +0530
@@ -773,6 +773,21 @@
b += strideb;
}
}
+
+template<int bx, int by>
+void blockcopy_ps_c(pixel *a, intptr_t stridea, int16_t *b, intptr_t strideb)
+{
+ for (int y = 0; y < by; y++)
+ {
+ for (int x = 0; x < bx; x++)
+ {
+ a[x] = (pixel)b[x];
+ }
+
+ a += stridea;
+ b += strideb;
+ }
+}
} // end anonymous namespace
namespace x265 {
diff -r aca0d5c6b960 -r f430bf4e179d source/common/primitives.h
--- a/source/common/primitives.h Mon Nov 04 17:30:15 2013 +0530
+++ b/source/common/primitives.h Mon Nov 04 18:14:38 2013 +0530
@@ -213,6 +213,7 @@
typedef void (*filter_p2s_t)(pixel *src, intptr_t srcStride, int16_t *dst, int width, int height);
typedef void (*copy_pp_t)(pixel *dst, intptr_t dstride, pixel *src, intptr_t sstride); // dst is aligned
+typedef void (*copy_ps_t)(pixel *dst, intptr_t dstStride, int16_t *src, intptr_t srcStride);
/* Define a structure containing function pointers to optimized encoder
* primitives. Each pointer can reference either an assembly routine,
@@ -240,6 +241,8 @@
copy_pp_t luma_copy_pp[NUM_LUMA_PARTITIONS];
copy_pp_t chroma_copy_pp[NUM_CHROMA_PARTITIONS];
+ copy_ps_t luma_copy_ps[NUM_LUMA_PARTITIONS];
+ copy_ps_t chroma_copy_ps[NUM_CHROMA_PARTITIONS];
ipfilter_pp_t ipfilter_pp[NUM_IPFILTER_P_P];
ipfilter_ps_t ipfilter_ps[NUM_IPFILTER_P_S];
More information about the x265-devel
mailing list