| 169 | //TEST cases followed |
| 170 | |
| 171 | TEST (PredMvTest, PredMv) { |
| 172 | SWelsMvPred sWelsMvPred; |
| 173 | SAnchorMvPred sAncMvPred; |
| 174 | int32_t i, iRef, iBlockWidth, iIndex; |
| 175 | const int32_t kiRandTime = 100; |
| 176 | bool bOK = true; |
| 177 | |
| 178 | //test specific input: 16x16 |
| 179 | iIndex = 0; |
| 180 | iBlockWidth = 4; |
| 181 | i = 0; |
| 182 | while (i++ < kiRandTime) { |
| 183 | iRef = (rand() % 18) - 2; //-2~15 |
| 184 | INIT_MV_DATA; |
| 185 | TEST_MV_PRED; |
| 186 | } |
| 187 | //test specific input: 16x8 |
| 188 | iBlockWidth = 4; |
| 189 | i = 0; |
| 190 | while (i++ < kiRandTime) { |
| 191 | iIndex = (rand() & 1) << 3; //0,8 |
| 192 | iRef = (rand() % 18) - 2; //-2~15 |
| 193 | INIT_MV_DATA; |
| 194 | TEST_MV_PRED; |
| 195 | } |
| 196 | //test specific input: 8x16 |
| 197 | iBlockWidth = 2; |
| 198 | i = 0; |
| 199 | while (i++ < kiRandTime) { |
| 200 | iIndex = (rand() & 1) << 2; //0,4 |
| 201 | iRef = (rand() % 18) - 2; //-2~15 |
| 202 | INIT_MV_DATA; |
| 203 | TEST_MV_PRED; |
| 204 | } |
| 205 | //test specific input: 8x8 |
| 206 | iBlockWidth = 2; |
| 207 | i = 0; |
| 208 | while (i++ < kiRandTime) { |
| 209 | iIndex = (rand() & 3) << 2; //0,4,8,12 |
| 210 | iRef = (rand() % 18) - 2; //-2~15 |
| 211 | INIT_MV_DATA; |
| 212 | TEST_MV_PRED; |
| 213 | } |
| 214 | //test specific input: 4x4 |
| 215 | iBlockWidth = 1; |
| 216 | i = 0; |
| 217 | while (i++ < kiRandTime) { |
| 218 | iIndex = rand() & 0x0f; //0~15 |
| 219 | iRef = (rand() % 18) - 2; //-2~15 |
| 220 | INIT_MV_DATA; |
| 221 | TEST_MV_PRED; |
| 222 | } |
| 223 | } //TEST PredMv |
| 224 | |
| 225 | |
| 226 | TEST (PredMvTest, PredInter16x8Mv) { |
no test coverage detected