shithub: openh264

Download patch

ref: 95ac333f3bf2a915ef2736888e695f1b284b3660
parent: 6489e7b38ad852a20f87214571fac382150dee62
parent: 9b753c9c3922b040ca1cd0c87b05343c19f941bf
author: dongzha <dongzha@cisco.com>
date: Tue Jul 8 08:51:51 EDT 2014

Merge pull request #1097 from dongzha/FixRecUT

add reconstruct UT input limitation

--- a/test/encoder/EncUT_Reconstruct.cpp
+++ b/test/encoder/EncUT_Reconstruct.cpp
@@ -248,7 +248,7 @@
     uint8_t uiQp = rand() % 52;
     FillWithRandomData ((uint8_t*)pInput[0], 32);
     for (int32_t i = 0 ; i < 16; i++) {
-      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32640, 32640);
+      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32000, 32000);
     }
     memcpy ((uint8_t*)pInput[1], (uint8_t*)pInput[0], 32);
 
@@ -278,7 +278,7 @@
     uint8_t uiQp = rand() % 52;
     FillWithRandomData ((uint8_t*)pInput[0], 32);
     for (int32_t i = 0 ; i < 16; i++) {
-      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32640, 32640);
+      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32000, 32000);
     }
     memcpy ((uint8_t*)pInput[1], (uint8_t*)pInput[0], 32);
 
@@ -307,7 +307,7 @@
     uint8_t uiQp = rand() % 52;
     FillWithRandomData ((uint8_t*)pInput[0], 32);
     for (int32_t i = 0 ; i < 16; i++) {
-      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32640, 32640);
+      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32000, 32000);
     }
     memcpy ((uint8_t*)pInput[1], (uint8_t*)pInput[0], 32);
 
@@ -334,7 +334,7 @@
     uint8_t uiQp = rand() % 52;
     FillWithRandomData ((uint8_t*)pInput[0], 32);
     for (int32_t i = 0 ; i < 16; i++) {
-      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32640, 32640);
+      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32000, 32000);
     }
     memcpy ((uint8_t*)pInput[1], (uint8_t*)pInput[0], 32);
 
@@ -360,7 +360,7 @@
     uint8_t uiQp = rand() % 52;
     FillWithRandomData ((uint8_t*)pInput[0], 128);
     for (int32_t i = 0 ; i < 64; i++) {
-      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32640, 32640);
+      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32000, 32000);
     }
     memcpy ((uint8_t*)pInput[1], (uint8_t*)pInput[0], 128);
 
@@ -387,7 +387,7 @@
     uint8_t uiQp = rand() % 52;
     FillWithRandomData ((uint8_t*)pInput[0], 128);
     for (int32_t i = 0 ; i < 64; i++) {
-      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32640, 32640);
+      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32000, 32000);
     }
     memcpy ((uint8_t*)pInput[1], (uint8_t*)pInput[0], 128);
 
@@ -414,7 +414,7 @@
     uint8_t uiQp = rand() % 52;
     FillWithRandomData ((uint8_t*)pInput[0], 128);
     for (int32_t i = 0 ; i < 64; i++) {
-      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32640, 32640);
+      pInput[0][i] = WELS_CLIP3 (pInput[0][i], -32000, 32000);
     }
     memcpy ((uint8_t*)pInput[1], (uint8_t*)pInput[0], 128);