diff options
Diffstat (limited to '')
-rw-r--r-- | third_party/dav1d/src/cdf.h | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/third_party/dav1d/src/cdf.h b/third_party/dav1d/src/cdf.h index 4b30474baa..c9b516dc72 100644 --- a/third_party/dav1d/src/cdf.h +++ b/third_party/dav1d/src/cdf.h @@ -34,12 +34,10 @@ #include "src/ref.h" #include "src/thread_data.h" -/* Buffers padded to [8] or [16] for SIMD where needed. */ +/* Buffers padded to [4]/[8]/[16] for SIMD where needed. */ typedef struct CdfModeContext { - ALIGN(uint16_t y_mode[4][N_INTRA_PRED_MODES + 3], 32); ALIGN(uint16_t uv_mode[2][N_INTRA_PRED_MODES][N_UV_INTRA_PRED_MODES + 2], 32); - ALIGN(uint16_t wedge_idx[9][16], 32); ALIGN(uint16_t partition[N_BL_LEVELS][4][N_PARTITIONS + 6], 32); ALIGN(uint16_t cfl_alpha[6][16], 32); ALIGN(uint16_t txtp_inter1[2][16], 32); @@ -49,23 +47,33 @@ typedef struct CdfModeContext { ALIGN(uint16_t cfl_sign[8], 16); ALIGN(uint16_t angle_delta[8][8], 16); ALIGN(uint16_t filter_intra[5 + 3], 16); - ALIGN(uint16_t comp_inter_mode[8][N_COMP_INTER_PRED_MODES], 16); ALIGN(uint16_t seg_id[3][DAV1D_MAX_SEGMENTS], 16); ALIGN(uint16_t pal_sz[2][7][7 + 1], 16); ALIGN(uint16_t color_map[2][7][5][8], 16); - ALIGN(uint16_t filter[2][8][DAV1D_N_SWITCHABLE_FILTERS + 1], 8); ALIGN(uint16_t txsz[N_TX_SIZES - 1][3][4], 8); - ALIGN(uint16_t motion_mode[N_BS_SIZES][3 + 1], 8); ALIGN(uint16_t delta_q[4], 8); ALIGN(uint16_t delta_lf[5][4], 8); - ALIGN(uint16_t interintra_mode[4][4], 8); ALIGN(uint16_t restore_switchable[3 + 1], 8); ALIGN(uint16_t restore_wiener[2], 4); ALIGN(uint16_t restore_sgrproj[2], 4); - ALIGN(uint16_t interintra[7][2], 4); - ALIGN(uint16_t interintra_wedge[7][2], 4); ALIGN(uint16_t txtp_inter3[4][2], 4); ALIGN(uint16_t use_filter_intra[N_BS_SIZES][2], 4); + ALIGN(uint16_t txpart[7][3][2], 4); + ALIGN(uint16_t skip[3][2], 4); + ALIGN(uint16_t pal_y[7][3][2], 4); + ALIGN(uint16_t pal_uv[2][2], 4); + + /* key/intra */ + ALIGN(uint16_t intrabc[2], 4); + + /* inter/switch */ + ALIGN(uint16_t y_mode[4][N_INTRA_PRED_MODES + 3], 32); + ALIGN(uint16_t wedge_idx[9][16], 32); + ALIGN(uint16_t comp_inter_mode[8][N_COMP_INTER_PRED_MODES], 16); + ALIGN(uint16_t filter[2][8][DAV1D_N_SWITCHABLE_FILTERS + 1], 8); + ALIGN(uint16_t interintra_mode[4][4], 8); + ALIGN(uint16_t motion_mode[N_BS_SIZES][3 + 1], 8); + ALIGN(uint16_t skip_mode[3][2], 4); ALIGN(uint16_t newmv_mode[6][2], 4); ALIGN(uint16_t globalmv_mode[2][2], 4); ALIGN(uint16_t refmv_mode[6][2], 4); @@ -80,14 +88,10 @@ typedef struct CdfModeContext { ALIGN(uint16_t comp_fwd_ref[3][3][2], 4); ALIGN(uint16_t comp_bwd_ref[2][3][2], 4); ALIGN(uint16_t comp_uni_ref[3][3][2], 4); - ALIGN(uint16_t txpart[7][3][2], 4); - ALIGN(uint16_t skip[3][2], 4); - ALIGN(uint16_t skip_mode[3][2], 4); ALIGN(uint16_t seg_pred[3][2], 4); + ALIGN(uint16_t interintra[7][2], 4); + ALIGN(uint16_t interintra_wedge[7][2], 4); ALIGN(uint16_t obmc[N_BS_SIZES][2], 4); - ALIGN(uint16_t pal_y[7][3][2], 4); - ALIGN(uint16_t pal_uv[2][2], 4); - ALIGN(uint16_t intrabc[2], 4); } CdfModeContext; typedef struct CdfCoefContext { @@ -108,13 +112,13 @@ typedef struct CdfCoefContext { typedef struct CdfMvComponent { ALIGN(uint16_t classes[11 + 5], 32); + ALIGN(uint16_t sign[2], 4); + ALIGN(uint16_t class0[2], 4); ALIGN(uint16_t class0_fp[2][4], 8); - ALIGN(uint16_t classN_fp[4], 8); ALIGN(uint16_t class0_hp[2], 4); - ALIGN(uint16_t classN_hp[2], 4); - ALIGN(uint16_t class0[2], 4); ALIGN(uint16_t classN[10][2], 4); - ALIGN(uint16_t sign[2], 4); + ALIGN(uint16_t classN_fp[4], 8); + ALIGN(uint16_t classN_hp[2], 4); } CdfMvComponent; typedef struct CdfMvContext { @@ -123,10 +127,10 @@ typedef struct CdfMvContext { } CdfMvContext; typedef struct CdfContext { + CdfCoefContext coef; CdfModeContext m; + CdfMvContext mv; ALIGN(uint16_t kfym[5][5][N_INTRA_PRED_MODES + 3], 32); - CdfCoefContext coef; - CdfMvContext mv, dmv; } CdfContext; typedef struct CdfThreadContext { @@ -138,7 +142,7 @@ typedef struct CdfThreadContext { atomic_uint *progress; } CdfThreadContext; -void dav1d_cdf_thread_init_static(CdfThreadContext *cdf, int qidx); +void dav1d_cdf_thread_init_static(CdfThreadContext *cdf, unsigned qidx); int dav1d_cdf_thread_alloc(Dav1dContext *c, CdfThreadContext *cdf, const int have_frame_mt); void dav1d_cdf_thread_copy(CdfContext *dst, const CdfThreadContext *src); |