mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-28 03:34:06 +00:00
Fix coverity warning.
- False positive about buffer overrun due to thinking work_tree_copy_up could be called with depth == 4.
This commit is contained in:
parent
cf2a406aba
commit
ed670f4185
|
@ -1221,6 +1221,8 @@ static int search_cu_inter(const encoder_state_t * const state, int x, int y, in
|
||||||
*/
|
*/
|
||||||
static void work_tree_copy_up(int x_px, int y_px, int depth, lcu_t work_tree[MAX_PU_DEPTH + 1])
|
static void work_tree_copy_up(int x_px, int y_px, int depth, lcu_t work_tree[MAX_PU_DEPTH + 1])
|
||||||
{
|
{
|
||||||
|
assert(depth >= 0 && depth < MAX_PU_DEPTH);
|
||||||
|
|
||||||
// Copy non-reference CUs.
|
// Copy non-reference CUs.
|
||||||
{
|
{
|
||||||
const int x_cu = SUB_SCU(x_px) >> MAX_DEPTH;
|
const int x_cu = SUB_SCU(x_px) >> MAX_DEPTH;
|
||||||
|
@ -1274,6 +1276,8 @@ static void work_tree_copy_up(int x_px, int y_px, int depth, lcu_t work_tree[MAX
|
||||||
*/
|
*/
|
||||||
static void work_tree_copy_down(int x_px, int y_px, int depth, lcu_t work_tree[MAX_PU_DEPTH + 1])
|
static void work_tree_copy_down(int x_px, int y_px, int depth, lcu_t work_tree[MAX_PU_DEPTH + 1])
|
||||||
{
|
{
|
||||||
|
assert(depth >= 0 && depth < MAX_PU_DEPTH);
|
||||||
|
|
||||||
// TODO: clean up to remove the copy pasta
|
// TODO: clean up to remove the copy pasta
|
||||||
const int width_px = LCU_WIDTH >> depth;
|
const int width_px = LCU_WIDTH >> depth;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue