mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-12-18 03:04:06 +00:00
Fix coverity warning.
- Overflow from buggy implementation of modulo behavior for pattern_type. As there is no need for such behavior I removed it.
This commit is contained in:
parent
6234b09461
commit
1c3873f5b2
|
@ -218,6 +218,8 @@ unsigned tz_pattern_search(const encoder_state_t * const state, const image_t *p
|
||||||
|
|
||||||
vector2d_t mv_best = { 0, 0 };
|
vector2d_t mv_best = { 0, 0 };
|
||||||
|
|
||||||
|
assert(pattern_type < 4);
|
||||||
|
|
||||||
//implemented search patterns
|
//implemented search patterns
|
||||||
vector2d_t pattern[4][8] = {
|
vector2d_t pattern[4][8] = {
|
||||||
//diamond (8 points)
|
//diamond (8 points)
|
||||||
|
@ -282,12 +284,6 @@ unsigned tz_pattern_search(const encoder_state_t * const state, const image_t *p
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//make sure parameter pattern_type is within correct range
|
|
||||||
if (pattern_type > sizeof pattern - 1)
|
|
||||||
{
|
|
||||||
pattern_type = sizeof pattern - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//set the number of points to be checked
|
//set the number of points to be checked
|
||||||
if (iDist == 1)
|
if (iDist == 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue