mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:22:45 +00:00 
			
		
		
		
	 d60bd42972
			
		
	
	
		d60bd42972
		
	
	
	
	
		
			
			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.
		
			
				
	
	
		
			38 lines
		
	
	
	
		
			582 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
	
		
			582 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * 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());
 | |
| }
 | |
| 
 | |
| }
 |