1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:37:35 +00:00

LibVideo/VP9: Implement most of inter_frame_mode_info (6.4.11-6.4.14)

This commit is contained in:
FalseHonesty 2021-05-08 11:36:58 -04:00 committed by Andreas Kling
parent e687f05b42
commit 42fdaa7f60
4 changed files with 115 additions and 14 deletions

View file

@ -10,7 +10,8 @@
namespace Video::VP9 {
int TreeParser::parse_tree(SyntaxElementType type)
template<typename T>
T TreeParser::parse_tree(SyntaxElementType type)
{
auto tree_selection = select_tree(type);
int value;
@ -25,9 +26,15 @@ int TreeParser::parse_tree(SyntaxElementType type)
value = -n;
}
count_syntax_element(type, value);
return value;
return static_cast<T>(value);
}
template int TreeParser::parse_tree(SyntaxElementType);
template bool TreeParser::parse_tree(SyntaxElementType);
template u8 TreeParser::parse_tree(SyntaxElementType);
template IntraMode TreeParser::parse_tree(SyntaxElementType);
template TXSize TreeParser::parse_tree(SyntaxElementType);
/*
* Select a tree value based on the type of syntax element being parsed, as well as some parser state, as specified in section 9.3.1
*/