mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:17:45 +00:00
LibVideo: Implement inter prediction
This enables the second frame of the test video to be decoded. It appears that the test video uses a superframe (group of multiple frames) for the first chunk of the file, but we haven't implemented superframe parsing. We also ignore the show_frame flag, so for now, this means that the second frame read out is shown when it should not be. To fix this, another error type needs to be implemented that is "thrown" to decoder's client so they know to send another sample buffer.
This commit is contained in:
parent
50d4217dbc
commit
b0187dfc27
6 changed files with 487 additions and 51 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
|
||||
* Copyright (c) 2022, Gregory Bertilson<zaggy1024@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -59,11 +60,14 @@ namespace Video::VP9 {
|
|||
#define COMPANDED_MVREF_THRESH 8
|
||||
#define MAX_LOOP_FILTER 63
|
||||
#define REF_SCALE_SHIFT 14
|
||||
// Number of bits of precision when performing inter prediction.
|
||||
#define SUBPEL_BITS 4
|
||||
#define SUBPEL_SHIFTS 16
|
||||
#define SUBPEL_MASH 15
|
||||
#define SUBPEL_MASK 15
|
||||
#define MV_BORDER 128
|
||||
// Value used when clipping motion vectors.
|
||||
#define INTERP_EXTEND 4
|
||||
// Value used when clipping motion vectors.
|
||||
#define BORDERINPIXELS 160
|
||||
#define MAX_UPDATE_FACTOR 128
|
||||
#define COUNT_SAT 20
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue