1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 18:15:07 +00:00
serenity/Userland/Libraries/LibVideo/VP9/MV.h
FalseHonesty d60bd42972 LibVideo/VP9: Implement MV reading & rectify MV storage issues
With this patch we are finally done with section 6.4.X of the spec :^)
The only parsing left to be done is 6.5.X, motion vector prediction.

Additionally, this patch fixes how MVs were being stored in the parser.
Originally, due to the spec naming two very different values very
similarly, these properties had totally wrong data types, but this has
now been rectified.
2021-07-10 21:28:56 +02:00

32 lines
572 B
C++

/*
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Types.h>
namespace Video::VP9 {
class MV {
public:
MV() = default;
MV(u32 row, u32 col);
u32 row() const { return m_row; }
void set_row(u32 row) { m_row = row; }
u32 col() const { return m_col; }
void set_col(u32 col) { m_col = col; }
MV& operator=(MV const& other);
MV& operator=(i32 value);
MV operator+(MV const& other) const;
private:
u32 m_row { 0 };
u32 m_col { 0 };
};
}