shithub: openh264

Download patch

ref: 66b16101149de113014b2871d4b1b037534905b8
parent: 3b5448cbbcea4a7defd470842eaa538258b04593
parent: ec0d151879f77f80a75b1f289320e30818578a3e
author: sijchen <sijchen@cisco.com>
date: Fri Oct 31 09:50:10 EDT 2014

Merge pull request #1472 from mstorsjo/fix-test-random

Make sure the width/height is large enough in SetOptionEncParamExt

--- a/test/api/encode_decode_api_test.cpp
+++ b/test/api/encode_decode_api_test.cpp
@@ -1985,8 +1985,8 @@
 
 
 TEST_F (EncodeDecodeTestAPI, SetOptionEncParamExt) {
-  int iWidth       = WELS_CLIP3 ((((rand() % MAX_WIDTH) >> 1) + 1) << 1,  2, MAX_WIDTH);
-  int iHeight      = WELS_CLIP3 ((((rand() % MAX_HEIGHT) >> 1) + 1) << 1, 2, MAX_HEIGHT);
+  int iWidth       = (((rand() % MAX_WIDTH) >> 1) + 16) << 1;
+  int iHeight      = (((rand() % MAX_HEIGHT) >> 1) + 16) << 1;
   float fFrameRate = rand() + 0.5f;
   int iEncFrameNum = WELS_CLIP3 ((rand() % ENCODE_FRAME_NUM) + 1, 1, ENCODE_FRAME_NUM);
   int iSpatialLayerNum = 4;