History

exception case for width or height is less than 16

karina li committed 11 years ago

Commit 2c830e61 parent c48f47a2 files · +9 −4Browse files

Showing the changes to test/encoder/EncUT_EncoderExt.cpp (1 of 2 files). Show all

Unified · Split

test/encoder/EncUT_EncoderExt.cpp+5−4
@@ -10,7 +10,7 @@ class EncoderInterfaceTest : public ::testing::Test { · 9 unmodified lines
1010 #define MB_SIZE (16)
1111 #define MAX_WIDTH (3840)
1212 #define MAX_HEIGHT (2160)
13−#define VALID_SIZE(iSize) (((iSize)>1)?(iSize):1)
13+#define VALID_SIZE(iSize) (((iSize)>16)?(iSize):16)
1414 #define MEM_VARY_SIZE (512)
1515 #define IMAGE_VARY_SIZE (512)
1616 #define TEST_FRAMES (30)
@@ -87,9 +87,10 @@ void EncoderInterfaceTest::PrepareOneSrcFrame() { · 70 unmodified lines
8787 pSrcPic->uiTimeStamp = 0;
8888 pSrcPic->iPicWidth = pParamExt->iPicWidth;
8989 pSrcPic->iPicHeight = pParamExt->iPicHeight;
90−
91− m_iWidth = pParamExt->iPicWidth;
92− m_iHeight = pParamExt->iPicHeight;
90+ pSrcPic->iPicWidth = VALID_SIZE (pParamExt->iPicWidth);
91+ pSrcPic->iPicHeight = VALID_SIZE (pParamExt->iPicHeight);
92+ m_iWidth = pSrcPic->iPicWidth;
93+ m_iHeight = pSrcPic->iPicHeight;
9394 m_iPicResSize = m_iWidth * m_iHeight * 3 >> 1;
9495
9596 pYUV[0] = rand() % 256;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t