Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictorien Le Couviour--Tuffet <victorien@videolan.org>2021-09-23 11:09:26 +0300
committerVictorien Le Couviour--Tuffet <victorien@videolan.org>2021-10-29 23:18:20 +0300
commit609fbaba84b8e15a25de9efbc8b14988be6df94d (patch)
tree2e39c4a0eb40ce94085ed7c8d8747683e14be927 /src/internal.h
parent8e6d5214a356dfc91c09468ac7473d8a66bf26cd (diff)
Allow CDEF and LR to run sbrows in parallel
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/internal.h b/src/internal.h
index d389906..f3cba13 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -175,6 +175,7 @@ enum TaskType {
DAV1D_TASK_TYPE_SUPER_RESOLUTION,
DAV1D_TASK_TYPE_LOOP_RESTORATION,
DAV1D_TASK_TYPE_ENTROPY_PROGRESS,
+ DAV1D_TASK_TYPE_RECONSTRUCTION_PROGRESS,
};
struct Dav1dTask {
@@ -183,7 +184,7 @@ struct Dav1dTask {
int sby; // sbrow
// task dependencies
- int recon_progress, deblock_progress, cdef_progress, lr_progress;
+ int recon_progress, deblock_progress;
int deps_skip;
struct Dav1dTask *next; // only used in task queue
};
@@ -226,7 +227,7 @@ struct Dav1dFrameContext {
filter_sbrow_fn filter_sbrow;
filter_sbrow_fn filter_sbrow_deblock_cols;
filter_sbrow_fn filter_sbrow_deblock_rows;
- filter_sbrow_fn filter_sbrow_cdef;
+ void (*filter_sbrow_cdef)(Dav1dTaskContext *tc, int sby);
filter_sbrow_fn filter_sbrow_resize;
filter_sbrow_fn filter_sbrow_lr;
backup_ipred_edge_fn backup_ipred_edge;
@@ -248,7 +249,8 @@ struct Dav1dFrameContext {
struct {
int next_tile_row[2 /* 0: reconstruction, 1: entropy */];
int entropy_progress;
- atomic_int deblock_progress, cdef_progress, lr_progress; // in sby units
+ atomic_int deblock_progress; // in sby units
+ atomic_uint *frame_progress, *copy_lpf_progress;
// indexed using t->by * f->b4_stride + t->bx
Av1Block *b;
struct CodedBlockInfo {
@@ -260,6 +262,7 @@ struct Dav1dFrameContext {
// iterated over inside tile state
uint8_t *pal_idx;
coef *cf;
+ int prog_sz;
int pal_sz, pal_idx_sz, cf_sz;
// start offsets per tile
int *tile_start_off;
@@ -270,21 +273,23 @@ struct Dav1dFrameContext {
uint8_t (*level)[4];
Av1Filter *mask;
Av1Restoration *lr_mask;
- int top_pre_cdef_toggle;
- int mask_sz /* w*h */, lr_mask_sz, cdef_line_sz[2] /* stride */;
- size_t lr_plane_sz; /* w*sbh*4*is_sb128 if n_tc > 1, else w*12 */
+ int mask_sz /* w*h */, lr_mask_sz;
+ int cdef_buf_plane_sz[2]; /* stride*sbh*4 */
+ int lr_buf_plane_sz[2]; /* (stride*sbh*4) << sb128 if n_tc > 1, else stride*4 */
int re_sz /* h */;
ALIGN(Av1FilterLUT lim_lut, 16);
int last_sharpness;
uint8_t lvl[8 /* seg_id */][4 /* dir */][8 /* ref */][2 /* is_gmv */];
uint8_t *tx_lpf_right_edge[2];
- uint8_t *cdef_line_buf;
+ uint8_t *cdef_line_buf, *lr_line_buf;
pixel *cdef_line[2 /* pre, post */][3 /* plane */];
+ pixel *cdef_lpf_line[3 /* plane */];
pixel *lr_lpf_line[3 /* plane */];
// in-loop filter per-frame state keeping
uint8_t *start_of_tile_row;
int start_of_tile_row_sz;
+ int need_cdef_lpf_copy;
pixel *p[3], *sr_p[3];
Av1Filter *mask_ptr, *prev_mask_ptr;
int restore_planes; // enum LrRestorePlanes
@@ -403,6 +408,7 @@ struct Dav1dTaskContext {
Dav1dWarpedMotionParams warpmv;
Av1Filter *lf_mask;
+ int top_pre_cdef_toggle;
int8_t *cur_sb_cdef_idx_ptr;
// for chroma sub8x8, we need to know the filter for all 4 subblocks in
// a 4x4 area, but the top/left one can go out of cache already, so this