[x265] [PATCH] C primitive for blockcopy_ss
murugan at multicorewareinc.com
murugan at multicorewareinc.com
Thu Mar 6 15:26:28 CET 2014
# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1394103789 -19800
# Thu Mar 06 16:33:09 2014 +0530
# Node ID f2fe08b5472fb3b1b47beac2e04e68c783d98836
# Parent ba92d06951162b20af133384f87234f7c6fd67ea
C primitive for blockcopy_ss
diff -r ba92d0695116 -r f2fe08b5472f source/common/pixel.cpp
--- a/source/common/pixel.cpp Wed Mar 05 21:32:47 2014 -0600
+++ b/source/common/pixel.cpp Thu Mar 06 16:33:09 2014 +0530
@@ -741,6 +741,21 @@
}
template<int bx, int by>
+void blockcopy_ss_c(int16_t *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] = b[x];
+ }
+
+ a += stridea;
+ b += strideb;
+ }
+}
+
+template<int bx, int by>
void blockcopy_sp_c(pixel *a, intptr_t stridea, int16_t *b, intptr_t strideb)
{
for (int y = 0; y < by; y++)
@@ -892,6 +907,7 @@
p.chroma[X265_CSP_I420].copy_pp[CHROMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
p.chroma[X265_CSP_I420].copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>; \
p.chroma[X265_CSP_I420].copy_ps[CHROMA_ ## W ## x ## H] = blockcopy_ps_c<W, H>; \
+ p.chroma[X265_CSP_I420].copy_ss[CHROMA_ ## W ## x ## H] = blockcopy_ss_c<W, H>; \
p.chroma[X265_CSP_I420].sub_ps[CHROMA_ ## W ## x ## H] = pixel_sub_ps_c<W, H>; \
p.chroma[X265_CSP_I420].add_ps[CHROMA_ ## W ## x ## H] = pixel_add_ps_c<W, H>;
@@ -900,6 +916,7 @@
p.chroma[X265_CSP_I444].copy_pp[LUMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
p.chroma[X265_CSP_I444].copy_sp[LUMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>; \
p.chroma[X265_CSP_I444].copy_ps[LUMA_ ## W ## x ## H] = blockcopy_ps_c<W, H>; \
+ p.chroma[X265_CSP_I444].copy_ss[LUMA_ ## W ## x ## H] = blockcopy_ss_c<W, H>; \
p.chroma[X265_CSP_I444].sub_ps[LUMA_ ## W ## x ## H] = pixel_sub_ps_c<W, H>; \
p.chroma[X265_CSP_I444].add_ps[LUMA_ ## W ## x ## H] = pixel_add_ps_c<W, H>;
@@ -908,6 +925,7 @@
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_ps[LUMA_ ## W ## x ## H] = blockcopy_ps_c<W, H>; \
+ p.luma_copy_ss[LUMA_ ## W ## x ## H] = blockcopy_ss_c<W, H>; \
p.luma_sub_ps[LUMA_ ## W ## x ## H] = pixel_sub_ps_c<W, H>; \
p.luma_add_ps[LUMA_ ## W ## x ## H] = pixel_add_ps_c<W, H>;
diff -r ba92d0695116 -r f2fe08b5472f source/common/primitives.h
--- a/source/common/primitives.h Wed Mar 05 21:32:47 2014 -0600
+++ b/source/common/primitives.h Thu Mar 06 16:33:09 2014 +0530
@@ -182,6 +182,7 @@
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 (*copy_ps_t)(int16_t *dst, intptr_t dstStride, pixel *src, intptr_t srcStride);
+typedef void (*copy_ss_t)(int16_t *dst, intptr_t dstStride, int16_t *src, intptr_t srcStride);
typedef void (*pixel_sub_ps_t)(int16_t *dst, intptr_t dstride, pixel *src0, pixel *src1, intptr_t sstride0, intptr_t sstride1);
typedef void (*pixel_add_ps_t)(pixel *a, intptr_t dstride, pixel *b0, int16_t *b1, intptr_t sstride0, intptr_t sstride1);
@@ -213,6 +214,7 @@
copy_pp_t luma_copy_pp[NUM_LUMA_PARTITIONS];
copy_sp_t luma_copy_sp[NUM_LUMA_PARTITIONS];
copy_ps_t luma_copy_ps[NUM_LUMA_PARTITIONS];
+ copy_ss_t luma_copy_ss[NUM_LUMA_PARTITIONS];
pixel_sub_ps_t luma_sub_ps[NUM_LUMA_PARTITIONS];
pixel_add_ps_t luma_add_ps[NUM_LUMA_PARTITIONS];
@@ -269,6 +271,7 @@
copy_pp_t copy_pp[NUM_LUMA_PARTITIONS];
copy_sp_t copy_sp[NUM_LUMA_PARTITIONS];
copy_ps_t copy_ps[NUM_LUMA_PARTITIONS];
+ copy_ss_t copy_ss[NUM_LUMA_PARTITIONS];
pixel_sub_ps_t sub_ps[NUM_LUMA_PARTITIONS];
pixel_add_ps_t add_ps[NUM_LUMA_PARTITIONS];
addAvg_t addAvg[NUM_LUMA_PARTITIONS];
More information about the x265-devel
mailing list