[x265] [PATCH 1 of 3] Modify input buffer for check_pixel_sse_ss() in pixelharness.cpp (Testbench)
ramya at multicorewareinc.com
ramya at multicorewareinc.com
Wed Oct 14 11:36:35 CEST 2015
# HG changeset patch
# User Ramya Sriraman <ramya at multicorewareinc.com>
# Date 1444205526 -19800
# Wed Oct 07 13:42:06 2015 +0530
# Node ID 0ea631d6f87d4fc056da26ff94c6ffa1120e69bd
# Parent 4f3b58b4db8d6f10ec849ad9f2ab9be3cf12649a
Modify input buffer for check_pixel_sse_ss() in pixelharness.cpp (Testbench)
diff -r 4f3b58b4db8d -r 0ea631d6f87d source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp Wed Sep 30 11:22:16 2015 +0530
+++ b/source/test/pixelharness.cpp Wed Oct 07 13:42:06 2015 +0530
@@ -42,6 +42,7 @@
int_test_buff[0][i] = rand() % SHORT_MAX;
ushort_test_buff[0][i] = rand() % ((1 << 16) - 1);
uchar_test_buff[0][i] = rand() % ((1 << 8) - 1);
+ residual_test_buff[0][i] = (rand() % (2 * RMAX + 1)) - RMAX - 1;// For sse_ss only
pixel_test_buff[1][i] = PIXEL_MIN;
short_test_buff[1][i] = SMIN;
@@ -50,6 +51,7 @@
int_test_buff[1][i] = SHORT_MIN;
ushort_test_buff[1][i] = PIXEL_MIN;
uchar_test_buff[1][i] = PIXEL_MIN;
+ residual_test_buff[1][i] = RMIN;
pixel_test_buff[2][i] = PIXEL_MAX;
short_test_buff[2][i] = SMAX;
@@ -58,6 +60,7 @@
int_test_buff[2][i] = SHORT_MAX;
ushort_test_buff[2][i] = ((1 << 16) - 1);
uchar_test_buff[2][i] = 255;
+ residual_test_buff[2][i] = RMAX;
pbuf1[i] = rand() & PIXEL_MAX;
pbuf2[i] = rand() & PIXEL_MAX;
@@ -125,8 +128,8 @@
{
int index1 = rand() % TEST_CASES;
int index2 = rand() % TEST_CASES;
- sse_ret_t vres = (sse_ret_t)checked(opt, short_test_buff[index1], stride, short_test_buff[index2] + j, stride);
- sse_ret_t cres = ref(short_test_buff[index1], stride, short_test_buff[index2] + j, stride);
+ sse_ret_t vres = (sse_ret_t)checked(opt, residual_test_buff[index1], stride, residual_test_buff[index2] + j, stride);
+ sse_ret_t cres = ref(residual_test_buff[index1], stride, residual_test_buff[index2] + j, stride);
if (vres != cres)
return false;
diff -r 4f3b58b4db8d -r 0ea631d6f87d source/test/pixelharness.h
--- a/source/test/pixelharness.h Wed Sep 30 11:22:16 2015 +0530
+++ b/source/test/pixelharness.h Wed Oct 07 13:42:06 2015 +0530
@@ -41,6 +41,8 @@
enum { TEST_CASES = 3 };
enum { SMAX = 1 << 12 };
enum { SMIN = -1 << 12 };
+ enum { RMAX = PIXEL_MAX - PIXEL_MIN }; //The maximum value obtained by subtracting pixel values (residual max)
+ enum { RMIN = PIXEL_MIN - PIXEL_MAX }; //The minimum value obtained by subtracting pixel values (residual min)
ALIGN_VAR_32(pixel, pbuf1[BUFFSIZE]);
pixel pbuf2[BUFFSIZE];
@@ -65,6 +67,7 @@
uint16_t ushort_test_buff[TEST_CASES][BUFFSIZE];
uint8_t uchar_test_buff[TEST_CASES][BUFFSIZE];
double double_test_buff[TEST_CASES][BUFFSIZE];
+ int16_t residual_test_buff[TEST_CASES][BUFFSIZE];
bool check_pixelcmp(pixelcmp_t ref, pixelcmp_t opt);
bool check_pixel_sse(pixel_sse_t ref, pixel_sse_t opt);
More information about the x265-devel
mailing list