summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibVideo/VP9/MV.cpp
blob: ac01e03e9c2bb3c14f89457317f376bcb462e856 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include "MV.h"

namespace Video::VP9 {

MV::MV(u32 row, u32 col)
    : m_row(row)
    , m_col(col)
{
}

MV& MV::operator=(MV const& other)
{
    if (this == &other)
        return *this;
    m_row = other.row();
    m_col = other.col();
    return *this;
}

MV& MV::operator=(i32 value)
{
    m_row = value;
    m_col = value;
    return *this;
}

MV MV::operator+(MV const& other) const
{
    return MV(this->row() + other.row(), this->col() + other.col());
}

}